Mod The Sims

Mod The Sims (https://modthesims.info/index.php)
-   Modding Discussion (https://modthesims.info/forumdisplay.php?f=547)
-   -   Creating a 'Wrestle' Interaction (https://modthesims.info/showthread.php?t=492221)

emino 29th Nov 2012 3:51 AM

Creating a 'Wrestle' Interaction
 
Hi, I am VERY new to TS3 modding. I have basic general coding knowledge and I am interested in making my first mod.

Basically 'Wrestle' is just a fight interaction which will function just like a regular fight interaction between sims. But, 'Wrestle' will be a friendly interaction (without decreasing relationships) , and will raise fun. That's the basic idea.

I also have an expanded idea where this interaction will raise more fun for Athletic, Brave, Diciplined and Daredevil sims. While a sim with Coward, Couch Potato and Slob sim will always refuse this interaction.

So any idea where can I start? I have been reading this tutorial ( http://simswiki.info/wiki.php?title...ripting_Modding ) and this one ( http://nene.modthesims.info/showthread.php?t=491875 ) to gain more understanding.

Sims MX 30th Nov 2012 6:29 AM

To add a social interaction you will need to load a custom SocialData and SocializingActionAvailability xml. Otherwise, you'll have to deal with social jigs and what not.

I use this code to load social interactions in one of my mods. Below is an adapted version, so you get and idea of how this works. LoadSocialData and LoadSocializingActionAvailability are triggered once the world load is finished. These methods will read two xml files (which I'll explain below) and add the interaction to the pie menu. IncreaseFunAfterWrestle is triggered once the wrestle interaction is finished. It increases the fun motive by 10 (or 15 if the Sim is Daredevil, Athletic, Disciplined, or Brave). TestWrestle checks if the target Sim has the Coward, Slob or Couch Potato trait. If they have any of those traits, the interaction won't display in the pie menu.



The SocialData XML contains the information of the social interaction: what happens before and after the interaction, which Sims can participate, under which pie menu should the interaction appear, etc. Add a new XML resource to your package (type _XML 0x0333406C) and make sure its instance is the FNV64 hash referenced in the script. In the script above, LoadSocialData tries to load "SocialData_Wrestle" (instance 0x03DB8DA9FE62CD65).



The SocializingActionAvailability xml defines in which types of "short term context" an interaction is available. For example, Sims cannot Make Out if their context isn't alluring, Sims cannot Tell Jokes if the context isn't Hilarious, etc.



I hope this helps you. Feel free to ask more questions in case I failed to explain something clearly.

JT` 30th Nov 2012 9:36 PM

Awesome, that's an excellent barebones. I've been studying twallan's SAA/SocialData injectors and trying to muster up the courage to get cracking on it, but this definitely gives me a leg up since NRaas certainly isn't the simplest framework to learn off of. =)


All times are GMT +1. The time now is 1:14 PM.

Powered by: vBulletin Version 3.0.14 · Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.