Replies: 22 (Who?), Viewed: 4133 times.
Field Researcher
Original Poster
#1 Old 11th Sep 2014 at 4:28 AM
Default Overriding Default Tuning?
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.
Advertisement
Test Subject
#2 Old 11th Sep 2014 at 5:15 AM
Just do what you did with the data file. Remember, tuning can't be merged, it can only be completely replaced. What you have to do is find the tuning resource for the Hungry moodlet, export the XML, edit it, then either import it back to the original build package, or import it into a new package retaining the same instance ID so that it gets replaced.
Lab Assistant
#3 Old 11th Sep 2014 at 5:34 AM
If somebody has the time, can we get a step by step instruction on how to accomplish both of these things? 1) edit the sim data file to change something, and 2) export the xml file, change it, and re-import it back? I, for one, would appreciate it.
Test Subject
#4 Old 11th Sep 2014 at 6:41 AM
I'm also working on modding tuning. But what I facing is a combined XML tuning resource. I did built a new XML file tuning resource but it just can't work with my modified data file at all.
Field Researcher
Original Poster
#5 Old 11th Sep 2014 at 1:50 PM
Quote:
Originally Posted by jcgurango
Just do what you did with the data file. Remember, tuning can't be merged, it can only be completely replaced. What you have to do is find the tuning resource for the Hungry moodlet, export the XML, edit it, then either import it back to the original build package, or import it into a new package retaining the same instance ID so that it gets replaced.


Thanks, but where are the individual tuning files? The only file I know about is the combined one, which I copied the above code from.
Mad Poster
#6 Old 11th Sep 2014 at 3:12 PM
In the SimulationFullbuild0 file there are also two resources of type 0xE2249422 with the names ac_pickle_cache and ac_pickle_cache_py_unopt, which appear to be XML and ITUN (it this were Sims3) tuning stuff. I think these should be looked at although I don't know how to do anything with them myself.

MedievalMods and Sims3mods: Dive Cave Reset Fix, Resort Revamp, Industrial Oven Revamp, Will O' Wisp fix, UI Sounds Disabled, No Cars, Gnome Family Planner, Townies Out on the Town, No Martial Arts Clothes, Fast Skilling, etc. http://simsasylum.com/tfm/
Pettifogging Legalist!
retired moderator
#7 Old 14th Sep 2014 at 10:08 PM
I have a feeling you two know this already -- just for others who come across this thread: this has become very simple now, with velocitygrass' XML Exporter, see the Tools forum for that.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Test Subject
#8 Old 14th Sep 2014 at 10:44 PM
For me it's not that simple, because the simdata I tried to tun does not have an attributed xml in the combined resource. But the SimGuru told me there's absolutely one there. I'm quite confused about that.
Inventor
#9 Old 14th Sep 2014 at 11:03 PM
@kikiwalu: You're trying to mod townie names, right? I know that only the CAS name spawner instance is in the combined tuning, but 0x7036FF3703847744 seems to use the same format (sims.sims-spawner.tdesc) as 0x784760dd00959dfa, which is in the combined tuning, so have you tried setting the s attribute to "8085930792737601348" and renaming the file to 0x00000000!0x7036FF3703847744.0x266ca322?

ETA: It could also be that the type 0x266ca322 is incorrect since the tag we're supposed to use for generating it isn't present for modules, though I found something in the python code today that made me believe my guess of using the R tag instead was correct. I haven't actually tested this to verify that module overrides work.
Test Subject
#10 Old 14th Sep 2014 at 11:08 PM
Quote:
Originally Posted by velocitygrass
@kikiwalu: You're trying to mod townie names, right? I know that only the CAS name spawner instance is in the combined tuning, but 0x7036FF3703847744 seems to use the same format (sims.sims-spawner.tdesc) as 0x784760dd00959dfa, which is in the combined tuning, so have you tried setting the s attribute to "8085930792737601348" and renaming the file to 0x00000000!0x7036FF3703847744.0x266ca322?


Yes I did exactly what you said before but it's not working. Maybe it's becasue the 7036 only contains the simspawner class tuning, while the 7847 is a whole module tuning.
Lab Assistant
#11 Old 14th Sep 2014 at 11:56 PM Last edited by letrax : 15th Sep 2014 at 12:14 PM.
Has anyone succeeded in creating a tuning override for a module yet? The successful overrides that I've had a look at so far have all been instances, so it seems to me there's some addressing problem with the modules that hasn't been solved yet.

(I have also been looking at the townie names, like kikiwalu - have been trying various combinations for the type, but haven't had any success yet. But then I'm a total beginner at this format; I haven't worked with python before and am unfamiliar with how the data is loaded, if it's even a python thing or something proprietary to Sims 4, so I'm still struggling to learn.)
Inventor
#12 Old 15th Sep 2014 at 8:25 PM
I looked into the issue with overriding modules and I finally got one to work. 0x266ca322 is incorrect. The resource type should be 0x03b33ddf. I'll update the XmlExtractor to reflect that change. In the meantime, you can manually change the file extension.
Lab Assistant
#13 Old 15th Sep 2014 at 8:36 PM Last edited by letrax : 15th Sep 2014 at 8:49 PM.
Quote:
Originally Posted by velocitygrass
I looked into the issue with overriding modules and I finally got one to work. 0x266ca322 is incorrect. The resource type should be 0x03b33ddf. I'll update the XmlExtractor to reflect that change. In the meantime, you can manually change the file extension.
Yes!! It finally works for me now. Great job, and thanks for the Xml extractor and everything! Now I'm off to create a few overrides for the Swedish Sims 4 players...

EDIT: Wait a minute – 0x03b33ddf? That's the ITUN from Sims 3. Oh damn, the solution was right under our noses, and no one thought of it!
Inventor
#14 Old 15th Sep 2014 at 9:31 PM
I didn't even realize that (I never did much with the ITUNs in Sims 3). So that's where it's coming from. It wasn't the FNV32 of "tun" or "tuning". I found the type in the python sources. I'm glad it works now. I have uploaded an updated version of the XmlExtractor that sets the correct type for the modules.
Test Subject
#15 Old 15th Sep 2014 at 11:02 PM
Quote:
Originally Posted by velocitygrass
I didn't even realize that (I never did much with the ITUNs in Sims 3). So that's where it's coming from. It wasn't the FNV32 of "tun" or "tuning". I found the type in the python sources. I'm glad it works now. I have uploaded an updated version of the XmlExtractor that sets the correct type for the modules.


Love u so much! I did it! All the weird townies's names are gone!
Pettifogging Legalist!
retired moderator
#16 Old 16th Sep 2014 at 5:49 PM
@velocitygrass -- I've seen you post somewhere (but I cannot find that post anymore now) that when updating the extractor, you doublechecked that it's working with overrides for starting funds and something else (forgot what it was). The starting funds was also something I had tried to change before and it hadn't worked, so I downloaded the Extractor update, re-exported everything and tried again .. but for me it's still not working (households still have 20.000 in game although I've set the amount to 10.000). I tried both in package form and as file in /unpackedmod.

What could I be missing, do you have any idea? Would you mind uploading your test file so that I have a working example to compare with?

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Inventor
#17 Old 16th Sep 2014 at 7:48 PM
You also need to change the data file(s) associated with it (I only noticed that after various "failed" tests). I'm not certain if both data files are needed or if just the one with the same ID would be fine. I was just happy it finally worked.

I've attached my test resources (loose files in a .7z).
Download - please read all instructions before downloading any files!
File Type: 7z starting_funds_test.7z (500 Bytes, 24 downloads) - View custom content
Description: My starting funds test that sets starting funds to 33333 and 2222 per sim
Pettifogging Legalist!
retired moderator
#18 Old 16th Sep 2014 at 7:58 PM
Thanks a lot! Okay, I'm going to look into the data thing then. (Downloaded your files as well -- that will surely be helpful =)

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Pettifogging Legalist!
retired moderator
#19 Old 16th Sep 2014 at 8:58 PM Last edited by plasticbox : 16th Sep 2014 at 10:16 PM.
Okay, I think I got 50% of it now, but the other 50% are still a mystery to me -- I must be missing a crucial step here? What I currently do is:

1. find something in game that I want to tweak,
2. look through the exported XML to find the parameter I want to change,
3. change the XML

4. (new! and working!) look at the instance of that XML, find the DATA resource with the same instance and export it
5. change the parameter in question in the DATA file as well,

so far so good .. but how did you make the connection to 0x006CA304!0x292660BCDFD2A795.0x545AC67A ? I can't see any reference to that anywhere .. how do I know that it may need to be edited? Or am I perhaps doing this backwards -- should I be looking at the DATA resources first, and then XML?

(From what I can see in game, regarding the starting funds, it works for the household I generated myself with only the XML and the DATA with the same instance as the XML. Game-generated households still get the default amount -- perhaps that's what the other DATA file does.) -- E: Nope. Game-generated households still stick with the default funds even when I have the other file in.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Inventor
#20 Old 16th Sep 2014 at 9:57 PM Last edited by velocitygrass : 16th Sep 2014 at 10:10 PM.
Actually I didn't go by instance, I simply searched for all data files that included "Starting_Funds" and it happened to show both. Looking for "shared.native.tuning" also would have found both. This duplication of the same setting seems to happen quite a bit for data in the 0x006CA304 group, which I think is the module tuning. I'm not sure why they have these identical data files. Maybe different files for client_binary (Renderer) and server_binary (Simulation).

ETA: I just saw that it worked without the other one. How do you see the starting funds for game generated households (or the new households at all)?

It could also be that the second DATA file is just old stuff that they left in. I just did a test and found the origin for the different instances. It's the following FNV64:
shared-native-tuning => 0xD66F672E4576EC88
shared.native.tuning.Shared_Settings => 0x292660BCDFD2A795

While looking for the module tuning resource type in the python code, I found that they implemented a getting of the module tuning files by replacing the "." with "-". I'm still not entirely sure what to make of that.
Pettifogging Legalist!
retired moderator
#21 Old 16th Sep 2014 at 10:19 PM Last edited by plasticbox : 16th Sep 2014 at 10:44 PM.
I may have spoken too early above in my edit -- am just about to test a second time (I had a different value in the other DATA, the one with not-the-same-instance .. maybe that's why it had no effect). -- No, even with a new DATA-with-not-same-instance the game-generated households still have the default amount. Grrr.


Quote:
Originally Posted by velocitygrass
ETA: I just saw that it worked without the other one. How do you see the starting funds for game generated households (or the new households at all)?


I just start a new game, make a new household and then you can see their funds when moving in .. the funds of the game-generated households (it will generate them when you leave the game running for a bit) are displayed in Manage Worlds -> Household Management (the middle icon, with three little figures + huge pen).


Quote:
Originally Posted by velocitygrass
While looking for the module tuning resource type in the python code, I found that they implemented a getting of the module tuning files by replacing the "." with "-". I'm still not entirely sure what to make of that.


Maybe this is why it's not working? You mean shared-native-tuning vs. shared.native.tuning? That would result in a different hash, wouldn't it?

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Pettifogging Legalist!
retired moderator
#22 Old 27th Sep 2014 at 7:09 PM
I meanwhile know why my approach wasn't working: because there are *still more* files for this that need tuning, not because there was something wrong. As Shimrod pointed out the starting funds are also in the Household templates, but that is only mentioned in the .tdesc files (with a default of 20.000) and not contained in the actual EAxian tuning.

Lesson learned: when searching for something, search the tdesc files as well.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Inventor
#23 Old 28th Sep 2014 at 10:25 AM
That's a very good point and a good reminder. I've added it to the FAQ section I've now created on the Sims4XmlExtractor page. Thank you!
Back to top