I intend to add my cobbled modding notes here in the hopes that others with as little gaming/modding time as I have (oh the bygone days of school before work/family...) will not have to waste precious gaming hours repeating my mistakes...

[General Troubleshooting]

2-22-12 Use the "Change Themes" subroutine to help test your mod. When you are adding elements\testing a them, always exit the game to the main menu and change the theme back to "default" before exiting the program. This way when you restart the game the next time, it will load the defaults (although if you have replaced default files (sounds, ui images, weapon images, etc,) it will load them at this point so you could still error out if you screw up a default file like I have and in that case you will more then likely get a general exception error). Once inside the game, change them theme to the mod you want to test again, now it will load the elements and provide you much more useful information for troubleshooting than just a general exception error. It will actually tell you the line and file it had trouble loading or did not find.

[\Customization\Your Theme\flagShapes]

2-22-12 There can only by 41 flags and they must use the same names (0-40) as in the original folder.

[\Customization\Your Theme\biases.txt]

2-22-12 If you add a custom race, do not forget to add this file to your theme and modify it to include your custom race not only at the bottom but at the end of each line so that you expand the bias matrix properly.

[\Customization\Your Theme\characters\racename.txt]

2-23-12 The name of this file must match the exact name you have given the race in your race file. Seems relatively straight forwarad but watch race names with special characters such as spaces. I have a number of custom races representing various "houses" similar to Dune or Game of Thrones. They all had spaces in the exact name of their house\race and this caused the game to generate random characters instead of the predefined characters I made up. No error was generated because this is working as intended (no file found so generate random characters).

2-23-12 Also, to easily test your characters - set them all to appearance = 0 for now. This way when you load a new game they will appear at once and you can verify the data and images for each character are working as intended.

Bad form replying to my own thread from last year, but here goes anyway. As everyone (at least those of us not in the beta) is busily trying to update their own personal mods for Shadows, I figured I would post my observations so far in the hope they would save someone else some time...

This analysis was strictly comparing the files/file structure of the last version of Legends to the 1.9.0.0. release today of Shadows. The goal was to quickly determine what areas of my mods need to be revised to work in Shadows.

That's it for now. This weekend will be spent determining whether or not we can now override additional files by placing them in the theme folder or not (or whether we are stuck still replacing default files).

[edit - I had this nicely indented in a code box but it kept extending the text below the box and making a mess in the post, so posting as normal text for now - sorry]

< Message edited by Tampa_Gamer -- 5/24/2013 5:04:07 PM >

_____________________________

For those interested, forum thread link to post with a master list of all my DW mods: Link

just a short update with respect to experimenting with \flagShapes in your Customization folder. They do appear to work, but you have to (1) make sure you have 0-40 in there (as well as the pirates subfolder) otherwise it creates an index error, and (2) the game reads the .png file not the .wmf file. If the .png file does not have proper transparency levels set, you will only be able to control one color rather than two in the race set-up screen.

_____________________________

For those interested, forum thread link to post with a master list of all my DW mods: Link

Its worth it in the end..and you DO NOT have to use the .tga files at all anymore. All flags can be made into .pngs. I do however suggest that you scale them at the same ratio as the in game flags 140p x 80p IIRC, since they will fit better when viewed in game. I had to rescale several to make them look right.

Also, you need to be sure to save with a clear alpha channel background and convert the opaque parts to pure white with the .pngs, or you will get black decorations on your flags. You can also specify colors by simply using a color image for your flag symbol (you'll note several of the pirate flagshapes have this).

Its worth it in the end..and you DO NOT have to use the .tga files at all anymore. All flags can be made into .pngs. I do however suggest that you scale them at the same ratio as the in game flags 140p x 80p IIRC, since they will fit better when viewed in game. I had to rescale several to make them look right.

Also, you need to be sure to save with a clear alpha channel background and convert the opaque parts to pure white with the .pngs, or you will get black decorations on your flags. You can also specify colors by simply using a color image for your flag symbol (you'll note several of the pirate flagshapes have this).

It is now way easier to make flag, multicolored flag. But I must admit it is a pain to convert them. Are you sure about the size ratio? It seems to me it is 180p x 107p, as a majority of flag is using that size, or 160p x 96p for pirate flag. Having official confirmation would be nice.

Its worth it in the end..and you DO NOT have to use the .tga files at all anymore. All flags can be made into .pngs. I do however suggest that you scale them at the same ratio as the in game flags 140p x 80p IIRC, since they will fit better when viewed in game. I had to rescale several to make them look right.

Also, you need to be sure to save with a clear alpha channel background and convert the opaque parts to pure white with the .pngs, or you will get black decorations on your flags. You can also specify colors by simply using a color image for your flag symbol (you'll note several of the pirate flagshapes have this).

It is now way easier to make flag, multicolored flag. But I must admit it is a pain to convert them. Are you sure about the size ratio? It seems to me it is 180p x 107p, as a majority of flag is using that size, or 160p x 96p for pirate flag. Having official confirmation would be nice.

On the ratio I am not 100% certain, as there are several different sizes. I just copied one to use as a base and it worked beautifully. It's going to be more the ratio than the actual size, though making them too big will end in increased resource usage.

I copied all but the top fluff, and pasted it into a spreadsheet with the "," as separator. Some lines did not come out well. Maybe something for you to test and verify? Xenon and Argon probably have some "," mess up front.

Kha'ak Paranid Split

Appears to have some weird values down the lines, a "," missing? Same spot for all of them.

Look at the stack trace in your image. It crashed in a flag related method.

What I see is.

First some generic stuff about windows and whatnot (the window frames, and events in the gui, probably). Standard stuff that is not custom for the program. 1: Start 2: Generate empire flags 3: Throw error. 4: Die.

The method "Start" is the first one. This probably set up the galaxy and whatnot.

During Start a lot of stuff could be done, but what is completed is not there, this is just "unfinished" tasks.

Then we see that Start called the flag method. And from inside the flag method, the error was thrown. So an error while setting up flags, as long as method names makes sense.

If after flags, it runs "loadRaceImages", and crashes during that, you would not see signs of the flag method, as the method would be complete. You only see methods on the call stack that is not yet complete.

If you are going to add custom flags to your theme it is best if you copy the default flag folder into your theme as simply 'Flagshapes' The problem I have found with every mod that crashes due to flag is that the number of flags in your theme do not match the number of flags the game is looking for.

So copy the default, replace with the flags you want by saving over old ones in the newly copied file (IE save file as) and try again.