Need help with race modding - get crash

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: Icemania, elliotg

Post Reply
Imperius
Posts: 26
Joined: Wed Jun 25, 2014 5:49 am

Need help with race modding - get crash

Post by Imperius »

Hi guys,

First off - thanks for all the excellent mods I see here! First time poster, but I've really enjoyed reading this forum over the last year.

I decided to take the first step towards making a Babylon 5 mod using many of the resources here, and I've got a lot of races and such done. The problem is, the game crashes when trying to create the galaxy with this error report:

((Edit: Ugghh.. cant post links until 7 days from now... ))

Something about aggressiveRacesRequired and index being out of bounds?

I thought the problem was in my race files, so to test that theory, I just tried copying over all the vanilla race files, changing only the name, portrait numbers, and shipset numbers. All the other "indexes" in those files are therefore correct.

It could be race policy then, but I tried removing all my custom policy files as well, and it still crashes.

I also removed the custom character files, so the problem is not there either.

So basically I have a mod, where the only things I've changed are portraits and some shipsets, and it crashes on trying to create the galaxy with the message stating something about aggressiveRacesRequired and index being out of bounds.

Any ideas of what could be wrong here, judging from that error report?


Any help is greatly appreciated!

Edit:

The error report in more detail says:

System.ArgumentOutofRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Throwhelper.ThrowArgumentOutofRangeException... etc, etc..
at DistantWorlds.Types.Galaxy.SetupAlienRacePopulations(EmpireStartList empireStart, Int32 aggressiveRacesRequired)
User avatar
Tcby
Posts: 342
Joined: Mon Dec 16, 2013 7:08 pm
Location: Australia

RE: Need help with race modding - get crash

Post by Tcby »

Can you upload the test race file?
Bingeling
Posts: 5186
Joined: Thu Aug 12, 2010 11:42 am

RE: Need help with race modding - get crash

Post by Bingeling »

Not sure if it is the problem, but make sure your files are encoded in UTF-8 and not ANSI. I know that at least the resource file crashes if ANSI.

How? One way is to look at them in Notepad++. ANSI/UTF-8 is shown in the lower right, and can be changed in the encoding menu.
User avatar
Tcby
Posts: 342
Joined: Mon Dec 16, 2013 7:08 pm
Location: Australia

RE: Need help with race modding - get crash

Post by Tcby »

On that subject, Notepad++ is generally pretty great.
Imperius
Posts: 26
Joined: Wed Jun 25, 2014 5:49 am

RE: Need help with race modding - get crash

Post by Imperius »

Thanks guys, I got it fixed - I *think* the problem was in the bias and racebias.txt tiles, once I actually got those done for a mod with only 18 races instead of 21, it seemed to work.

And yes, notepad++ is a must :D I learned that from Crusader Kings II modding, it's pretty much impossible to work without it there.

It may also be that I added the Shakturi and Mechanoids...
Post Reply

Return to “Design and Modding”