Generate shield items

merge/2021-11-19
kaetemi 3 years ago
parent 03b9e1f44f
commit 190057b11b
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -119,6 +119,8 @@ def findSkill(tags):
t.remove("two-handed")
if "refugee" in t and not "heavy" in t and not "medium" in t and not "light" in t:
t += [ "light" ]
if "shield" in t:
t += [ "armor" ]
res = findTreeEntry(skillTree, t)
if len(res) == 7:
return res
@ -669,7 +671,7 @@ def generateSitems():
# print(shapeFemale)
# print(tags)
if not "armor" in tags:
if not "armor" in tags and not "shield" in tags:
continue
if "armor" in tags and "caster" in tags and not "pants" in tags:
@ -710,6 +712,8 @@ def generateSitems():
f.write(" <STRUCT>\n")
f.write(" <STRUCT Name=\"basics\">\n")
f.write(" <ATOM Name=\"name\" Value=\"" + displayName + "\"/>\n")
if origin != "common":
f.write(" <ATOM Name=\"origin\" Value=\"" + origin + "\"/>\n")
if itemType != "undefined":
f.write(" <ATOM Name=\"ItemType\" Value=\"" + itemType + "\"/>\n")
if armorSlot != "Undefined":
@ -722,8 +726,7 @@ def generateSitems():
f.write(" </STRUCT>\n")
f.write(" <STRUCT Name=\"3d\">\n")
f.write(" <ATOM Name=\"shape\" Value=\"" + shapeMale + ".shape\"/>\n")
if shapeFemale != shapeMale:
f.write(" <ATOM Name=\"shape_female\" Value=\"" + shapeFemale + ".shape\"/>\n")
f.write(" <ATOM Name=\"shape_female\" Value=\"" + shapeFemale + ".shape\"/>\n")
if mapVariant != "Default":
f.write(" <ATOM Name=\"map_variant\" Value=\"" + mapVariant + "\"/>\n")
if icon != "":
@ -828,24 +831,34 @@ def generateSitems():
f.write(" <ATOM Name=\"IconOver\" Value=\"fp_over.png\"/>\n")
f.write(" <ATOM Name=\"IconOver2\"/>\n")
f.write(" </STRUCT>\n")
if "armor" in tags:
if "armor" in tags or "shield" in tags:
f.write(" <STRUCT Name=\"faber\">\n")
f.write(" <ATOM Name=\"Tool type\" Value=\"ArmorTool\"/>\n")
# f.write(" <ATOM Name=\"Durability Factor\" Value=\"1\"/>\n")
f.write(" <STRUCT Name=\"Create\">\n")
f.write(" <ATOM Name=\"Crafted Item\" Value=\"" + name + ".sitem\"/>\n")
f.write(" <ATOM Name=\"Nb built items\" Value=\"1\"/>\n")
if "light" in tags:
f.write(" <ATOM Name=\"MP 1\" Value=\"Raw Material for Clothes\"/>\n")
else:
if "armor" in tags:
if "light" in tags:
f.write(" <ATOM Name=\"MP 1\" Value=\"Raw Material for Clothes\"/>\n")
else:
f.write(" <ATOM Name=\"MP 1\" Value=\"Raw Material for Armor shell\"/>\n")
f.write(" <ATOM Name=\"Quantity 1\" Value=\"" + str(int(mp1 / 4)) + "\"/>\n")
f.write(" <ATOM Name=\"MP 2\" Value=\"Raw Material for Armor interior coating\"/>\n")
f.write(" <ATOM Name=\"Quantity 2\" Value=\"" + str(int(mp2 / 4)) + "\"/>\n")
f.write(" <ATOM Name=\"MP 3\" Value=\"Raw Material for Armor interior stuffing\"/>\n")
f.write(" <ATOM Name=\"Quantity 3\" Value=\"" + str(int(mp3 / 4)) + "\"/>\n")
f.write(" <ATOM Name=\"MP 4\" Value=\"Raw Material for Armor clip\"/>\n")
f.write(" <ATOM Name=\"Quantity 4\" Value=\"" + str(int(mp4 / 4)) + "\"/>\n")
if "shield" in tags:
f.write(" <ATOM Name=\"MP 1\" Value=\"Raw Material for Armor shell\"/>\n")
f.write(" <ATOM Name=\"Quantity 1\" Value=\"" + str(int(mp1 / 4)) + "\"/>\n") # TODO: Calibrate
f.write(" <ATOM Name=\"MP 2\" Value=\"Raw Material for Armor interior coating\"/>\n")
f.write(" <ATOM Name=\"Quantity 2\" Value=\"" + str(int(mp2 / 4)) + "\"/>\n") # TODO: Calibrate
f.write(" <ATOM Name=\"MP 3\" Value=\"Raw Material for Armor interior stuffing\"/>\n")
f.write(" <ATOM Name=\"Quantity 3\" Value=\"" + str(int(mp3 / 4)) + "\"/>\n") # TODO: Calibrate
f.write(" <ATOM Name=\"MP 4\" Value=\"Raw Material for Armor clip\"/>\n")
f.write(" <ATOM Name=\"Quantity 4\" Value=\"" + str(int(mp4 / 4)) + "\"/>\n") # TODO: Calibrate
f.write(" <ATOM Name=\"Quantity 1\" Value=\"" + str(int(mp1 / 2)) + "\"/>\n")
f.write(" <ATOM Name=\"MP 2\" Value=\"Raw Material for Armor clip\"/>\n")
f.write(" <ATOM Name=\"Quantity 2\" Value=\"" + str(int(mp2 / 2)) + "\"/>\n")
f.write(" <ATOM Name=\"MP 3\"/>\n")
f.write(" <ATOM Name=\"Quantity 3\" Value=\"0\"/>\n")
f.write(" <ATOM Name=\"MP 4\"/>\n")
f.write(" <ATOM Name=\"Quantity 4\" Value=\"0\"/>\n")
f.write(" <ATOM Name=\"MP 5\"/>\n")
f.write(" <ATOM Name=\"Quantity 5\" Value=\"0\"/>\n")
f.write(" </STRUCT>\n")

@ -439,12 +439,12 @@ BCFSCA 22 bcfsca22 __missing
BCFSCA 23 bcfsca23 __missing
BCFSCA 24 bcfsca24 __missing
BCFSCA 25 bcfsca25 __missing
BCFSEA 01 bcfsea01 icfsb
BCFSEA 2 bcfsea01_2 icfsb_2 __missing
BCFSEA 3 bcfsea01_3 icfsb_3 __missing
BCFSEA 4 bcfsea02 icfss __missing
BCFSEA 5 bcfsea02_2 icfss_2 __missing
BCFSEA 6 bcfsea02_3 icfss_3 __missing
BCFSEA 1 bcfsea01_fsb bcfsea01 icfsb
BCFSEA 2 bcfsea02_fsb_2 bcfsea01_2 icfsb_2
BCFSEA 3 bcfsea03_fsb_3 bcfsea01_3 icfsb_3
BCFSEA 4 bcfsea04_fss bcfsea02 icfss
BCFSEA 5 bcfsea05_fss_2 bcfsea02_2 icfss_2
BCFSEA 6 bcfsea06_fss_3 bcfsea02_3 icfss_3
BCFSEA 7 bcfsea03 icfsbb __missing
BCFTCA 01 bcftca01 __missing
BCFTCA 02 bcftca02 __missing
@ -861,12 +861,12 @@ BCMSCA 22 bcmsca22 __missing
BCMSCA 23 bcmsca23 __missing
BCMSCA 24 bcmsca24 __missing
BCMSCA 25 bcmsca25 __missing
BCMSEA 01 bcmsea01 icmsb
BCMSEA 2 bcmsea01_2 icmsb_2 __missing
BCMSEA 3 bcmsea01_3 icmsb_3 __missing
BCMSEA 4 bcmsea02 icmss __missing
BCMSEA 5 bcmsea02_2 icmss_2 __missing
BCMSEA 6 bcmsea02_3 icmss_3 __missing
BCMSEA 1 bcmsea01_msb bcmsea01 icmsb
BCMSEA 2 bcmsea02_msb_2 bcmsea01_2 icmsb_2
BCMSEA 3 bcmsea03_msb_3 bcmsea01_3 icmsb_3
BCMSEA 4 bcmsea04_mss bcmsea02 icmss
BCMSEA 5 bcmsea05_mss_2 bcmsea02_2 icmss_2
BCMSEA 6 bcmsea06_mss_3 bcmsea02_3 icmss_3
BCMSEA 7 bcmsea03 icmsbl __missing
BCMTCA 01 bcmtca01 __missing
BCMTCA 02 bcmtca02 __missing
@ -1472,12 +1472,12 @@ BCTSCA 22 bctsca22 __missing
BCTSCA 23 bctsca23 __missing
BCTSCA 24 bctsca24 __missing
BCTSCA 25 bctsca25 __missing
BCTSEA 01 bctsea01 ictsb
BCTSEA 2 bctsea01_2 ictsb_2 __missing
BCTSEA 3 bctsea01_3 ictsb_3 __missing
BCTSEA 4 bctsea02 ictss __missing
BCTSEA 5 bctsea02_2 ictss_2 __missing
BCTSEA 6 bctsea02_3 ictss_3 __missing
BCTSEA 1 bctsea01_tsb bctsea01 ictsb
BCTSEA 2 bctsea02_tsb_2 bctsea01_2 ictsb_2
BCTSEA 3 bctsea03_tsb_3 bctsea01_3 ictsb_3
BCTSEA 4 bctsea04_tss bctsea02 ictss
BCTSEA 5 bctsea05_tss_2 bctsea02_2 ictss_2
BCTSEA 6 bctsea06_tss_3 bctsea02_3 ictss_3
BCTSEA 7 bctsea03 ictsbw __missing
BCTTCA 01 bcttca01 __missing
BCTTCA 02 bcttca02 __missing
@ -1811,12 +1811,12 @@ BCZSCA 22 bczsca22 __missing
BCZSCA 23 bczsca23 __missing
BCZSCA 24 bczsca24 __missing
BCZSCA 25 bczsca25 __missing
BCZSEA 01 bczsea01 iczsb
BCZSEA 2 bczsea01_2 iczsb_2 __missing
BCZSEA 3 bczsea01_3 iczsb_3 __missing
BCZSEA 4 bczsea02 iczss __missing
BCZSEA 5 bczsea02_2 iczss_2 __missing
BCZSEA 6 bczsea02_3 iczss_3 __missing
BCZSEA 1 bczsea01_zsb bczsea01 iczsb
BCZSEA 2 bczsea02_zsb_2 bczsea01_2 iczsb_2
BCZSEA 3 bczsea03_zsb_3 bczsea01_3 iczsb_3
BCZSEA 4 bczsea04_zss bczsea02 iczss
BCZSEA 5 bczsea05_zss_2 bczsea02_2 iczss_2
BCZSEA 6 bczsea06_zss_3 bczsea02_3 iczss_3
BCZSEA 7 bczsea03 iczsbe __missing
BCZTCA 01 bcztca01 __missing
BCZTCA 02 bcztca02 __missing

Can't render this file because it has a wrong number of fields in line 6.
Loading…
Cancel
Save