From 4a683755533644c96ebae040833ec1bc73eab3a1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 18 May 2019 19:52:19 -0300 Subject: Update redesign so it generates Aeros Master too --- wiki/redesign.py | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 84 insertions(+), 7 deletions(-) (limited to 'wiki') 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('EleGen File') @@ -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] []") + 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+="Lot," elif " Assist: true" in a: @@ -942,5 +1000,24 @@ wikib.write('') 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) -- cgit v1.2.3-70-g09d2