Skip to content

Instantly share code, notes, and snippets.

@patlegu
Created January 24, 2021 07:43
Show Gist options
  • Select an option

  • Save patlegu/4d6fddb5308a0a470b9ce6c6332ff886 to your computer and use it in GitHub Desktop.

Select an option

Save patlegu/4d6fddb5308a0a470b9ce6c6332ff886 to your computer and use it in GitHub Desktop.

Revisions

  1. patlegu created this gist Jan 24, 2021.
    63 changes: 63 additions & 0 deletions sims4-cheat-shortcuts-mod
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,63 @@
    import sims4.commands


    @sims4.commands.Command('gml','grandmotherlode', command_type=sims4.commands.CommandType.Live)
    def grandmotherlode(times:int=None,_connection=None):
    output = sims4.commands.CheatOutput(_connection)
    if times is not None or type(times) != 'int':
    if times > 0:
    for x in range(0,times):
    sims4.commands.client_cheat('|motherlode', _connection)
    else:
    output('Usage: grandmotherlode {positive number}')
    else:
    output('Usage: grandmotherlode {number of times}')


    @sims4.commands.Command('fem','fulleditmode','cas.fem', command_type=sims4.commands.CommandType.Live)
    def fulleditmode_shortcut(_connection=None):
    command = '|testingcheats on'
    sims4.commands.client_cheat(command, _connection)
    command = 'cas.fulleditmode'
    sims4.commands.client_cheat(command, _connection)


    @sims4.commands.Command('mo','moveobjects', command_type=sims4.commands.CommandType.Live)
    def move_objects_shortcut(_connection=None):
    command = '|testingcheats on'
    sims4.commands.client_cheat(command, _connection)
    command = 'bb.moveobjects on'
    sims4.commands.client_cheat(command, _connection)


    @sims4.commands.Command('tco', 'tc', command_type=sims4.commands.CommandType.Live)
    def testing_cheats_shortcut(_connection=None):
    command = '|testingcheats on'
    sims4.commands.client_cheat(command, _connection)


    @sims4.commands.Command('shortcuts.help', 'sch', 'sh', command_type=sims4.commands.CommandType.Live)
    def shortcuts_help(_connection=None):
    output = sims4.commands.CheatOutput(_connection)
    output('\nShortcut Commands:\n')
    output('testingcheats on: ["tc", "tco"]')
    output('bb.moveobjects on: ["mo", "moveobjects"] (Also turns on testing cheats)')
    output('cas.fulleditmode: ["fem","cas.fem", "fulleditmode"] (Also turns on testing cheats)')
    output('grandmotherlode (runs motherlode however many times you say): ["gml {number}", "grandmotherlode {number}]')
    output('freerealestate: ["fre {True|False}", "free {True|False}"] (Also turns on testing cheats)')


    @sims4.commands.Command('free','fre', command_type=sims4.commands.CommandType.Live)
    def free_real_estate_shortcut(enabled:bool=None,_connection=None):
    if enabled is not None:
    command = '|testingcheats on'
    sims4.commands.client_cheat(command, _connection)
    if enabled:
    command = 'freerealestate on'
    sims4.commands.client_cheat(command, _connection)
    elif not enabled:
    command = 'freerealestate off'
    sims4.commands.client_cheat(command, _connection)
    else:
    output = sims4.commands.CheatOutput(_connection)
    output('Usage: free {True|False}')