Python scripting ingame
Today I’d like to provide you a fast way to load and execute your python scripts ingame.
You can load a script, do your changes and load it again, useful to quickly test things.
dll will just spawn a console with some information on how to use it, just wait it to be ready and load your scripts.
Some useful tips:
- game loads scripts not all in once, they are fully loaded ingame
- better to login and wait to be in main menu, then execute your own scripts
- executing scripts in in main menu will ensure basic python imports to be already loaded
Why should I look into python in ros?
- game is based on it, the logic is there, weapon values (ammo etc) and other interesting things are there.
- cheat scripts does not need to be updated (or just in small part)
The linked script does not take into account class inheritance, to have a full class members dump (provided you have the class object):
- go ingame
- find the class obj of which you want to dump members
- this will list ALL the methods and attributes in it:
- def sprintf(buf, fmt, *args):
- buf.write(fmt % args)
- def dump_class_full_names(class_obj):
- fl = open(‘D:\full_list.txt’, ‘w+’)
- sprintf(fl, “Class %sn”, type(class_obj))
- for f_name in dir(class_obj):
- sprintf(fl, “t%sn”, f_name)