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 »

Hi LuciferBaphomet, I did have one other user have this issue and it turned out to be something unexpected. In theory, waiting should eventually run the program (it's silently regenerating the Native Image Cache if you're interested), but if you've not got past it already then you might try this link. Under the workaround section is the solution that worked for him. No guarantees it's the same issue of course but if you're seeing no setup.exe in your task manager and it just seems to be sitting there forever it's the same symptoms he experienced.
LuciferBaphomet
Posts: 4
Joined: Sun Jan 08, 2017 12:48 pm

RE: Modding Tool

Post by LuciferBaphomet »

Thanks Sabranan. I managed to get it installing. I noticed in one of your posts it was a "click once" app. So I googled it, realised I had to open the manifest in internet explorer, and hey presto, installation began.

I just came to post this, and saw you'd replied.
LuciferBaphomet
Posts: 4
Joined: Sun Jan 08, 2017 12:48 pm

RE: Modding Tool

Post by LuciferBaphomet »

All that did was set up a folder with a 1kb "application reference" and a desktop shortcut. I see the install downloading 5.56 MB of files, but this is all I get.

I'm seriously confused by all this.

Re the linked workaround, that seems to be regarding difficulties installing the latest net framework, which I already have installed.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

ORIGINAL: LuciferBaphomet
All that did was set up a folder with a 1kb "application reference" and a desktop shortcut. I see the install downloading 5.56 MB of files, but this is all I get.

Hmm, if the installer has downloaded the latest version (which is about the size you mentioned) it should still run said latest version after it's downloaded.
ORIGINAL: LuciferBaphomet
I'm seriously confused by all this.

Re the linked workaround, that seems to be regarding difficulties installing the latest net framework, which I already have installed.

You definitely should not need to open the manifest in IE or anything else. It should just run after being installed.

You can check to see if it's installed under the Windows "Programs and Features" list, the actual name of the application is "Distant Worlds Mod Editor" and the latest version is 0.2.3.13. Might be a plan to try uninstalling/reinstalling just to see if it was some sort of one off event.

It is possible that your firewall or antivirus is interfering with the program. I know when I go to run a new update for the first time Windows Smartscreen always kicks off and I have to tell it to run the application anyway.

I've attached a setup.zip of revision 13 to this message for you to test with, that'll negate the need for the program to immediately try to update itself.

Let me know how you get on!

[edit: Attachment Removed as obsolete]
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Ok, revision 14 is up and not gonna lie, this one was a huge pain the ass.

Thanks to looking in Rosbjerg’s Grouping Colonization Techs thread, I realised that you can actually have more than two abilities per project, either all on one line or on separate lines, or indeed a combination of the two.

Not only that, but there doesn’t appear to be a hardcoded limit on how many abilities each individual project can have. So a project that has ten thousand abilities is apparently perfectly fine as far as the DW engine is concerned.

Writing code to make sense of all the different possibilities was, challenging, to say the least. I think I’ve managed it though.

I’ve elected to set a limit of 7 abilities per project. I’ve never seen a mod use that many and if you use more than that it becomes difficult or impossible for the player to see each individual ability on a project anyway. It will let you know in the input log if you’ve got more than that and warn you that you’ll lose the extra projects.
User avatar
Shogouki
Posts: 200
Joined: Sun Aug 11, 2013 7:35 pm

RE: Modding Tool

Post by Shogouki »

Very nice!
Rosbjerg
Posts: 88
Joined: Wed Mar 11, 2015 4:02 pm

RE: Modding Tool

Post by Rosbjerg »

Well, happy I could help! :)
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Revision 15 corrects a long standing bug in the resources form that broke clearing a resource location when I introduced data validation. I've also gone ahead and set the resources form to use the same theme as the rest of the graphically updated forms.

A note about the resources form, due to the number of controls it has to destroy/generate each time the resource is changed I've made it so it makes the form invisible briefly rather than show each individual control being removed and recreated. It's still not as instant as I'd like it to be, but it's much quicker than it was.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Better solution for the resources form inbound for revision 16. It now uses the DoubleBuffered property, which helps a huge amount in destroying/creating controls and negates the need to make the form invisible, however briefly.

Also includes some tidy up of the Research Ability Subform, the clear ability button wasn't quite doing what it was supposed to. Now it is.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Revision 17 and all the forms have the new graphical theme. It's looking damn good now!
User avatar
Shogouki
Posts: 200
Joined: Sun Aug 11, 2013 7:35 pm

RE: Modding Tool

Post by Shogouki »

Man I can't wait for this to be finished!
User avatar
StarLab
Posts: 1082
Joined: Mon Aug 27, 2012 2:28 pm
Location: Ontario, Canada
Contact:

RE: Modding Tool

Post by StarLab »

I just skimmed through the many pages of this thread... a crap-ton of work in this tool. Nice commitment to a great game! I'm not a modder so I likely won't use it... but appreciate the work nonetheless. Thanks!
User avatar
Kingah
Posts: 99
Joined: Fri Aug 16, 2013 9:59 pm
Location: Teeka

RE: Modding Tool

Post by Kingah »

ORIGINAL: StarLab

I just skimmed through the many pages of this thread... a crap-ton of work in this tool. Nice commitment to a great game! I'm not a modder so I likely won't use it... but appreciate the work nonetheless. Thanks!

Have been reading this thread since it was first started and I have to second Starlab on this. I've tried modding the game before but being the lazy ass that I am I always gave up because of the sheer amount required to make a decent mod in the environment that vanilla offers. This tool is going to make it so much easier for all the serious modders out there to make progress and not be stuck scanning the text for a misplaced comma.
User avatar
Capshades
Posts: 138
Joined: Sat Aug 02, 2014 8:17 pm

RE: Modding Tool

Post by Capshades »

Also going to help solve bugs in current mods lol...
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Thank you guys, much appreciated!

For revision 18 I've implemented a checkbox to disable backup file creation if you want. Naturally it's a good idea to always make your own, but the tool is stable enough and consistent enough now that I generally feel pretty confident about outputting without having to worry it's going to screw something up.

I've also changed the input/output log colours a bit, introducing a light blue for lines that are just informing you about something and leaving the orange as the warning colour, letting you know that a value will be dropped or changed.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

A brand new feature for revision 19, a tech tree viewer!

I've spent the past several hours on this and while complicated, the most difficult part was getting visual studio to actually draw the arrows and keep them there. It does work quite nicely though. A couple notes:

a) The way the arrows work is they're saved as a bitmap in memory and that bitmap is set to be the background image of the panel with the techs in it. But bitmaps are limited to 2GB in Visual Studio, so it's possible to overload it if your tech level or row number is too high. To help with this I've done the same thing that Distant Worlds itself does, which is that if your tech level is 100 or more for a project then it doesn't display in the tree. There 'should' be no need to go anywhere near that number, especially since modders have the Base Cost Multiplier.

b) Right now projects list their names and ID's, their cost, any components they enable and their parents. I figured this is the most critical info to provide. I'll program in the other stuff too at some point, though due to space limitations I might have a drop-down box or something to select the values you want to examine.

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

RE: Modding Tool

Post by Sabranan »

For revision 20, a few things...

I noticed that missing policy files didn't quite get created as they should, so I've fixed that. I've also made a small change to the policy form, it now has a check-box to switch to the pirate races rather than listing them separately.

More excitingly, the tech tree viewer has had a bit of an upgrade:

a) I've switched to using textboxes rather than labels to display the projects, so now you can copy info out of them if you want.

b) Double clicking a project will bring up another sub form, which will give you the details of the project. Over the next couple revisions I’m planning to have that display a great deal of info!

c) All the project boxes are considerably smaller; they’re now more or less the same size that they appear in DW itself.

d) I’ve adjusted the way it calculates the project cost so it’s more accurate.
User avatar
Capshades
Posts: 138
Joined: Sat Aug 02, 2014 8:17 pm

RE: Modding Tool

Post by Capshades »

Not sure if it's just my computer or not, but when I accidentally selected the wrong path for the mod folder on start-up, after giving the warning message it froze and the only thing I could do was X out of the program....
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Thanks Capshades, I've fixed that issue now so that if you select an invalid folder it should re-enable the "select mod folder" button so you can try again.

More importantly, I realised I forgot to make the button that opens the tech tree viewer I've been talking about for the last two posts actually visible to users...

So revision 21 and now 22 fixes both those problems.
Sabranan
Posts: 474
Joined: Wed Feb 24, 2016 4:05 pm

RE: Modding Tool

Post by Sabranan »

Revision 23 is up and the rest of the basic research info has been added. So now opening up a project in the tech tree viewer will tell you about things like any components it enables/improves, any abilities/fighters/facilities it enables, any race restrictions etc. I've also set it so that the tech tree viewer will be small enough to fit on a 720p screen, but it has the maximise button enabled so if you have a better resolution you can take full advantage of it.

Here's a screenshot to show it off:

Image
Post Reply

Return to “Design and Modding”