summaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-18 19:52:19 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-18 19:52:19 -0300
commit4a683755533644c96ebae040833ec1bc73eab3a1 (patch)
treee14990e82757979d9a27259be54ba710045f88e8 /wiki
parentbb87b3acaaec92093dd3fdb1ff54e741db018c58 (diff)
downloadtools-4a683755533644c96ebae040833ec1bc73eab3a1.tar.gz
tools-4a683755533644c96ebae040833ec1bc73eab3a1.tar.bz2
tools-4a683755533644c96ebae040833ec1bc73eab3a1.tar.xz
tools-4a683755533644c96ebae040833ec1bc73eab3a1.zip
Update redesign so it generates Aeros Master too
Diffstat (limited to 'wiki')
-rwxr-xr-xwiki/redesign.py91
1 files changed, 84 insertions, 7 deletions
diff --git a/wiki/redesign.py b/wiki/redesign.py
index bea9180..2871e67 100755
--- a/wiki/redesign.py
+++ b/wiki/redesign.py
@@ -12,6 +12,7 @@ import datetime
import sys
stgen=True
+aeros=False
wikib=open("EleMonsters.html", "w")
wikib.write('<html><head><meta charset=utf8 /><title>EleGen File</title></head><body>')
@@ -84,15 +85,29 @@ def printSeparator():
print("--------------------------------------------------------------------------------")
def showHeader():
+ global stgen, aeros
print("TMW2 Ele Generator")
+ print("Run at: " + datetime.datetime.now().isoformat())
+ print("Usage: ./redesign.py [default|aeros|none|all] [<path_to_serverdata>]")
+ if len(sys.argv) >= 2:
+ if sys.argv[1] == "default":
+ stgen=True
+ aeros=False
+ elif sys.argv[1] == "aeros":
+ stgen=False
+ aeros=True
+ elif sys.argv[1] == "none":
+ stgen=False
+ aeros=False
+ elif sys.argv[1] == "all":
+ stgen=True
+ aeros=True
+ else:
+ exit(1)
print("This stuff analyzes and sorts monsters and then create base stats for Moubootaur Legends.")
print("Drops aren't calculated or taken in account, TWEAK AS NEEDED")
- print("If you are creating a new monster, run ./udesign for HP tweak adjustment.")
- ##print "Evol client data validator."
- print("Run at: " + datetime.datetime.now().isoformat())
- print("Output is: EleMonsters.html")
- ##print "https://gitlab.com/evol/evol-tools/blob/master/testxml/testxml.py"
printSeparator()
+ print("Output is: EleMonsters.html")
def showFooter():
#pass
@@ -109,6 +124,15 @@ Mobs5=[]
Mobs6=[]
MobsA=[]
+# This is for Aeros
+Plants=[]
+Level50=[]
+Level100=[]
+Aggressive=[]
+Assistant=[]
+Looter=[]
+Boss=[]
+
SysDrops=[]
def fwalk(wmask):
@@ -201,6 +225,7 @@ class Mob:
self.name="Unknown Monster Name"
self.view="1"
self.boss=False
+ self.plant=False
# Defensive
self.mobpt="0" # Mob Points “Level”
@@ -251,10 +276,41 @@ def MobAlloc(ab):
else:
MobsA.append(ab)
+ # Aeros allocation
+ """Plants=[]
+ Level50=[]
+ Level100=[]
+ Aggressive=[]
+ Assistant=[]
+ Looter=[]
+ Boss=[]"""
+ normie=True
+ if ab.plant:
+ Plants.append(ab.id)
+ normie=False
+ if ab.boss:
+ Boss.append(ab.id)
+ normie=False
+ if normie:
+ if "Agr" in ab.st:
+ Aggressive.append(ab.id)
+ normie=False
+ if "Lot" in ab.st:
+ Looter.append(ab.id)
+ normie=False
+ if "Ass" in ab.st:
+ Assistant.append(ab.id)
+ normie=False
+ if normie:
+ if maab <= 55:
+ Level50.append(ab.id)
+ else:
+ Level100.append(ab.id)
+
def testMobs():
print("Generating Elem-Mob Wiki...")
- if len(sys.argv) >= 2:
- src=open(sys.argv[1]+"/db/re/mob_db.conf", "r")
+ if len(sys.argv) >= 3:
+ src=open(sys.argv[2]+"/db/re/mob_db.conf", "r")
else:
src=open("../../server-data/db/re/mob_db.conf", "r")
@@ -321,6 +377,8 @@ def testMobs():
elif " Boss: true" in a:
x.boss=True
+ elif " Plant: true" in a:
+ x.plant=True
elif " Looter: true" in a:
x.st+="<font color=#790>Lot</font>,"
elif " Assist: true" in a:
@@ -942,5 +1000,24 @@ wikib.write('</body></html>')
wikib.close()
#print(str(SysDrops))
+# Aeros allocation
+if aeros:
+ print("// These arrays are filled automatically by redesign.py");
+ print("setarray .ML_Plants, "+
+ str(Plants).replace('[','').replace(']','').replace("'","")+";")
+ print("setarray .ML_Boss, "+
+ str(Boss).replace('[','').replace(']','').replace("'","")+";")
+ print("setarray .ML_Aggr, "+
+ str(Aggressive).replace('[','').replace(']','').replace("'","")+";")
+ print("setarray .ML_Asst, "+
+ str(Assistant).replace('[','').replace(']','').replace("'","")+";")
+ print("setarray .ML_Loot, "+
+ str(Looter).replace('[','').replace(']','').replace("'","")+";")
+ print("setarray .ML_Lv50, "+
+ str(Level50).replace('[','').replace(']','').replace("'","").replace('ID, ','')+
+ ";")
+ print("setarray .ML_Lv99, "+
+ str(Level100).replace('[','').replace(']','').replace("'","")+";")
+
showFooter()
exit(0)