.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Spell-modding limits, and a workaround of sorts (http://forum.shrapnelgames.com/showthread.php?t=37548)

Endoperez January 30th, 2008 02:02 PM

Spell-modding limits, and a workaround of sorts
 
The last spellnr that works at all is 1023. However, right-click view (fatigue, effect, description etc) of spells numbered 1000 or more will crash the game. Because there are 829 spells at the moment, there are 171 spell slots left for modding and for future spells before one or both of those limits are hit. While it's probably enough for official spells and most mods, all-mods games with multiple nations could hit the limit. Also, at least Conceptual Balance will use lots of custom #onebattlespell effects.



In addition, while you can use #selectspell to choose empty spells and edit them, it seems the game will stop searching for new spells when it hits the first empty slot. As you know if you've read the discussion about missing modding commands in 3.14, #onebattlespell and #nextspell can only reference custom spells via their spell id numbers. The ID's change depending on which mods you chose, and the order in which you enabled them! The mod that was enabled first will be read first, and it's #newspells will be added first, thus the numbering will start from that mod.


Thanks to FoodStamp's idea, I've made a mod that creates empty spells that modders can use with #selectspell, partially circumventing the problem. For A Spell Enabler mod to properly create the null-spells usable in modding, it has to be selected before any mods that use these null-spells. If the order is wrong, you WON'T get an error message and the game seems to start properly, but the modded spells won't be there. To see the order the mods will be read in, press Esc and choose 'View enabled mods' in map view. This mod (A Spell Enabler) should appear first.
If I made all slots up to 999 usable via #selectspell, any mod using #newspell would crash. In this first version, I've left 71 slots free for #newspells, and reserved 100 spells for #selectspell use, which means that #selectspell works for spells between 0 and 929.




During the process of discovering various facts about how Dominions handles mods, I discovered how to organize your mods alphabetically in Dom3's mod preferences. The game seems to remember the order you added new mods in, and will only reorganize the folder if you first take the mods away. I did this by creating a folder called 'temp' in my Dominions 3\mods\, moving all the .dm files there, launching and quitting Dominions and moving the files back. I checked that no mods were left in the preferences screen, but I don't think it's required for this to work.

After this, A Spell Enabler will be first mod in your mod preferences, and thus easy to enable. You still have to remember to enable it before any mods you want it to work with, though.

Saulot January 30th, 2008 02:57 PM

Re: Spell-modding limits, and a workaround of sort
 
Thanks Endoperez... This will undoubtably come in handy.

Shame about hearing about the spell limit. Towards the purpose of multiple nation mods, it seems like every time a limit is removed and the way forward is clear, we run right into another one.

DrPraetorious January 30th, 2008 05:23 PM

Re: Spell-modding limits, and a workaround of sort
 
Well, we keep adding new mods.

Personally, I'm working on megamods that appear as a single .dm file, with all of the spells in-order; it *attempts* to resolve all spell numbering issues when it combines the mods, by assuming that each mod runs "clean" without any other mods enabled at the same time, but success is limited.

The fact that 1000-1023 can be used but can't be described means that those values should be used, if possible, for #onebattlespell and #nextspell entries.

We should add a request for spell #s through 1500 to be made available for modding. That should cover even a huge expansion, I believe.


All times are GMT -4. The time now is 02:04 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.