summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script.rpy3
-rw-r--r--ueditor.rpy30
2 files changed, 24 insertions, 9 deletions
diff --git a/script.rpy b/script.rpy
index ed11e04..15fc53c 100644
--- a/script.rpy
+++ b/script.rpy
@@ -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