Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Lab Assistant
Original Poster
#1 Old 18th Feb 2017 at 9:01 PM
EP content (XML tuning) and compatibility with base game ?
I'm currently modding all kinds of workout equipment (XML tuning). I need to mod both gym stuff and basketball equipment, so my mod will include both base game and City Living content.
I'm totally aware that the basketball related files won't work for people who don't have City Living installed, but I'd like to know if such files' presence inside my mod could cause bugs to them because of an XML that belongs to an EP they don't have. Can I safely combine base game XMLs and City Living XMLs in one package for everybody, no matter if they have City Living installed or not, or is it much safer if I make two different packages ?
Advertisement
Mad Poster
#2 Old 19th Feb 2017 at 9:37 PM
I do not own CL, so if you want, I could test for you. I won't hold you responsible, if it breaks my game, I promesh ahah

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Lab Assistant
Original Poster
#3 Old 20th Feb 2017 at 11:49 PM
Thanks Rosebine, it's really nice, I'll need testers for the mod anyway and this would greatly help
Mad Poster
#4 Old 23rd Feb 2017 at 3:29 AM
Great. Whenever you're ready.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS, And all new uploads Here . :)
Test Subject
#5 Old 24th Feb 2017 at 11:38 PM
Quote: Originally posted by Candyd
I'm currently modding all kinds of workout equipment (XML tuning). I need to mod both gym stuff and basketball equipment, so my mod will include both base game and City Living content.
I'm totally aware that the basketball related files won't work for people who don't have City Living installed, but I'd like to know if such files' presence inside my mod could cause bugs to them because of an XML that belongs to an EP they don't have. Can I safely combine base game XMLs and City Living XMLs in one package for everybody, no matter if they have City Living installed or not, or is it much safer if I make two different packages ?
Having extraneous XMLs shouldn't cause any damage or bugs, because the XML files are essentially just configuration setting for the code, which pulls its variables from the XML. If you include an XML in a package that the user's game doesn't need, that XML will simply never be referenced. It'll take up the few bytes on their computer, but it won't cause anything malicious to happen.

So if you rewrite the XMLs for all of the workout equipment, and include the XMLs for the City Living content, then when someone installs your mod without City Living, their game will simply reference the XMLs for the gym equipment it does have, and ignore the XMLs for the equipment it doesn't.

However, let's say that the XML for the treadmill changed with a recent patch, so you have the new and Maxis-updated file to which you make changes. If you were to then share that XML file with someone without the most recent patch, that may cause bugs or errors in that person's game because their code is not up to date with the standards by which it calls and reads that updated XML file. They would need to patch their game to use your mod. Similarly, if you made a mod on an old patch, anyone using a new patch in which relevant game content was changed by the patch may encounter bugs or difficulty with your mod.

I hope that helps explain it. If I'm wrong, someone please correct me, but that's my understanding and experience thus far. Feel free to ask for clarification.
Lab Assistant
Original Poster
#6 Old 26th Feb 2017 at 9:31 PM
Quote: Originally posted by Eurynome
Having extraneous XMLs shouldn't cause any damage or bugs, because the XML files are essentially just configuration setting for the code, which pulls its variables from the XML. If you include an XML in a package that the user's game doesn't need, that XML will simply never be referenced. It'll take up the few bytes on their computer, but it won't cause anything malicious to happen.

So if you rewrite the XMLs for all of the workout equipment, and include the XMLs for the City Living content, then when someone installs your mod without City Living, their game will simply reference the XMLs for the gym equipment it does have, and ignore the XMLs for the equipment it doesn't.

However, let's say that the XML for the treadmill changed with a recent patch, so you have the new and Maxis-updated file to which you make changes. If you were to then share that XML file with someone without the most recent patch, that may cause bugs or errors in that person's game because their code is not up to date with the standards by which it calls and reads that updated XML file. They would need to patch their game to use your mod. Similarly, if you made a mod on an old patch, anyone using a new patch in which relevant game content was changed by the patch may encounter bugs or difficulty with your mod.

I hope that helps explain it. If I'm wrong, someone please correct me, but that's my understanding and experience thus far. Feel free to ask for clarification.

Oh, good to know, I'm glad that I can make only one package, it will be more convenient to download, thanks for the explanation
Lab Assistant
#7 Old 27th Feb 2017 at 8:45 PM
Quote: Originally posted by Eurynome
Having extraneous XMLs shouldn't cause any damage or bugs, because the XML files are essentially just configuration setting for the code, which pulls its variables from the XML. If you include an XML in a package that the user's game doesn't need, that XML will simply never be referenced. It'll take up the few bytes on their computer, but it won't cause anything malicious to happen.

So if you rewrite the XMLs for all of the workout equipment, and include the XMLs for the City Living content, then when someone installs your mod without City Living, their game will simply reference the XMLs for the gym equipment it does have, and ignore the XMLs for the equipment it doesn't.

However, let's say that the XML for the treadmill changed with a recent patch, so you have the new and Maxis-updated file to which you make changes. If you were to then share that XML file with someone without the most recent patch, that may cause bugs or errors in that person's game because their code is not up to date with the standards by which it calls and reads that updated XML file. They would need to patch their game to use your mod. Similarly, if you made a mod on an old patch, anyone using a new patch in which relevant game content was changed by the patch may encounter bugs or difficulty with your mod.

I hope that helps explain it. If I'm wrong, someone please correct me, but that's my understanding and experience thus far. Feel free to ask for clarification.

Great explanation!

Question: What if you have an XML file that contains some base game references (ex: Skill gain multiplier for Guitar) but then it also contains an expansion reference (ex: Skill gain multiplier for Organ)?

In theory, if someone doesn't have the related expansion, will their game simply pass over the ID as something that doesn't exist (since it can't locate it) or might it cause problems?

In other words, I guess this question could be summed up as, "If a test/check/modifier within an XML file attempts to reference an ID it can't find, will there be problems or will it simply not do anything, since it can't find what it's looking for?" Intuitively, it seems like it'd only be an issue if it was trying to reference something that is essential to the operation of the game, or a feature. But I'm nonetheless leaning in the direction that it'd be better practice (however tedious to split up) to make base game and expansion version. I don't know how it handles IDs it can't find, but my programming instincts say, "Don't do it!"

What do you think?
Back to top