.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Custom Spells and #onebattlespell (http://forum.shrapnelgames.com/showthread.php?t=38085)

AreaOfEffect March 19th, 2008 04:29 PM

Custom Spells and #onebattlespell
 
I'm having trouble using #onebattlespell with a custom spell of mine. I can get the spell to appear in the grimoire without any errors. I can also manage to get #onebattlespell to work with the original spells. However, the instant I try to reference the new spell, by name, with the #onebattlespell command I get a "name2spell: no such spell" error. I have the new spell defined before I apply it to the #onebattlespell command so that shouldn't be the issue.

Does anyone know what to do or can someone point me to an example mod that uses a custom spell in the #onebattlespell command?

Tyrian March 19th, 2008 04:57 PM

Re: Custom Spells and #onebattlespell
 
Actually #onebattlespell don't work with custom spell. It is write in the new modding manual (very good work for this manual).

AreaOfEffect March 19th, 2008 05:47 PM

Re: Custom Spells and #onebattlespell
 
Thanks. Also, boo.

Endoperez March 19th, 2008 06:23 PM

Re: Custom Spells and #onebattlespell
 
Actually, you can reference a custom spell via #onebattlespell, but you have to do it via the spell number. The first new spell created in mods will be 829, the next 830 etc. Your mod will only work if it's the only mod to add new spells, or the first read mod that does that.

The order the mods are read changes from installation to installation, and seems to be dependent on the order the mods were put into your Dominions folder, and possibly alphabetical order as well. Because it probably won't work for others, it's simpler to just say that your mod won't work with mods that use custom spells - like Conceptual Balance, or any mod that uses national summons.

So yeah, boo.

AreaOfEffect March 19th, 2008 06:39 PM

Re: Custom Spells and #onebattlespell
 
I created a work-around.

If you modify an original spell after making a copy of it you can create a custom spell that #onebattlespell will recognize. The only catch is that you can't change the name of the spell or else you'll be back to the same issue. You can of course hide the modified spell.

Endoperez March 19th, 2008 06:45 PM

Re: Custom Spells and #onebattlespell
 
That's one way to do it all right. I think you could bypass that if you referenced the spell by ID instead of name. I don't remember is pressing Shift+i when reading a spell's description shows it's ID or not, though. If not, there's a list of all spells' id numbers somewhere on the forums.

AreaOfEffect March 19th, 2008 06:45 PM

Re: Custom Spells and #onebattlespell
 
Interesting work-around Endoperez. Of course it comes with obvious limitations.

I think my method would cause less problems. The only issue would be if another mod utilizes the same original spell, either to modify it or to use it as-is. Much better then being unable to work with most existing mods. The other positive is it requires no spell number counting.


All times are GMT -4. The time now is 02:16 AM.

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