- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Social Interaction defined only through xml
- Site Map >
- Modding and Creation >
- Sims 3 Creation >
- Modding Discussion >
- Social Interaction defined only through xml
Replies: 5 (Who?), Viewed: 1915 times.
#1
18th Dec 2014 at 1:04 PM
Last edited by Arsil : 18th Dec 2014 at 1:31 PM.
Posts: 997
Thanks: 22090 in 95 Posts
Social Interaction defined only through xml
Hello,I wanted to try something new and make a social interaction defined only (or almost) through xml.
It's not showing up so I guess I'm missing something or I've screwed up somewhere.
First question: can this be done without any interaction coding? (except a test method).
What is the minimal data I have to fill to make it work?
My first step is to load the social data from an xml where I defined an Action entry/tag.
I copy/pasted the entry of a similar interaction and made the needed changes
(ATM it use the same jazz script, I just want to see if it works).
Then I load the socializing action availability data from another xml where I defined some SAA
tags for the custom action. I think I understand how the SAA tags work, I've taken for granted
that if the action is available for the "Ok" context then is available also for the "Friendly" and
"VeryFriendly" contexts, is that correct or I have to explicitly define those too?
What's the difference between FPA and SPA tags? Is the first for the lead-actor action and the latter
for the target-actor [re]action?
What's the difference between SAA and TAA tags? Does "S" stands for social and "T" for topic?
Are TAA tags necessary for this kind (or any kind) of social interaction?
Do I have to define an ActionTopic somewhere? No clue what they are.
Please don't link other threads about this, I'm sure I've already read them all (and some seem
even contradictory to me), I need practical help and explanations fitted for a 7yo child.
----------------
I don't think it matters, but I'm trying to add a new way to greet someone. The game's xmls
call that "greet" but it's the interaction to introduce a sim to a unknown sim (greet, amusing
greet, flirty greet, etc). Or maybe I'm just confused, it's been a while since last time I played
(testing excluded).
I used the info posted by Sim_MX in this POST and his/her Hypochondriasis mod as reference.
Another question: is all this worth it just to avoid to code the interaction and define a social-jig
(not sure what that is either), synchronize the actors and handling relationships changes?
What are the pros and cons of an interaction defined in a way or in the other?
Loading CODE
Code:
public static void LoadSocialData() { XmlDocument root = Simulator.LoadXML("ArsilJapCultureSocialData"); bool isEp5Installed = GameUtils.IsInstalled(ProductVersion.EP5); if (root != null) { XmlElementLookup lookup = new XmlElementLookup(root); List<XmlElement> list = lookup["Action"]; foreach (XmlElement element in list) { CommodityTypes types; XmlElementLookup table = new XmlElementLookup(element); ParserFunctions.TryParseEnum<CommodityTypes>(element.GetAttribute("com"), out types, CommodityTypes.Undefined); ActionData data = new ActionData(element.GetAttribute("key"), types, ProductVersion.BaseGame, table, isEp5Installed); ActionData.Add(data); } } } public static void LoadSocializingActionAvailability() { XmlDbData xdb = XmlDbData.ReadData("ArsilJapCultureSocializingActionAvailability"); if (xdb != null) { try { if (xdb.Tables.ContainsKey("SAA")) { SocialManager.ParseStcActionAvailability(xdb); } if (xdb.Tables.ContainsKey("TAA")) { SocialManager.ParseActiveTopicActionAvailability(xdb); } if (xdb.Tables.ContainsKey("ActionNames")) { SocialManager.ParseActionNames(xdb); } } catch (Exception)// exception) { } } }
ArsilJapCultureSocialData XML (the first entry is not void, but the loader/parser "knows that" so it should be fine)
Code:
<?xml version="1.0"?> <Social> <!-- STBL's Key "Gameplay/Excel/Socializing/Action:ArsilGreetWithBow" --> <Action key="ArsilGreetWithBow" com="Friendly"> <Text key="ArsilGreetWithBow" pvt="BeGreeted" /> <AD val="0x00080088"> <Misc ITLA="20" /> <!-- Interestingness To Look At --> </AD> <AA> <AGE x="C,T,Y,A,E" y="C,T,Y,A,E" /> <!-- <ATRA val="NoSenseOfHumor" /> --> <ATREQ val="TraitJapCulture" /> <ATE val="TraitJapCulture" /> <Available auto="True" udo="True" /> <!-- Format: namespace.class,assemblyName,method --> <ProcTest key="Arsil.JapCulture.Instantiator,JapCultureTrait,TestGreetWithBow" /> </AA> <Jazz> <!-- jazz script name, "a2a_soc_", startStance, suite, endStance, "_x/_y" --> <Graph val="social_generic" suite="AmusingGreet" data="BaseGame" x="Neutral" y="Neutral" jig="SocialJigTwoPerson" /> </Jazz> <Rules> <RHS com="Friendly" state=""> <Anim /> <Buff /> <TUN charInc="0" /> <Topic /> </RHS> </Rules> </Action> </Social>
ArsilJapCultureSocializingActionAvailability XML
Code:
<?xml version="1.0"?> <SocializingActionAvailability> <SAA> <Cat></Cat> <Gr></Gr> <FPA></FPA> <SPA></SPA> </SAA> <SAA> <Cat>Ok</Cat> <!-- Type of shorterm context type --> </SAA> <SAA> <Gr>Default</Gr> <!-- Type of longterm relationship that will be associated to the previous context --> </SAA> <SAA> <Gr>Acquaintance</Gr> <!-- This type of longterm relationship will also be associated with the Ok context --> </SAA> <SAA> <Gr>BestFriend</Gr> <!-- This one too and so on --> </SAA> <SAA> <Gr>BestFriendsForever</Gr> </SAA> <SAA> <Gr>Ex</Gr> </SAA> <SAA> <Gr>ExSpouse</Gr> </SAA> <SAA> <Gr>Friend</Gr> </SAA> <SAA> <Gr>GoodFriend</Gr> </SAA> <SAA> <Gr>OldFriend</Gr> </SAA> <SAA> <Gr>Partner</Gr> </SAA> <SAA> <Gr>RomanticInterest</Gr> </SAA> <SAA> <Gr>Fiancee</Gr> </SAA> <SAA> <Gr>Spouse</Gr> </SAA> <SAA> <FPA>ArsilGreetWithBow</FPA> <SPA>ArsilGreetWithBow</SPA> <!-- Key of the social interaction that will be associated with the previous context. In the Ok context, Sims can greet with a bow with any kind of relationship. --> </SAA> </SocializingActionAvailability>
Advertisement
#2
19th Dec 2014 at 8:24 PM
Last edited by Arsil : 19th Dec 2014 at 8:42 PM.
Posts: 997
Thanks: 22090 in 95 Posts
I guess I'll use the good old coding method.
Can I have a bit of linguistic advice? Like I said, I want to do a new kind of greeting,
be it for introduce a Sim to an unknown Sim or for greet one your Sim already know .
For the latter I think "Greet with a bow" is all right, but for the former I'd like to keep
the "format" used by the game: Amusing/Funny/Rude Introduction. My introduction
is based on a bow, but I don't think it's correct to say "Bow Introduction" or "Bowing
Introduction" in English, right? ATM I'm using "Introduce with a bow" but I'm not sure
about this either. Is that at least correct grammatically? Should I use "Introduction
with a bow" instead? I'd also like to keep it as short as possible.
What about "Bow to Introduce"?
Can I have a bit of linguistic advice? Like I said, I want to do a new kind of greeting,
be it for introduce a Sim to an unknown Sim or for greet one your Sim already know .
For the latter I think "Greet with a bow" is all right, but for the former I'd like to keep
the "format" used by the game: Amusing/Funny/Rude Introduction. My introduction
is based on a bow, but I don't think it's correct to say "Bow Introduction" or "Bowing
Introduction" in English, right? ATM I'm using "Introduce with a bow" but I'm not sure
about this either. Is that at least correct grammatically? Should I use "Introduction
with a bow" instead? I'd also like to keep it as short as possible.
What about "Bow to Introduce"?
#3
19th Dec 2014 at 9:18 PM
Posts: 301
Thanks: 6789 in 13 Posts
What kind of bowing? If you mean the Japanese bowing then that's what it's called in English, "Japanese bowing". So I'm guessing "Japanese Introduction" is the correct one. I'd wait for native speakers though, as I'm not, I just thought I'd give my two cents
Nothing's real. Nothing's unreal either.
The frontier between true and untrue is a shady fuzzy line.
Destiny, or maybe the long flight's time-span, shall decide the issue.
Nothing's real. Nothing's unreal either.
The frontier between true and untrue is a shady fuzzy line.
Destiny, or maybe the long flight's time-span, shall decide the issue.
#4
19th Dec 2014 at 9:32 PM
Posts: 997
Thanks: 22090 in 95 Posts
Yes, the Japanese bow. I'd rather not use the word "Japanese" because I think it will be redundant.
#5
23rd Dec 2014 at 1:03 PM
Posts: 49
My first language is actually french but I'm still pretty good in english and among all the names you gave, "Japanese Introduction" or "Greet with a bow" sounds the best in my opinion.
#6
2nd Jan 2015 at 5:46 AM
Posts: 28
Thanks: 33 in 1 Posts
The practice of bowing in Japan is called o-jigi. You might call it that. With the Proper trait from late night though, you can do a "proper introduction." If you wanted to stick with EA matching stuff, maybe "Proper greet" could work.
Who Posted
|