Well I added some new abilities today which was full of spelling errors and structure errors, and took me 6 hours to make the game able to start. The debugger was quite helpfull and understandable on these ones though I still have some few errors that are geberish but lets me play the game.
The three things I learned was this one:
Failed to convert 'DrainAntimatter' to an enum value.
And this one:
File: C:\Users\Bjørn\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.041\Project 1\GameInfo\BuffPsiEpicAbility2Detonate.entity
Label: numPeriodicActions
Line Number:24
Line Contents: drainAntiMatterRate
And this:
c:\gs\entrenchment\CodeSource\GS\Entity\Interfaces\IBuff.cpp(2055): assert! [weaponEffectsDef.weaponType != WeaponType::Beam]
Now the first one is kinda triggy since it doesn't say which file it is but only the "word" that is wrong which makes it hard to locate onless you add the abilities one at a time or use a tool to search through multiple text files. The error itself means that that command/definition doesn't excist in the game. Fx if you add a weapon class such as bombardment then it will come with this error. In this case I added this as an on delay instant action buff, but it can only be used as a periodic buff (probably spelled wrong).
The next one is when you don't follow the structure. This can be if you say 3 wepons and there only is 2 then you get an error saying that the Label: weapon (since this is the line that should be followed after the 2nd weapon when there is 3). And in Line Contents: (whatever line actually follows the 2nd weapon). It also shows if there is spelling errors including if you use capital letters at the right places. This can also be used if you don't know the structure. Fx in this case I found out that the name of the buff was RemoveAntiMatter, but I didn't know what I should write above the values. So I lod it be and started the dev to get this error:
File: C:\Users\Bjørn\AppData\Local\Ironclad Games\Sins of a Solar Empire\Mods-Entrenchment v1.041\Project 1\GameInfo\BuffPsiEpicAbility2Detonate.entity
Label: antiMatter
Line Number:24
Line Contents: drainAntiMatterRate
This way I could see that I had to write antiMatter above the values (got another error after correcting it because I didn't make the M capital
).
Now the last one Means that value is enum, but can't be used in this connection. In this case I wanted an ability to have a beam travel effect, but as you can see the travel effect for abilities can't (atleast with this ability) be a beam effect. Another case were I got this error was when I had set an aiUseTime to invalid. Now invalid is a enum value for aiusetime, but only when it is a passive abillity which this one wasn't.
I hope this info can help other people better understand how to debug their abilities and other editted files (note this only makes them crash free).
~ gruntmaster1