diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-23 20:21:11 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-23 20:21:11 -0300 |
commit | 60158b29f7077466032d099c3d387aa0ff3a2efa (patch) | |
tree | d9fb6c99b7bd94a819bd6db4b5f9f2566e7eddd5 | |
parent | f3142aa8a606f360635d5215f1b5f7e0dc684dff (diff) | |
download | sdk-60158b29f7077466032d099c3d387aa0ff3a2efa.tar.gz sdk-60158b29f7077466032d099c3d387aa0ff3a2efa.tar.bz2 sdk-60158b29f7077466032d099c3d387aa0ff3a2efa.tar.xz sdk-60158b29f7077466032d099c3d387aa0ff3a2efa.zip |
Allow to discard all changes.
Improve sub unit generation.
-rw-r--r-- | script.rpy | 3 | ||||
-rw-r--r-- | ueditor.rpy | 30 |
2 files changed, 24 insertions, 9 deletions
@@ -42,6 +42,9 @@ label restore: print("No units to save") pass pass + "Discard changes": + $ GAME_LOADER() + pass "Continue editing": pass jump loop diff --git a/ueditor.rpy b/ueditor.rpy index 897c643..34e6620 100644 --- a/ueditor.rpy +++ b/ueditor.rpy @@ -155,24 +155,36 @@ init python: global allunitsbase if not sub: ueid=(100000+len(allunitsbase))*100 + rar=1 + nam="New unit" + flav="A standard unit in the game." + attr=1 + sex=0 + job=1 else: - ueid=allunitsbase[current]["unit_id"]/100*100 # Truncate + ueid=allunitsbase[current]["unit_id"]/100*100+1 # Truncate + rar=allunitsbase[current]["rare"]+1 + nam=allunitsbase[current]["name"]+" +"+str(rar) + attr=allunitsbase[current]["attribute"] + sex=allunitsbase[current]["sex"] + job=allunitsbase[current]["job"] + flav=allunitsbase[current]["flavor"] allunitsbase.append({"skill_id": 0, "strength": 500, - "rare": 1, - "name": "New unit", + "rare": rar, + "name": nam, "ability_id": 0, - "attribute": 1, + "attribute": attr, "hp": 500, "unit_id": ueid, - "sex": 0, - "max_level": 20, - "job": 1, - "cost": 1, + "sex": sex, + "max_level": 10+(rar*10), + "job": job, + "cost": rar**2, "flags": 0, "unit_base_id": ueid/100, - "flavor": "A standard unit in the game."}) + "flavor": flav}) renpy.notify("New unit added: %d" % ueid) return |