Beispiel #1
0
class TeamConfig(Model):
    """团队属性"""
    moxxi_drink_duration = FloatField(0x10BC, label='莫西饮酒时长')
    skill_mgr = ModelPtrField((0xC98, 0x58), SkillManager, label='技能')
    ability_cooldown = ModelPtrField(0xC58, AbilityCooldown, label='主技能冷却')
    damage_heals_self = FloatField(0xD54)
    team_ammo_regen = FloatField(0xFE0, label='团队弹药回复')
    explosives_heal_allies = FloatField(0x114C)
    bullets_heal_allies = FloatField(0x1110)
    badass_tokens = FloatField(0x182C, label='坏小子徽章')
    badass_bonuses = ArrayField((0x183C, 0), 14, Field(0))  # 坏小子加成效果
    team_kill_skill_timer_mult = FloatField(0x1A7C)
    damage_taken_mult = FloatField(0x590, label='伤害倍数?')

    shock_time = FloatField(0x4A0, label='闪电时间')
    corrosive_time = FloatField(0x4B4, label='腐蚀时间')
    fire_time = FloatField(0x48C, label='火焰时间')
    frost_time = FloatField(0x4DC, label='冰冻时间')
    melee_damage = FloatField(0x374, label='近战伤害')
    physical_damage = FloatField(0x608, label='物理伤害')
    explosive_damage = FloatField(0x5E0, label='爆炸伤害')
    shock_damage = FloatField(0x5CC, label='闪电伤害')
    corrosive_damage = FloatField(0x5F4, label='腐蚀伤害')
    fire_damage = FloatField(0x5B8, label='火焰伤害')
    frost_damage = FloatField(0x630, label='冰冻伤害')
Beispiel #2
0
class TeamConfig(Model):
    """团队属性"""
    skill_mgr = ModelPtrField((0xB74, 0x58), SkillManager, label='技能')
    ability_cooldown = ModelPtrField(0xB64, AbilityCooldown, label='主技能冷却')
    damage_heals_self = FloatField(0xBF4)
    team_ammo_regen = FloatField(0xE58, label='团队弹药回复')
    explosives_heal_allies = FloatField(0xF90)
    bullets_heal_allies = FloatField(0xF54)
    badass_tokens = FloatField(0x1664, label='坏小子徽章')
    badass_bonuses = ArrayField((0x1678, 0), 14, Field(0))  # 坏小子加成效果
    team_kill_skill_timer_mult = FloatField(0x18A4)

    bullets_resistance = FloatField(0x4A0, label='普通抗性')
    physical_resistance = FloatField(0x580, label='物理抗性')
    melee_resistance = FloatField(0x4C8, label='近战抗性')
    explosive_resistance = FloatField(0x5A8, label='爆炸抗性')
    shock_resistance = FloatField(0x5D0, label='闪电抗性')
    corrosive_resistance = FloatField(0x5F8, label='腐蚀抗性')
    fire_resistance = FloatField(0x620, label='火焰抗性')
    slag_resistance = FloatField(0x648, label='紫渣抗性')
    elemental_resistance = FloatField(0x4B4, label='元素抗性')
    grenades_resistance = FloatField(0x4DC, label='手榴弹/枪桶抗性')
    rockets_resistance = FloatField(0x4F0, label='火箭炮抗性')
    chock_time = FloatField(0x464, label='闪电时间')
    corrosive_time = FloatField(0x478, label='腐蚀时间')
    fire_time = FloatField(0x450, label='火焰时间')
    melee_damage = FloatField(0x374, label='近战伤害')
    physical_damage = FloatField(0x57C, label='物理伤害')
    explosive_damage = FloatField(0x554, label='爆炸伤害')
    shock_damage = FloatField(0x540, label='闪电伤害')
    corrosive_damage = FloatField(0x568, label='腐蚀伤害')
    fire_damage = FloatField(0x52C, label='火焰伤害')
    slag_damage = FloatField(0x590, label='紫渣伤害')
Beispiel #3
0
class PlayerManager(Model):
    player_config = ModelPtrField(0xA4, PlayerConfig)
    physics_config = ModelPtrField(0xDC, PhysicsConfig)
    bank_size = Field((0x230, 0x40), label='仓库空间')
    weapon_deck_size = Field(0x1DC, label='武器装备空间')
    backpack_size = Field(0x1D8, label='背包大小')
    backpack_used_space = Field(0x1F8, label='背包已用空间')
Beispiel #4
0
class Manager(Model):
    # system_config = ModelPtrField((0xC, 0xA4), SystemConfig)
    character = ModelPtrField(0x24, Character)
    team_config = ModelPtrField((0x2C, 0xA4), TeamConfig)
    player_mgr = ModelPtrField(0x30, PlayerManager)
    weapon_ammos = ArrayField((0x2C, 0x188), 8, ModelPtrField(0, WeaponAmmo), cachable=True)
    vehicle_mgrs = ArrayField((0x10, 0x378), 4, ModelPtrField(0, VehicleManager), cachable=True)
Beispiel #5
0
class Global(Model):
    mgr = ModelPtrField(0x01BF3C90, Manager)
    another_mgr = ModelPtrField((0x01C2AF2C, 8), AnotherManager)
    physics_mgr = ModelPtrField(0x01BF3C9C, PhysicsManager)
    vehicle_mgr = ModelPtrField((0x01BF0164, 0), Vehicle)
    current_weapon_ammo = ModelPtrField((0x01BF3CCC, 0, 0x28, 0x38C),
                                        Value,
                                        label='当前武器子弹总数')
Beispiel #6
0
class Character(Model):
    experience = ModelPtrField(0x1E4, Value, label='经验')
    ability_cooldown = ModelPtrField(0x1E8, Value, label='技能冷却')
    health = ModelPtrField(0x1F0, ShieldHealth, label='生命')
    shield = ModelPtrField(0x1F4, ShieldHealth, label='护盾')
    weapon_ammos = ArrayField(0x1F8,
                              8,
                              ModelPtrField(0, WeaponAmmo),
                              cachable=True)
Beispiel #7
0
class Unit(Model):
    type = ModelPtrField(8, UnitType)
    player = ModelPtrField(0xC, Player)
    hp = FloatField(0x30, label='HP')
    ptr_unknow1 = Field(0x18, label='不明指针')
    selected = ByteField(0x36, label='选中状态')
    resource = FloatField(0x44, label='资源')
    ptr_unknow2 = Field(0x6C, label='不明指针2')
    construction_progress = FloatField(0x1FC, label="建造进度")
Beispiel #8
0
class PlayerConfig(Model):
    """玩家属性"""
    player_model_scale = FloatField(0x78, label='角色模型大小')
    player_visibility = ByteField(0xBF, label='角色能见度')
    move_speed_mult = FloatField(0x310, label='移动速度倍数')
    current_weapon = ModelPtrField(0x470, Weapon)
    second_wind = ModelPtrField((0x6A4, 0x68), SecondWind)
    hit_ricochet_chance = FloatField(0x948, label='击飞')
    miss_ricochet_chance = FloatField(0x9AC, label='避开击飞')
    ignore_fatal_damage_chance = FloatField(0x9E8, label='免受致命伤')
    coord = CoordField(0x60, label='坐标')
    move_vector = CoordField(0x104, label='移动向量')
Beispiel #9
0
class Character(Model):
    """角色"""
    health = ModelPtrField(0x3AC, ShieldHealth, label='护甲')
    shield = ModelPtrField(0x3B8, ShieldHealth, label='生命')
    money = Field(0x2A0, label='钱')
    eridium = Field(0x2B4, label='铱元素块')
    seraph_crystals = Field(0x2C8, label='炽天使水晶')
    torgue_tokens = Field(0x2F0, label='托格币')
    experience = ModelPtrField((0xA4, 0xB58), Experience)
    melee_overide_cooldown = ModelPtrField((0xA4, 0xB70), Value)
    level = Field(0x258, label='等级')
    exp_next_level = Field(0x25C, label='到下级经验值')
    skill_points = Field(0x274, label='技能点数')
    head = Field(0x55C, label='头像')
    skin = Field(0x56C, label='皮肤')
Beispiel #10
0
class Character(Model):
    """角色"""
    health = ModelPtrField(0x3B8, ShieldHealth, label='护甲')
    shield = ModelPtrField(0x3C4, ShieldHealth, label='生命')
    oxygen = ModelPtrField(0x3D0, ShieldHealth, label='氧气')
    money = Field(0x2AC, label='钱')
    moon_shards = Field(0x2C0, label='月亮石')
    shift_coins = Field(0x310, label='ShiftCoins')
    experience = ModelPtrField((0xA4, 0xC4C), Experience)
    melee_overide_cooldown = ModelPtrField((0xA4, 0xC64), Value)
    level = Field(0x258, label='等级')
    exp_next_level = Field(0x268, label='到下级经验值')
    skill_points = Field(0x280, label='技能点数')
    head = Field(0x574, label='头像')
    skin = Field(0x584, label='皮肤')
Beispiel #11
0
class Global(BaseGlobal):
    # chapter = ByteField(0x0202BCFA)
    # turns = WordField(0x0202BCFC)
    person_addr = Field(0x021BED30)
    curx = ByteField(0x02273BD4)  # 0x02272EA4
    cury = ByteField(0x02273BD5)  # 0x02272EA5
    # persons = ArrayField(0x202be48, 0xff, ModelField(0, Person))
    train_items = ArrayField(0x022C7420, 100, ModelField(0, ItemSlot))  # 运输队
    ourturn = ToggleField(0x021CC278, enable=0xE3A01001, disable=0xE5D01000)
    control_enemy = ToggleField(0x021D5674, enable=0xE1500000, disable=0xE1510000)
    upgrade_max = ToggleField(0x02050AC0, enable=0xB1A06004, disable=0xB2866001)
    upgrade_all = ToggleField(0x02050A98, enable=0xE1A00000, disable=0xAA000009)
    lv1_can_transfer = ToggleField(0x02049EE0, enable=0x00000001, disable=0xE350000A)
    can_train = ToggleField(0x021EBE08, enable=0xE3A00002, disable=0xEBF98E8F)
    can_visit = ToggleField(0x021ECB14, enable=0xE3A00002, disable=0xEBF98B4C)
    can_holddown = ToggleField(0x021EBBD8, enable=0xE3A00002, disable=0xEBF98F1B)
    use_enemy_prof = ToggleField(0x021D4CEC, enable=0xEA000022, disable=0x1A000022)
    infinite_refine = ToggleField(0x02069683, size=1, enable=0, disable=0xE3)
    item_consume = ToggleField(0x02051650, size=2, enable=0x0000, disable=0x0001)
    enemy_item_drop = ToggleField(0x021F8CE0, size=8, enable=0xE3500000E1D006B0, disable=0xE3100020E5D00063)
    exp_rate = Field(0x021F4DA8)
    pro_rate = Field(0x021F4F5C)
    config = ModelPtrField(0x021BD44C, Config, 4)
    # iteminfo_base = Field(0x0227A748)
    _iteminfos = ArrayField(0x022AA97C, 0xff, ModelField(0, ItemInfo))

    @property
    def _offset(self):
        return self.handler.read32(0x021BD44C) - 0x022BEAA0

    @property
    def iteminfos(self):
        self.field('_iteminfos').offset = self.handler.read32(0x0227A748 + self._offset)
        return self._iteminfos
Beispiel #12
0
class EmeraldEn(PointerGlobal):
    NAME = "绿宝石(英文版)"

    active_pokemon_count = Field(0x020244E9)
    active_pokemon = ModelField(0x020244EC, PokemonStructActives)
    stored_pokemon = Field((0x03005D94, 4))
    safari_balls = ByteField(0x0203A9FC)
    safari_time = WordField(0x0203A076)
    exp_gain = SignedField(0x020241F0, size=2)

    store = ArrayField(0x02005274, 8, ModelField(0, StoreItem))
    area = WordField(0x020322E4)
    wild_pokemon = WordField(0x03007E28)
    furniture_purchase = ByteField(0x03005E3A)
    appearance = ByteField(0x02024A5C)

    Inner = EmeraldJp.Inner
    inner = ModelPtrField(0x03005D90, Inner)

    # rom
    breed_list = ArrayField(0x083203CC, 412, ModelField(0, BreedListEntry))
    deoxys_breed_abilities = Field(0x00329D48)
    # ^
    exp_list = ArrayField(0x0831F72C, 8, ArrayField(0, 0x65, Field(0)))
    item_list = Field(0x005839A0)
    skill_list = Field(0x0031C898)
Beispiel #13
0
class FireLeafJp(PointerGlobal):
    active_pokemon_count = 0
    active_pokemon = ModelField(0x020241E4, PokemonStructActives)
    stored_pokemon = Field((0x03005050, 4))
    dust = 0
    decorate = 0
    clock_adjustment = 0
    per_day_random = 0
    safari_balls = ByteField(0x0203990C)
    safari_time = WordField(0x0203990E)
    exp_gain = SignedField(0x02023CB0, size=2)

    class Inner(Model):
        _player_name = Field(0, bytes, 10)
        _player_id = Field(0x0A)
        xor_mask = Field(0x00000AF8)
        money = MaskedField(Field(0x00001234))
        coin = MaskedField(WordField(0x00001238))
        menu = Field(0x00001F89)
        badge = Field(0x00001F8A)
        spray_time = WordField(0x00001FE4)
        daycare_center_step_1 = ByteField(0x00003FAC)
        daycare_center_step_2 = ByteField(0x00004038)
        step_counter = ByteField(0x0000403E)

        _iemfield = PokemonItemField(0)
        item_normal = ArrayField(0x000012B4, 0x2A, _iemfield)
        item_keyitem = ArrayField(0x0000135C, 0x1E, _iemfield)
        item_pokeball = ArrayField(0x000013D4, 0x0D, _iemfield)
        item_machine = ArrayField(0x00001408, 0x3A, _iemfield)
        item_berry = ArrayField(0x000014F0, 0x2B, _iemfield)
        item_pokeblock = None

    inner = ModelPtrField(0x0300504C, Inner)
Beispiel #14
0
class PlayerConfig(Model):
    """玩家属性"""
    player_model_scale = FloatField(0x78, label='角色模型大小')
    time_scale_multiplier = FloatField(0x328, label='时间流逝倍数')
    gravity = FloatField(0x3A0, label='重力')  # confirm
    player_visibility = ByteField(0xBF, label='角色能见度')
    player_allegiance = Field(0x518, label='角色忠诚')
    move_speed_mult = FloatField(0x320, label='移动速度倍数')
    current_weapon = ModelPtrField(0x480, Weapon)
    hit_ricochet_chance = FloatField(0xA1C, label='击飞')
    miss_ricochet_chance = FloatField(0xA80, label='避开击飞')
    ignore_fatal_damage_chance = FloatField(0xABC, label='免受致命伤')
    bullet_reflect_chance = FloatField(0xA44, label='子弹反弹几率')
    coord = CoordField(0x60, label='坐标')
    move_vector = CoordField(0x104, label='移动向量')

    ffyl_time_mult = FloatField(0xBDC, label='原地复活时间倍数')
    ffyl_Health_mult = FloatField(0xBDC, label='原地复活生命倍数')
    current_vehicle = ModelPtrField(0x450, VehicleManager)
Beispiel #15
0
class PlayerManager(Model):
    population_mgr = ModelPtrField((0x4C, 0x4, 0xA8), PopulationManager)

    v2 = Field(0x4C)
    v3 = WordField(0x94)

    @property
    def adv_selected_unit(self):
        addr = self.handler.read32(self.v2 + 4 * self.v3)
        addr = self.handler.read32(addr + 0x01C0)
        return Unit(addr, self.handler)
Beispiel #16
0
class Weapon(Model):
    display_level = Field(0x1DC, label='显示等级')
    specification_level = Field(0x1E0, label='作用等级')
    actual_level = Field(0xE84, label='武器实际等级')
    item_actual_level = Field(0x8AC, label='物品实际等级')
    calculated_damage = FloatField(0x8E0, label='计算伤害')
    base_damage = FloatField(0x8E4, label='基本伤害')
    calculated_accuracy = FloatField(0x8CC, label='计算偏移率')
    base_accuracy = FloatField(0x8D0, label='基本偏移率')
    calculated_fire_rate = FloatField(0x8B8, label='计算射击延迟')
    base_fire_rate = FloatField(0x8BC, label='基本射击延迟')
    calculated_projectile_speed = FloatField(0xD74, label='计算子弹速')
    base_projectile_speed = FloatField(0xD78, label='基本子弹速')
    calculated_swap_speed = FloatField(0x940, label='计算切换速')
    base_swap_speed = FloatField(0x944, label='基本切换速')
    calculated_reload_speed = FloatField(0xA2C, label='计算换弹速')
    base_reload_speed = FloatField(0xA30, label='基本换弹速')
    calculated_burst_length = Field(0xB38, label='计算爆发长度')  # 0: Auto
    base_burst_length = Field(0xB3C, label='基本爆发长度')
    calculated_projectiles_per_shot = Field(0xDF0, label='计算射击子弹数')
    base_projectiles_per_shot = Field(0xDF4, label='基本射击子弹数')
    calculated_bullets_used = Field(0x9D8, label='计算使用子弹')
    base_bullets_used = Field(0x9DC, label='基本使用子弹')
    calculated_extra_shot_chance = Field(0x404, label='计算额外射击机会')
    base_extra_shot_chance = Field(0x408, label='基本额外射击机会')
    magazine_size = Field(0xA04, label='弹药库容量')
    current_bullets = Field(0xA24, label='当前子弹')
    ammo = ModelPtrField(0x9CC, WeaponAmmo, label='弹药')
    clip_ammo = Field(0x9D0, label='弹夹子弹')
    item_price = Field(0x1CC, label='物品价格')
    item_quantity = Field(0x1D4, label='物品数量')
    item_state = Field(0x21C, label='物品状态')  # Favorited, Crossed, Equipped, ect

    # type = Field(0xE78, label='类别')
    # balance = Field(0xE7C, label='平衡')
    # manufacturer = Field(0xE80, label='制造商')
    # body = Field(0xE88, label='枪身')
    # grip = Field(0xE8C, label='握把')
    # barrel = Field(0xE90, label='枪管')
    # sight = Field(0xE94, label='准镜')
    # stock = Field(0xE98, label='枪托')
    # elemental = Field(0xE9C, label='元素')
    # accessory1 = Field(0xEA0, label='配件1')
    # accessory2 = Field(0xEA4, label='配件2')
    # material = Field(0xEA8, label='材料')

    def set_level(self, level):
        """设置等级"""
        self.display_level = self.specification_level = level
        if self.actual_level:
            self.actual_level = level
        elif self.item_actual_level:
            self.item_actual_level = level
Beispiel #17
0
class FireLeafEn(PointerGlobal):
    active_pokemon_count = 0
    active_pokemon = ModelField(0x02024284, PokemonStructActives)
    stored_pokemon = Field((0x03005010, 4))
    dust = 0
    decorate = 0
    clock_adjustment = 0
    per_day_random = 0
    safari_balls = ByteField(0x02039994)
    safari_time = WordField(0x02039996)
    exp_gain = SignedField(0x02023D50, size=2)

    Inner = FireLeafJp.Inner
    inner = ModelPtrField(0x0300500C, Inner)
Beispiel #18
0
class UnitType(Model):
    # type = ByteField(0x4, label="类型")  # 类型
    # dll_name = WordField(0xC, label="语言DLL:名称")
    # dll_hint = WordField(0xE, label="语言DLL:创建提示")
    # id1 = WordField(0x10, label="ID 1")
    # id2 = WordField(0x12, label="ID 2")
    # id3 = WordField(0x14, label="ID 3")
    # type2 = WordField(0x16, label="类别")
    # fn_str = ModelPtrField(0x18, StringField(0), 'fn名称指针')
    # name_str = ModelPtrField(0x20, StringField(0), '名称指针')
    # dll_help = Field(0xA8, label="语言DLL:帮助说明")
    # dll_hot_text = Field(0xAC, label="语言DLL:热键文字")
    # dll_hot_text_ = Field(0xB0, label="热键文字")
    hp_max = WordField(0x2A, label="HP上限")
    view = FloatField(0x2C, label="视野")
    shipload = ByteField(0x30, label="Shipload")
    collision = FloatField(0x34, label="碰撞")
    move_speed = FloatField(0xC8, label="移动速度")
    search = FloatField(0x104, label="搜索")
    work_efficiency = FloatField(0x108, label="工作效率")
    def_items = ModelPtrField(0x128, AtkDefItems)  # 防御列表
    atk_items = ModelPtrField(0x130, AtkDefItems)  # 攻击列表
    range_max = FloatField(0x138, label="最大射程")
    damage_radius = FloatField(0x13C, label="攻击范围")
    damage_type = Field(0x140, label="伤害方式")
    atk_interval = FloatField(0x144, label="攻击间隔")  # 越小攻速越快(>0)
    atk_interval2 = FloatField(0x168, label="攻击间隔2")
    range_min = FloatField(0x15C, label="最小射程")
    base_def = WordField(0x160, label="显示的防御")
    base_atk = WordField(0x162, label="显示的攻击")
    range_base = FloatField(0x164, label="显示的射程")
    construction_time = WordField(0x182, label="建造时间")
    thrown_object = WordField(0x148, label="抛掷物单位")
    addition_thrown_object = WordField(0x1AC, label="附加抛掷物单位")
    min_thrown_object_count = WordField(0x19C, label="最小附加弹药数")
    thrown_object_area = CoordField(0x1A0, label="抛掷物产生区域")
Beispiel #19
0
class EmeraldJp(PointerGlobal):
    NAME = "绿宝石(日文版)"

    active_pokemon_count = Field(0x0202418D)
    active_pokemon = ModelField(0x02024190, PokemonStructActives)
    stored_pokemon = Field((0x03005AF4, 4))
    safari_balls = ByteField(0x02039D18)
    safari_time = WordField(0x02039D1A)
    exp_gain = SignedField(0x02023E94, size=2)

    class Inner(Model):
        _player_name = Field(0, bytes, 10)
        _player_id = Field(0x0A)
        xor_mask = Field(0x000000AC)
        money = MaskedField(Field(0x0000143C))
        coin = MaskedField(WordField(0x00001440))
        dust = WordField(0x000023D8)
        menu = Field(0x00002328)
        decorate = Field(0x000036E0)
        badge = Field(0x00002329)
        clock_adjustment = Field(0x00000098)
        per_day_random = Field(0x00002390)
        spray_time = WordField(0x0000238A)
        daycare_center_step_1 = ByteField(0x00004064)
        daycare_center_step_2 = ByteField(0x000040F0)
        step_counter = ByteField(0x000040F8)
        battle_points_current = WordField(0x00000EB8)
        battle_points_trainer_card = WordField(0x00000EBA)

        _iemfield = PokemonItemField(0)
        item_normal = ArrayField(0x0000150C, 0x1E, _iemfield)
        item_keyitem = ArrayField(0x00001584, 0x1E, _iemfield)
        item_pokeball = ArrayField(0x000015FC, 0x10, _iemfield)
        item_machine = ArrayField(0x0000163C, 0x40, _iemfield)
        item_berry = ArrayField(0x0000173C, 0x46, _iemfield)
        item_pokeblock = ArrayField(0x000017F4, 0x28, _iemfield)

    inner = ModelPtrField(0x03005AF0, Inner)

    # rom
    breed_list = ArrayField(0x082F0D54, 412, ModelField(0, BreedListEntry))
    deoxys_breed_abilities = Field(0x002FA6D6)
    # ^
    exp_list = ArrayField(0x082F00B4, 8, ArrayField(0, 0x65, Field(0)))
    item_list = Field(0x0055CEE8)
    skill_list = Field(0x002ED220)
Beispiel #20
0
class Weapon(Model):
    display_level = Field(0x1E0, label='显示等级')
    specification_level = Field(0x1E4, label='作用等级')
    actual_level = Field(0xE3C, label='武器实际等级')
    item_actual_level = Field(0x8B4, label='物品实际等级')
    calculated_damage = FloatField(0x8E8, label='计算伤害')
    base_damage = FloatField(0x8EC, label='基本伤害')
    calculated_accuracy = FloatField(0x8D4, label='计算偏移率')
    base_accuracy = FloatField(0x8D8, label='基本偏移率')
    calculated_fire_rate = FloatField(0x8C0, label='计算射击延迟')
    base_fire_rate = FloatField(0x8C4, label='基本射击延迟')
    calculated_projectile_speed = FloatField(0xEB4, label='计算子弹速')
    base_projectile_speed = FloatField(0xEB8, label='基本子弹速')
    calculated_reload_speed = FloatField(0xA30, label='计算换弹速')
    base_reload_speed = FloatField(0xA34, label='基本换弹速')
    calculated_burst_length = Field(0xAFC, label='计算爆发长度')  # 0: Auto
    base_burst_length = Field(0xB00, label='基本爆发长度')
    calculated_projectiles_per_shot = Field(0xDB8, label='计算射击子弹数')
    base_projectiles_per_shot = Field(0xDBC, label='基本射击子弹数')
    calculated_bullets_used = Field(0x9DC, label='计算使用子弹')
    base_bullets_used = Field(0x9E0, label='基本使用子弹')
    calculated_extra_shot_chance = Field(0xD28, label='计算额外射击机会')
    base_extra_shot_chance = Field(0xD2C, label='基本额外射击机会')
    magazine_size = Field(0xA0C, label='弹药库容量')
    current_bullets = Field(0xA28, label='当前子弹')
    ammo = ModelPtrField(0x9D0, WeaponAmmo, label='弹药')
    clip_ammo = Field(0x9D4, label='弹夹子弹')
    item_price = Field(0x1D0, label='物品价格')
    item_quantity = Field(0x1D8, label='物品数量')
    item_state = Field(0x224,
                       label='物品状态')  # Favorited, Crossed, Equipped, ect

    def set_level(self, level):
        """设置等级"""
        self.display_level = self.specification_level = level
        if self.actual_level:
            self.actual_level = level
        elif self.item_actual_level:
            self.item_actual_level = level
Beispiel #21
0
class NativeContext(NativeContext):
    """GTAIV原生函数调用的环境"""
    SIZE = 160

    m_nDataCount = Field(0x0C)                                          # unsigned int m_nDataCount;     // 0C-10
    m_pOriginalData = ArrayField(0x10, 4, ModelPtrField(0, _Vector3))   # CVector3 * m_pOriginalData[4]; // 10-20
    m_TemporaryData = ArrayField(0x20, 4, CoordField(0, length=4))      # Vector4 m_TemporaryData[4];    // 20-60
    m_TempStack = ArrayField(0x60, 16, Field(0))                        # int m_TempStack[16];           // 60-A0

    def get_result(self, type, size=0):
        """获取调用结果"""
        if self.m_nDataCount:
            """推测是把local Vector变量写回传进的Vector指针参数"""
            for i in range(self.m_nDataCount):
                self.m_pOriginalData[i].value.set(self.m_TemporaryData[i])

            self.m_nDataCount = 0

        return self.handler.read(self.m_TempStack.addr, type, size)

    def reset(self):
        self.m_nArgCount = 0
        self.m_nDataCount = 0
Beispiel #22
0
class Global(BaseGlobal):
    # chapter = ByteField(0x0202BCFA)
    # turns = WordField(0x0202BCFC)
    person_addr = Field(0x021986F4)
    curx = ByteField(0x02273BD4)  # 0x02272EA4  # TODO
    cury = ByteField(0x02273BD5)  # 0x02272EA5  # TODO
    # persons = ArrayField(0x202be48, 0xff, ModelField(0, Person))
    train_items = ArrayField(0x021986D0, 100, ModelField(0, ItemSlot))  # 运输队
    ourturn = ToggleField(0x021A9674, enable=0xE2812000, disable=0xE2812001)
    control_enemy = ToggleField(0x021B1830, enable=0xE1500000, disable=0xE1510000)
    upgrade_max = ToggleField(0x0203C474, enable=0xE1A09005, disable=0xB2899001)
    upgrade_all = ToggleField(0x0203C44C, enable=0xE1A00000, disable=0xAA000009)
    lv1_can_transfer = ToggleField(0x02049EE0, enable=0x00000001, disable=0xE350000A)
    can_train = ToggleField(0x021C6F7C, enable=0xE3A00002, disable=0xEBF9D152)
    can_visit = ToggleField(0x021ECB14, enable=0xE3A00002, disable=0xEBF98B4C)  # TODO
    can_holddown = ToggleField(0x021C6E0C, enable=0xEBF9A61E, disable=0xEBF9D1AE)
    use_enemy_prof = ToggleField(0x021D4CEC, enable=0xEA000022, disable=0x1A000022)
    infinite_refine = ToggleField(0x02052618, size=2, enable=0, disable=0x0A01)
    item_consume = ToggleField(0x0203CDD0, size=2, enable=0x0000, disable=0x0001)
    enemy_item_drop = ToggleField(0x021D3114, size=8, enable=0xE3500000E1D006B0, disable=0xE3500020E5D10003)
    exp_rate = Field(0x021CFACC)
    pro_rate = Field(0x021CFC78)
    config = ModelPtrField(0x02198120, Config, 4)
    _iteminfos = ArrayField(0x022494E0, 0xff, ModelField(0, ItemInfo))

    difficulty = ByteField(0x0227E6E5)  # 0201FF8C E3A00000
    always_level_up = ToggleField(0x021CFAC4, enable=0xE3A02064, disable=0xE5D1206B)

    @property
    def _offset(self):
        return self.handler.read32(0x021BD44C) - 0x022BEAA0

    @property
    def iteminfos(self):
        self.field('_iteminfos').offset = self.handler.read32(0x0227A748 + self._offset)
        return self._iteminfos
Beispiel #23
0
class Global(Model):
    # mgr = ModelPtrField(0x01CFA848, Manager)
    mgr = ModelPtrField(0x01528F78, Manager)
Beispiel #24
0
class Global(Model):
    character_struct = ModelPtrField(0x013C4428, CharacterStruct)
    character_config = ModelPtrField(0x013C345C, CharacterConfig)
    enemy_data = ModelPtrField(0x13C33CC, EnemyData)
    char_skills = ArrayField((0x013C3414, 1832), 8, ArrayField(0, 3, Field(0)))
    saved_item_manager2 = ModelField(0x1388D58, SavedItemManager2)
Beispiel #25
0
class EnemyData(Model):
    count = Field(0x30, label="敌人数量")
    enemy_items = ArrayField(0x3C, 10, ModelPtrField(0, EnemyItem))
Beispiel #26
0
class EnemyItem(Model):
    """敌人"""
    enemy = ModelPtrField(0, Enemy)
Beispiel #27
0
class CharacterStruct(Model):
    chars = ArrayField(0x24, 8, ModelPtrField(0, Character))
    chars_count = Field(0x44, label="角色数量")
Beispiel #28
0
class VehicleManager(Model):
    boost = ModelPtrField((0x38C, 0x188), Value, label='推进剂')
    health = ModelPtrField(0x394, Value, label='血量')
    scale = FloatField(0x78, label='缩放')
    coord = CoordField(0x60, label='坐标')
Beispiel #29
0
class CharacterStruct(Model):
    chars = ArrayField(0x24, 4, ModelPtrField(0, Character))
    chars_count = Field(0x34, label="角色数量")
    saved_items = ArrayField(0x714D0, 4, ModelField(0, SavedItemHolder))
    inventory_treasure_holder = ModelPtrField(0x168F0, InventoryTreasureItemHolder)
Beispiel #30
0
class Global(Model):
    character_struct = ModelPtrField(0x00DA2A5C, CharacterStruct)
    money = ModelPtrField(0x00DA23D8, Money)