Forum Announcement, Click Here to Read More From EA_Cade.

Help Wanted: Adding an option to mailboxes

Hi there, I'm wanting to make a mod to add the 'Plan Social Event' interaction to a mailbox so that sims don't have to go via the phone (for an off-the-grid challenge), but it's my first mod and I'm unsure how to proceed.

In principle it works. My sim can click on my custom "Ol' Rusty Mailbox" and select a 'Send invites' option, which causes them to play through the 'MailLetter' animation, and then the 'Plan Social Event' window pops up, and the event appears to carry on like it should.

However, the sim will not move to the mailbox, and will just carry out the action wherever they were standing, and I can remove the cellphone icon from the queue but it automatically replaces with a Llamacorn icon and I'm not sure how to specify use of the mailbox icon. I've also started getting an 'Items Removed: ...items may not be installed...' error when loading my game up into a lot (before placing the mailbox) which began after I started testing my mod, so I assume it's related?

I've been looking through the 'GetMail' and 'PayBills' interactions, but can't spot where the sims are instructed to move to the mailbox, or where a queue icon is specified. And I have no clue what's causing the 'items removed' error :/ Can anyone point me in the right direction? :)

Bonus question: It would be cool to have a 'write letter' animation, followed by the 'mail letter' animation but whenever I tried that everything broke :p Is it possible to chain animations?
Gallery: HanbamSims | Twitter: HanbamSims | Youtube: Hanbam

Comments

  • LittleMsSamLittleMsSam Posts: 125 Member
    I assume you copied the Interaction from the Phone Interaction and did not use an Interaction from the Mailbox? Maybe yours is still connected with Actor instead of Object and that's why your Sim won't go to the Mailbox. That would also explain why you don't get the Mailbox Icon or whatever. But it is difficult to say without seeing your File.

    Bonus answer: You could add an Animation in the Outcome Tag or in a Continuation Interaction in the Outcome Tag.
    ~~~ FIND OVER 150+ MODS ON MY OWN SITE https://lms-mods.com/ ~~~
  • BroskiPlaysBroskiPlays Posts: 5 New Member
    You can do it in two ways. Either by using Python and making use of this code:

    """
    Mailbox Testing Cheats Pie Menu Tutorial Mod
    by Scumbumbo @ ModTheSims
    """
    import sims4.commands
    import services
    import injector
    import objects.game_object

    mbox_tc_sa_instance_ids = (11269596188621091361, 16221651884105033584)
    mbox_tc_object_ids = (14940, )

    @injector.inject_to(objects.game_object.GameObject, 'on_add')
    def mbox_tc_add_super_affordances(original, self):
    original(self)

    if not self.guid64 in mbox_tc_object_ids:
    return

    sa_list = []
    affordance_manager = services.affordance_manager()
    for sa_id in mbox_tc_sa_instance_ids:
    tuning_class = affordance_manager.get(sa_id)
    if not tuning_class is None:
    sa_list.append(tuning_class)
    self._super_affordances = self._super_affordances + tuple(sa_list)

    @sims4.commands.Command('mbox.tc_enable', command_type=sims4.commands.CommandType.Live)
    def mbox_tc_enable_command(obj_id:int, _connection=None):
    client = services.client_manager().get_first_client()
    cheat_service = services.get_cheat_service()
    cheat_service.enable_cheats()
    cheat_service.send_to_client(client)

    @sims4.commands.Command('mbox.tc_disable', command_type=sims4.commands.CommandType.Live)
    def mbox_tc_disable_command(obj_id:int, _connection=None):
    client = services.client_manager().get_first_client()
    cheat_service = services.get_cheat_service()
    cheat_service.disable_cheats()
    cheat_service.send_to_client(client)

    (code is from the Mailbox Tutorial by @Scumbumbo )

    Or by going in The Sims 4 Studio and making a Interaction Tuning and adding that Interaction Tuning to the object_mailbox affordancelist. Good luck, and if you need any help just DM me. Cheers
  • juaveraldojuaveraldo Posts: 1 New Member
    I was searching for a mod just like this, can you please publish it?
Sign In or Register to comment.
Return to top