November 12 - Everyone ready for November Maxis Monthly? Details here
November 8 - Click here for this week's Friday Highlight!

Add custom titles to certain sims?

Sometimes, when you point the cursor at certain sims you encounter in public, you see titles above their names, such as "fitness trainer", "celebrity", or "military personnel". Is there a mod or any other possibility (by editing certain script files, for example) to give custom titles to certain sims?

As I explained in this thread, all the worlds have mayors in my head, but you'd never know because it's not an actual feature in the game. I tried to solve this by creating a reward trait with Zerbu's Mod Constructor, but couldn't get into it at all, and reward traits aren't visible on sims anyway unless you're directly controlling them. So instead I'd like a custom title to be displayed above a sim's name, like this:

Mayor of Forgotten Hollow
VLADISLAUS STRAUD
Elder

Does anyone know anything that could help me?
Thanks in advance!

Comments

  • TURBODRIVERTURBODRIVER Posts: 49 Member
    Hey! I'm not going to provide you with exact details on how to do something like this, but I can explain to you what that title above their head is.

    The red text that shows up in the headline display when hovering over a Sim is a "SituationJob".
    Every "Situation" instance in the game comes with roles and jobs that Sims are given depending on how that Situation is configured.
    The "RoleState" determines their constraints, where and what they do, and their autonomy behavior. The "SituationJob" determines their individual status in the Situation, like the title name.

    So for example, the Gym venue has a phase timer that gives random Sims a Situation, like the Gym Trainer situation. The Gym Trainer situation is a complex situation, which means it has special behavior written into the game code, but that is not a requirement to create a situation. The only reason it's complex is because Gym Trainers are employees of the venue and they ask you if you need assistance. While a Sim has the Gym Trainer situation, the Gym Trainer job is applied which makes Sims energized and gives them the gym outfit, as well as that custom title of "Gym Trainer". At the same time, the Gym Trainer role encourages their autonomy to mentor other Sims.

    So, giving some mayor a title involves creating a Situation, that would be applied on the Sim that fits a Sims filter. That situation would most likely have to be injected somewhere to run at all times, as Sims that are not currently in the zone are not running any situations. Applying a situation on a Sim forces them to spawn into the zone.

    Situation+SituationJob+RoleState+SimFilter+Injection. If it sounds like a lot, you're right, it is. I only did something like this once and it took a while to understand all the intricate parts of it. You won't be able to do this with any "constructor" out there, you need a notepad and a lot of time.
    Sorry, but not sorry tumblr_paqcr5LaDB1vwgrfio1_r1_75sq.png
  • AmandèleAmandèle Posts: 285 Member
    Why don't you create a mayor career instead? It would be less complicated ;)
    Sorry for the mistakes, English is not my first language ^^'
  • GrumpyGlowfishGrumpyGlowfish Posts: 1,225 Member
    @TURBODRIVER Wow, thanks for this great in-depth explanation! When I opened this thread, I was like, okay, that should be easy, a random title that doesn't even have to do anything other than being displayed, there's probably a mod for it that I just haven't found yet... And now you come out with this. :D I actually saw "Situations" in Zerbu's Mod Constructor, but didn't know until now what that meant, and didn't bother looking into it any further because it was in the advanced section. Now I can see why!

    @Amandèle Thank you for putting so much trust in my abilities, but I can't even create a single custom trait, which is said to be easy, let alone an entire career. :D I don't need it to be a job per se, the mayors are just sims in the politics career, and there's usually just one per world. But yeah, based on what TURBODRIVER described, a career would probably be easier than what I have in mind... :s
  • SimGuruTwoLegsSimGuruTwoLegs Posts: 20 SimGuru
    edited June 18
    We did something like this for GP07's military personnel (and conspiracy theorists and scientists). You can use that as a pattern. It's self contained (don't need to inject into existing tuning) and it roughly goes:

    trait_Hidden_Strangertown_Military
    buffs_add_on_spawn_only is enabled, and buffs has buff_Trait_Hidden_Military tuned in it. That is, this buff is automatically added when the Sim with the trait spawns in.

    buff_Trait_Hidden_Military
    auto_situation starts basicTraitSituation_Strangerville_NPC_military. This combined with the buffs_add_on_spawn_only set on the buff, this situation automatically starts when the Sim spawns in.

    basicTraitSituation_Strangerville_NPC_military
    This situation adds a tooltip to the Sim and does not a whole lot else. situationJob_BasicTrait_StrangervilleNPC_Military has the tooltip_name set to the title, and roleState_BasicTrait_StrangervilleNPC_Military is empty but needs to exist. Make sure that if the tuning has a duration field it's set to 0, else the situation will time out at some point and the title tooltip will disappear.
Sign In or Register to comment.
Return to top