Licenses : Code under LGPL v2.1 / Textures under CC-BY-SA
Dependancies : default, 3d_armor (optional)
LATE: Download | Browse code | API Documentation
Extra impacts: Download | Browse code
Demo mod: Download | Browse code
Introduction
LATE allows an easy creation of combinable, temporary effects on various targets:
Easy creation: Effects are easy to create. Most of the time, few more entries in item or node table definition will do the job.
Various targets: LATE effects can affect players and mobs, with the same API.
Combinable: All effects created by LATE can be combined to each other without conflicts. LATE takes in charge effect mixing to give a coherent result.
Temporary: LATE manages temporary effects, not instant effects. Effects lasts for a given time duration or as long as given condition are fulfilled (equiped with item, near node). Effect intensity can smoothly raise and fall.
Extensible: New effect impact types can be defined and registered, increasing variety of effects.
A quick example using LATE to create magic items:
Code: Select all
-- Speed boots (run three times faster)
minetest.register_tool("mymod:speed_boots", {
description = "Speed boots",
inventory_image = "mymod_boots.png",
effect_equip = { impacts = { speed=3 } },
})
-- Invisibility potion (gives invisibility for 20 seconds)
minetest.register_tool("mymod:invisibility_potion", {
description = "Invisibility potion",
inventory_image = "mymod_potion.png",
effect_use = { impacts = { texture = { opacity = 0 } }, duration = 20 },
})
-- Solar stone (always day 15 nodes around)
minetest.register_node("mymod:solar_stone", {
description = "Solar stone",
...
effect_near = { impacts = { daylight = 1 }, distance = 15, raise = 2, fall = 1},
})
On players:
- Speed change
- Jump height change
- Gravity change
- Daylight change
- Body color and opacity
- Damage (or heal)
- Hud display of ongoing effects
- Effect cancellation and antidote
- Several effects on items and nodes
- More impact types
- Effects on world itself (perceptible by all players)
- Persistance of effects on mobs on server restart (now only player effects persist)
- Conditions registration for adding custom conditions
- Node effect intensity according to node distance
LATE is not the first mod dealing with temporary effect and effect mixing.
Player Effects by Wuzzy (forum/git) is very good mod to manage temporary effect and it was my main source of inspiration. It does not offer combinable effects but it can be used along with Player Monoids.
Player Monoids by Byakuren (forum/git) offers a way to combine impacts on players in various way. Used with Player Effects, it gives something close to LATE mod.
Why developing LATE then ? Because it adds a few more things:
- Very simple way to create effects and associate them to items and nodes.
- Effects on mobs.
- Effect intensity variation in time.
- Fully associative combination of effects (actually a restriction, but allows having same cumulated result regardless of order of the effects)
Inspiration and thanks
I wanted to thanks the authors of these four mod and these aditional ones from which I took some inspiration too:
- Admin toys by wilkgr76
- Whitchcraft by D00Med
- Invisibility Potion by TenPlus1
- Invisibility Command by octacian
- Incognito by ChimneySwift
- Flying carpet by Wuzzy
- Player Effects Potions by Wuzzy
I hope being enough clear in my writtings. English is not my native language and some concepts may not easy to describe.