rcpd/offline/README

23 lines
2.3 KiB
Plaintext
Raw Normal View History

Rank Code Personal Database.
How to use:
Currently there is no real UI, so start by running python in this dir and `import codegen`.
Config file is in ~/.config/swat.cfg. If you want it somewhere else, open codegen.py and edit line 6. Do this BEFORE `import codegen`. If you've already imported it, quit python and reopen it.
If you are using Windows, you HAVE to edit that line or setup will fail.
Setup:
Execute `codegen.add_user('{YOUR IGN}')`. This will create the config file if it doesn't exist. You can add as many users as you like if you want to have multiple profiles for whatever reason (I cannot think of a reason, I just added it for fun).
When you run it later, it will automatically load the conf.
General use:
To load a code, use `codegen.read_code('0000-0000-0000-0000')`. You can put it in without the hyphens, also you can use anything in there, doesn't have to be hyphens. I recommend having something in between because it's helpful for checking the code is right.
To load a bunch of codes at once, do `codegen.mass_add()`, it just calls `read_code` in a loop. It stops if you give it a blank line.
To generate codes, use `codegen.generate('class/line')`, where you give it class/armour/trait/spec/talent. Look in tables.py for the names you should be using; it is not case sensitive, at least.
If generating mav/wm, you must specify the gun BEFORE the class, with no slash, like so: "glwm", "rmav". For WM use two letters, for mav use one. Actually WM *might* work with one. Not sure.
To check your progress, use `codegen.ranks()`. It's not very pretty yet, it's a work in progress.
All of these operate on `codegen.active_profile`, which is a number. If you look at `codegen.conf`, you can see the numbers associated with each name(s). Set `codegen.active_profile={NUM}` to switch. I'll make a thing for that later too.
Every time you feed a code into it, it will automatically save your progress. You can manually override that if you want (with `codegen.read_code({CODE},False)`), and manually call `codegen.save_conf()` after. I don't know why you would want this, maybe the file write is very slow or something. Or you're putting in cheated codes and you don't want to save them. It will still update your running config but it just won't update the file so when you restart it it'll be gone.