Modding Whipmarks (Lessons Learned) (Full Version)

All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Design and Modding



Message


Tampa_Gamer -> Modding Whipmarks (Lessons Learned) (2/23/2012 1:42:22 AM)

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.




Tampa_Gamer -> RE: Modding Whipmarks (Lessons Learned) (5/24/2013 4:20:44 AM)

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.

\root folder
- GameText.txt (revised 5/17/13)

\characters
- (20 new race files dated 3/4/13)

\designTemplates (new subfolder in root directory)
- contains 23 new subfolders (one for each race, plus default)
- each subfolder contains 30 design templates, humans contains 1 more (BLANK)

\help
- 32 new/revised files

\images
\\effects
\\\tractorbeamstrikes (new subfolder)
- contains 21 new .png files
\\\weapons
- contains new .png files for troop combat and assault pods
\\environment
\\\planetmaps (new subfolder)
- contains 18 new .png files for ground combat maps
\\\planetaryfacilities
- contains 9 new .png files for new facilities
\\ui
\\\achievements (new subfolder)
- contains 60 new .png files
\\\chrome
- contains new/revised .png files
\\\cursors
- contains 2 new .png files
\\\flagshapes
- contains new subfolder for pirates
- contains new .png versions of original flags
\\\messages
- new construction stalled .png file
\\\shipsymbols (new subfolder)
- contains 17 .png files of visual ship shape symbols
\\units
\\\races
- contains new subfolder for pirates (8 pics)
\\\ships
- new subfolders for family22 through 26 (26 pics each)
\\\troops
- 80+ new .png files for multitude of new troop types


\policy
- 22 new files, one for each race)
- new subfolder for pirates

\races
- 22 new files, one for each race

\sound
\\effects
- 8 new/revised sound effects (tractor beam, etc.)
\\music
- 1 new song

\tutorial
- 2 new tutorial text files (new ways to play)


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]




rjord -> RE: Modding Whipmarks (Lessons Learned) (5/24/2013 8:03:29 AM)

Nice work there Tampa......




Shark7 -> RE: Modding Whipmarks (Lessons Learned) (5/24/2013 4:46:18 PM)

On the flags issue:

There is now a folder within the flagshapes folder for pirate flags, so there are more than 41 flags with shadows. Also, flag symbols may now be in .png format.




2guncohen -> RE: Modding Whipmarks (Lessons Learned) (5/24/2013 6:06:40 PM)

guys what are the size specifications for ground combat units ?




Tampa_Gamer -> RE: Modding Whipmarks (Lessons Learned) (5/24/2013 6:09:12 PM)

the .png files are 80x80 pixels and all less than 10 KB - each race has 5 unique ones (see \images\units\troops)




Shark7 -> RE: Modding Whipmarks (Lessons Learned) (5/24/2013 6:57:36 PM)

Any size will work, some of my older .pngs were 300 x 300 pixels and worked fine. However, it is advisable to resize them down to 80 x 80 as they take far fewer resources at that size.

I do suspect that many mods will be updated once the modding guide is released.




Tampa_Gamer -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 3:30:44 AM)

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.




2guncohen -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 10:52:30 AM)


quote:

ORIGINAL: Tampa_Gamer

the .png files are 80x80 pixels and all less than 10 KB - each race has 5 unique ones (see \images\units\troops)



So 5 unique ones and then I presume also generic ones ?




Shark7 -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 11:04:07 AM)


quote:

ORIGINAL: 2guncohen


quote:

ORIGINAL: Tampa_Gamer

the .png files are 80x80 pixels and all less than 10 KB - each race has 5 unique ones (see \images\units\troops)



So 5 unique ones and then I presume also generic ones ?



Nope, just 5 unique images for each race.




Tampa_Gamer -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 1:58:58 PM)


quote:

ORIGINAL: 2guncohen

So 5 unique ones and then I presume also generic ones ?



just take a peek at the \images\units\troops subfolder, but essentially each race has a unique image for infantry, pirate raiders, armored, artillery and special forces




ASHBERY76 -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 2:46:54 PM)

Them changing the flags is going to cost me about 2 hours labour.Cheers.[8|]




Shark7 -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 4:24:42 PM)

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).




Matys -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 6:03:28 PM)


quote:

ORIGINAL: Shark7

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.[:D] 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.



[image]local://upfiles/37142/55A96915AE9F449BB9E39E2D07507763.jpg[/image]




Shark7 -> RE: Modding Whipmarks (Lessons Learned) (5/25/2013 7:34:21 PM)


quote:

ORIGINAL: Matys


quote:

ORIGINAL: Shark7

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.[:D] 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.



[image]local://upfiles/37142/55A96915AE9F449BB9E39E2D07507763.jpg[/image]


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.




Mansen -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:21:36 PM)

(This seems like the natural place to ask for modding assistance)

I'm having some issues with the biases file - when loading the Theme it keeps insisting that I have more values than races, which as far as I can tell simply is not correct.

http://peecee.dk/upload/download/412683

Any clues? I've gone through it several times and I'm growing grey haired.

Edit: I may have already found the error. :)




Bingeling -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:37:41 PM)

Mansen, I have never looked at modding, but did peek at your file.

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.




Mansen -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:39:36 PM)

The theme loader went past the error - so that's great. :)

The new error (which isn't being awfully helpful) is not however. :/

[image]http://peecee.dk/uploads/052013/Parameter_name_-_Index.jpg[/image]




Bingeling -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:41:25 PM)

Those files must surely be easier to tune in a spreadsheet. Just save as csv and specify the "," separator?




Bingeling -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:42:58 PM)

The error seems related to flag generation, so check that all versions of "race counts" matches. If the number of races is typed somewhere, and they are listed somewhere else, for instance.




Mansen -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:49:15 PM)

I am stumped as to how you figured out it involved flags from that error message, but regardless you were spot on. I had some filename errors with some custom flags.

Fixed those and and it goes all the way into a new game - so thanks a lot, Bingeling. :)




Bingeling -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:56:25 PM)

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.

Luckily the code of the DW is not obfuscated.




Mansen -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 1:59:19 PM)

Oh for ... I'm an idiot. It's right there, clear as day. I definitely need a break if something as simple as that is missed. [>:]




Bingeling -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 2:01:13 PM)

And the way to read a stack trace is...

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.




Shark7 -> RE: Modding Whipmarks (Lessons Learned) (5/29/2013 4:05:02 PM)

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.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
1.265625