summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-23 20:15:55 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-23 20:15:55 -0300
commitf3142aa8a606f360635d5215f1b5f7e0dc684dff (patch)
tree5267b0568569bf6184369793297159cad38a2d7f
parent8a1b7c6158b4a467a5430c20117ea06d0593911e (diff)
downloadsdk-f3142aa8a606f360635d5215f1b5f7e0dc684dff.tar.gz
sdk-f3142aa8a606f360635d5215f1b5f7e0dc684dff.tar.bz2
sdk-f3142aa8a606f360635d5215f1b5f7e0dc684dff.tar.xz
sdk-f3142aa8a606f360635d5215f1b5f7e0dc684dff.zip
Unit creation (basic)
-rw-r--r--ueditor.rpy47
1 files 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():