|
|
|
|
March 19th, 2008, 04:29 PM
|
|
Major
|
|
Join Date: Mar 2008
Posts: 1,099
Thanks: 56
Thanked 122 Times in 48 Posts
|
|
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?
|
March 19th, 2008, 04:57 PM
|
Corporal
|
|
Join Date: Nov 2005
Posts: 88
Thanks: 1
Thanked 1 Time in 1 Post
|
|
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).
|
March 19th, 2008, 05:47 PM
|
|
Major
|
|
Join Date: Mar 2008
Posts: 1,099
Thanks: 56
Thanked 122 Times in 48 Posts
|
|
Re: Custom Spells and #onebattlespell
Thanks. Also, boo.
|
March 19th, 2008, 06:23 PM
|
|
National Security Advisor
|
|
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
|
|
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.
|
March 19th, 2008, 06:39 PM
|
|
Major
|
|
Join Date: Mar 2008
Posts: 1,099
Thanks: 56
Thanked 122 Times in 48 Posts
|
|
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.
|
March 19th, 2008, 06:45 PM
|
|
National Security Advisor
|
|
Join Date: Sep 2003
Location: Eastern Finland
Posts: 7,110
Thanks: 145
Thanked 153 Times in 101 Posts
|
|
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.
|
March 19th, 2008, 06:45 PM
|
|
Major
|
|
Join Date: Mar 2008
Posts: 1,099
Thanks: 56
Thanked 122 Times in 48 Posts
|
|
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.
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|