Forum Announcement, Click Here to Read More From EA_Cade.

Overriding Default Tuning?

ZerbuZerbu Posts: 3,457 Member
Does anybody have any idea how to override the default tuning in the game?

I'm trying to change the emotions that certain moodlets produce. For my first attempt at this, I tried changing the "Hungry" moodlet to give the "Dazed" moodlet. I edited the DATA file, and that went as planned. The information shown in the UI attached to the moodlet works properly, but it doesn't change the effect it has on the actual game. According to the official documentation, you also have to edit the XML file.

Problem is, the documentation only gives information on how to create new tuning. How do you override existing tuning? I tried simply putting the part of the code I wanted into a new XML file and importing it into the same package as the DATA file:

<?xml version="1.0" encoding="utf-8"?>
<I c="Buff" i="buff" m="buffs.buff" n="Buff_Motives_Hunger_Hungry" s="12820">
<r n="audio_sting_on_add" x="186" />
<r n="audio_sting_on_remove" x="187" />
<T n="buff_description">0xBA2D6E0F</T>
<T n="buff_name">0xEC47DDA4</T>
<r n="flip_arrow_for_progress_update" x="73" />
<U n="game_effect_modifiers">
<L n="game_effect_modifiers">
<V t="autonomy_modifier">
<U n="autonomy_modifier">
<L n="decay_modifiers">
<U>
<r n="key" x="3068" />
<r n="value" x="72882" />
</U>
</L>
<L n="stat_use_multiplier">
<U>
<r n="key" x="3068" />
<U n="value">
<r n="apply_direction" x="2299" />
<r n="multiplier" x="72882" />
</U>
</U>
</L>
<r n="subject" x="20329" />
</U>
</V>
</L>
</U>
<r n="icon" x="40409" />
<r n="icon_highlight" x="40409" />
<r n="interactions" x="40413" />
<r n="mood_type" x="1191" />
<r n="mood_weight" x="192" />
<r n="timeout_string" x="20334" />
</I>

But that didn't work, it just did nothing at all. I imported the XML file the exact same way the documentation told me to import new tuning.

Comments

  • velocitygrassvelocitygrass Posts: 103 Member
    I think you'll need to replace the references (the r tags) with the actual ones by finding the T/V/... with the x value. (I'm actually just working on a tool that extracts the xml instances from the combined tuning xml to make such replacements easier.)

    But even with replaced references you might run into issues. At least I had some problems with overriding defaults too. When I modded out the friends requirements for the Secret Agent Career (Diamond Agent branch), it worked perfectly for the first level with friends requirements, but for the other two levels the charisma requirement (which I left intact) didn't register correctly any longer (i.e. even though my sim fulfilled the requirement it wasn't recognized as such). The xml for this is really simple, so I don't think I did anything wrong, and as soon as I replaced the charisma requirement with the lower one from the first level with friends requirements it works, which doesn't really make sense to me. I'll have to investigate further.
  • ZerbuZerbu Posts: 3,457 Member
    edited September 2014
    I think you'll need to replace the references (the r tags) with the actual ones by finding the T/V/... with the x value. (I'm actually just working on a tool that extracts the xml instances from the combined tuning xml to make such replacements easier.)

    But even with replaced references you might run into issues. At least I had some problems with overriding defaults too. When I modded out the friends requirements for the Secret Agent Career (Diamond Agent branch), it worked perfectly for the first level with friends requirements, but for the other two levels the charisma requirement (which I left intact) didn't register correctly any longer (i.e. even though my sim fulfilled the requirement it wasn't recognized as such). The xml for this is really simple, so I don't think I did anything wrong, and as soon as I replaced the charisma requirement with the lower one from the first level with friends requirements it works, which doesn't really make sense to me. I'll have to investigate further.

    Thanks for the response!

    Is editing the huge XML file the only way? Because if so, that would mean that tuning overrides couldn't be shared without conflicting with each other. I did try, but I came into problems with it too. I got a glitch where I couldn't even enter Live Mode and it would just bounce me back to the household selection screen. :(

    Glad to hear you're working on a tool though! It should hopefully make it much easier in the future. :)
  • velocitygrassvelocitygrass Posts: 103 Member
    No, you don't have to edit the huge XML file. What you did (extracting the part you want to override) was correct. But the references don't work, so they'll have to be replaced.

    I noticed you wrote you put the xml into the package. I believe the bug that prevents xml tunings from loading has NOT been fixed in the patch from a couple of days ago, so you'll still need to put the file in the unpackedmod folder with the naming scheme that SimGuruModSquad mentioned in their workaround.

    My tool will replace the references in the XML and split it into the individual xml tunings for the instances (and modules) to make editing and general handling of a single setting easier. Replacing the references in the g tag already works, and I hope to get the writing of the individual files done some time this weekend at the latest.
  • ZerbuZerbu Posts: 3,457 Member
    edited September 2014
    Okay, thanks! How do you change the references though (before your program is released)? Is there a particular instance you must give the new XML files?
  • velocitygrassvelocitygrass Posts: 103 Member
    I hope it works. Btw, I published the tool I mentioned here.
  • ZerbuZerbu Posts: 3,457 Member
    edited September 2014
    Sorry, I edited my post after realizing I read your post too fast and missed the part about updating references. Anyway, if your tool works then the part I mentioned shouldn't matter, so I'll try it out. :)
  • velocitygrassvelocitygrass Posts: 103 Member
    If you want to override an existing file the EA unpackedmod naming pattern schould give you a file with the correct name. You'll just have to redo the changes in the file the tool exports.
  • EruonenEruonen Posts: 13 New Member
    Your tool is really great! Works like a charm. I was wondering since you've done this (semi-)succesfully before.

    As an experiment, I decided to increase the hourly wage of one of my Sims since it's a simple change that is extremely easy to verify in-game by just checking the job tab of that Sim.

    Sadly, it's not working. The file can be found here: puu.sh/bxB7G/74aa6098ac.txt
    The filename is 0x00000000!0x0000000000007305.0x2c70adf8 (which is what your tool provided).
    The file is in \Documents\Electronic Arts\The Sims 4\Mods\unpackedmod\
    My Resource.cfg looks like this:
    Priority 500
    PackedFile *.package
    PackedFile *\*.package
    DirectoryFiles unpackedmod autoupdate

    Have I missed anything obvious? When I start the game I get the mods popup screen, but it's empty.
  • ZerbuZerbu Posts: 3,457 Member
    I've tried the tool, and it worked great! I've successfully made the changes I need! :mrgreen:

    @Eruonen - I wouldn't be quick to say "all you need to do is check the UI" if I were you. What's displayed in the UI and how the game actually works aren't always linked. For example, when I changed the DATA file for the Hunger buff, it updated the UI to say "Dazed" but in actuality it still gave the Uncomfortable emotion. The problem you're having sounds like the reverse - you probably updated the XML correctly (you will need to test actually sending your Sim to work to make sure) but not the DATA file which controls the UI.
  • EruonenEruonen Posts: 13 New Member
    Ahh, thank you. I'll look into that.
  • pboxpbox Posts: 630 Member
    Thanks for that explanation, @Zerbu! I was having the same issue =)
    Stuff for TS2 · TS3 · TS4
  • EruonenEruonen Posts: 13 New Member
    @Zerbu and @velocitygrass, the two of you are fantastic! I managed to get everything working as intended. @Zerbu I noticed you released a mod (good work by the way, I'm checking it out when I'm done experimenting!) as a .package. Does this mean tunables DO work in a .package now? The "Maxis Documentation" thread still suggests otherwise.
  • pboxpbox Posts: 630 Member
    I believe the bug that prevents xml tunings from loading has NOT been fixed in the patch from a couple of days ago, so you'll still need to put the file in the unpackedmod folder with the naming scheme that SimGuruModSquad mentioned in their workaround.

    I'm having the same issue – @SimGuruModSquad , you might want to take a second look at that? The exact same XML tuning (a default override) works fine for me when in /unpackedmod, but in a .package it's not being recognised. I have a bunch of other .packages installed and working, so I don't think it's a general issue with my setup.



    Stuff for TS2 · TS3 · TS4
  • velocitygrassvelocitygrass Posts: 103 Member
    I think they're aware. In the workaround post, SGModSquad has struck out the script loading problem and added a note, but not the tuning in packages problem, so it just hasn't been added to the last patch. Let's hope they get around to fixing this for the next patch.
  • pboxpbox Posts: 630 Member
    Oh ok, thanks for the heads-up! =) Was undercaffeinated I guess .. and thought both were the same issue.
    Stuff for TS2 · TS3 · TS4
  • ZerbuZerbu Posts: 3,457 Member
    edited September 2014
    Two people on ModTheSims have reported that the changes that should be made by the XML aren't taking effect.
    http://www.modthesims.info/download.php?t=534445&c=1&goto=newpost
    Does anyone here know what the problem could be? I'm totally clueless because it's working 100% for me. I've tried it with and without the unpackedmod folder.
  • pboxpbox Posts: 630 Member
    @Zerbu - I posted in your d/l thread since that is where the context is =)
    Stuff for TS2 · TS3 · TS4
Sign In or Register to comment.
Return to top