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.
- The only container that can be inserted manually to another container(chest or sack) is mortar, and it's restricted by name (not containertype as it should be) because cloned mortars can't be inserted to another container. You can add any container to another container from script though by using item:addItem(item). Btw. For some reason item:addItem is undocumented.
- You can't override containers onUseItem-hook. If you do, the container will not open no matter what value the hook returns.
This will attempt to cast the original Ice Shards spell. Several people have tried to define new spells that use the ice shards ranged effect (say for a fire based spell), but to no avail.
Is skull bonus hardcoded as well? I tried to make tribal painted skull some time ago which would give some Energy/Will bonuses but still count as a skull for a Head Hunter (an item suitable especially for those rare minotaur mages, but also usefull for other minotaurs and non-minotaur mages). But sadly the skull seemed to lost its Head Hunter bonus.
This is an excellent idea to make this kind of listing ! It should be helpful to every modder out there...
While making some quick tests with containers, I have spotted another thing that seams to be hardcoded in some way, at least adding limits to what you can do.
If you make a new chest class container, you cannot make it with more than the default of 12 slots.
You can make a chest with a lower number of slots, say 8 or 10, but the GUI is measleading since it displays all 12 slots while enabling slots up to the number you have specified.
If you have specified 10 slots for your chest, you would have 10 useable slots with 12 displayed and you cannot interact and put items in the last two slots in the GUI.
The sack class of containers works with the same constraints but with a maximum of 6 slots.
Slots numbers also has to be an even number.
When opening a container in the dungeon preview with an odd number of slots or with more slots than the limit it crash the editor.
I don't know if it would crash the game in a compiled dungeon but i guess it would.
I have not tested new graphics yet to see if you can reproduce the icon effect for sacks containing objects (the icon change), but i have not been able to see this feature anywhere in the asset pack for this.
It could or could not be hardcoded as well.
This is an old thread but it touches on my question -
I have a 'Blazing Runelantern' item in Labyrinth of Lies (similar to the goromorg lantern but it emits a torch light effect)
In the definition I have placed -
torch = true,
fuel = math.huge,
I can see that as soon as it is equipped in any slot - the icon is overridden (as is mentioned in the original post)
I have tried to place icons in gfx 131 - 135 of my atlas but this does not seem to work
Healing crystals all use the "healing_crystal" material. But, you can change the material and the change applies (of course, to all crystals).
Sounds used in pits (and probably others) are hardcoded. But, you can change the sound and the change applies (of course, to all pits). One easy hack is to use a silent wav file as a sound for pits and everytime a pit is opened/closed, play a custom sound by script (I did this in my mod).