Tutorial: making AwesomeMod-compatible XML hacks (Careers/Socializing/Traits)

(1/3) > >>

chann:
AwesomeMod currently comes packaged with these three XMLs (the "Awesome XMLs"):
Careers (instance 0x6E9ADCDAEB2CE302) - includes new MaxOfficeHolders (career caps) tagsSocializing (instance 0x4B0FC8F0A28B12EF) - includes Pedophile interactionsTraits (instance 0x905E2204EBCAC0B6) - includes Pedophilia and Sacred functionality
If you try to load a mod that modifies one of the above XMLs while AwesomeMod is active, one of two Bad Things will happen.
1. Your mod will squelch the Awesome XML in awesome.package - breaking or removing AM's functions.[/li][/list]
2. Awesome.package will squelch your mod. The changes you made will be ignored.[/li][/list]

This tutorial will explain how to make modifications to these SPECIFIC three XMLs so that they play nice with AwesomeMod. Not other XMLs. Not core hacks. Just Careers, Socializing and Traits.

Note that if Pescado updates the relevant XML, you will have to re-extract the XML from the newest awesome.package and re-do the tweaks you made originally. Oh, and this tutorial applies to any future tuning XMLs "commandeered" for AwesomeMod use.

The short version
1. Add this text to the top of Resource.cfg:
Code:

Priority 501
PackedFile Mods/Override/*.package

2. Extract the relevant Awesome XML from awesome.package
3. Edit the extracted XML to your liking while not breaking Pescado's additions.
4. Import the edited Awesome XML into a new .package and save that package in the /Mods/Override folder.
5. Load TS3 and see if your changes show up in the game.

The long version

Before you start, I'll assume you have AM up and running in its default location, which means your mod framework is in place and working. I'll also assume you know how to mod tuning XMLs; there's plenty of tutorials for that available out there. I'm focusing on how to make your changes appear without being squelched by awesome.package.

1. Locate Resource.cfg in your TS3 root folder, by default in C:\Program Files\Electronic Arts\The Sims 3\ on PC. Open it in a text editor.

Example - the Resource.cfg that comes with Delphy's install tool:

Code:

Priority 500
PackedFile Mods/Packages/*.package
PackedFile Mods/Packages/*/*.package
PackedFile Mods/Packages/*/*/*.package
PackedFile Mods/Packages/*/*/*/*.package


2. Add these two lines to the top of the file:

Code:

Priority 501
PackedFile Mods/Override/*.package


Once done, save and exit. Your game is now equipped to load override packages in the Mods/Override/ folder (which you should create at this point).

3. Using s3pe, open awesome.package. Click the Type column to sort by type. You will see this:



Select one of the 3 XML resources that you wish to alter in the main window - you can use the instance numbers at the top of my post for reference, or open them up (click Value or Editor) to see what they contain. For instance, the Careers XML looks like this:



After you choose one, go to File > Export to Package. Save the package in Electronic Arts/The Sims 3/Mods/Override and name it whatever you wish. For this example, I want to tweak the XML to allow two mayors instead of one. I exported the Careers XML from awesome.package into a new package in Mods/Override/ called MoreMayors.package.

4. Keeping s3pe open, open the new .package containing the extracted Awesome XML (close awesome.package WITHOUT saving - it shouldn't prompt you anyway).



Select the single resource you see in the main window, and click the Editor button in s3pe to open it in your text editor.

5. Here's the point where you make your desired tweaks/changes.

In my example, after loading MoreMayors.package and opening the XML, I search for Mayor, find the MaxOfficeHolders tag which reads "-1" and change it to "-2". Now, MaxOfficeHolders is a tag added by AM - but of course you can change ANY part of the file Awesome or not. I'm just using this as an example. In the Careers XML you can tune wages, uniforms job hours and other stuff - it's all pretty intuitive.

Here's what I changed:



Go to File > Save in Notepad, then exit Notepad. Click yes when the the Commit Changes dialog pops up in s3pe and go to File > Save.

6. Finally, load up TS3 and check whether your change shows up. The Resource.cfg framework should load your Mod/Override/ resources on top of the Mod/Packages/ ones, overriding the identical ones but allowing the rest of awesome.package to load.



Success!

Feedback and questions welcome.

Aaroc:
So, according to the example you just gave, if I wanted to completely do away with the MaxOfficeHolders thing, I could simply delete all instances of that tag and I could, say, have 500 Leaders of The Free World running around in my hood if I wanted to? (you know, of course providing that my neighborhood and computer could support that many sims, let alone that many in Politics, etc, etc.)

chann:
Quote from: Aaroc on 2009 July 25, 06:13:18

So, according to the example you just gave, if I wanted to completely do away with the MaxOfficeHolders thing, I could simply delete all instances of that tag and I could, say, have 500 Leaders of The Free World running around in my hood if I wanted to? (you know, of course providing that my neighborhood and computer could support that many sims, let alone that many in Politics, etc, etc.)


Yes, you could do that.

J. M. Pescado:
FYI, the Careers XML will likely be dropped from future releases of AwesomeMod as I replace it with a solution that touches fewer files, so don't count on this method being reliable forever.

pbox:
Quote from: J. M. Pescado on 2009 July 25, 08:10:25

FYI, the Careers XML will likely be dropped from future releases of AwesomeMod as I replace it with a solution that touches fewer files


Hm, I just looked at an almost-current version and there's still a career XML in there. Are you planning to keep that? I wanted to look into making some careers and if what I want to do is even possible then I'd like them to last for a while .. are those XMLs here to stay now, or will they soon be ditched?

Somewhat related question: would it be feasible to somehow recycle the "MaxOfficeHolders" key for custom careers? I wouldn't want 28 store clerks in my town any more than I'd want 28 mayors.

Navigation

[0] Message Index

[#] Next page