SIMS4 スクリプトMod
SIMS3のスクリプトはなぜかxmlだったとかで、なんでやねんと突っ込みを入れつつまるでさわってなかったら
SIMS4はpythonになってたのでさわってみた
とりあえずpyoにコンパイルしてzipで固めてModsディレクトリにぶち込めばうごくっぽい
ただコンパイルはimportする先を揃えようと思うと大変なので、バイトコードにするのみ
$ python -O -m compileall test.py
とりまHelloWordしてみた
command_typeってのがよく分からないけどLiveとAutomationが動いた
import sims4.commands @sims4.commands.Command('zenu.hello0') def zenu_hello0(_connection=None): output = sims4.commands.CheatOutput(_connection) output('zenu_hello0') @sims4.commands.Command('zenu.hello1', command_type=sims4.commands.CommandType.Live) def zenu_hello1(_connection=None): output = sims4.commands.CheatOutput(_connection) output('zenu_hello1') @sims4.commands.Command('zenu.hello2', command_type=sims4.commands.CommandType.Automation) def zenu_hello2(_connection=None): output = sims4.commands.CheatOutput(_connection) output('zenu_hello2') @sims4.commands.Command('zenu.hello3', command_type=sims4.commands.CommandType.DebugOnly) def zenu_hello3(_connection=None): output = sims4.commands.CheatOutput(_connection) output('zenu_hello3')