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 »

Revision 10 is up, Plagues and Resources now have data validation enabled.

Just realising what a nightmare the components form could be, with potentially 7 different values for each component type all having different valid ranges for their values. Might just leave that till last...
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Revision 11 is up, Fighters and Facilities now have data validation enabled.

It seems that some of the values don't really have a limit, so where that's the case they're limited to the max value for an integer which is 2147483647.

Facilities gave me some good practice for the components form, I think I've got a good basis for dealing with that now. Still, gonna leave the component values (and the identical component improvement values under research) as the last thing I implement.
Cepheiden
Posts: 28
Joined: Tue Dec 29, 2015 2:30 am

RE: Modding Tool

Post by Cepheiden »

After using the tool to edit research.txt I either get the game stopping to work when starting a new game or the game not starting at all.

The Error is kind of reproducible. It doesn't happen when I only modify 1 or 2 entries, making me think it works. Then when I go ahead and modify a few more and test it again, it suddenly doesn't work again.
I have a hard time telling which action it is.
I get the crash on starting a new game after deleting a research project, which is weird since I checked the file and all the references and IDs have been changed according to the number of erased projects.
I don't know what causes the game not starting at all. It just happens after editing a couple of entries. Again, there is nothing suspicious in the research.txt file, yet it won't start the game unless I remove every project from it. There might be something invisible or really minor being added by the tool that makes it stop working.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Hi Cepheiden,

There should be a crash log in:

%appdata%\Code Force Limited\Distant Worlds\DW crash log.txt
or
%systemdrive%\Users\YOURUSERNAME\Documents\my games\Distant Worlds Universe\DW_CrashDump.txt

Which would be useful to have along with a copy of a crash inducing research.txt file.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ah, I’ve just managed to fix the deleting projects issue. Any projects that had more than one parent reference only had the first one changed, same issue on the components form and with inserting projects too.

I’ve tested it as best I can, but I’m finding I’m going from a “crash on new game” state to a proper load with the change so I think that’s sorted.

That may or may not solve the other issue depending on whether you’ve deleted/inserted projects while modding, if you’re still getting that problem then again, a crashing research.txt would be very useful.

Since that bug would effectively corrupt a research.txt or components.txt file, revision 12 is obligatory.
Cepheiden
Posts: 28
Joined: Tue Dec 29, 2015 2:30 am

RE: Modding Tool

Post by Cepheiden »

That was fast.
You are right I should have thought about including those files earlier. If I ever manage to create another faulty file I will post it here.

Though apparently, when the game "crashes" with the windows message that the program has stopped working, it apparently doesn't write anything in the log file. Mine is empty except for a crash that resulted from something I typed in manually before even using your tool.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Yeah I saw it wasn't creating log files. This also explains why in one of my tests a while back I suddenly found all sorts of links between projects that weren't supposed to exist, it was like a spiderweb lol.

Anyway, revision 13 is up with the components and research forms (and subforms) having data validation, with the exception of the component values. That's literally the last bit now, so hopefully when I get a few hours to knock that out I'll be ready to look at graphics and finishing this project off!
User avatar
ChildServices
Posts: 47
Joined: Mon May 12, 2014 6:47 am
Location: Australia, mate

RE: Modding Tool

Post by ChildServices »

Is anybody else having the same problem as me where their anti-virus absolutely refuses to let them run this?

Edit: This started happening after it finally did let me run them
PLATFORM VERSION INFO
Windows : 6.1.7601.65536 (Win32NT)
Common Language Runtime : 4.0.30319.42000
System.Deployment.dll : 4.6.1055.0 built by: NETFXREL2
clr.dll : 4.6.1076.0 built by: NETFXREL3STAGE
dfdll.dll : 4.6.1055.0 built by: NETFXREL2
dfshim.dll : 4.0.41209.0 (Main.041209-0000)

SOURCES
Deployment url : file:///A:/Games/Steam/steamapps/common/Distant%20Worlds%20Universe/Customization/MODS/Tools/Distant%20Worlds%20Mod%20Editor.application
Deployment Provider url : http://sabranan.plus.com/shares/Externa ... pplication
Server : Apache

ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of A:\Games\Steam\steamapps\common\Distant Worlds Universe\Customization\MODS\Tools\Distant Worlds Mod Editor.application resulted in exception. Following failure messages were detected:
+ The deployment identity at the deployment provider is not the same as the original deployment identity.

COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.

WARNINGS
* The manifest for this application does not have a signature. Signature validation will be ignored.

OPERATION PROGRESS STATUS
* [26/10/2016 4:59:54 PM] : Activation of A:\Games\Steam\steamapps\common\Distant Worlds Universe\Customization\MODS\Tools\Distant Worlds Mod Editor.application has started.

ERROR DETAILS
Following errors were detected during this operation.
* [26/10/2016 4:59:55 PM] System.Deployment.Application.InvalidDeploymentException (SubscriptionSemanticValidation)
- The deployment identity at the deployment provider is not the same as the original deployment identity.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.DownloadManager.FollowDeploymentProviderUri(SubscriptionStore subStore, AssemblyManifest& deployment, Uri& sourceUri, TempFile& tempFile, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.DownloadManager.DownloadDeploymentManifestBypass(SubscriptionStore subStore, Uri& sourceUri, TempFile& tempFile, SubscriptionState& subState, IDownloadNotification notification, DownloadOptions options)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut, String textualSubId, String deploymentProviderUrlFromExtension, BrowserSettings browserSettings, String& errorPageUrl)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)

COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Alexander the Great, his name struck fear into hearts of men.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Hmm, anti-virus may well kick in for an application like this since obviously I'm a one-man publisher and it won't recognise the tool as being safe. Generally, the solution is to make an exception in your anti-virus software so it lets the application run, the "actual" installation path will be under "%userprofile%\AppData\Local\Apps\2.0\" if you need that to make an exception rule. It'll have a random looking folder name that'll be a bunch of letters and numbers, it's different for each machine so I can't tell you exactly what that'll be, but (just in case you have more than one ClickOnce application installed) there should be a "Distant Worlds Mod Editor.exe" file under there somewhere.

Obviously making an anti-virus exception requires a certain amount of faith that I'm not a malicious git, but I'm assuming if you installed the application in the first place you must trust me to some extent!

As for the error message, I believe at some point I had to change the certificate used to sign the application and that could cause this error. The solution here is to uninstall the tool (Control Panel / Programs and Features in Windows 10) and reinstall using the version in the OP.
User avatar
ChildServices
Posts: 47
Joined: Mon May 12, 2014 6:47 am
Location: Australia, mate

RE: Modding Tool

Post by ChildServices »

Ah, cheers! Reinstalled it and it works now.
Alexander the Great, his name struck fear into hearts of men.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

So, here we are with 0.2.3. That's data validation done and dusted!

It means that (aside from any bugfixes that might be needed) that’s all that needs doing to the code, so right now we have a completed application!

Except for graphics.

Now, as you can probably tell, I'm no artist. I make functional tools not pretty ones.

Fortunately, my girlfriend is.

So she’s going to be working on making it look a bit better. That means potentially moving/resizing controls, adding images and whatever else it is artists do. It shouldn’t involve any code changes. If I have ended up changing any code to fix bugs or whatever then I can just copy/paste any changed code on top of her version and jobs a good un.

Once we’re happy with it I’ll be publishing it as 1.0.0. If any bugfixes are needed before then I’ll just publish them as revisions to 0.2.3.

So now would be a good time to start actually using the tool and reporting any problems you have with it. I’ll be fixing issues for some time yet, but sooner or later I’ll want to be moving on to some new project which will give me less time to sort out issues with this tool.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Just pushed a new revision to implement something I've been thinking about doing for a while, a log reporter.

If you have problems using the tool, you can now tick the new "Send Log File on Close?" box on the main menu. If you do this, when you close the tool it'll send me a log file (via encrypted FTP) which will contain your input/output log and should include an error message if one was generated while trying to input/output. It'll be a big help if you use that in addition to reporting issues here or by email.
User avatar
Shogouki
Posts: 200
Joined: Sun Aug 11, 2013 7:35 pm

RE: Modding Tool

Post by Shogouki »

How's it coming? Close to 1.0 yet?
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

I haven't had any bug reports so it seems that it works properly, but my gf works full time so she's a bit more limited on when she can work on the artistic side of things.

It is happening though, here's a little screenshot:

Image

This is far from complete and I don't want to push revisions while it's in this sort of half-done state, but that should give you a general idea of the style we're going for.
User avatar
Shogouki
Posts: 200
Joined: Sun Aug 11, 2013 7:35 pm

RE: Modding Tool

Post by Shogouki »

Looking very awesome! Awesome work, both of you! [&o]
User avatar
Capshades
Posts: 138
Joined: Sat Aug 02, 2014 8:17 pm

RE: Modding Tool

Post by Capshades »

ORIGINAL: Shogouki

Looking very awesome! Awesome work, both of you! [&o]
^ This
Unbroken
Posts: 21
Joined: Fri Aug 22, 2014 11:26 am

RE: Modding Tool

Post by Unbroken »

This has been pretty damn helpful for me in trying to rejig the research tree more towards what I wanted.

However, there've been times where the editor inserts parents for various projects on its own. Also, the editor seems to be confusing the ID for Ocean and Deserts when modifying specific traits, whether related to techs or races. For example, I can pull up the Dhayut's default record and the editor tells me their HW type is Ocean.

When creating research orders, there's no button to delete techs from the order, which is a mild inconvenience. It'd also be nice if the editor remembered where the user has installed DWU so you don't always have to re-navigate to the folder every time the editor is run.

Just my two cents. Looking forward to the completed version!
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Hi Unbroken,

Thanks for the feedback! Ask and thou shalt receive…

I haven’t been able to reproduce the extra parent lines, if you manage to consistently make this happen can you let me know how?

I’ve sorted the native planet type; this was just having the Ocean/Desert planet type in the wrong order. I’ve had a look through the other references to colony types and as far as I can tell they’re all correct, feel free to report if I’ve missed any more.

Research orders can now be removed with a double click on the one you want to get rid of. Adding them again them will still work too.

I’ve set it to store the installation folder in the registry and prioritise that as the default if it exists. That way you should only have to find it once. Clearing the recent mod folders list will also clear this value, so you can reset it. You can also regedit to “HKEY_CURRENT_USER\SOFTWARE\Distant Worlds Mod Tool” and delete/change it manually if need be.

This is revision 4, and contains the splash screen and main menu updated with some graphical changes, it’s not complete but I think I’ve set it so it’s clear and usable (at least, once you’ve loaded a mod). I haven’t made it obligatory so if people don’t want to deal with changed graphics yet they don’t have to.
Unbroken
Posts: 21
Joined: Fri Aug 22, 2014 11:26 am

RE: Modding Tool

Post by Unbroken »

It seemed to occur mostly when I was adding/removing parents and then switching to different projects. The editor also seemed to not always remove the entire parent entry, as I'd run into parsing errors with the game and discover that there'd be an orphaned N or Y somewhere after I had removed a parent, looking like this: "PARENTS ; 265, N, N"

It could also be related to deleting projects and the subsequent re-ordering causing issues.
Mujik
Posts: 2
Joined: Tue Nov 22, 2016 3:17 am

RE: Modding Tool

Post by Mujik »

Hey great tool mate! thanks for all your effort.

I used to play a lot of DW a few years ago, and decided do reinstall and play a little more, when i went to look for mods i found your tool, and I'm glad that i did [:)]
it makes so much easier to edit and tweak values in order do merge mods and adapt them to my style of gameplay...
just a quick feedback, when I'm going to edit any decimal values in your tool it shows decimal points in the separator as pink and decimal commas in green...
I'm fairly certain that i should be using points instead of commas (even the tip that appears when i hover the cursor says so). So, is it a problem with my keyboard configuration (just guessing) or is it something with the tool?
Post Reply

Return to “Design and Modding”