Modding Tool [1.1.0 Released!]

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

Moderators: Icemania, elliotg

Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

The modding guide indicates the maximum value is 5.0, and I'm pretty sure this is correct.

To show off what I mean, here's my test values for the Ackdarian:

CharacterRandomAppearanceChanceLeader ;3.0
CharacterRandomAppearanceChanceAmbassador ;4.0
CharacterRandomAppearanceChanceGovernor ;5
CharacterRandomAppearanceChanceAdmiral ;7.0
CharacterRandomAppearanceChanceGeneral ;10.0
CharacterRandomAppearanceChanceScientist ;100.0
CharacterRandomAppearanceChanceIntelligenceAgent ;1000000.0

And this is what comes up in game with those values:

Image

As you can see, using 3.0, 4.0 and 5 all give different values (200%, 300% and 400%). But after 5, any higher number just gives 400% so there's no point. That's why the tool will set any value outside of 0 - 5 to a default value.

The default value is valid too, if it's a whole number you don't need the ".0", as the above test also proves.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

In other news, I've finally solved an issue which has been preventing me from pushing a new update. The actual work has been done but this problem basically screwed my results up, so now that it's fixed we're right back on track.

Meet 1.0.15.0!

That's literally all of the data validation done (dialogues wouldn't benefit from it), I just need to test for bugs and wait for reports to see if I've got everything right. Once it's there, I'll push version 1.1.0.0 and that'll be that!
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Modding Tool

Post by Darkspire »

Guess it must be the beta tester in me that I had to have another look [:D]

Same file is now showing a different error (it has not been altered since the last time it was checked)

The current line contains invalid data in the C:\Matrix Games\Distant Worlds Universe\Customization\Darkverse\races\ackdarian.txt file, the "CharacterRandomAppearanceChanceIntelligenceAgen" variable is not recognised. It will be dropped if the races are outputted.

My character files work fine, no problems for years, this comes up (along with 216 similar messages for the other files)

Invalid race override value "aritri" found in Characters record 0) Dekshi Shokia of race "Aritri", value changed to "Aritri"

No problem with the resources either and this comes up.

Invalid location type value "0" found in Resources record 44) Kreil Pebble, value changed to "2"

The line in the resources file reads: (no problem with that either, works fine in game)

44, Kreil Pebble,44,8.0,2,0, N, N,0,0,0,11,0.156,0.4,0.8,

Darkspire





Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ok, let's have a looksie:
The current line contains invalid data in the C:\Matrix Games\Distant Worlds Universe\Customization\Darkverse\races\ackdarian.txt file, the "CharacterRandomAppearanceChanceIntelligenceAgen" variable is not recognised. It will be dropped if the races are outputted.

You're missing a "T" at the end of that variable so that's why the tool doesn't recognise it.
My character files work fine, no problems for years, this comes up (along with 216 similar messages for the other files)

Invalid race override value "aritri" found in Characters record 0) Dekshi Shokia of race "Aritri", value changed to "Aritri"

You're right that's not really an error, but best practise is to maintain the same case. Although it'll generate a lot of data validation warnings, they are just warnings. As long as you can see that the value it's changed them to is correct, you can safely ignore them.
No problem with the resources either and this comes up.

Invalid location type value "0" found in Resources record 44) Kreil Pebble, value changed to "2"

The line in the resources file reads: (no problem with that either, works fine in game)

44, Kreil Pebble,44,8.0,2,0, N, N,0,0,0,11,0.156,0.4,0.8,

There is a problem with this resource line, you've set the location type to planet/moon and the subtype to argon. I figured people are more likely to be accurate with the sub-type, so it's setting the type to match. I imagine the in-game behaviour would be that this resource just doesn't spawn and empires only get it when they get a random event saying "Kreil Pebble discovered on colony X".

Seeing this though does make me realise I could probably go one step further and set the location type to be consistent with the resource type so thanks for that.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Modding Tool

Post by Darkspire »

You're missing a "T" at the end of that variable so that's why the tool doesn't recognize it.


I must have knocked off the 'T' when I was checking it from the first post regards number issues. Fixed.
You're right that's not really an error, but best practise is to maintain the same case. Although it'll generate a lot of data validation warnings, they are just warnings. As long as you can see that the value it's changed them to is correct, you can safely ignore them.

It picks up on capitalization? [:D] That did make me smile. I shall use capitals sir. Fixed
There is a problem with this resource line, you've set the location type to planet/moon and the subtype to argon. I figured people are more likely to be accurate with the sub-type, so it's setting the type to match. I imagine the in-game behaviour would be that this resource just doesn't spawn and empires only get it when they get a random event saying "Kreil Pebble discovered on colony X".

Thanks for spotting that, I have only just returned to modding the theme and DW due to family issues, the theme was spread all over the web and I have been putting it back together piece by piece, in this instance it was from an excel spreadsheet that I ported to text and put back in the theme folder, I should have checked it first, as your editor did not pick any others out I can only presume that none of the other values were incorrect, i will check them this evening.

Thanks for the output, very helpful, if anything I shall use the editor just to check through the theme as I put it together.

Regards the hidden victory condition values, try 60 through to 70, they are the pirate ones, 70 is still the same as 59, I can only presume the others are still there as I still use 70 for one of my races.

Darkspire
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

It picks up on capitalization? [:D] That did make me smile. I shall use capitals sir. Fixed

Well yes and no, the tool has found a race in the "race override" field that doesn't match any race in the list the tool has generated from your race files (due to the capitalisation difference in this case). It responds by trying to determine which race is the most similar and uses that as the replacement value. I figured it might help people who have made simple typos or capitalisation errors.
Regards the hidden victory condition values, try 60 through to 70, they are the pirate ones, 70 is still the same as 59, I can only presume the others are still there as I still use 70 for one of my races.

That's interesting, they definitely appear in the race setup screen as race specific victory conditions but only appear in-game if you're a standard race with race-specific victory conditions set. Pirate races don't have that option during setup, would need to do some testing to see if they're still actually taken into account.

In any event they appear to be valid values as far as the game is concerned and you could at least use 64) "Eliminate the most pirate factions in the galaxy" as a standard race victory condition.

From what I can tell none of them except for 62 "Control X% of all pirate-controlled colonies in the galaxy" appear to have any value or additional data information, they're all boolean conditions which makes things easy.

I've just pushed a revision to account for those on the race form and make sure data validation knows about it too.

For anyone interested the undocumented victory conditions are:

60 Build the most Hidden Pirate Bases in the galaxy
61 Build a Hidden Pirate Fortress facility
62 Control [value]% of all pirate-controlled colonies in the galaxy
63 Complete the most pirate attack missions in the galaxy
64 Eliminate the most pirate factions in the galaxy
65 Complete the most pirate defend missions in the galaxy
66 Earn the most income from Smuggling in the galaxy
67 Earn the most income from Pirate Protection Agreements in the galaxy
68 Build a pirate criminal network
69 Complete the most successful Pirate Raids in the galaxy
70 Produce the most Colony Manufactured resources (same as 59)
User avatar
rjord2021
Posts: 2019
Joined: Fri Jun 14, 2013 2:47 am
Location: Sydney, Australia

RE: Modding Tool

Post by rjord2021 »

You indicated yesterday that you had pushed through an update to the tool.

Just a question...... where is the latest version of your tool. I had a look on the tool and dont see an update button .The attachment on your first post last modified in February has the files with a last modified date of 15th February.

Should I be downloading the tool from somewhere else?
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Modding Tool

Post by Darkspire »

Been sitting up most of the night putting the theme back together, a few errors have been coming up, most of them due to converting from excel to text again, this one came up with the research tech levels, all that is missing is a space. Due to the space being missed and the error being changed to 0 a few other errors for that line were thrown up, I have amended the line with the space and will put the file in the theme and transfer it to the other system for testing and will update if there is still an error shown.

Invalid tech level value "10,11" found in Research record 425) Optimal Jamming, value changed to "0"

Code: Select all

PROJECT			;425, Optimal Jamming, 10,11,      2, 14, 0, 40.0, 
 COMPONENTS		;164
 PARENTS			;424, N
EDIT: No further problems with the above with the space correctly added.

These on the other hand are somewhat confusing, could really do with a line number within the race file to show where the error is as I am none to sure where 'record #' is, the only one that is quite clear is the Maerzi one, that I will change to 59 although 70 is valid until you decide whether to update with the new victory conditions.

Code: Select all

Invalid condition 2 value value "50" found in Race Information record 1) Aritri, value changed to "0"
 Invalid condition 3 value value "50" found in Race Information record 1) Aritri, value changed to "0"
 Invalid condition 4 value value "50" found in Race Information record 1) Aritri, value changed to "0"
 Invalid caution value "40" found in Race Information record 2) Atuuk, value changed to "50"
 Invalid condition 1 type value "70" found in Race Information record 20) Maerzi, value changed to "0"
 Invalid condition 1 value value "100" found in Race Information record 26) Negharu, value changed to "0"
 Invalid condition 1 additional data value "2" found in Race Information record 26) Negharu, value changed to "0"
 Invalid condition 2 value value "100" found in Race Information record 26) Negharu, value changed to "0"
 Invalid condition 3 value value "100" found in Race Information record 26) Negharu, value changed to "0"
 Invalid condition 4 value value "100" found in Race Information record 26) Negharu, value changed to "0"
 Data validation on Race Information complete, found and corrected 10 values

Just a word on the victory conditions from 60-70, they are for a pirate race, you can select if a race is a normal or pirate empire from the race file, adding those victory conditions to a pirate race were meant to be so a race could have been both a normal empire and pirate, bit fuzzy on memory as it was a while ago but I seem to remember discussing the idea that a race would have its own folder like the design templates with a pirate folder inside it so that the two were separated, as it is now you can need to make a separate race for a pirate unfortunately.

Any chance of adding an option to send the input info to a text file on desktop? [:D]

Darkspire
darkriot
Posts: 32
Joined: Sat Jul 05, 2014 1:56 am

RE: Modding Tool

Post by darkriot »

Nice work on this tool! The validation it does is great!
I have noticed using this tool that there was a mistake in the modding guide that your tool is doing. For targeting components and counter measures they both use value 2 and not 1 as stated in the guide. After validating the research and component files both counter measures and targeting had 0% bonus.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

ORIGINAL: rjord1

You indicated yesterday that you had pushed through an update to the tool.

Just a question...... where is the latest version of your tool. I had a look on the tool and dont see an update button .The attachment on your first post last modified in February has the files with a last modified date of 15th February.

Should I be downloading the tool from somewhere else?

The latest version is 1.0.15.3, I haven’t uploaded these data validation builds as an attachment but the tool should automatically update if there’s a newer version when you run it. Being a clickonce application I don’t think there’s a way to programmatically call an update check.

If it isn’t doing it by itself, that probably indicates that either you’re not connected to the internet at the time, or more likely the tool is being blocked by your security software.

When I push 1.0.15.4, I’ll include a button to test the connection to my NAS. I’ll update the op with that as an attachment too so you can get it even if there is an issue.

Also, I think updates may have been broken for the past 24 hours or so since a firmware update to my NAS changed my webdav server to deny access to guests by default. I’ve changed that now so it should be good to go.

ORIGINAL: Darkspire
These on the other hand are somewhat confusing, could really do with a line number within the race file to show where the error is as I am none to sure where 'record #' is, the only one that is quite clear is the Maerzi one, that I will change to 59 although 70 is valid until you decide whether to update with the new victory conditions.

I would like to include a line number, but by this point the data is all stored in an array so that kind of detail is lost. That said, it shouldn’t be too difficult to figure out what’s going on.

So for example in:
Invalid condition 2 value value "50" found in Race Information record 1) Aritri, value changed to "0"

It tells you it’s “Race Information”, which means it’s in the Aritri race file. It’s the condition 2 value value (a bit of a mouthful admittedly) so it’s talking about the “value” variable of victory condition 2. Basically it’s saying that whatever type victory condition 2 is, it either doesn’t use a value variable or said value variable is out of whatever range it’s supposed to be.

It’s much the same for the additional data, whether or not it’s valid is going to depend on what victory condition type you’ve chosen for that race.

I suspect the “Invalid condition 1 type value "70"” is now fixed in 1.0.15.3, so you shouldn’t see that again once you update. As I mentioned to rjord above, updates may have failed over the last day or so, probably worth just checking the version number of the tool in the “About” section on the main menu.
Just a word on the victory conditions from 60-70, they are for a pirate race, you can select if a race is a normal or pirate empire from the race file, adding those victory conditions to a pirate race were meant to be so a race could have been both a normal empire and pirate, bit fuzzy on memory as it was a while ago but I seem to remember discussing the idea that a race would have its own folder like the design templates with a pirate folder inside it so that the two were separated, as it is now you can need to make a separate race for a pirate unfortunately.

I guess the real question here is do they actually work in-game for a pirate race? When I start it up I can ironically only get them to be visible if I’m playing as a non-pirate race, with the “Race Specific Victory Conditions” option set. But when playing as a pirate race you don’t get the option to enable race victory conditions at all, it’s replaced with the pirate specific ones which come from the “playstyle” of your pirate race.
Any chance of adding an option to send the input info to a text file on desktop? [:D]

I could do that sure, will probably need to write it to a rtf or something since you’d lose all the text colours with plain text. That’ll be in 1.0.15.4 too.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

ORIGINAL: darkriot

Nice work on this tool! The validation it does is great!
I have noticed using this tool that there was a mistake in the modding guide that your tool is doing. For targeting components and counter measures they both use value 2 and not 1 as stated in the guide. After validating the research and component files both counter measures and targeting had 0% bonus.

Oh that's annoying lol...

Although it seems like the regular countermeasures/targeting uses value 1, it's just the fleet ones that are value 2.

Bah, the Scanner Jammer uses value 2 as well apparently...

Ah well, I'll fix them for 1.0.15.4
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ok, just pushed 1.0.15.4.

That sorts the data validation issues that darkriot brought up, includes a (very) simple test to see if the tool can hook up to my NAS (for log reporting or updates) and also includes a button to write the contents of the input/output log on to an rtf file on your desktop.

And the OP is updated with this version, just in case anyone is having trouble with the updates. You should be able to use the tester to trigger a connection attempt and configure your firewall appropriately.

Whew!
User avatar
rjord2021
Posts: 2019
Joined: Fri Jun 14, 2013 2:47 am
Location: Sydney, Australia

RE: Modding Tool

Post by rjord2021 »

ORIGINAL: Sabranan

Ok, just pushed 1.0.15.4.

That sorts the data validation issues that darkriot brought up, includes a (very) simple test to see if the tool can hook up to my NAS (for log reporting or updates) and also includes a button to write the contents of the input/output log on to an rtf file on your desktop.

And the OP is updated with this version, just in case anyone is having trouble with the updates. You should be able to use the tester to trigger a connection attempt and configure your firewall appropriately.

Whew!


Got the new version...... I had been on version 1.0.0.0 for a while.

When the tool starts I get
* Partial new feature release 1.0.15.0

- Main Menu
- New "Write Log to File" button added.
- New "Test Internet Connection" button added.

- Data Validation
- Fleet Countermeasures, Fleet Targeting and the Scanner Jammer component types now use value 2 instead of value 1.



Now on version 1.0.15.4
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ah ok, so this'll be your first look at the new data validation on input features. Might be worthwhile hitting the connection test, this should give you two messages:

"Downloaded connectiontesting.txt, integer value recieved: X" - where X is any whole number.

and once you click OK on that, another should appear:

"Upload working, the newly downloaded integer was incremeneted."

If you get these two messages, it means it downloaded a file, read the integer contained within it and then uploaded the file with an incremented value. Then it downloads it again to check that it's actually been able to write to the file.

If it's done this then there's no reason why you shouldn't be able to update the tool automatically or use the log reporting function. I have found certain people just upload blank files which suggests that their firewall is preventing them from writing to a remote server, even though it doesn't mind creating a new file.

If something fails along the way it'll report an error message to you, but basically this is just going to mean it can't connect or it can't transfer data.
User avatar
rjord2021
Posts: 2019
Joined: Fri Jun 14, 2013 2:47 am
Location: Sydney, Australia

RE: Modding Tool

Post by rjord2021 »

Connection test was ok.........
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Modding Tool

Post by Darkspire »

Got the new update and just validated the current theme to test the new write to log option. I altered nothing in the theme from the previous test, which validated correctly, as the theme is on one of my other systems and this came up.

Darkspire

Image
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

I've just pushed a revision to squish that bug Darkspire, and the character validation should now check traits against each other to make sure they're not opposite types.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Modding Tool

Post by Darkspire »

Not sure what happened but yesterday the editor was correctly telling me that on fleet countermeasures component improvements were:

- Fleet Countermeasures: Value1=countermeasures bonus percentage for fleet, Value2-7 unused

Now today it is telling me that it is value two that is the correct place to put the value, had a look in the research part of your editor and it is definitely showing the value should be in two not one.

Invalid component improvement 1's value 1 value "25" found in Research record 186) Advanced Fleet Countermeasures, value changed to "0"

Darkspire
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

I'm assuming the research project you're quoting is from vanilla? If so the component improvement line would be:

COMPONENT IMPROVEMENTS ;90, 5, 35, 20, 0, 0, 0, 0, 0,

But the vanilla project definitely uses 20% as the bonus, and doesn't seem to use the 35 value at all.

darkriot reported this a few posts up. Turns out that despite what the modding guide and the text files say, for the scanner jammer, fleet countermeasures and fleet targeting systems it actually uses value 2 as the % effectiveness.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Modding Tool

Post by Darkspire »

ORIGINAL: Sabranan

I'm assuming the research project you're quoting is from vanilla? If so the component improvement line would be:

COMPONENT IMPROVEMENTS ;90, 5, 35, 20, 0, 0, 0, 0, 0,

But the vanilla project definitely uses 20% as the bonus, and doesn't seem to use the 35 value at all.

darkriot reported this a few posts up. Turns out that despite what the modding guide and the text files say, for the scanner jammer, fleet countermeasures and fleet targeting systems it actually uses value 2 as the % effectiveness.

As I said, I have been away from modding for the last year or so, my memory on the matter was a tad fuzzy, I had put the values in the second slot originally but changed them to the first slot Sunday as I thought I must have got them in the wrong slot upon reading the guide and text file, I will change my data and text files back again.

Darkspire

Post Reply

Return to “Design and Modding”