1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
#################################################################################
# This file is part of Spheres.
# Copyright (C) 2022 Jesusalva
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#################################################################################
# Editor labels for developers
label ueditor_supernew:
$ rar = int(renpy.input("What is the base unit rarity?", allow="0123456789"))
python:
c = Counter()
for u in allunitsbase:
if u["unit_id"] % 10:
continue
if u["flags"]:
continue
c[u["rare"]] += 1
lastid = c[rar] + 1 # We start at 1, not at 0
$ unitid = int("1%02d%03d" % (rar, lastid))
$ name = renpy.input("How is this [rar]★ unit called?\nIts ID is: [unitid]")
menu:
"Male":
$ sex = 0
"Female":
$ sex = 1
menu:
"Please select the unit element:"
"Fire":
$ ele = Ele_Fire
"Water":
$ ele = Ele_Water
"Nature":
$ ele = Ele_Nature
"Light":
$ ele = Ele_Light
"Shadow":
$ ele = Ele_Shadow
menu:
"Please select the unit job:"
"Swordsman (DEF+)":
$ job = 1
"Assassin (Balanced)" if False:
$ job = 2
"Mage (ATK+)":
$ job = 3
"Archer (Balanced)":
$ job = 4
"Gunner (ATK++)" if False:
$ job = 5
show expression Text("[name]\n") at truecenter as ipsum with None
$ desc = renpy.input("Describe the unit basic description.", default="A standard unit in the game.")
show expression Text("[name]\n[desc]") at truecenter as ipsum with None
$ desd = renpy.input("Describe the unit 2nd form description.") or ""
show expression Text("[name]\n[desc] [desd]") at truecenter as ipsum with None
$ dese = renpy.input("Describe the unit 2nd form description.") or ""
hide ipsum with None
python:
# Create the randomness seed
ssr=renpy.random.randint(-10, 15)
shp=renpy.random.randint(-10, 15)
i=0
while i < 3:
if i == 0:
atd = ""
else:
atd = " +%d" % i
allunitsbase.append({"skill_id": 0,
"strength": 500,
"rare": rar,
"name": "%s%s" % (name, atd),
"ability_id": 0,
"attribute": ele,
"hp": 500,
"unit_id": unitid*100+i,
"sex": sex,
"max_level": 10+(rar*10),
"job": job,
"cost": rar**2,
"flags": 0,
"unit_base_id": unitid,
"flavor": desc})
current = len(allunitsbase)-1
ueditor_recalc(False, shp, ssr)
rar += 1
i+=1
if i == 1:
desc+=" %s" % desd
elif i == 2:
desc+=" %s" % dese
pass
$ ueditor_save()
jump units_editors
|