Logo Platform
logo amplifiers simplified

modding tutorial: discussion

Reply
Copied to clipboard!
12 years ago
Aug 9, 2012, 4:55:19 PM
(moderator action: davea: split non-dev team posts out of official tutorial thread; some loss of context, but it keeps the tutorial thread clean)



Thank you LoiCus-, very helpful!
0Send private message
12 years ago
Aug 9, 2012, 4:56:26 PM
Very Nice ! Can't wait for more..



Please stay like you are Amplitude! You are by far the best Developer for us the Community!
0Send private message
12 years ago
Aug 9, 2012, 5:15:48 PM
I guess it's time to get working on the Inferni Pugno.



I'll get started ASAP.
0Send private message
0Send private message
12 years ago
Aug 9, 2012, 5:49:14 PM
You can't imagine how wonderful it is when you can create mod without having to worry about characters :P



I can finally do things freely and only crash messages I get is when I try to do something what game doesn't understand. (hey, removing access to any ships should be normal action :P)
0Send private message
12 years ago
Aug 9, 2012, 5:57:00 PM
Let the games begin!
0Send private message
12 years ago
Aug 9, 2012, 5:58:27 PM
custom galaxy generators are working.

you can even make custom config options which will show up.

and the custom dll is loading.

Expect my Galaxy Generator in a few days.





edit:

now we need support to load multiple mods.

And to only change parts of it.

When you only make xml files with your changes it will crash smiley: frown
0Send private message
0Send private message
12 years ago
Aug 9, 2012, 8:07:18 PM
Dagobert wrote:
custom galaxy generators are working.

you can even make custom config options which will show up.

and the custom dll is loading.

Expect my Galaxy Generator in a few days.





edit:

now we need support to load multiple mods.

And to only change parts of it.

When you only make xml files with your changes it will crash smiley: frown




Indeed smiley: biggrin. It wasn't between the tutorial steps so assumed... too much it seems.
0Send private message
12 years ago
Aug 9, 2012, 8:53:31 PM
For GalaxyShapes for example.

It would be nice to have a Folder with lots of xml files and each one descibes one Shape.



Also removing GalaxyShapes from GalaxyConfiguration.xml



But for changes in other xml files.

In Index.xml is basicly the complete database.

I wonder if it is possible to put all the changes you make in a seperate file and only add it to the end of the specific list.

This would also reduce filesize.



Ty for your Tip.

And one more Protips:

Use an xml editor that can validate xml files.

Sometimes you look over 1 file 10 times and you dont see the error.

And it´s faster than starting the mod and see if it works.
0Send private message
12 years ago
Aug 9, 2012, 9:28:46 PM
That is what I'm planning to do:



1) All new code that I add will be in my own XML files



2)Any default code that I 'tweak' will also end up in my custom XML file with the required XML file(s) cleaned of matching code. Worst case is I might have to include a mostly delete default XML file in my distribution



3)Use a custom localization file.



The above 'rules' will hopefully prevent extensive updating whenever the dev release patches. All that will be required is simple removing the limited offending code rather the redoing every change to all the required files. Side benefit is that I can simple create one XML file that I can edit rather then trying to match their formatting structure. Basically, limit modification of the default XML files as much as possible
0Send private message
12 years ago
Aug 9, 2012, 10:07:25 PM
I would love to do (1) everywhere, but you cannot use this approach to delete an object or to change a number on an existing object.
0Send private message
12 years ago
Aug 9, 2012, 11:17:03 PM
I guess I didn't explain it as well as I hoped I did... here goes:



Say I want to modify the below code so TerraformationToBarren only cost 100 instead, what I'm proposing is the following. Instead of simply modifying the value in the PlanetImprovement.xml file, copy that section of code over to your custom XML file, and remove that section of code from the PlanetImprovement.xml file.



[CODE]
ColonizeDependance="ColonizeBarren">

PlanetTypeBarren

($(PlanetTypeDesert) or $(PlanetTypeArctic) or $(PlanetTypeLava)) and $(PlanetStatusColonized)



%TerraformationToBarrenTitle

%TerraformationToBarrenDescription





[/CODE]



By modifying your custom XML file rather then the PLanetImprovement.xml file, you're avoiding a lot of potential conflicts down the road, as when a new patch is released all you have to is delete that section of code from PlanetImprovement rather remodify. Granted the above is an extremely easy example, but I believe it is a lot easier to clean a code section up then rebuild it every patch, and potentially making it easier to merge mods even. Maybe, even put a tiny bit of peer pressure on the devs to include the 'if two items have same name, then modders file is prioritized' feature I suggested xD
0Send private message
12 years ago
Aug 9, 2012, 11:28:51 PM
So you would copy out an entire object and then modify the copy. Can you confirm if that works today? Even if it did, I would be nervous about using that. If a subsequent patch changes some other attribute of the object, then you will not be able to tell. I agree that when possible, we should add new objects in new files. But when changing objects, I feel it is better to just take the pain of diff/patch to update, rather than creating a copy of an existing object.
0Send private message
12 years ago
Aug 10, 2012, 12:25:49 AM
Confirmed - I commented out Nanoscale Thermodynamics, and copied it over to my custom XML file, where I proceeded to modify the appropriate entries and it functioned perfectly in game.



Userbased XML file(s) - this approach has three key points



1) Allows userbased file management system vs developers (I can search my custom file(s) easily vs 57 files)

2) Potentially easy non-conflicting mod merging as each mod would offer an independent file system

3) Decrease file bloat - the modder only includes what they mod or suppress (avoid completely redoing mod every patch)



Now my question for the dev's is - is there any reason to not have one XML file for everything when I mod? Will it slow down access time?



And as for future overhaul of game design in the future, you'll still have to go in and remove/comment out sections of code for overlapping conflicts between the mod and default settings, at which point you'll hopefully notice. And god I hope any serious modders are planning on making custom XML files when they add new items >.>
0Send private message
12 years ago
Aug 10, 2012, 1:38:42 AM
Well I've managed to convert everything over to my suggested system - I'm currently running off 5.5 files instead of 9 (I don't really see why I couldn't reduce it down to 1 file, but I'm keep some file structure). I'm not touching Registry.xml as of right now (thats my .5 file) as the thing has too many sublevels to be worth drilling down into right now. And even technology.xml, I cloned it basically but editing that one is touchy... I couldn't grab the one line I wanted to out of it without grabbing the other lines or crashing the game ;S



Basically I merged all classes and their matching descriptors together - reduces number of files I have to work with by ~30%! (after accounting for modules and technologies)



ie: StarSystemImprovement.xml and StarSystemImprovementDescriptor.xml are now StarSystemImprovement_R.xml
0Send private message
12 years ago
Aug 10, 2012, 2:06:25 AM
But, in index.xml the different files are loaded into different repositories. Are you sure all your changes are taking effect? Or do you load your one file into each different repository?
0Send private message
12 years ago
Aug 10, 2012, 2:56:20 AM
Even copying the unmodded 'Public' directory files into my modding directory causes a game crash when attempting to load it as a mod.



I'm willing to be shown it's something I'm doing, if anyone has any idea what. I do notice that my list of mods contains mods of the original name even when I edit the xml file to change the name. I just thought that was odd.



Nothing shows up in the output log that suggests an issue.



Ironically, I had no trouble at all with hand editing the 40K lines of code in the assets file. Now they've made it easier and I got nothing.



Thoughts?
0Send private message
0Send private message
12 years ago
Aug 10, 2012, 4:15:39 AM
Can you please try my anomaly mod, and see if that works for you? None of the other mods are compatible with 1.0.14. If mine works, then please look into it and see if you can see any differences. One key point is "standalone=false" in index.xml.
0Send private message
?

Click here to login

Reply
Comment