Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

RE: Modding Tool

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Design and Modding >> RE: Modding Tool Page: <<   < prev  8 9 [10] 11 12   next >   >>
Login
Message << Older Topic   Newer Topic >>
RE: Modding Tool - 2/14/2017 7:53:12 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
Thank you very much NegativeZ3R0!

rjord, I can't add a maximise button because maximising it would corrupt the view of the form (none of the controls would resize).

Minimise I can do though, you'd just restore it by hitting the program icon in the task bar.

_____________________________


(in reply to rjord2021)
Post #: 271
RE: Modding Tool - 2/14/2017 9:07:22 PM   
NegativeZ3R0

 

Posts: 2
Joined: 2/13/2017
Status: offline
I am actually learning to program myself, and so seeing you make a tool like this is really inspirational.

That aside, thanks to your tool, most of the tedium and easily made mistakes are now basically taken out of the modding process.
A long time ago I made a personal mod for myself, but lost it to a burnt out HDD. Now what took me a few days, could easily take me an half an hour.

When Distant Worlds II comes out, I hope that you, or someone like you, is around to make a tool like this for the game when it is released.

(in reply to Sabranan)
Post #: 272
RE: Modding Tool - 2/14/2017 11:06:07 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
At long last…

It’s been just under a year since I started on this tool. I did consider waiting until the 24th so I could say it’s been exactly a year, but I figured why make people wait 10 more days for no good reason? Back then, another MatrixGames user had a similar project that had been going on two years and ended up abandoned with no release. I figured anything I can make has to be better than that.

40,000+ lines of code later and we’re finally here. Version 1.0.0 of the tool is out, and marks the end of development for this project. That’s not to say I won’t fix any issues that come up or implement feature requests though, so please feel free to keep reporting and suggesting.

Of course, at some point Distant Worlds 2 will come out and I’ll use this as a basis to make an editor for that too. Hopefully it’ll be easier now that I have a decent idea of what I’m doing and lots of code to reference. It should also mean a release of the editor for DW2 within months after the game releases as opposed to almost 7 years later. I expect that will mean the DW2 editor gets rather more use out of it than this one.

That said, this is still a fantastic game in its own right with plenty of potential for creative folks to work their magic. I hope this tool helps you guys to do that, and you can bet I’ll be trying out the fruits of your efforts.

Happy modding!

_____________________________


(in reply to NegativeZ3R0)
Post #: 273
RE: Modding Tool - 2/15/2017 2:05:52 PM   
Data


Posts: 3909
Joined: 1/3/2011
Status: offline


Seriously tho, great great job


< Message edited by Data -- 2/15/2017 2:06:13 PM >


_____________________________

...Igniting stellar cores....Recharging reactors...Recalibrating hyperdrives....

(in reply to Sabranan)
Post #: 274
RE: Modding Tool - 2/16/2017 12:10:29 AM   
darkriot

 

Posts: 32
Joined: 7/5/2014
Status: offline
I will name a Star System after you Sabranan

< Message edited by darkriot -- 2/16/2017 12:12:44 AM >

(in reply to Data)
Post #: 275
RE: Modding Tool - 2/16/2017 11:31:11 PM   
Capshades

 

Posts: 138
Joined: 8/2/2014
Status: offline
As will I.

(in reply to darkriot)
Post #: 276
RE: Modding Tool - 2/17/2017 6:51:57 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
Thank you so much guys!

I've just published a revision to deal with a little bug a user reported where the proportion values for the race victory conditions didn't save properly. Easy fix and by all means, if you guys find anything else like this do report it either here or by PM (using the log reporting tool in the mod would be very helpful as well).

_____________________________


(in reply to Capshades)
Post #: 277
RE: Modding Tool - 2/18/2017 6:44:28 PM   
Capshades

 

Posts: 138
Joined: 8/2/2014
Status: offline
It's probably got something to do with me not knowing what I'm doing, but I have it reading in from this almost blank mod folder, it's still preventing me from deleting resources:


(in reply to Sabranan)
Post #: 278
RE: Modding Tool - 2/18/2017 7:07:27 PM   
Capshades

 

Posts: 138
Joined: 8/2/2014
Status: offline
Also getting red box for values over 1 in "Colony Manufacturing Level," there is no limit on this as far as I know, it's based on population*development level.

< Message edited by Capshades -- 2/18/2017 7:14:25 PM >

(in reply to Capshades)
Post #: 279
RE: Modding Tool - 2/19/2017 2:15:41 AM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
Hi Capshades,

The Colony Manufacturing Level issue is because the data validation wasn't set properly for some reason, I've pushed a revision to deal with that.

The other issue is happening because the tool loads mods in the same way DW does, I.E. if any files are missing, it'll use the ones in the DW installation folder instead. That results in you having the default components file loaded instead. Of course, the default components already reference the various strategic resources in the game.

So I've implemented a new feature to wipe all the values in the currently loaded mod and just use the absolute minimum of one project per file (so one research project, one race, one resource etc.). It should be quite useful for anyone wanting to start work on a brand new mod.

If you've already got some stuff you've worked on (say a resources.txt in your case):

1) backup the files you've worked on to somewhere outside the mod folder
2) load the mod and wipe the values
3) output everything to disk
4) copy your backup back into your mod folder
5) reload the mod

That will keep your work and give you a blank template to work from for everything else. For the resources.txt file that should work, because resources.txt doesn't contain any references to any other file.

_____________________________


(in reply to Capshades)
Post #: 280
RE: Modding Tool - 2/19/2017 9:58:05 AM   
Ranbir


Posts: 142
Joined: 3/28/2010
Status: offline
Well done. I love modding tools like this, reminds me of the Civ 2 editor that made things an easy breeze for a 10 year old me to make whatever I wanted.

_____________________________

"The imaginary number is a fine and wonderful resource of the human spirit, almost an amphibian between being and not being." - Gottfried Leibniz

(in reply to Sabranan)
Post #: 281
RE: Modding Tool - 2/19/2017 2:03:01 PM   
salemonz

 

Posts: 16
Joined: 5/19/2015
From: USA
Status: offline
Thank you very much for this tool, Sebranan! I'll be checking it out, for sure :)

Yeah, these forums aren't as lively as they used to be. You could also post a link to your mod to the Distant Worlds Reddit. There are discussions there, too :)

(in reply to Sabranan)
Post #: 282
RE: Modding Tool - 2/19/2017 9:24:03 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
Yeah that's a good idea salemonz, I'll make a post there. Might also stick one in the Steam forum for the game too, can't hurt.

_____________________________


(in reply to salemonz)
Post #: 283
RE: Modding Tool - 2/21/2017 3:59:36 AM   
salemonz

 

Posts: 16
Joined: 5/19/2015
From: USA
Status: offline
I just saw your post on Reddit. Hope you get some more downloads!

(in reply to Sabranan)
Post #: 284
RE: Modding Tool - 2/24/2017 1:20:06 AM   
darkriot

 

Posts: 32
Joined: 7/5/2014
Status: offline
I found a bug with the resource inputs. It wont let you add additional resource locations after the first one is filled out. It happened on resource 9 and 25 for me

(in reply to salemonz)
Post #: 285
RE: Modding Tool - 2/25/2017 1:14:36 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
darkriot, is this with 1.0.0.3? I pushed a minor fix related to this with revision 3 and I'm not sure if you posted before or after I did that.

_____________________________


(in reply to darkriot)
Post #: 286
RE: Modding Tool - 2/26/2017 2:35:14 AM   
darkriot

 

Posts: 32
Joined: 7/5/2014
Status: offline
yes. I even uninstalled and reinstalled to make sure. I get an unhandled exception for value 5.

(in reply to Sabranan)
Post #: 287
RE: Modding Tool - 2/26/2017 10:35:48 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
When you reinstalled, did the tool update to 1.0.0.3? The version number is on the bottom left of the main menu under the "about" section.

I ask because I can't seem to reproduce the issue, for me, as soon as you select the "Location Type" in one column the fields in the next column are enabled. You do have to work left to right, it won't let you write values more than one column ahead of whichever one has the "Clear" button enabled, but that's by design so you don't have blank location values getting outputted.

_____________________________


(in reply to darkriot)
Post #: 288
RE: Modding Tool - 2/26/2017 11:32:24 PM   
darkriot

 

Posts: 32
Joined: 7/5/2014
Status: offline
It is the latest version. I found the problem tho. Apparently I left 2 values blank when I outputted and it wouldn't recognise the blanks when I reloaded the mod

(in reply to Sabranan)
Post #: 289
RE: Modding Tool - 2/27/2017 12:59:59 AM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
Ah yes that would probably do it. Usually when it crashes I find it's because of some invalid (or null) value being loaded in, but of course it's somewhat impractical to have code everywhere to test each value before it loads.

I'm actually working on a data validation routine to run when you load a mod to catch this sort of thing before you actually load the forms. I don't know how fast it will run (since eventually it will have to check every single value in the mod) but VB is surprisingly quick at looping through large arrays so if it's efficient enough I may enable it by default.

So right now I've just got the research file's project lines being done, and it shows up on the input log like this (this is testing with the WH40K mod):

Beginning data validation on Research
Invalid special function code value "190" found in Research record 553, value changed to "0"
Invalid special function code value "190" found in Research record 623, value changed to "0"
Invalid special function code value "190" found in Research record 676, value changed to "0"

Data validation on Research complete, found and corrected 3 values

If this wasn't corrected, it would cause a crash when loading those research projects into the research form since it's trying to set the special function code drop-down box to an index that doesn't exist. DW itself has also been known to have a hissy fit due to this sort of thing so I think this will not only reduce crashes with the tool but it should also be brilliant for just testing mods to make sure you haven't forgotten values or made a typo.

_____________________________


(in reply to darkriot)
Post #: 290
RE: Modding Tool - 2/27/2017 3:08:14 PM   
Twigster

 

Posts: 1023
Joined: 1/13/2015
Status: offline
This is me dding my voice to the cacophony of awe, praise and thanks for this, Sabranan!!!

(in reply to Sabranan)
Post #: 291
RE: Modding Tool - 2/27/2017 11:04:59 PM   
Capshades

 

Posts: 138
Joined: 8/2/2014
Status: offline
Would be really helpful in converting all the old mods into usable versions too...

(in reply to Twigster)
Post #: 292
RE: Modding Tool - 3/2/2017 11:07:25 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
So in preparation for the next feature release (1.1.0.0) I figured I’d show off some of what’ll be coming in the next partial feature release (1.0.1.0). This revision (number 4) contains my latest work on the on-load data validator. It now checks the research file with the exception of the ability lines and the component improvement lines (they’re a fair bit more complex because the valid values change depending on the ability/component type).

As an example of what this can do for you, I’ve manually introduced some errors into the default games first project “Wave Weapons”. It looks like this:

PROJECT ;0, Wave Weapons, X, -5, 10, armour, I'm Special, 10000000000.0,
COMPONENTS ;129, , 4
FIGHTERS;48
FACILITY; 4
PLAGUE CHANGE; -1, Random Plague, 200000000, -10x00, Duration, -200000000, 50%, 2 Hours
ALLOWED RACES; happyonish
PARENTS ;N

As you might imagine, DW would freak if you tried to load a research.txt file containing the above into it and so would my tool when you tried to open the project in the research form. It can’t allocate words to a number field or set a drop-down box to a negative value or something beyond its range. It also doesn’t always deal well with missing values like the blank component or the orphaned “N” in the parents line.

Until now.

Now it pre-emptively finds those invalid values and sets them to something that is valid. Usually this is just a default value so you’ll probably see a lot of 0’s in the log.

But it can also fix issues like the blank components value, it’ll remove that value entirely and move the third one up a level. So “COMPONENTS ;129, , 4” becomes “COMPONENTS ;129, 4” (or actually it becomes “COMPONENTS ;0, 4” since 129 isn’t a valid component).

Another useful thing it can do is try to figure out which genuine race name is closest to what you’ve typed in and sets it to that. So “happyonish” gets changed to “Haakonish” rather than just getting dropped. Very handy for when you make a simple capitalisation error or you’ve missed a letter.

This is the actual contents of the input log when loading in the above project:

Beginning data validation on Research
Invalid tech level value "X" found in Research record 0) Wave Weapons, value changed to "0"
Invalid row value "-5" found in Research record 0) Wave Weapons, value changed to "1"
Invalid industry value "10" found in Research record 0) Wave Weapons, value changed to "0"
Invalid category value "armour" found in Research record 0) Wave Weapons, value changed to "0"
Invalid special function code value "I'm Special" found in Research record 0) Wave Weapons, value changed to "0"
Invalid base cost multiplier override value "10000000000.0" found in Research record 0) Wave Weapons, value changed to "0"
Invalid enable component 0 value "129" found in Research record 0) Wave Weapons, value changed to "0"
Invalid enable fighter 0 value "48" found in Research record 0) Wave Weapons, value changed to "0"
Invalid plague change index value " -1" found in Research record 0) Wave Weapons, value changed to "0"
Invalid plague change mortality rate value "200000000" found in Research record 0) Wave Weapons, value changed to "0.001"
Invalid plague change infection chance value "-10x00" found in Research record 0) Wave Weapons, value changed to "0"
Invalid plague change duration value "Duration" found in Research record 0) Wave Weapons, value changed to "1"
Invalid plague change exception mortality rate value "-200000000" found in Research record 0) Wave Weapons, value changed to "0.001"
Invalid plague change exception infection chance value "50%" found in Research record 0) Wave Weapons, value changed to "0"
Invalid plague change exception duration value "2 Hours" found in Research record 0) Wave Weapons, value changed to "1"
Invalid race (allowed races) value "happyonish" found in Research record 0) Wave Weapons, value set to "Haakonish"
Invalid project parent 0 value "N" found in Research record 0) Wave Weapons, value changed to "0"
Invalid project parent 0's obligatory flag value "" found in Research record 0) Wave Weapons, value changed to "N"

Data validation on Research complete, found and corrected 18 values

As it turns out, this runs really well so I've set this to run by default for the time being. If you do find it's causing you issues there's a new checkbox on the main menu to disable it.

Minor warning, my free digital certificate has expired so I've published this as unsigned to avoid forcing users to reinstall which happens when you sign it with a new certificate. It'll say "Unable to verify publisher" or something similar and ask if you still want to install. It seems redundant to sign an application that's just not used enough to gain trust status from Microsoft and naturally I'm unwilling to pay for a permanent certificate when I'm doing this for free.

_____________________________


(in reply to Capshades)
Post #: 293
RE: Modding Tool - 4/3/2017 7:22:46 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
1.0.1.0 is up, a partial feature release that includes data validation on all of the research.txt file.

Next up will be 1.0.2.0, which will have the components.txt file done. I’m hoping this is going to be considerably easier now that I’ve sorted out the data validation rules for the component values already, that part took up about 90% of the time for the research.txt file.

Enjoy!

_____________________________


(in reply to Sabranan)
Post #: 294
RE: Modding Tool - 4/3/2017 11:18:30 PM   
Capshades

 

Posts: 138
Joined: 8/2/2014
Status: offline
So my understanding is this will allow us to load in an already modified components file, and have it check for errors based on the current DW:U formatting, correct? Meaning it should be relatively easy to resurrect all the old DW:Shadows mods into being playable for Universe once you finish the other parts?

(in reply to Sabranan)
Post #: 295
RE: Modding Tool - 4/3/2017 11:57:42 PM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
I only started playing DW after the release of Universe so I'll have to ask, did Shadows even have a components file? I've tried downloading a few Shadows mods but none of them had it, and I can't find reference to it in the modding guide for Shadows.

But basically yeah, it'll check for any invalid values and show them in the input log, so you'll be able to correct them in the tool (assuming it's not possible to just guess the correct value like it does with the "ALLOWED RACES" line). It'll set those variables that it corrects to a standard default value so it at least won't cause a crash if you try to load it (either in DW or my tool).

_____________________________


(in reply to Capshades)
Post #: 296
RE: Modding Tool - 4/4/2017 10:12:50 PM   
Capshades

 

Posts: 138
Joined: 8/2/2014
Status: offline
Ahhhh, I honestly don't know, I thought the old BSG mod did at least, perhaps not. Regardless, this will take outdated/buggy mods and make them usable again. Maybe someone more knowledgeable than me could compile them all?

(in reply to Sabranan)
Post #: 297
RE: Modding Tool - 4/5/2017 10:43:33 PM   
rjord2021


Posts: 1992
Joined: 6/14/2013
From: Sydney, Australia
Status: offline
My understanding is that the components.txt file was introduced in Universe as a new file...... mods created for Shadows would need to go through the process of being converted over to Shadows.

The Battlestar Galactica mods prior to Universe were for Return of the Shakturi and Legends but I do not think there was a version for Shadows.

_____________________________



(in reply to Capshades)
Post #: 298
RE: Modding Tool - 4/6/2017 1:41:33 AM   
Sabranan

 

Posts: 418
Joined: 2/24/2016
Status: offline
Ah ok, just to get a better idea I've downloaded the Legends version of BSG and had a looksie. The first issue is just that some of the folders are in different locations and/or differently named (ship images being contained in \shipimages as opposed to \images\units\ships for example), but that's easy enough for anyone to fix with some cutting and pasting just using the default files as a guide to the new layout.

There don't appear to be any root files for that mod other than biases.txt, which would just need renaming to raceBiases.txt. That makes things easy, because there's literally nothing to change to make them work for Universe, it would just use the default files anyway.

The Characters folder seems to be the same as it is now, as does the dialog folder barring a couple of obsolete variables that the tool already accounts for because they were mistakenly included in several Universe mods. The Races and Policy folders also don't seem to contain anything that data validation wouldn't sort out, except the policies files have some extra lines for ship design which are obsolete now due to Universe's designtemplates folder.

The designtemplates folder is the biggest difference, but the primitive version of design templates stored in the policies just doesn't have enough information there to automatically translate it into a Universe design template, it's just too general and open to interpretation what the flat values should be. Creating new design templates will likely therefore be the biggest job in getting an old mod up to Universe standards.

So basically when my tool is at 1.1.0.0 and you wanted to update an old mod to work with Universe you'd have to:

1) Rename some of the files/folders to their Universe equivalents.
2) Load the mod into the tool.
3) Create new design templates.
4) Output everything.

And in theory that should be it, you'd have a Legends or Shadows mod that works for Universe.

_____________________________


(in reply to rjord2021)
Post #: 299
RE: Modding Tool - 4/7/2017 5:14:33 PM   
Shark7


Posts: 7937
Joined: 7/24/2007
From: The Big Nowhere
Status: offline
Noticed the other day that the editor is not picking up on my pre-existing added races when opening the race biases editor. So loading my custom theme, and pulling up the race biases tab, all the vanilla races are listed in the drop down menu, but my custom races do not show up at all.

So unless I've managed to point it to the wrong files? Don't see how, went to my DW/customiztion/theme folder to load from. Might want to check on that by testing a test theme rather than just editing from the base game. Could just be me though.

Just to verify, this is a fully working DW:U theme. I'm just making some balance tweaks to it and stumbled on this issue.

_____________________________

Distant Worlds Fan

'When in doubt...attack!'

(in reply to Sabranan)
Post #: 300
Page:   <<   < prev  8 9 [10] 11 12   next >   >>
All Forums >> [New Releases from Matrix Games] >> Distant Worlds 1 Series >> Design and Modding >> RE: Modding Tool Page: <<   < prev  8 9 [10] 11 12   next >   >>
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

3.547