Hardcoded things to watch for
Posted: Sun Oct 21, 2012 6:22 pm
There are a number of things that are hard-coded and don't seem to have obvious hooks in the asset pack. For example, the goromorg's shield and the necklace that gives you bonus xp gain. Does the engine use the item names to determine this (e.g. will a monster called 'goromorg' always have a shield, any any monster not called 'goromorg' will not?). Similarly, the glowing orb is an item that provides light when equipped but is not a torch (all torch-class items have their graphics replaced dynamically by a torch icon, since thats how the engine displays the current fuel level I guess) - I'm pretty sure thats also a hard-coded effect, since cloning it doesn't create an item that glows.
Do you think it'd be worth accumulating a list of all the hard-coded effects in the engine and the names that produce them? We could have links along-side with solutions to achieve the effects via non-hardcoded means when possible (e.g. for the bonus xp necklace you could add something in the onDeath hook of every monster to grant that xp manually, and for the glowing orb you could have a 1-second timer that spawns an fx lightsource on the party or even do something using the party's onMove to save on the constant creation/destruction of fx objects), and so on.
List so far
Items
Do you think it'd be worth accumulating a list of all the hard-coded effects in the engine and the names that produce them? We could have links along-side with solutions to achieve the effects via non-hardcoded means when possible (e.g. for the bonus xp necklace you could add something in the onDeath hook of every monster to grant that xp manually, and for the glowing orb you could have a 1-second timer that spawns an fx lightsource on the party or even do something using the party's onMove to save on the constant creation/destruction of fx objects), and so on.
List so far
Items
- glowing_orb: Acts as a lightsource.
assassin_dagger: Lifedrain effect
skull: Headhunter trait. viewtopic.php?f=14&t=3839#p39568
spirit_mirror_pendant: XP boost
Torch class: the gfxIcon is always overridden to display a torch icon for the current fuel level
Mortar-in-container: viewtopic.php?f=14&t=3839#p39523
Container slots: viewtopic.php?f=14&t=3839#p39594
- Goromorg: Shield effect
- Original spells are hard-coded by name. viewtopic.php?f=14&t=3839#p39532