Logo Platform
logo amplifiers simplified

all your xml are belong to us

Reply
Copied to clipboard!
12 years ago
Jul 4, 2012, 6:55:10 PM
Following the tip from seiya in this thread:

https://www.games2gether.com/endless-space/forum/37-modding/thread/15664-how-to-mod-more-than-the-easy-xml-files.

I have unpacked all the xml files into text and attached them to this post. I have permission from amplimath (via PM) to do this. There is no documentation yet. And you cannot edit the files yet. But you can look to see what will be possible. This is from the 0.51.2 version. I am sure there are some changes in the 1.0.3 version.
0Send private message
12 years ago
Jul 5, 2012, 8:36:25 PM
I'm sure later we won't have to pay any more attention to keeping the number of charavters the same right? Also is it safe to assume that these files can be modified and stored for later implementation?

And just saying, good job there, this really manages to create a feeling for what will be soon moddable.
0Send private message
12 years ago
Jul 6, 2012, 5:54:39 AM
Well, right now this is a one way extraction. We will need a tool to easily extract, and then re-insert the files before any modding of these is *practical*.
0Send private message
12 years ago
Jul 6, 2012, 9:47:10 AM
The problem with extracting the files is that it is done using Unity's proprietary format. I have not been able to find a third party one yet.



If the devs wanted to be nice, in the next version, they could insert about a megabyte of white space onto the very end of the file and someone could write a program that automatically removes all that extra white space from the tail end first. So long as it checks for a non-white space character, you could add in as much as you wanted without issue. It would also need to add white space to the end as you remove stuff from the beginning.



Some other features, an editing area that can either nicely read the xml, or at the least removes the binary portion at the front. If someone was really ambitious, they could also make it so that the various sections were able to be chosen from a sidebar or something similar.
0Send private message
12 years ago
Jul 6, 2012, 3:54:30 PM
Other games use the approach of a binary file, containing many editable files. For example, Total War Shogun 2. In that particular case, the fans wrote a binary unpack/repack tool. But since amplimath has indicated that these xml files exist and amplitude wants to support modding, I **assume** that their first step will be to release a binary unpack/repack tool. Otherwise they cannot possibly claim to "support" modding. If somebody is familiar with binary pack/unpack, and can't wait, I would love somebody to write this tool. For myself, I will try one or two simple things while keeping whitespace constant, and "dream of the day" when modding these things is more convenient.
0Send private message
12 years ago
Jul 6, 2012, 5:24:15 PM
Like I said, the packing is using Unity's propriety format and if I am reading the information that is available right, Amplitude cannot release a problem to pack/unpack them. This is why they need to rewrite the file loading code; so they can have any file they want read without having it have to be in a .assets file.



I could be wrong here since I do not have access to an actual Unity compiler.
0Send private message
12 years ago
Jul 6, 2012, 8:48:32 PM
seiya wrote:
Like I said, the packing is using Unity's propriety format and if I am reading the information that is available right, Amplitude cannot release a problem to pack/unpack them.


If that is true, then IMHO amplitude has made an error when claiming that they intend to support modding. Unless their solution is going to be to remove these files from the unity file altogether.
0Send private message
12 years ago
Jul 7, 2012, 3:50:42 PM
What they said they will do is that they will still have the XML in the unity, but will provide separated XML file that we can change and put in the game folder. These custom files will be loaded before the default ones so we can customize the game.
0Send private message
12 years ago
Jul 7, 2012, 4:39:40 PM
Shtong wrote:
What they said they will do is that they will still have the XML in the unity, but will provide separated XML file that we can change and put in the game folder. These custom files will be loaded before the default ones so we can customize the game.




Actually that idea is absolutely great. That way you have the assets as files you don't have to touch at all, so all the other files necesserily belong to the mods. that would make it incredibly easy to find and mod the right stuff without much effort. Somewhat similar to SE5 you might have a folder for each mod which only has the files which are being replaced.
0Send private message
12 years ago
Jul 7, 2012, 4:56:08 PM
Then the only question is how the game resolves multiple mods. Suppose I make a mod which changes files A and B, then you make a mod which changes file B differently. However, my mod of file A requires my changes in file B to even load the game properly. How can the game detect this?
0Send private message
12 years ago
Jul 7, 2012, 5:25:31 PM
I'm rather sure Amplitude won't let the game load more than one mod at a time, never seen it different for games like this, and the reasons are the ones you mentioned. There are 2 ways of addressing that problem though:



1. Mod types: Have some dedicated mod types which don't interfere with each other. For example an UI type mod won't bother an Gameplay type mod. This method is somewhat unsafe and limiting though so I would refrain to the method mentioned below.



2. Combining mods: Putting all changed files into one mod folder, works as long as the mods don't change something another mod needs, or both mods change the same file. Combining those mods will in most cases require some human effort to do it properly. I already thought how to do this most efficient and I think we should have a program which can read out the XMLs and compare them to the original, then show us a history of changes/additions/removes. A program like that would make combining tremendously easier.



I have some programming experience but not enough of that and not exactly the time to bother writing programs, taking the time to mod something myself and regularly posting here is as far as it goes. But I have a precise plan how to combine mods most efficient so if you want I'll put a little more detail here on that topic so someone (maybe even the devs) can write such an program.
0Send private message
12 years ago
Jul 7, 2012, 6:31:28 PM
Yup, in the sticky thread that disappeared SpaceTroll suggested that they probably will go with a "one mod at a time" policy.
0Send private message
12 years ago
Jul 7, 2012, 7:04:53 PM
Civ 5 does it as does Supreme Commander. Interestingly, both ran LUA. That aside, with an xml only route, it would be hard to get them concatenate properly. The syntax is just too touchy so it would be, "one mod at a time".
0Send private message
12 years ago
Jul 8, 2012, 7:37:10 PM
Request to devs: If mod tools are not going to be added soon, can you add some padding to xml files in the meantime? Especially the technologies definitions, there isn't much room to work with these.
0Send private message
12 years ago
Jul 23, 2012, 3:43:12 AM
Wish I'd seen this topic before doing something similar myself. Anyhow, here's a set for 1.0.9. (Note: the organization is different--I manually named the files.)
XML1.zip
XML2.zip
0Send private message
?

Click here to login

Reply
Comment