TraDukTer
Recruit

Hi all! I hate to be that guy, but I tried to search for this and didn't come up with anything halfway decent. I'm sure this is some elementary noob mistake and I'm sorry in advance.
So, I referred to the official documentation and poked around items.py. I rearranged all the stuff after the warning that says not to do so, and changed the properties of the flintlock pistol. I got some errors, because I'd accidentally removed both of the Sarranid two-handed axes. I got rid of the references to them (one was in troops, the other in scripts), and got no errors.
Then I went ingame, loads up fine and all, but when I access the cheatmenu to find my item, it's not there. Also, all the items are in the vanilla order, not just the ones that I wasn't supposed to touch according to the .py file comment.
I'm certain the Module System target file in info.py is the correct one. And I reiterate, the system gives no errors. But still, NOTHING happens to items_types.txt. What gives?
Here's the end of my items.py if someone has a theory they want to check out. If we ever get it to actually work, it's up for grabs for anyone who wants an ordered vanilla items.py (with the sarranid two-h axes missing and an Obrez with the flintlock pistol mesh for a flintlock pistol).
Also, if anyone would like to clear some things up for me, that'd be super. For one, where does the modding system get the initial files? Even if I change the target directory, the .py files (or at least items.py) don't update to what they currently are in the mod. I don't know if they should, since there's no overt mention of how that's supposed to work in the documentation, but how else are you supposed to be able to work on several mods? You can't be expected to hand-craft the .py from the .txt?
Also, I'd like to know how to access the 100% vanilla items.py, scripts.py and troops.py to fix that Sarra axe cock-up I mentioned up there. Hopefully this mod will be more of a total conversion in time, but for the time being, I want to test the balance and stuff out on top of Vanilla.
So, I referred to the official documentation and poked around items.py. I rearranged all the stuff after the warning that says not to do so, and changed the properties of the flintlock pistol. I got some errors, because I'd accidentally removed both of the Sarranid two-handed axes. I got rid of the references to them (one was in troops, the other in scripts), and got no errors.
Then I went ingame, loads up fine and all, but when I access the cheatmenu to find my item, it's not there. Also, all the items are in the vanilla order, not just the ones that I wasn't supposed to touch according to the .py file comment.
I'm certain the Module System target file in info.py is the correct one. And I reiterate, the system gives no errors. But still, NOTHING happens to items_types.txt. What gives?
Here's the end of my items.py if someone has a theory they want to check out. If we ever get it to actually work, it's up for grabs for anyone who wants an ordered vanilla items.py (with the sarranid two-h axes missing and an Obrez with the flintlock pistol mesh for a flintlock pistol).
插入代码块:
# Crossbows
["hunting_crossbow", "Hunting Crossbow", [("crossbow_a",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_crossbow|itcf_carry_crossbow_back,
22 , weight(2.25)|difficulty(0)|spd_rtng(47) | shoot_speed(50) | thrust_damage(37 , pierce)|max_ammo(1),imodbits_crossbow ],
["light_crossbow", "Light Crossbow", [("crossbow_b",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed ,itcf_shoot_crossbow|itcf_carry_crossbow_back,
67 , weight(2.5)|difficulty(8)|spd_rtng(45) | shoot_speed(59) | thrust_damage(44 , pierce)|max_ammo(1),imodbits_crossbow ],
["crossbow", "Crossbow", [("crossbow_a",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back,
182 , weight(3)|difficulty(8)|spd_rtng(43) | shoot_speed(66) | thrust_damage(49,pierce)|max_ammo(1),imodbits_crossbow ],
["heavy_crossbow", "Heavy Crossbow", [("crossbow_c",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back,
349 , weight(3.5)|difficulty(9)|spd_rtng(41) | shoot_speed(68) | thrust_damage(58 ,pierce)|max_ammo(1),imodbits_crossbow ],
["sniper_crossbow", "Siege Crossbow", [("crossbow_c",0)], itp_type_crossbow |itp_merchandise|itp_primary|itp_two_handed|itp_cant_reload_on_horseback ,itcf_shoot_crossbow|itcf_carry_crossbow_back,
683 , weight(3.75)|difficulty(10)|spd_rtng(37) | shoot_speed(70) | thrust_damage(63 ,pierce)|max_ammo(1),imodbits_crossbow ],
# Pistols
["Obrez", "Obrez", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_next_item_as_melee ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(2)|difficulty(7)|spd_rtng(65) | shoot_speed(160) | thrust_damage(45 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none,
[(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],
["Obrez melee", "Obrez", [("flintlock_pistol",0)], itp_type_one_handed_wpn|itp_can_knock_down, itc_scimitar, 350, weight(2)|difficulty(7)|spd_rtng(80) | swing_damage(20,blunt)|weapon_length(62),imodbits_none ],
# Rifles
########
# AMMO #
########
["arrows","Arrows", [("arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows|itp_merchandise|itp_default_ammo, itcf_carry_quiver_back, 72,weight(3)|abundance(160)|weapon_length(95)|thrust_damage(1,pierce)|max_ammo(30),imodbits_missile],
["khergit_arrows","Khergit Arrows", [("arrow_b",0),("flying_missile",ixmesh_flying_ammo),("quiver_b", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back_right, 410,weight(3.5)|abundance(30)|weapon_length(95)|thrust_damage(3,pierce)|max_ammo(30),imodbits_missile],
["barbed_arrows","Barbed Arrows", [("barbed_arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver_d", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back_right, 124,weight(3)|abundance(70)|weapon_length(95)|thrust_damage(2,pierce)|max_ammo(30),imodbits_missile],
["bodkin_arrows","Bodkin Arrows", [("piercing_arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver_c", ixmesh_carry)], itp_type_arrows|itp_merchandise, itcf_carry_quiver_back_right, 350,weight(3)|abundance(50)|weapon_length(91)|thrust_damage(3,pierce)|max_ammo(28),imodbits_missile],
["bolts","Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag", ixmesh_carry),("bolt_bag_b", ixmesh_carry|imodbit_large_bag)], itp_type_bolts|itp_merchandise|itp_default_ammo|itp_can_penetrate_shield, itcf_carry_quiver_right_vertical, 64,weight(2.25)|abundance(90)|weapon_length(63)|thrust_damage(1,pierce)|max_ammo(29),imodbits_missile],
["steel_bolts","Steel Bolts", [("bolt",0),("flying_missile",ixmesh_flying_ammo),("bolt_bag_c", ixmesh_carry)], itp_type_bolts|itp_merchandise|itp_can_penetrate_shield, itcf_carry_quiver_right_vertical, 210,weight(2.5)|abundance(20)|weapon_length(63)|thrust_damage(2,pierce)|max_ammo(29),imodbits_missile],
["cartridges","Cartridges", [("cartridge_a",0)], itp_type_bullets|itp_merchandise|itp_can_penetrate_shield|itp_default_ammo, 0, 41,weight(2.25)|abundance(90)|weapon_length(3)|thrust_damage(1,pierce)|max_ammo(50),imodbits_missile],
#non-hardcoded practice
["practice_arrows_2","Practice Arrows", [("arena_arrow",0),("flying_missile",ixmesh_flying_ammo),("quiver", ixmesh_carry)], itp_type_arrows, itcf_carry_quiver_back, 0,weight(1.5)|weapon_length(95)|max_ammo(80),imodbits_missile],
################
# Prop weapons #
################
["torch", "Torch", [("club",0)], itp_type_one_handed_wpn|itp_primary, itc_scimitar, 11 , weight(2.5)|difficulty(0)|spd_rtng(95) | weapon_length(95)|swing_damage(11 , blunt) | thrust_damage(0 , pierce),imodbits_none,
[(ti_on_init_item, [(set_position_delta,0,60,0),(particle_system_add_new, "psys_torch_fire"),(particle_system_add_new, "psys_torch_smoke"),(set_current_color,150, 130, 70),(add_point_light, 10, 30),
])]],
["lyre", "Lyre", [("lyre",0)], itp_type_shield|itp_wooden_parry|itp_civilian, itcf_carry_bow_back, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),0 ],
["lute", "Lute", [("lute",0)], itp_type_shield|itp_wooden_parry|itp_civilian, itcf_carry_bow_back, 118 , weight(2.5)|hit_points(480)|body_armor(1)|spd_rtng(82)|weapon_length(90),0 ],
["keys", "Ring of Keys", [("throwing_axe_a",0)], itp_type_one_handed_wpn |itp_primary|itp_bonus_against_shield,itc_scimitar,
240, weight(5)|spd_rtng(98) | swing_damage(29,cut)|max_ammo(5)|weapon_length(53),imodbits_thrown ],
#######################
# #
# END OF ITEMS #
# #
#######################
["items_end", "Items End", [("shield_round_a",0)], 0, 0, 1, 0, 0],
["Obrez", "Obrez", [("flintlock_pistol",0)], itp_type_pistol |itp_merchandise|itp_primary|itp_next_item_as_melee ,itcf_shoot_pistol|itcf_reload_pistol, 230 , weight(2)|difficulty(7)|spd_rtng(65) | shoot_speed(160) | thrust_damage(45 ,pierce)|max_ammo(1)|accuracy(65),imodbits_none,
[(ti_on_weapon_attack, [(play_sound,"snd_pistol_shot"),(position_move_x, pos1,27),(position_move_y, pos1,36),(particle_system_burst, "psys_pistol_smoke", pos1, 15)])]],
["Obrez melee", "Obrez", [("flintlock_pistol",0)], itp_type_one_handed_wpn|itp_can_knock_down, itc_scimitar, 350, weight(2)|difficulty(7)|spd_rtng(80) | swing_damage(20,blunt)|weapon_length(62),imodbits_none ],
]
Also, if anyone would like to clear some things up for me, that'd be super. For one, where does the modding system get the initial files? Even if I change the target directory, the .py files (or at least items.py) don't update to what they currently are in the mod. I don't know if they should, since there's no overt mention of how that's supposed to work in the documentation, but how else are you supposed to be able to work on several mods? You can't be expected to hand-craft the .py from the .txt?
Also, I'd like to know how to access the 100% vanilla items.py, scripts.py and troops.py to fix that Sarra axe cock-up I mentioned up there. Hopefully this mod will be more of a total conversion in time, but for the time being, I want to test the balance and stuff out on top of Vanilla.


