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: elliotg, Icemania

Overlord015
Posts: 55
Joined: Tue Jan 20, 2015 8:08 pm

RE: Modding Tool

Post by Overlord015 »

Thank you for the prompt response. I'm working with facilities atm, I think I caught a few other issues:

In the variable section for the Spy Academy (facility type from the drop down menu) its labelled as increasing the spawn chances for troop generals (rather than spies).
Same issue also with the Science Academy where its labelled as increasing the chances for spies and the Military Academy increasing the spawn chances for scientists (the Naval Academy seems fine).

Again, thank you for the work you've put into this tool, I've been going crazy with it for some time now, loving it so far. I will probably keep dropping by if I keep finding other things. Would you rather I use the direct comm feature on the tool? Or are you okay with me posting up here as I find things?
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

It's probably easiest to report problems here, I get an email notification every time someone posts on this thread so it'll likely be the fastest way.

Posting steps to reproduce issues help a lot, as does using the internal log reporter in the tool if it's crashing or inputting/outputting incorrect data. It's not needed for reporting wrong labels and such though, since that's just an inconvenience and won't actually effect your mod as long as you're aware of it.

I've sorted the facility labels now so that's revision 11.
Rochndil
Posts: 9
Joined: Fri Jun 30, 2017 3:41 pm

RE: Modding Tool

Post by Rochndil »

Greetings!

I re-scaled all the standard and pirate versions of 50 races' ships, and also fixed the carrier tactics (for some weird reason someone had them going all weapons). Other than a mistake of my own making, everything worked perfectly. Awesome improvement; it made the impossibly tedious simple.

Rochndil, still deciding if his smaller ships are too small...
User avatar
Hattori Hanzo
Posts: 735
Joined: Mon Mar 21, 2011 12:40 pm
Location: Okinawa
Contact:

RE: Modding Tool

Post by Hattori Hanzo »

very, very good indeed Sabranan !!!!! [&o]
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

At this point I'm happy that the data validation is stable enough to be released as 1.1.0.0, so up it goes!

I'll update the OP with this version too.
Overlord015
Posts: 55
Joined: Tue Jan 20, 2015 8:08 pm

RE: Modding Tool

Post by Overlord015 »

Hi there, been working with facilities and I've been encountering some issues:

First this error:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.InvalidCastException: Conversion from string "" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at Distant_Worlds_Mod_Editor.frm_facilities.btn_deleteproject_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2103.2 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Distant Worlds Mod Editor
Assembly Version: 0.0.0.1
Win32 Version: 0.0.0.1
CodeBase: file:///C:/Users/Overlord/AppData/Local/Apps/2.0/JRMLOMBM.35K/VD5KZVGV.N38/dist..tion_0000000000000000_0001.0000_9e2a0b2d88c7f570/Distant%20Worlds%20Mod%20Editor.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 14.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2104.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2102.0 built by: NET47REL1LAST
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
System.Deployment
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Deployment/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.7.2046.0 built by: NET47REL1
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

Error above occurs when deleting facilities, if I press continue and try to scroll down to other facilities the settings and information remain the same as the old ones (the entry for the one deleted seems to remain). Although if I exit and then go back into the facilities section everything goes to normal, and the deleted one is indeed gone.

Next, validation seems to be mishandling facilities. It eliminates any descriptions on newly made facilities and making some nonsensical changes to values (changing one wonder’s maintenance 25 from 25000 for ex.). It also seems it doesn’t allow you to use values above 100000 (changing one worth 100000 to 10,000) for costs. Strangely enough this doesn’t seem to affect vanilla facilities, only newly added ones, even when modified (I changed one to be worth 1500000 with 250000 maintenance for ex.). Also it seems to misplace some values, in turn causing errors. Looking at the facility text file it seems that its moving values to the wrong spots. Also, I have a fleeting suspicion that it is doing this when I'm writing values in the regular way too, but i haven't tested for this one.

And finally, a minor glitch: if scrolling through facilities and you go through multiple facilities with planet restrictions all reflect the same setting as the first one (even though the original setting seems to be unaffected, this is only visual).

(Attachment is a copy of the modified facility file)
Attachments
facilities.txt
(22.44 KiB) Downloaded 6 times
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ok, I've pushed a revision to address your post Overlord.

It's hard to say at the moment whether I've solved it all, but I have found two issues.

One is that when you delete a facility it was looping through policies in an incorrect way, for me, this generated an "out of range" error. I'm not sure why it was giving you a "Input string was not in a correct format" error though, but I have a feeling that pressing continue probably corrupted the values in some way.

The other issue I've solved is on creating new facilities it wasn't creating proper default values, so there was no picture reference. That pushed all the other values to the left in the text file, so build cost was being read as the picture reference etc. That would certainly cause data validation issues.

I'll have a look at the other forms that involve this later on today to see if they might have the same problem, but in the meantime see if this version sorts it.
Overlord015
Posts: 55
Joined: Tue Jan 20, 2015 8:08 pm

RE: Modding Tool

Post by Overlord015 »

Did a little bit of testing, I tried a fresh facility file, created a new facility as a test, then deleted it, got the error below. Also, tried testing for this with other mods, couldn’t replicate it, so I think you may be correct in your suspicion on something getting corrupted somewhere. I’ll just remake the mod from scratch as I’m just experimenting before getting into the real effort, no loss. The issue on misplaced values seems to be 100% resolved though.

************** Exception Text **************
System.InvalidCastException: Conversion from string "" to type 'Integer' is not valid. ---> System.FormatException: Input string was not in a correct format.
at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- End of inner exception stack trace ---
at Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
at Distant_Worlds_Mod_Editor.frm_facilities.btn_deleteproject_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ok, so what with RogerBacon intending to release (at the time of writing) a version of his mod that uses the two unused values of the Terraforming facility type, I figured it would be nice if my tool supported it too.

So in revision 4 it now detects whether the Bacon Mod is installed (it just checks to see if you have a BaconSettings.txt file in your DW installation folder) when you first load a mod. If you want to enable/disable this feature at will, you can do so with the new checkbox on the main menu after you've loaded a mod.

It can't tell what version of the Bacon mod you have installed, but it doesn't really matter since DW will ignore unused values anyway.

For right now, this just means that the terraforming facility type supports two new values as detailed here.
AngelScott
Posts: 4
Joined: Thu Mar 20, 2014 11:05 am

RE: Modding Tool

Post by AngelScott »

I just wanna give a shout out to Sabranan the man for making this awesome tool. Codeforce should have done this years ago.
Pilot Details: Angel Scott

Corporation: Cutting Edge Incorporated
Alliance: RAZOR Alliance
Kills: 1464
Losses: 65
Damage done (ISK): 270.06B
Damage received (ISK): 14.85B
Chance of enemy survival: 4.25%
Pilot Efficiency (ISK): 94.79%
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ok, small update today because I've been playing with my design templates and finding that if I use image scaling with the "scaled" option, values between 1 and 1.05 prevent me from creating a game with the error "Invalid image scaling factor".
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Had a bit of a play about with the resources form today, I've come up with a couple improvements which I've published as revision 7.

First, the abundance and prevalence values now display as percentages, making them much more human readable. The labels will display the "%" symbol and the tooltip has been updated so people don't get confused. The "%" symbol will appear and disappear as needed to deal with super luxury resources.

The other thing is that setting the subtype for the resource location is now a bit more intelligent, it'll prevent setting gas type resources to metal asteroids for example. Before it only compared the location type to the location subtype, now it included the resource type as well.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Roger has done it again and in the new version of his Bacon Mod the mining cap can now be changed for all mining engine types. Therefore, revision 9 of my modding tool now supports editing these values (value 2 of the mining components in the components and component improvements forms) as long as you have the Bacon Mod installed.

Enjoy!
Revoluti0nX
Posts: 1
Joined: Mon Dec 04, 2017 11:12 am

RE: Modding Tool

Post by Revoluti0nX »

ORIGINAL: Sabranan

Roger has done it again and in the new version of his Bacon Mod the mining cap can now be changed for all mining engine types. Therefore, revision 9 of my modding tool now supports editing these values (value 2 of the mining components in the components and component improvements forms) as long as you have the Bacon Mod installed.

Enjoy!

Sabranon,

I made an account on this forum just so I could personally thank you for your efforts on this tool.

I'm way too late to the DW:U modding scene, I know the game has been around for many years now, but it was and still is one of the best space 4x games available. Now that I've had my fill of the default stories and campaigns, I want to try my hand at coming up with improvements, and your tool will provide me with a means to simplify the whole process.

Hopefully players like you will keep this place alive and kicking until DW2 is made :)

Much appreciated again.
I sings a dances of wolfs, who smells blood and slays the coward; I sings me a dances of mans, who smells gold and slays his brother.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Just pushed revision 13 to deal with an issue Das found with certain design templates disappearing.

It also implements the changes made by bacon mod into the tool.
User avatar
rjord2021
Posts: 2019
Joined: Fri Jun 14, 2013 2:47 am
Location: Sydney, Australia

RE: Modding Tool

Post by rjord2021 »

I have been battling for 3 weeks to completely replace research and components in my mods but when I do this I get errors starting the game and with my mods for distant worlds universe I have had problems trying to fix "Index was outside the bounds of the array" errors as shown below as they do not specify what the problem is.

Have checked my mods with your tool and there are no errors.

With your mod I see you have the option to clear all files and start a mod from scratch. Have tried this but still getting errors.

Does anyone have tips on how to use this tool to create a blank mod that I can build on..... I am simply looking to have new research items and new components and for some reason I cant do this without getting errors as show below.

Image
Attachments
error.jpg
error.jpg (233.8 KiB) Viewed 546 times
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

That feature will give you a clean fileset to work from but you won't be able to load it in game as-is. The thing is DW:U has certain minimum requirements, but nobody is sure exactly what they are.

I imagine you would need at least 2 races of both standard/pirate and at least 2 race families along with the appropriate bias files. Probably would need 1 of each type of component so ships can be designed by the AI. No idea how small the research tree can be, but putting a couple in each of the three categories certainly wouldn't hurt. You'd have to have at least 1 fuel type of resource, probably a good idea to have one of each of mineral/gas/luxury with the gas being the fuel.

That's all just off the top of my head but no doubt there are other basics the game just wont load without too.
User avatar
rjord2021
Posts: 2019
Joined: Fri Jun 14, 2013 2:47 am
Location: Sydney, Australia

RE: Modding Tool

Post by rjord2021 »

ORIGINAL: Sabranan

That feature will give you a clean fileset to work from but you won't be able to load it in game as-is. The thing is DW:U has certain minimum requirements, but nobody is sure exactly what they are.

I imagine you would need at least 2 races of both standard/pirate and at least 2 race families along with the appropriate bias files. Probably would need 1 of each type of component so ships can be designed by the AI. No idea how small the research tree can be, but putting a couple in each of the three categories certainly wouldn't hurt. You'd have to have at least 1 fuel type of resource, probably a good idea to have one of each of mineral/gas/luxury with the gas being the fuel.

That's all just off the top of my head but no doubt there are other basics the game just wont load without too.


Thanks for the reply..... finding the minimum requirements is what I am struggling with .
When I work it out I will post the mod to the forum which will make it easier for other modders to start from scratch.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Little update today to change the update path to a dynamic location. Won't make any difference in terms of functionality, but it will enable me to easily reset it should I ever lose my static IP address.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

I’ve pushed revision 19 which includes a redundant update test for the tool. I’ve noticed a lot of logs coming through for version 1.1.0.0 (back then there was a bug which tended to send logs regardless of whether you wanted to or not), which means that updates are not working properly for a fair few people. I suspect this is probably down to over-aggressive firewalls stopping the ClickOnce updates.

I’ve attached the latest revision to the OP so if this applies to you then you can update manually, which you really should, because a lot of bugs have been squished over the last 18 versions!
Post Reply

Return to “Design and Modding”