Logo Platform
logo amplifiers simplified

Simple question about Conversion/Extension mods

Reply
Copied to clipboard!
9 years ago
Jan 23, 2016, 4:03:49 PM
Hello again! This time is more of a generic question than something specific:



What are the diferences in the code between the Conversion and the Extension mods? Only the tag on the xml file? Or the game reads then differently? How do i convert an Conversion mod in an Extension one? Is that even possible to begin with?



Thanks in advance ^^
0Send private message
9 years ago
Jan 23, 2016, 8:52:54 PM
Hey DaemomHal.



As far as I understand it, an extension mod basically can't edit any files that are already in the game. It would have to be a mod that only added code and didn't adjust any existing xml.



The formatting for it is pretty simple; it's just the same files, except you take out all the base code and just leave your code in the .xml files. When the game loads an extension mod, it just adds the new code at the end of the existing files.



You might take a look at the Expanded Heroes mod for formatting help, since that is an extension mod.



Hope that helps you out. smiley: smile
0Send private message
9 years ago
Jan 24, 2016, 12:28:34 PM
lilyophelia wrote:
Hey DaemomHal.



As far as I understand it, an extension mod basically can't edit any files that are already in the game. It would have to be a mod that only added code and didn't adjust any existing xml.



The formatting for it is pretty simple; it's just the same files, except you take out all the base code and just leave your code in the .xml files. When the game loads an extension mod, it just adds the new code at the end of the existing files.



You might take a look at the Expanded Heroes mod for formatting help, since that is an extension mod.



Hope that helps you out. smiley: smile




This is not correct!



The coding is identical in both formats. The only difference is that the game (EL) will not load more than one Conversion mod. It's more of a flag for users and modders, so that we can set bigger, sweeping mods to conversion so they won't conflict, and when we make purely additive mods, or minor changes, we can flag them as Extensions and load multiple ones together. It helps reduce conflicts for the players of our mods, but it doesn't actually change how they are implemented.



Furthermore, I must correct you on how the mods are loaded in:

Any text in the mods is loaded when the mod is loaded. If the mod has anything in it which has the same name as something from the base game, then that thing in the base game gets overwritten with the content from the mod. This means that you can adjust any existing .xml, but you can't outright remove objects from the EL simulation.



If you do want to remove something (like, say, all quests) then you must make a Standalone mod. A standalone mod makes the game (EL) load up only what is in the mod's folder, and not what is in the EL Public folder (the default files). As such Standalone mods are very large (~450mb) and nobody has made one yet.



DaemomHal wrote:
Hello again! This time is more of a generic question than something specific:



What are the diferences in the code between the Conversion and the Extension mods? Only the tag on the xml file? Or the game reads then differently? How do i convert an Conversion mod in an Extension one? Is that even possible to begin with?



Thanks in advance ^^




So to answer the question in the OP: you can just change the one line in your main .xml from Conversion to Extension and it will work fine. However it is good karma to go through and make sure you're not overwriting anything you don't have to, as doing so will mean conflicts with other mods.
0Send private message
9 years ago
Jan 24, 2016, 2:06:19 PM
Thanks for all the info!
0Send private message
9 years ago
Jan 24, 2016, 2:12:06 PM
So, as far as I understood it, when you flag a mod to conversion, it replaces the game files with the files you've provided.



And when you flag a mod to extension, it just appends the info to end of the base game files.



Is this not correct?
0Send private message
9 years ago
Jan 24, 2016, 2:20:15 PM
A related question. If I have a conversion mod, and I comment out part of the file, will it still load the original xml code from the base files.



In other words, you can't subtract anything from the game via a Conversion/Extension mod?



Thanks for the answer
0Send private message
9 years ago
Jan 24, 2016, 10:38:57 PM
lilyophelia wrote:
So, as far as I understood it, when you flag a mod to conversion, it replaces the game files with the files you've provided.



And when you flag a mod to extension, it just appends the info to end of the base game files.



Is this not correct?




Not quite. Loading a mod doesn't load files. Instead it loads the objects you've coded up. For both extension and conversion any new objects will be added to the Big Complicated Thing™ that is the Endless Legend Simulation.



So if you define a new object (say, a new technology) in your mod file, then you create something new that is added to the Big List of Technologies.



If you define an object which has the same name as an existing object, then it will overwrite the default object that was defined in the EndlessLegend/Public/ folders.







In practice this means that you can copy an entire file from the public folder to use in your mod, but you are in essence overwriting everything that was already there with a new version of itself. When you add your own code to the end of the file it will add those objects and references to the simulation and everything will work. However, if someone is trying to load multiple mods, and a mod loaded before yours alters one of the objects that you have copied over, then when your mod loads it will reset that object to the one defined in your file (the copy of its original state), thereby overwriting the other mod.



Uh, this is rather confusing. Let's try an example!:



You have a mod that changes the SimulationDescriptors[UnitClass].xml to give infantry plus one movement. What you do is you take the whole file, stick it in your mod, and change the 4 to a 5 in the line:

[code] [/code]



Someone else has a mod where they edit the same file in their mod, but they add a new type of unit, say a 'scout', and leave the movement at 4.



Both of you have the rest of the file verbatim in your mods.



If your mod loads first, then the change in movement will be overwritten by the code copied from the Public folder when the other mod loads. The new unit will load up as intended.

If your mod loads second, the Infantry unit will be overwritten twice, first by the other mod, changing nothing, and then by your mod, increasing its move. The new unit will not be overwritten, as your mod has no reference to it, and hence should work as intended.







The upshot of all of this is to only include what you change in your mod, and leave the rest of it out.





lilyophelia wrote:
A related question. If I have a conversion mod, and I comment out part of the file, will it still load the original xml code from the base files.



In other words, you can't subtract anything from the game via a Conversion/Extension mod?



Thanks for the answer


Correct: the game will keep in the simulation anything you don't have active in your mod files. This is true for both extension and conversion.



It is only with standalone that the game will assume nothing exists except what you define in your mods.
0Send private message
9 years ago
Jan 24, 2016, 10:46:12 PM
Thanks so much Zen. This really helped me out a bunch and I'm super grateful that you corrected me. Thank you, thank you, thank you. <3
0Send private message
9 years ago
Jan 24, 2016, 11:00:35 PM
Happy to help! I hope I didn't come off to grumpy, but I like to explain things clearly more than politely, haha. I really like what you've got in your mods and I hope you can use this info to keep making awesome stuff!
0Send private message
9 years ago
Jan 27, 2016, 8:21:03 PM
I am still having trouble with this. I have a standalone mod where all my changes work, and then when I pull them out and try to make them into an extension or conversion mod, the changes revert back to the base game.



The changes just overwrite the base game variables (like the duration of a debuff, for example).



Actually, this might just be a problem with my localization files. I notice that the file is super sensitive to changes
0Send private message
9 years ago
Jan 28, 2016, 8:09:21 PM
After going to a standalone format, everything has been much simpler/easier/predictable. If anyone has any ambitious modding plans, I almost suggest you just start standalone because it would have saved me some time and lots of confusion to do so.



The bigger files aren't even an issue via Steam, but it's possible that some subscribers might not want to download the bigger files. YMMV.
0Send private message
?

Click here to login

Reply
Comment