- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Technical thread: Ouroboros - A scripted storytelling world
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Technical thread: Ouroboros - A scripted storytelling world
Replies: 6 (Who?), Viewed: 3285 times.
#1
30th May 2019 at 3:29 PM
Posts: 3,860
Thanks: 8536 in 67 Posts
Technical thread: Ouroboros - A scripted storytelling world
What is this? A good portion of us modders, as well as simmers, play the sims for its strong storytelling core. I mean just take a peek on tumblr, stories everywhere! If not, legacies with some form of storytelling. It's just a big factor of the game and we all love it for that! This love even goes back to the good old PSP sims 2 game and the Sims console games (Bustin' out being one of them). But what about making a world where you don't have to include a save file to have some form of storytelling in it? Can we make an already set-up EAish world? What about adding quests or just dialogs in general when talking to specific sims? If not making a dev tools for script modders? Already excited? Great! :D
How would this work?
EA has a loooot of world functions in the script files that communicates with the game engine. Which means, we can easily ask the game engine "Hey what world is this? Which world file does it use? What kind of sims live here?" Etc. This is a super big project in itself. First we need to test the script itself, actually, make sure it works. Then a world, then sims. I hope in the far future to have a simple program that sets everything up by just dumping in your .world file and easily types everything out with some great user experience but right now I don't have enough knowledge about how worlds work to get this really working with a program.
In the end it's supposed to be as helpful for script modders as well as world builders And having our first world that has this all set and working!
What do I have?
Currently, I've been messing around with these EA functions a lot and finally got a simple version of this script to work (Thanks to Battery for getting to figure out why it wasn't loading at first) The script currently outputs the following information:
- The Current World
- The Current world type
- The World file name
- The World Name key
When I tested it, this was outputting the following for Sunset Valley:
- Current World: Sunset valley
- Current world type: Base
- World file name: Sunset Valley.world
- World Name Key: World/Pleasant_Valley/WorldDescription: Name
And for a custom world, which I used the lovely Cronor world to test it:
- Current World: Cronor.world
- Current world type: Base
- World file name: Cronor.world
- World Name Key: Cronor
Obviously, from here we can easily use the world's data to say "Only run this script if it's this world". Which was step 1. Secondly is to see if we can output the sim's SimDescription table to get the Sim ID/Key (Which Nraas is able to, and I know that function exists). I know, this sounds all super complicated, but trust me After that we can specify what sim says what and when and where, etc. If not steal the WA's quest system
What is a Ouroboros?
Welllll:
Quote:
1. A symbol in the form of a snake biting its own tail, used especially in ancient Egypt and in Hermetic philosophy as an emblem of eternity. 2. The beginning and the end of something. |
Now that that's out of the way, I wanted to have something that is sort of a modern old town, or say the events between Sunset valley and Pleasantview. (Fun fact, Sunset valley was supposedly going to be called pleasant valley). So specific people would come and go, but generally a world that's nature-y pleasing and just a small town in general, with some interesting characters and premade ones and what not. If you've got some ideas to feel free to write them down in this thread!
How will this benefit World builders?
Without much effort, if everything goes well, they can easily create their own stories and add sims to their worlds without playing the world and then save it, and then uploading that save file. Instead, They would be able to assign dialogues to each sim, if not, specific quests in order to make the world interesting and just generally making the world more liveable. Maybe even making something strangeville like!
How will this benefit Script modder?
The hassle right now is that if we were to debug a super big mod, we need to write our own, if not crossing our fingers that it works. Especially if someone would want to make a mod for a specific world this would be super helpful! I'll later add a visual studio project for the people among us that would like to manually be able to create sim dialogues or adding events, or other crazy weird stuff, etc.
So what about me?
Currently, I got most of it covered but if you want to give suggestions/feedback/etc. Let me know!
Advertisement
Space Pony
#2
30th May 2019 at 5:10 PM
Posts: 433
Thanks: 792 in 6 Posts
That sounds brilliant,
playing sims 3 can get repetetive at times adding quests/dialoges would be a "gamechanger" pun intended.
When i read about that i was reminded of the work i did a few month back on my utility mod to add a multiple choice menu. So if i ever get that work done i could foward you the code if you are interested (but setting up multiple choice dialogs could be a lot of work)
I added a picture of the early dialog to illustrate better what i mean(obviously work in progress still default graphics etc)
Im also interested which approch you take with the quests etc going for procedural generation or import via xml i got so many questions but i dont want to bother you too much since you got your work cut out for you it seems :P
Good luck with your Project Lyralei !
playing sims 3 can get repetetive at times adding quests/dialoges would be a "gamechanger" pun intended.
Quote:
What about adding quests or just dialogs in general when talking to specific sims? |
When i read about that i was reminded of the work i did a few month back on my utility mod to add a multiple choice menu. So if i ever get that work done i could foward you the code if you are interested (but setting up multiple choice dialogs could be a lot of work)
I added a picture of the early dialog to illustrate better what i mean(obviously work in progress still default graphics etc)
Im also interested which approch you take with the quests etc going for procedural generation or import via xml i got so many questions but i dont want to bother you too much since you got your work cut out for you it seems :P
Good luck with your Project Lyralei !
#3
30th May 2019 at 7:07 PM
Posts: 5,656
Thanks: 1034 in 5 Posts
This sounds interesting.....it might interest me personally since I've been interested in custom text boxes and stuff.....whether it'd be possible to put a bit of text into a file in S3PE and have it come up in-game as a notification with a Sim's face next to it.
insert signature here
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
( Join my dumb Discord server if you're into the whole procrastination thing. But like, maybe tomorrow. )
#4
31st May 2019 at 4:58 PM
Posts: 437
Thanks: 5330 in 22 Posts
This is a very cool idea. If the script is relying on specific sims in a world, though, you'd probably have to protect them from death and/or story progression somehow.
If you're looking for World Adventures-style quests, NRaas Careers uses an extensible framework for adding custom opportunities that could be copied and reworked to simulate quests, dialog options, scripted events, etc.
I'm finishing up a mod for the Business creator theme right now, but when that's done I'd be willing to help you out with scripting or writing/storytelling if you'd like.
If you're looking for World Adventures-style quests, NRaas Careers uses an extensible framework for adding custom opportunities that could be copied and reworked to simulate quests, dialog options, scripted events, etc.
I'm finishing up a mod for the Business creator theme right now, but when that's done I'd be willing to help you out with scripting or writing/storytelling if you'd like.
"The Internet is the first thing that humanity has built that humanity doesn't understand, the largest experiment in anarchy that we have ever had." - Eric Schmidt
If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
If you enjoy the mods I put out, consider supporting me on patreon: www.patreon.com/Gamefreak130
#5
31st May 2019 at 10:43 PM
Posts: 3,860
Thanks: 8536 in 67 Posts
Thank you guys for the ideas and suggestions! I've been slowly making the debugging script more individually world-friendly (If that makes any sense?) Next step is making it more dynamic from a user experience kind of way.
On the other hand, is there anything that you'd want to see/would find useful when it comes to getting just general information from a world?
Nice! I didn't think of that but it shouldn't be too difficult. I know that EA uses CSS for their UI so might be worth checking that out. Else it's a great start to get more acknowledge to using the UI code.
Regarding the age and death thing, that's a good one. I know there are flags that you can apply to a sim to have them not die but probably need to make some sort of plan before starting to script this bit of the project.
Also, I'll try coming back to figuring out what to do on the helping area Right now it's pretty minor stuff that I started on, but I'm sure that at some point it will get a bit overloaded. I do appreciate the want to help though!
On the other hand, is there anything that you'd want to see/would find useful when it comes to getting just general information from a world?
Quote: Originally posted by Battery
That sounds brilliant, playing sims 3 can get repetetive at times adding quests/dialoges would be a "gamechanger" pun intended. When i read about that i was reminded of the work i did a few month back on my utility mod to add a multiple choice menu. So if i ever get that work done i could foward you the code if you are interested (but setting up multiple choice dialogs could be a lot of work) I added a picture of the early dialog to illustrate better what i mean(obviously work in progress still default graphics etc) Im also interested which approch you take with the quests etc going for procedural generation or import via xml i got so many questions but i dont want to bother you too much since you got your work cut out for you it seems :P Good luck with your Project Lyralei ! |
Nice! I didn't think of that but it shouldn't be too difficult. I know that EA uses CSS for their UI so might be worth checking that out. Else it's a great start to get more acknowledge to using the UI code.
Regarding the age and death thing, that's a good one. I know there are flags that you can apply to a sim to have them not die but probably need to make some sort of plan before starting to script this bit of the project.
Also, I'll try coming back to figuring out what to do on the helping area Right now it's pretty minor stuff that I started on, but I'm sure that at some point it will get a bit overloaded. I do appreciate the want to help though!
#6
9th Jun 2019 at 3:35 PM
Last edited by Lyralei : 9th Oct 2021 at 12:15 PM.
Posts: 3,860
Thanks: 8536 in 67 Posts
I noticed something quite helpful actually. Existing worlds have XMLs (This is, all worlds except for Sunset Valley, which are non-cas created sims as well, whereas non-sunset valley sims are cas-created.) If we open AppaloosaPlains.world for example, and you search for specifically these TGI keys within S3PE: 0x0333406C-0x00000000-0xE51DF1C5C044A949
You'll find yourself an XML file. For the sake of explaining, I cut down the information.
Now that you've gone through the notes, if so yay! I did notice that worlds don't have any sims data. I just hope that the UNKOWN types don't happen to hold those :P
Now a few things I found about what it ABSOLUTELY needs to have when you'd create your own is:
Now, on gameload, the CharacterImportOnGameLoad is being triggered. I'm wondering now if having a save file, getting the correct SimDescID key and all would make it read a Custom XML since Custom worlds aren't exactly being updated by default, but we still don't know if the game just literally ignores them whatsoever either.
You'll find yourself an XML file. For the sake of explaining, I cut down the information.
Code:
<?xml version="1.0"?> // The Character import actually refers to the CharacterImportOnGameLoad/CharacterImportCommands scripts <CharacterImport>// A reference on what all the tags could mean. If you've done this type of XML editing you'll know what this mean <Households> <HouseholdId></HouseholdId> <FamilyName></FamilyName> <Funds>0</Funds> <HouseholdName>Gameplay/Excel/EP05_World/Households:HouseholdNameNotSpecified</HouseholdName> <HouseholdBio>Gameplay/Excel/EP05_World/Households:HouseholdBioNotSpecified</HouseholdBio> </Households> // Our first household. <Households> <HouseholdId>6</HouseholdId> <FamilyName>Parrot</FamilyName> <Funds>1200</Funds> <HouseholdName>Gameplay/Excel/EP05_World/Household:Parrott</HouseholdName> <HouseholdBio>Gameplay/Excel/EP05_World/Households:ParrottDescription</HouseholdBio> </Households>// Included the reference as well in case people are curious <Sims> <SimDescriptionId></SimDescriptionId> <SpreadSheetUniqueID></SpreadSheetUniqueID> <FirstName></FirstName> <LastName></LastName> <HouseholdId></HouseholdId> <PercentageAgeStateComplete>0</PercentageAgeStateComplete> <Traits></Traits> <Skills></Skills> <LifetimeWish></LifetimeWish> <Sign></Sign> <CelebrityLevel></CelebrityLevel> <PreferredRole></PreferredRole> <OccultType></OccultType> <CareerName></CareerName> <CareerLevel></CareerLevel> <CareerLocation></CareerLocation> <CareerBranch>Base</CareerBranch> <CareerPerformance></CareerPerformance> <HasRetired>0</HasRetired> <AgeWhenStartedJob></AgeWhenStartedJob> <Fitness>-100</Fitness> <Weight>-100</Weight> <GenderPreference>N</GenderPreference> <Description>DescriptionNotSpecified</Description> <PercentagePregnant>-1</PercentagePregnant> <PregnancyPartner></PregnancyPartner> </Sims> // The household but each individual sim // The SimDescriptionId is a hash. This LINK Is probably really helpful in that regard. You could also look at the SimDescription class and see how it reads it. But I would have to rule out whether this is a FVN32 + type name. And if the whole Xo'red stuff belongs here too. Doubt it but it's good to look into. <Sims> <SimDescriptionId>3141542499305254272</SimDescriptionId> <SpreadSheetUniqueID>Sim_1</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Kanoa</FirstName> <LastName>Gameplay/Excel/EP05_World/Sims:Parrott</LastName> <HouseholdId>6</HouseholdId> <PercentageAgeStateComplete>5</PercentageAgeStateComplete> <Traits>Inappropriate,Flirty,CommitmentIssues,PartyAnimal,Schmoozer</Traits> <Skills>Athletic,0 Foosball,7 Chess,7 Logic,9</Skills> <LifetimeWish>major_dream_boyfriend_girlfriend_num_different_sims</LifetimeWish> <Sign>Taurus</Sign> <CelebrityLevel>0</CelebrityLevel> <CareerName>Criminal</CareerName> <CareerLevel>1</CareerLevel> <CareerPerformance>-50</CareerPerformance> <AgeWhenStartedJob>Adult</AgeWhenStartedJob> <Description>Gameplay/Excel/EP05_World/Sims:KanoaParrottDescription</Description> </Sims> <Sims> <SimDescriptionId>3141542499305254288</SimDescriptionId> <SpreadSheetUniqueID>Sim_2</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Jazlyn</FirstName> <LastName>Gameplay/Excel/EP05_World/Sims:Parrott</LastName> <HouseholdId>6</HouseholdId> <PercentageAgeStateComplete>1</PercentageAgeStateComplete> <Traits>FamilyOriented,Brave,Handy,Neat,LightSleeper</Traits> <Skills>WildlifeFriend,6</Skills> <LifetimeWish>major_dream_raise_num_children_from_baby_to_teen</LifetimeWish> <Sign>Virgo</Sign> <CelebrityLevel>0</CelebrityLevel> <CareerName>PTGroceryStoreClerk</CareerName> <CareerLevel>1</CareerLevel> <CareerPerformance>10</CareerPerformance> <AgeWhenStartedJob>YoungAdult</AgeWhenStartedJob> <Description>Gameplay/Excel/EP05_World/Sims:JazlynParrottDescription</Description> <PercentagePregnant>51</PercentagePregnant> <PregnancyPartner>Sim_1</PregnancyPartner> </Sims> <Sims> <SimDescriptionId>3141542499305254304</SimDescriptionId> <SpreadSheetUniqueID>Sim_3</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Ethan</FirstName> <LastName>Gameplay/Excel/EP05_World/Sims:Parrott</LastName> <HouseholdId>6</HouseholdId> <PercentageAgeStateComplete>12</PercentageAgeStateComplete> <Traits>HeavySleeper,CouchPotato,Friendly</Traits> <Skills>Diving,4 Mooch,8 Logic,8 Painting,7 ChildCooking,10</Skills> <Sign>Libra</Sign> <CelebrityLevel>0</CelebrityLevel> <Description>Gameplay/Excel/EP05_World/Sims:EthanParrottDescription</Description> </Sims> <Sims>// Then we have the relationship reference:<Relationships> <SpreadSheetUniqueID></SpreadSheetUniqueID> <Sim_1></Sim_1> <Sim_2></Sim_2> <Sim_3></Sim_3> <Sim_4></Sim_4> <Sim_5></Sim_5> <Sim_6></Sim_6> <Sim_7></Sim_7> <Sim_8></Sim_8> <Sim_9></Sim_9> <Sim_10></Sim_10> <Sim_11></Sim_11> <Sim_12></Sim_12> <Sim_13></Sim_13> <Sim_14></Sim_14> <Sim_15></Sim_15> <Sim_16></Sim_16> <Sim_17></Sim_17> <Sim_18></Sim_18> <Sim_19></Sim_19> <Sim_20></Sim_20> <Sim_21></Sim_21> <Sim_22></Sim_22> <Sim_23></Sim_23> <Sim_24></Sim_24> <Sim_25></Sim_25> <Sim_26></Sim_26> <Sim_27></Sim_27> <Sim_28></Sim_28> <Sim_29></Sim_29> <Sim_30></Sim_30> <Sim_31></Sim_31> <Sim_32></Sim_32> <Sim_33></Sim_33> <Sim_34></Sim_34> <Sim_35></Sim_35> <Sim_36></Sim_36> <Sim_37></Sim_37> <Sim_38></Sim_38> <Sim_39></Sim_39> <Sim_40></Sim_40> <Sim_501></Sim_501> <Sim_502></Sim_502> <Sim_503></Sim_503> <Sim_504></Sim_504> <Sim_600></Sim_600> <Sim_601></Sim_601> <Sim_602></Sim_602> <Sim_603></Sim_603> <Sim_604></Sim_604> <Sim_605></Sim_605> <Sim_606></Sim_606> <Sim_607></Sim_607> <Sim_608></Sim_608> <Sim_609></Sim_609> <Sim_610></Sim_610> <Sim_611></Sim_611> <Sim_612></Sim_612> <Sim_613></Sim_613> <Sim_614></Sim_614> <Sim_700></Sim_700> <Sim_701></Sim_701> <Sim_702></Sim_702> <Sim_703></Sim_703> <Sim_704></Sim_704> <Sim_705></Sim_705> <Sim_706></Sim_706> <Sim_707></Sim_707> <Sim_708></Sim_708> <Sim_709></Sim_709> <Sim_710></Sim_710> <Sim_711></Sim_711> <Sim_712></Sim_712> <Sim_713></Sim_713> <Sim_714></Sim_714> <Sim_715></Sim_715> <Sim_716></Sim_716> <Sim_717></Sim_717> <Sim_718></Sim_718> <Sim_719></Sim_719> <Sim_720></Sim_720> <Sim_721></Sim_721> <Sim_722></Sim_722> <Sim_723></Sim_723> <Sim_724></Sim_724> <Sim_101></Sim_101> <Sim_102></Sim_102> <Sim_103></Sim_103> <Sim_104></Sim_104> <Sim_105></Sim_105> <Sim_106></Sim_106> <Sim_107></Sim_107> <Sim_108></Sim_108> <Sim_109></Sim_109> <Sim_110></Sim_110> <Sim_111></Sim_111> <Sim_112></Sim_112> <Sim_113></Sim_113> <Sim_114></Sim_114> <Sim_115></Sim_115> <Sim_116></Sim_116> <Sim_117></Sim_117> <Sim_118></Sim_118> <Sim_119></Sim_119> <Sim_120></Sim_120> <Sim_121></Sim_121> <Sim_122></Sim_122> <Sim_124></Sim_124> <Sim_125></Sim_125> <Sim_126></Sim_126> <Sim_123></Sim_123> </Relationships> // Here we have all the sims that have? or could? Have relationships with other sims. <Relationships> <Sim_1>Kanoa Parrott</Sim_1> <Sim_2>Jazlyn Parrott</Sim_2> <Sim_3>Ethan Parrott</Sim_3> <Sim_4>Sofia Martingale</Sim_4> <Sim_5>Cruz Martingale</Sim_5> <Sim_6>Rodney Singleton</Sim_6> <Sim_7>Booker Singleton</Sim_7> <Sim_8>Calvin Riffin</Sim_8> <Sim_9>Cornell Riffin</Sim_9> <Sim_10>Chantrelle Riffin</Sim_10> <Sim_11>Tate Curley</Sim_11> <Sim_12>Esme Curley</Sim_12> <Sim_13>Bertram Bedlington</Sim_13> <Sim_14>Patricia Bedlington</Sim_14> <Sim_15>Quincy Miller</Sim_15> <Sim_16>Jacquie Miller</Sim_16> <Sim_17>Maisy Miller</Sim_17> <Sim_18>Alouette Bird</Sim_18> <Sim_19>Oriole Bird</Sim_19> <Sim_20>Shawnee Fox</Sim_20> <Sim_21>Cheyenne Fox</Sim_21> <Sim_22>Dakota Fox</Sim_22> <Sim_23>Benni Hennessey</Sim_23> <Sim_24>Zac Whipsnake</Sim_24> <Sim_25>Hailey Shepherd</Sim_25> <Sim_26>Kenji Midden</Sim_26> <Sim_27>Johnny Johnson</Sim_27> <Sim_28>Chuck Hobble</Sim_28> <Sim_29>Barrington Diamond</Sim_29> <Sim_30>Juanita Blanco</Sim_30> <Sim_31>Felipe Marshall</Sim_31> <Sim_32>Kim Marshall</Sim_32> <Sim_33>Vera Blackburn</Sim_33> <Sim_34>Hetty Lionheart</Sim_34> <Sim_35>Vallari Chandra</Sim_35> <Sim_36>Gavin Pinkerton</Sim_36> <Sim_37>Benjamin Schmidt</Sim_37> <Sim_38>Imogen Pelly</Sim_38> <Sim_39>Honey Darnell</Sim_39> <Sim_40>Gracie Loveland</Sim_40> <Sim_501>Clement Riffin</Sim_501> <Sim_502>Clarissa Riffin</Sim_502> <Sim_503>Yellow-Foot Wild-Hair</Sim_503> <Sim_504>Donna Parr-Teague</Sim_504> <Sim_600>Kalliopi Ellada</Sim_600> <Sim_601>Gussie Bell</Sim_601> <Sim_602>Jay Schreckengast</Sim_602> <Sim_603>Maggie Gray</Sim_603> <Sim_604>Hiller Flint</Sim_604> <Sim_605>Charmaine Hopper</Sim_605> <Sim_606>Josy Clover</Sim_606> <Sim_607>Evan Noble</Sim_607> <Sim_608>Sage Oxendine</Sim_608> <Sim_609>Gurpal Einstein</Sim_609> <Sim_610>Alani Shepherd</Sim_610> <Sim_611>Li Lo</Sim_611> <Sim_612>Angel Jenner</Sim_612> <Sim_613>Gloria Bedlington</Sim_613> <Sim_614>Shaun Kiffle</Sim_614> <Sim_700>Lark Gosling</Sim_700> <Sim_701>Jacoby Grubb</Sim_701> <Sim_702>Avery Sage</Sim_702> <Sim_703>Edison Trace</Sim_703> <Sim_704>Bea Bright</Sim_704> <Sim_705>Seymore Cole</Sim_705> <Sim_706>Ashleigh Ashford</Sim_706> <Sim_707>Kale Parrott</Sim_707> <Sim_708>Pippa Rose</Sim_708> <Sim_709>Altman Rush</Sim_709> <Sim_710>Dorothy Button</Sim_710> <Sim_711>Chase Harley</Sim_711> <Sim_712>Genna Kizzy</Sim_712> <Sim_713>Benedict Brier</Sim_713> <Sim_714>Audrey Puggle</Sim_714> <Sim_715>Zebedee Devoir</Sim_715> <Sim_716>Verity Fiddle</Sim_716> <Sim_717>Jak Reynard</Sim_717> <Sim_718>Mollie Bullock</Sim_718> <Sim_719>Elliot Parr</Sim_719> <Sim_720>Sara Foster</Sim_720> <Sim_721>Julian Sprockett</Sim_721> <Sim_722>Melody Frend</Sim_722> <Sim_723>Joey Sims</Sim_723> <Sim_724>Jenny Howlet</Sim_724> <Sim_101>Marney Martingale</Sim_101> <Sim_102>Glint30 Singleton</Sim_102> <Sim_103>Ditz Riffin</Sim_103> <Sim_104>Petunia Curley</Sim_104> <Sim_105>Buckley Bedlington</Sim_105> <Sim_106>Patch Miller</Sim_106> <Sim_107>Mozart Miller</Sim_107> <Sim_108>Minette Bird</Sim_108> <Sim_109>Willow Fox</Sim_109> <Sim_110>Bramble Fox</Sim_110> <Sim_111>Shep Fox</Sim_111> <Sim_112>Freebird Johnson</Sim_112> <Sim_113>Shadow Hobble</Sim_113> <Sim_114>GooGoo Marshall</Sim_114> <Sim_115>BaBa Marshall</Sim_115> <Sim_116>Oopsie-Daisy Marshall</Sim_116> <Sim_117>Ginger Blackburn</Sim_117> <Sim_118>Walter Blackburn</Sim_118> <Sim_119>Mothball Lionheart</Sim_119> <Sim_120>Pickles Lionheart</Sim_120> <Sim_121>Muffin Lionheart</Sim_121> <Sim_122>Teabag Lionheart</Sim_122> <Sim_124>Pantoufle Pelly</Sim_124> <Sim_125>Skedaddle Darnell</Sim_125> <Sim_126>BabycakesLoveland</Sim_126> <Sim_123>Ralston Schmidt</Sim_123> </Relationships>// Interestingly this piece of XML doesn't have a reference. But I did include 3 others to see how they're linked. The <SpreadSheetUniqueID> tag refers to our sim, the i.e <Sim_4> refers to the relationship they both have<Relationships> <SpreadSheetUniqueID>Sim_1</SpreadSheetUniqueID> <Sim_4>Romantic Interest</Sim_4> <Sim_38>Romantic Interest</Sim_38> <Sim_707>Old Enemies</Sim_707> </Relationships> <Relationships> <Sim_3>parentOf</Sim_3> <Sim_707>siblingOf</Sim_707> </Relationships> <Relationships> <SpreadSheetUniqueID>Sim_2</SpreadSheetUniqueID> <Sim_1>Spouse</Sim_1> <Sim_18>Best Friend</Sim_18> <Sim_25>Good Friend</Sim_25> <Sim_37>Friend</Sim_37> <Sim_610>Best Friend</Sim_610> </Relationships> // Sometimes I noticed there were empty tags, which... I'm not sure if that's the code's bad parsing or other reasons? <Relationships> </Relationships> // Then there's a similar one but this I'd assume means the sim literally has no friends or family. Probably an NPC or Service <Relationships> <SpreadSheetUniqueID>Sim_606</SpreadSheetUniqueID> </Relationships>// Reference of dead sims<DeadSims> <SimDescriptionId></SimDescriptionId> <SpreadSheetUniqueID></SpreadSheetUniqueID> <FirstName></FirstName> <LastName></LastName> <HouseholdId></HouseholdId> <PercentageAgeStateComplete>0</PercentageAgeStateComplete> <Traits></Traits> <Skills></Skills> <LifetimeWish></LifetimeWish> <Sign></Sign> <CareerName></CareerName> <CareerLevel></CareerLevel> <CareerLocation></CareerLocation> <CareerBranch>Base</CareerBranch> <CareerPerformance></CareerPerformance> <HasRetired>0</HasRetired> <AgeWhenStartedJob></AgeWhenStartedJob> <Fitness></Fitness> <Weight></Weight> <GenderPreference>N</GenderPreference> <Description>DescriptionNotSpecified</Description> <PercentagePregnant>-1</PercentagePregnant> <PregnancyPartner></PregnancyPartner> </DeadSims> // Information of a dead sim. Maybe supernatural Data is also stored here? <DeadSims> <SimDescriptionId>3141542494596887808</SimDescriptionId> <SpreadSheetUniqueID>Sim_501</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Clement</FirstName> <LastName>Gameplay/Excel/EP05_World/Sims:Riffin</LastName> <PercentageAgeStateComplete>55</PercentageAgeStateComplete> <Traits>OverEmotional,Friendly,FamilyOriented,GreatKisser,GoodSenseOfHumor</Traits> <Skills>Charisma,0 Handiness,2</Skills> <LifetimeWish>major_dream_raise_num_children_from_baby_to_teen</LifetimeWish> <Sign>Aries</Sign> <GenderPreference>F</GenderPreference> <Description>Gameplay/Excel/EP05_World/Sims:ClementRiffinDescription</Description> </DeadSims>// Reference of Towniesims<TownieSims> <SimDescriptionId></SimDescriptionId> <SpreadSheetUniqueID></SpreadSheetUniqueID> <FirstName></FirstName> <LastName></LastName> <HouseholdId></HouseholdId> <PercentageAgeStateComplete>0</PercentageAgeStateComplete> <Traits></Traits> <Skills></Skills> <LifetimeWish></LifetimeWish> <Sign></Sign> <CelebrityLevel></CelebrityLevel> <PreferredRole></PreferredRole> <OccultType></OccultType> <CareerName></CareerName> <CareerLevel></CareerLevel> <CareerLocation></CareerLocation> <CareerBranch>Base</CareerBranch> <CareerPerformance></CareerPerformance> <HasRetired>0</HasRetired> <AgeWhenStartedJob></AgeWhenStartedJob> <Fitness></Fitness> <Weight></Weight> <GenderPreference>N</GenderPreference> <Description>DescriptionNotSpecified</Description> <PercentagePregnant>-1</PercentagePregnant> <PregnancyPartner></PregnancyPartner> </TownieSims> // All TownieSims live in household 38, which the XML file also refers to as: <HouseholdId>38</HouseholdId> <FamilyName>TownieFamilyBell</FamilyName> So this must be a general household. <TownieSims> <SimDescriptionId>3141542494596886304</SimDescriptionId> <SpreadSheetUniqueID>Sim_600</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Kalliopi</FirstName> <LastName>Gameplay/Excel/EP05_World/Sims:Ellada</LastName> <HouseholdId>38</HouseholdId> <PercentageAgeStateComplete>54</PercentageAgeStateComplete> <Traits>Handy,Good,Angler,AnimalLover</Traits> <Skills>Hacking,10 Chess,4 Athletic,7 WildlifeFriend,3</Skills> <Sign>Capricorn</Sign> <CelebrityLevel>0</CelebrityLevel> </TownieSims>// Then we have the Service sims <ServiceNPCSims> <SimDescriptionId></SimDescriptionId> <SpreadSheetUniqueID></SpreadSheetUniqueID> <FirstName></FirstName> <LastName></LastName> <HouseholdId></HouseholdId> <PercentageAgeStateComplete>0</PercentageAgeStateComplete> <Traits></Traits> <Skills></Skills> <LifetimeWish></LifetimeWish> <Sign></Sign> <CareerName></CareerName> <CareerLevel></CareerLevel> <CareerLocation></CareerLocation> <CareerBranch>Base</CareerBranch> <CareerPerformance></CareerPerformance> <HasRetired>0</HasRetired> <AgeWhenStartedJob></AgeWhenStartedJob> <Fitness></Fitness> <Weight></Weight> <GenderPreference>N</GenderPreference> <Description>DescriptionNotSpecified</Description> <PercentagePregnant>-1</PercentagePregnant> <PregnancyPartner></PregnancyPartner> </ServiceNPCSims> <ServiceNPCSims> <SimDescriptionId>3141542499305253152</SimDescriptionId> <SpreadSheetUniqueID>Sim_700</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Lark</FirstName> <LastName>Gameplay/Excel/EP05_World/Sims:Gosling</LastName> <HouseholdId>1</HouseholdId> <PercentageAgeStateComplete>88</PercentageAgeStateComplete> <Traits>HeavySleeper,CatPerson,Childish,FamilyOriented</Traits> <Skills>Homework,0</Skills> <Sign>Virgo</Sign> </ServiceNPCSims>// Again bad parsing...? <Data> </Data>// Pet pool references, so this refers to say, wild animals and racoons, etc <PetPoolSims> <SimDescriptionId></SimDescriptionId> <SpreadSheetUniqueID></SpreadSheetUniqueID> <FirstName></FirstName> <LastName></LastName> <HouseholdId></HouseholdId> <PercentageAgeStateComplete>0</PercentageAgeStateComplete> <Traits></Traits> <Skills></Skills> <LifetimeWish></LifetimeWish> <Sign></Sign> <CelebrityLevel></CelebrityLevel> <PreferredRole></PreferredRole> <OccultType></OccultType> <CareerName></CareerName> <CareerLevel></CareerLevel> <CareerLocation></CareerLocation> <CareerBranch>Base</CareerBranch> <CareerPerformance></CareerPerformance> <HasRetired>0</HasRetired> <AgeWhenStartedJob></AgeWhenStartedJob> <Fitness></Fitness> <Weight></Weight> <GenderPreference>N</GenderPreference> <Description></Description> <PercentagePregnant>-1</PercentagePregnant> <PregnancyPartner></PregnancyPartner> </PetPoolSims> <PetPoolSims> <SimDescriptionId>3141542499305252640</SimDescriptionId> <SpreadSheetUniqueID>Sim_201</SpreadSheetUniqueID> <FirstName>Gameplay/Excel/EP05_World/Sims:Needles</FirstName> <HouseholdId>2</HouseholdId> <PercentageAgeStateComplete>22</PercentageAgeStateComplete> <Traits>IndependentPet,PlayfulPet,DestructivePet,LazyPet</Traits> </PetPoolSims>// This is from Moonlight falls, I was just curious is it was there since the script did indicate that it was writing stuff to a XML file or in-game simdescription // Reference of the data <SupernaturalData> <SpreadSheetUniqueID></SpreadSheetUniqueID> <OccultType></OccultType> <FairyWingColor_R></FairyWingColor_R> <FairyWingColor_G></FairyWingColor_G> <FairyWingColor_B></FairyWingColor_B> <FairyWingType></FairyWingType> <GhostDeathType></GhostDeathType> <TransformedOutfitKey></TransformedOutfitKey> </SupernaturalData> // We all know Occults each has traits. Funnily enough, those actually aren't specified in the <sims> Just the occult type skills like spellcasting <SupernaturalData> <SpreadSheetUniqueID>Sim_3</SpreadSheetUniqueID> <OccultType>Fairy</OccultType> <FairyWingColor_R>0.1411764</FairyWingColor_R> <FairyWingColor_G>0.5647058</FairyWingColor_G> <FairyWingColor_B>0.8274509</FairyWingColor_B> <FairyWingType>FairyWingB</FairyWingType> </SupernaturalData></CharacterImport>
Now that you've gone through the notes, if so yay! I did notice that worlds don't have any sims data. I just hope that the UNKOWN types don't happen to hold those :P
Now a few things I found about what it ABSOLUTELY needs to have when you'd create your own is:
- The TGI has to be exactly this: 0x0333406C-0x00000000-0xE51DF1C5C044A949 (All EA worlds all have this exact TGI key)
- Names like this: "Gameplay/Excel/EP06_World/Household:Batez" In a custom XML we can easily just call it 'Batez'. Custom worlds also just use the regular names so this is completely okay.
- To get the SimDescriptionId (Which is a weird number like 3141542499305254288), you can get this by using Nraas as well. You need DebugEnabled for this and once you click on a sim>debugEnabler>Object>Who am I? You'll see this exact hash, also on custom sims.
- EA's worlds are constantly being updated by the game. So if you open "C:\Program Files (x86)\Electronic Arts\The Sims 3 Showtime\GameData\Shared\NonPackaged\Worlds" For example and you have a save there, you will see your sim in a Snap, but also in the XML file. However, Custom worlds are weirdly never updated.
Now, on gameload, the CharacterImportOnGameLoad is being triggered. I'm wondering now if having a save file, getting the correct SimDescID key and all would make it read a Custom XML since Custom worlds aren't exactly being updated by default, but we still don't know if the game just literally ignores them whatsoever either.
#7
10th Jun 2019 at 5:56 PM
Posts: 3,860
Thanks: 8536 in 67 Posts
I noticed that EA left quite a bunch of their "Export" helpers. Now, the script Sims3.Gameplay.WorldBuilderUtil.CharacterImportCommands.ExportVisibleSimsToFile() Sort of does what I want it to do. Which is a big yay! Because the game ended up creating an XML file inside Documents/The sims 3 and exported this:
Now, looking at the 'CharacterExport' XML stuff, it does seem a bit different the way it states things. For example, traits have 'sub tags' whereas the 'CharacterImport' stuff seems to have just one line. So that's another mystery to solve.
For the ones wondering why I'm on a big hunt figuring out which function to use rather than creating it myself (Which I will be honest, would have made things faster), one thing that I got taught at least is "Don't rewrite code that's already there".
Code:
<?xml version="1.0" encoding="utf-8"?> <CharacterExport> <Sim> <Name>Lilly Bachelor</Name> <Age>YoungAdult</Age> <SimDescriptionID>4916805570223393520</SimDescriptionID> <Traits> <Trait>SociallyAwkward</Trait> <Trait>CommitmentIssues</Trait> <Trait>Mooch</Trait> <Trait>EasilyImpressed</Trait> </Traits> <Skills> <Skill> <Name>Photography</Name> <Level>0</Level> </Skill> </Skills> <Career> <Job> </Job> <School> </School> </Career> <Buffs> <Buff>SqueakyClean</Buff> </Buffs> <Pregnant>False</Pregnant> <Relationships> </Relationships> </Sim> <Household> <Name>Gameplay/Excel/EP05_World/Households:HouseholdNameNotSpecified</Name> <ID>1</ID> <Funds>200</Funds> <Description>Â*</Description> </Household> <Household> <Name>Bachelor</Name> <ID>6</ID> <Funds>660</Funds> <Description></Description> </Household> <Household> <Name>De Luca</Name> <ID>7</ID> <Funds>20000</Funds> <Description></Description> </Household> </CharacterExport>
Now, looking at the 'CharacterExport' XML stuff, it does seem a bit different the way it states things. For example, traits have 'sub tags' whereas the 'CharacterImport' stuff seems to have just one line. So that's another mystery to solve.
For the ones wondering why I'm on a big hunt figuring out which function to use rather than creating it myself (Which I will be honest, would have made things faster), one thing that I got taught at least is "Don't rewrite code that's already there".
Who Posted
|