From f3142aa8a606f360635d5215f1b5f7e0dc684dff Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 23 Dec 2020 20:15:55 -0300 Subject: Unit creation (basic) --- ueditor.rpy | 47 +++++++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/ueditor.rpy b/ueditor.rpy index def5b9f..897c643 100644 --- a/ueditor.rpy +++ b/ueditor.rpy @@ -119,8 +119,8 @@ screen units_editor(): textbutton _("Save") action Function(ueditor_save) textbutton _("Close") action Return() - textbutton _("New Quest") action Function(ueditor_new) - textbutton _("New S.") action Function(ueditor_new, 1) + textbutton _("New Sub") action Function(ueditor_new, True) + textbutton _("New Unit") action Function(ueditor_new) ## Right-click and escape refresh screen key "game_menu" action Function(RestartInteraction)#Return() @@ -151,30 +151,29 @@ init python: renpy.notify("File saved as units.editor.json") return - def ueditor_new(special=False): + def ueditor_new(sub=False): global allunitsbase - if not special: - qeid=len(allunitsbase) - qefl=1 - qec=1 + if not sub: + ueid=(100000+len(allunitsbase))*100 else: - qeid=90000 - qefl=4 - qec=20 - - allunitsbase.append({ - "unit_id": qeid, - "difficulty": 0, - "requeriment": 0, - "cost": qec, - "flags": qefl, - "loot": [ - ["1010", 1000], - ["1020", 100], - ["1030", 10] - ], - "waves": []}) - renpy.notify("New units added: %d" % qeid) + ueid=allunitsbase[current]["unit_id"]/100*100 # Truncate + + allunitsbase.append({"skill_id": 0, + "strength": 500, + "rare": 1, + "name": "New unit", + "ability_id": 0, + "attribute": 1, + "hp": 500, + "unit_id": ueid, + "sex": 0, + "max_level": 20, + "job": 1, + "cost": 1, + "flags": 0, + "unit_base_id": ueid/100, + "flavor": "A standard unit in the game."}) + renpy.notify("New unit added: %d" % ueid) return def ueditor_addloot(): -- cgit v1.2.3-70-g09d2