PDA

View Full Version : How do I add to an NPCs actions?


Alundra
17th Nov 2011, 04:20 PM
I'm new to this but since it's XML I think I can attempt to blow things up with it :D.

Basically I have extracted the butler thing from the GamePlay package as the tutorial on tuning mods instructed. I exported it to my own package...but the thing is I don't want to change any existing values. I want to add them. Specifically...

1. I want to add times that a butler should cook at (in addition to the value already there)
2. I want to add what they should cook
3. I want to add times for when they do their chores. For example, I want the butler to do laundry only on certain days but make beds every day if possible.
4. If the home owner is having a party I'd like the butler to bring party drinks around or hot drinks to NPCs if they've been made available (I don't want them making the wrong drink or getting in the way of mixologists) or if they're asked (so I'd need to add an interaction). That way everyone will get a drink and the party will be better lol.

So. I'm utterly clueless and can't really find what I want, or maybe I'm just lost cause I'm new to this. If anyone could direct me to a tutorial that will help me or point me in the right direction I'll love you forever :D.

Srikandi
18th Nov 2011, 02:04 AM
If you want to do more than just modify values in an XML file, you are out of the realm of XML modding and into script modding.

Basically the XML files just provide numbers that the game's scripts look up when they need a specific value. You can't use them to make scripts do different or additional things.

You can find scripting tutorials here to get an idea of what's involved: http://www.modthesims.info/wiki.php?title=Tutorials:TS3_GeneralModding#Script_Mods

Alundra
18th Nov 2011, 03:55 AM
Oh okay.

So which tutorial should I start with? Assuming I just want to add times they will cook at.

CmarNYC
18th Nov 2011, 10:10 AM
My guess is the best fit would be the Pure Scripting Modding tutorial.

As for what you'd need to do, my guess (again) is that you'd need to redefine the class defining the butler actions. You could take a look at Douglasveiga's mod (http://www.modthesims.info/download.php?t=459967) which creates a new gardener NPC as an example of how an NPC is set up and what would need to be added, and maybe look at NRaas Master Controller for an example of overriding game classes.

Just adding interactions to the butler so other sims can request them to do things would be relatively easier and the same tutorial would apply.

If I'm right about what you'd need to do, you really need programming skills to take on a project like this.

Alundra
18th Nov 2011, 04:22 PM
Hmm. Well that really sucks. XML I could figure out but I know nothing about C or anything else :(. The interaction to cook is already there so it's kinda pointless in trying.

Maybe I'll see if I can do a course online to get a bit of an intro or something :D. Thanks for your help guys!!