Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

MTS Speed-Building Challenge - posted on 17th Oct 2018 at 7:25 PM
Replies: 3 (Who?), Viewed: 978 times.
Lab Assistant
Original Poster
#1 Old 12th Jul 2018 at 9:40 PM
Help figuring out how to make a mod that adds new types of party attire?
So I wanted a mod that would allow me to designate specific outfits/costumes for a party. For example, a mod that would allow me to designate princess and prince outfits as the party attire for a prince/princess themed birthday party. I could not find any however, so I've decided to take it into my own hands. I think I've got the logistics worked out, essentially I'd need to create a new category of party attire that, building on my example, would include only the princess and prince outfits from the dreamer's costume chest. I'd then need to add that party attire as an option for birthday parties, so when you select the drop down menu in-game you could select "Princess and Prince Costumes". I have S3OC but as far as I know that only clones objects, not things like party attire. I believe I might need to do some scripting, but I'm not certain where to start nor where to find the lines of code that code for which clothing sims may wear to a party (or how I would go about adding new ones.) Any help would be much appreciated and I would credit you for your help on my mod page once I upload it to MTS (I plan on sharing this mod once it's finished)! Please feel free to correct me, too, if I'm wrong and my theory of how to go about creating new party attire types is incorrect. Don't worry about going into too much detail, either, the more info on this that I can gather, the better! Links to any tutorials that may aid in this endeavor would also be much appreciated. Thanks in advance, I really hope to make this mod a reality as I think it is something quite a few Sims 3 players would enjoy!

P.S. Though I used princess and prince outfits as an example, this mod could really apply to any costume type. Want a pirate-themed birthday party? Make a category of party attire that requires pirate clothing! (Although for that one you'd probably need to download some CC from the Store or MTS or some other website.) Want a dinosaur-themed birthday party? Make a category of party attire that requires the dinosaur costume! Though, naturally, I would need to create a new category of party attire and add it to the drop down menu for each costume/theme, lol.
Advertisement
Forum Resident
#2 Old 13th Jul 2018 at 1:03 AM Last edited by Squidconqueror : 13th Jul 2018 at 2:08 AM.
You would need to use something like ILSpy to analyze the game's coding then use Microsoft Visual Studio for the actual programming and you would need to extract the dll files. I would give you mine but i'm not sure if it would be compatable with your game setup and computer and if it's against the site's rules but follow these tutorials http://modthesims.info/wiki.php?tit..._Studio_project http://modthesims.info/wiki.php?tit...ripting_Modding http://modthesims.info/wiki.php?tit...Depth_Scripting. Anyways I found a piece of code in the game's dll files that might be of interest to you. I must admit I don't know how to program yet so I apologize if i'm not that much help to you but I'll try helping you out anyways but here's the code for the NPC Costume Party.

// Sims3.Gameplay.Situations.NpcCostumeParty
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.Gameplay.CAS;
using Sims3.Gameplay.Core;
using Sims3.Gameplay.Situations;
using Sims3.Gameplay.Utilities;
using Sims3.SimIFace;
using Sims3.SimIFace.CAS;
using System.Collections.Generic;

public class NpcCostumeParty : NpcParty
{
[Tunable]
[TunableComment("The time at which we decide to schedule the Npc Costume Party due to the player not scheduling a party yet. 0 - 23")]
public static int kHourToScheduleNpcCostumeParty = 11;

public override PartyType TypeOfParty => PartyType.NpcCostumeParty;

public override TNSNames InvitationTNSName => TNSNames.NpcCostumePartyInvitation;

public override string InvitationDialogTitleHeading => "TitleHeadingCostumeParty";

public override string InvitationDialogFlavorText => "FlavorTextCostumeParty";

private NpcCostumeParty()
{
}

private NpcCostumeParty(Lot lot, Sim host, List<SimDescription> guests, OutfitCategories clothingStyle, DateAndTime startTime)
: base(lot, host, guests, clothingStyle, startTime, PartyType.NpcCostumeParty)
{
}

public static void ScheduleParty()
{
float time = (float)kHourToScheduleNpcCostumeParty - SimClock.CurrentTime().Hour;
long ticks = SimClock.CurrentTicks + SimClock.ConvertToTicks(time, TimeUnit.Hours);
DateAndTime startTime = new DateAndTime(ticks);
StartNpcCostumeParty(startTime);
}

public static bool StartNpcCostumeParty(DateAndTime startTime)
{
if (!NpcParty.ReadyNpcPartyHostAndGuests(PartyType.NpcCostumeParty, NpcParty.GetCandidateHosts(PartyType.NpcCostumeParty), out Sim sim, out List<SimDescription> guests))
{
return false;
}
NpcParty.sNpcParty = new NpcCostumeParty(sim.LotHome, sim, guests, OutfitCategories.Special, startTime);
return true;
}

public override CommodityKind BeAtHostedSituationMotive(Sim sim)
{
return CommodityKind.BeAtCostumeParty;
}
}

I'm really looking forward to your new mod. One thing that I would really like is a mod that allows the children to show up at a sleepover in the pajamas that you or the game picked out instead of the default base game pajamas that they change into instead because I think it's rather unrealistic that they wear the same pjs to a sleepover. I know that I can easily change them using Consort's dress code sign but it should had been an option not forced upon. I wonder why EA or Maxis would even bother to writing extra code to make the game force the kids into those same pjs. Seems like unnecessary extra work especially for a lazy and greedy company like EA but oh well I guess I could deal with it.
Lab Assistant
Original Poster
#3 Old 15th Jul 2018 at 3:49 AM
Quote:
Originally Posted by Squidconqueror
You would need to use something like ILSpy to analyze the game's coding then use Microsoft Visual Studio for the actual programming and you would need to extract the dll files. I would give you mine but i'm not sure if it would be compatable with your game setup and computer and if it's against the site's rules but follow these tutorials http://modthesims.info/wiki.php?tit..._Studio_project http://modthesims.info/wiki.php?tit...ripting_Modding http://modthesims.info/wiki.php?tit...Depth_Scripting. Anyways I found a piece of code in the game's dll files that might be of interest to you. I must admit I don't know how to program yet so I apologize if i'm not that much help to you but I'll try helping you out anyways but here's the code for the NPC Costume Party.

// Sims3.Gameplay.Situations.NpcCostumeParty
using Sims3.Gameplay.Actors;
using Sims3.Gameplay.Autonomy;
using Sims3.Gameplay.CAS;
using Sims3.Gameplay.Core;
using Sims3.Gameplay.Situations;
using Sims3.Gameplay.Utilities;
using Sims3.SimIFace;
using Sims3.SimIFace.CAS;
using System.Collections.Generic;

public class NpcCostumeParty : NpcParty
{
[Tunable]
[TunableComment("The time at which we decide to schedule the Npc Costume Party due to the player not scheduling a party yet. 0 - 23")]
public static int kHourToScheduleNpcCostumeParty = 11;

public override PartyType TypeOfParty => PartyType.NpcCostumeParty;

public override TNSNames InvitationTNSName => TNSNames.NpcCostumePartyInvitation;

public override string InvitationDialogTitleHeading => "TitleHeadingCostumeParty";

public override string InvitationDialogFlavorText => "FlavorTextCostumeParty";

private NpcCostumeParty()
{
}

private NpcCostumeParty(Lot lot, Sim host, List<SimDescription> guests, OutfitCategories clothingStyle, DateAndTime startTime)
: base(lot, host, guests, clothingStyle, startTime, PartyType.NpcCostumeParty)
{
}

public static void ScheduleParty()
{
float time = (float)kHourToScheduleNpcCostumeParty - SimClock.CurrentTime().Hour;
long ticks = SimClock.CurrentTicks + SimClock.ConvertToTicks(time, TimeUnit.Hours);
DateAndTime startTime = new DateAndTime(ticks);
StartNpcCostumeParty(startTime);
}

public static bool StartNpcCostumeParty(DateAndTime startTime)
{
if (!NpcParty.ReadyNpcPartyHostAndGuests(PartyType.NpcCostumeParty, NpcParty.GetCandidateHosts(PartyType.NpcCostumeParty), out Sim sim, out List<SimDescription> guests))
{
return false;
}
NpcParty.sNpcParty = new NpcCostumeParty(sim.LotHome, sim, guests, OutfitCategories.Special, startTime);
return true;
}

public override CommodityKind BeAtHostedSituationMotive(Sim sim)
{
return CommodityKind.BeAtCostumeParty;
}
}

I'm really looking forward to your new mod. One thing that I would really like is a mod that allows the children to show up at a sleepover in the pajamas that you or the game picked out instead of the default base game pajamas that they change into instead because I think it's rather unrealistic that they wear the same pjs to a sleepover. I know that I can easily change them using Consort's dress code sign but it should had been an option not forced upon. I wonder why EA or Maxis would even bother to writing extra code to make the game force the kids into those same pjs. Seems like unnecessary extra work especially for a lazy and greedy company like EA but oh well I guess I could deal with it.


Wow, this is very informative! Thank you very much for the help, I will give those tutorials a look over and see what I can do. My programming experience is extremely limited so I'm not sure if I can really do it but I'll try! If I do, I'll be sure to credit you and message you when it's done! Maybe I'll even see about including an option for a custom pajama party where NPCs choose a random sleepwear outfit from the sleepwear outfits for that age category that you have installed via expansions/custom content.
Forum Resident
#4 Old 15th Jul 2018 at 8:32 PM
Quote:
Originally Posted by PikachuMaiden
Wow, this is very informative! Thank you very much for the help, I will give those tutorials a look over and see what I can do. My programming experience is extremely limited so I'm not sure if I can really do it but I'll try! If I do, I'll be sure to credit you and message you when it's done! Maybe I'll even see about including an option for a custom pajama party where NPCs choose a random sleepwear outfit from the sleepwear outfits for that age category that you have installed via expansions/custom content.

Thank you,if I had known more about programming I would be able to help you better but it's just too complicated for me to get into and learn and I have no money to spend to learn these things. It's like trying to learn a new language. You could try asking people on the programmers' Stack Exchange,on other Sims modding sites,Github or any other websites that lets you get in touch with other programmers to help you make the mod. I'm sorry that i'm not really that much help to you but that's only because I know even least about this than you. I wish you good luck on this project and I hope to see your mod hosted on this site very soon. You could also try getting in touch with Sims modder on this site by sending them a pm.
Back to top