コード例 #1
0
ファイル: flag.py プロジェクト: NiceneNerd/botw_actor_tool
 def to_Hash(self) -> Hash:
     r = super(BoolFlag, self).to_Hash()
     if not self._category == -1:
         r["Category"] = S32(self._category)
     r["InitValue"] = S32(self._init_value)
     r["MaxValue"] = self._max_value
     r["MinValue"] = self._min_value
     return r
コード例 #2
0
ファイル: flag.py プロジェクト: NiceneNerd/botw_actor_tool
 def to_Hash(self) -> Hash:
     r = super(S32ArrayFlag, self).to_Hash()
     array_one = Array()
     array_one.append(Hash())
     array_two = Array([S32(value) for value in self._init_value])
     array_one[0]["Values"] = array_two
     r["InitValue"] = array_one
     r["MaxValue"] = S32(self._max_value)
     r["MinValue"] = S32(self._min_value)
     return r
コード例 #3
0
ファイル: flag.py プロジェクト: NiceneNerd/botw_actor_tool
 def to_Hash(self) -> Hash:
     r = Hash()
     r["DataName"] = self._data_name
     r["DeleteRev"] = S32(self._delete_rev)
     r["HashValue"] = S32(self._hash_value)
     r["IsEventAssociated"] = self._is_event_associated
     r["IsOneTrigger"] = self._is_one_trigger
     r["IsProgramReadable"] = self._is_program_readable
     r["IsProgramWritable"] = self._is_program_writable
     r["IsSave"] = self._is_save
     r["ResetType"] = S32(self._reset_type)
     return r
コード例 #4
0
def armor_iter(armor, actorinfo, actors):
    armor.base = get_def_item(armor.base, actors)
    old_hash = create_hash(armor.base)
    new_hash = create_hash(armor.name)

    loc = 0
    for x in actorinfo['Hashes']:
        if int(new_hash) < int(x):
            break
        loc += 1

    old_loc = get_arr_index(actorinfo["Hashes"], old_hash)
    actorinfo["Hashes"].insert(loc, new_hash)
    # new_loc = get_arr_index(actorinfo["Hashes"], new_hash)
    new_entry = dict(actorinfo["Actors"][old_loc])
    new_entry["name"] = armor.name
    new_entry = dict(actorinfo["Actors"][old_loc])
    new_entry["name"] = armor.name

    if armor.elink: new_entry["elink"] = armor.elink

    if armor.slink: new_entry["slink"] = armor.slink
    if armor.armorStarNum:
        new_entry["armorStarNum"] = oead.S32(armor.armorStarNum)
    if armor.armorNextRankName:
        new_entry["armorNextRankName"] = armor.armorNextRankName
    if armor.itemUseIconActorName:
        new_entry["itemUseIconActorName"] = armor.itemUseIconActorName

    if armor.defence:
        new_entry["armorDefenceAddLevel"] = oead.S32(int(armor.defence))
    if armor.effect_lv:
        new_entry["armorEffectEffectLevel"] = oead.S32(int(armor.effect_lv))
    if armor.effect: new_entry["armorEffectEffectType"] = armor.effect
    elif armor.effect == 'None':
        new_entry["armorEffectEffectLevel"] = oead.S32(0)
    if armor.profile: new_entry["profile"] = armor.profile
    if armor.series: new_entry["seriesArmorSeriesType"] = armor.series

    if armor.bfres: new_entry["bfres"] = armor.bfres
    else: new_entry["bfres"] = armor.bfres_folder

    if armor.mainmodel: new_entry["mainModel"] = armor.mainmodel
    else: new_entry["mainModel"] = armor.name

    #if "bfres" in new_entry: new_entry["bfres"] = armor.bfres_folder
    #if "mainModel" in new_entry: new_entry["mainModel"] = armor.name
    new_entry["sortKey"] = S32(int(new_entry["sortKey"]) + 1)
    #new_entry["armorNextRankName"] = ''

    if armor.item1 and armor.item1_n:
        new_entry["normal0ItemName01"] = armor.item1
        new_entry["normal0ItemNum01"] = oead.S32(int(armor.item1_n))
    else:
        new_entry["normal0ItemName01"] = 'Item_Enemy_26'
        new_entry["normal0ItemNum01"] = oead.S32(1)

    if armor.item1 and armor.item1_n and armor.item2 and armor.item2_n:
        new_entry["normal0ItemName02"] = armor.item2
        new_entry["normal0ItemNum02"] = oead.S32(int(armor.item2_n))
    else:
        new_entry["normal0ItemName02"] = 'Item_Enemy_00'
        new_entry["normal0ItemNum02"] = oead.S32(1)

    if armor.item1 and armor.item1_n and armor.item2 and armor.item2_n and armor.item3 and armor.item3_n:
        new_entry["normal0ItemName03"] = armor.item3
        new_entry["normal0ItemNum03"] = oead.S32(int(armor.item3_n))
    else:
        new_entry["normal0ItemName03"] = 'Item_Enemy_28'
        new_entry["normal0ItemNum03"] = oead.S32(1)
    new_entry["normal0StuffNum"] = oead.S32(1)
    if armor.price:
        new_entry["itemBuyingPrice"] = oead.S32(int(armor.price))
        new_entry["itemCreatingPrice"] = oead.S32(int(armor.price))

    actorinfo["Actors"].insert(loc, new_entry)
    del new_entry

    return actorinfo
コード例 #5
0
def weapon_iter(weapon, actorinfo, actors):
    weapon.base = get_def_item(weapon.base, actors)
    old_hash = create_hash(weapon.base)

    new_hash = create_hash(weapon.name)

    loc = 0
    for x in actorinfo['Hashes']:
        if int(new_hash) < int(x):
            break
        loc += 1

    old_loc = get_arr_index(actorinfo["Hashes"], old_hash)
    actorinfo["Hashes"].insert(loc, new_hash)
    #new_loc = get_arr_index(actorinfo["Hashes"], new_hash)
    new_entry = dict(actorinfo["Actors"][old_loc])
    new_entry["name"] = weapon.name

    if weapon.profile == 'WeaponShield':
        if weapon.attack:
            new_entry["weaponCommonGuardPower"] = oead.S32(int(weapon.attack))
    else:
        if weapon.attack:
            new_entry["attackPower"] = oead.S32(int(weapon.attack))

    if weapon.elink: new_entry["elink"] = weapon.elink
    if weapon.slink: new_entry["slink"] = weapon.slink
    if weapon.dur: new_entry["generalLife"] = oead.S32(int(weapon.dur))
    new_entry["bfres"] = weapon.name
    new_entry["mainModel"] = weapon.name
    new_entry["sortKey"] = S32(int(new_entry["sortKey"]) + 1)

    if weapon.item1 and weapon.item1_n:
        new_entry["normal0ItemName01"] = weapon.item1
        new_entry["normal0ItemNum01"] = oead.S32(int(weapon.item1_n))
    else:
        new_entry["normal0ItemName01"] = 'Item_Enemy_26'
        new_entry["normal0ItemNum01"] = oead.S32(1)

    if weapon.item1 and weapon.item1_n and weapon.item2 and weapon.item2_n:
        new_entry["normal0ItemName02"] = weapon.item2
        new_entry["normal0ItemNum02"] = oead.S32(int(weapon.item2_n))
    else:
        new_entry["normal0ItemName02"] = 'Item_Enemy_00'
        new_entry["normal0ItemNum02"] = oead.S32(1)

    if weapon.item1 and weapon.item1_n and weapon.item2 and weapon.item2_n and weapon.item3 and weapon.item3_n:
        new_entry["normal0ItemName03"] = weapon.item3
        new_entry["normal0ItemNum03"] = oead.S32(int(weapon.item3_n))
    else:
        new_entry["normal0ItemName03"] = 'Item_Enemy_28'
        new_entry["normal0ItemNum03"] = oead.S32(1)

    new_entry["normal0StuffNum"] = oead.S32(1)
    if weapon.price:
        new_entry["itemBuyingPrice"] = oead.S32(int(weapon.price))
        new_entry["itemCreatingPrice"] = oead.S32(int(weapon.price))

    actorinfo["Actors"].insert(loc, new_entry)
    del new_entry
    return actorinfo
コード例 #6
0
def to_numbers(pio: ParameterIO) -> None:
    for _, element in pio.lists["Elements"].lists.items():
        element.objects["Parameters"].params["TypeIndex"] = S32(
            paramdict[element.objects["Parameters"].params["TypeIndex"].v])
コード例 #7
0
ファイル: flag.py プロジェクト: NiceneNerd/botw_actor_tool
 def to_Hash(self) -> Hash:
     r = super(S32Flag, self).to_Hash()
     r["InitValue"] = S32(self._init_value)
     r["MaxValue"] = S32(self._max_value)
     r["MinValue"] = S32(self._min_value)
     return r
コード例 #8
0
ファイル: flag.py プロジェクト: NiceneNerd/botw_actor_tool
 def to_sv_Hash(self) -> Hash:
     r = Hash()
     r["DataName"] = self._data_name
     r["HashValue"] = S32(self._hash_value)
     return r