How to randomize weapons you spawn in.

Users who are viewing this thread

Waffss

Recruit
I created my own troop on NW and gave it a list of weapons but every time I respawn I stay with the same weapon.
I want the troop to work exactly as partizani in NW

Thanks in advance
 
I am not sure how exactly partizani works in Napoleonic Wars. But if you want to get random weapon,armor or horse - you can use these operations.

Python:
store_random_horse              = 2257    # (store_random_horse,<destination>)
store_random_equipment          = 2258    # (store_random_equipment,<destination>)
store_random_armor              = 2259    # (store_random_armor,<destination>)
# I use old modsys, this works perfectly here. In modern modsys, it might now work. In this case. You should choose different approach.

Keep in mind, if you decide to use this approach, and you don't want to give someone musket without bullets, you have to code it.

Another approach would be to iterate through weapons/armors range and choose random weapon by your own.

Most importantly, in both cases you need module system knowledge to understand what I just said.
Good luck.
 
Upvote 0
I am not sure how exactly partizani works in Napoleonic Wars. But if you want to get random weapon,armor or horse - you can use these operations.

Python:
store_random_horse              = 2257    # (store_random_horse,<destination>)
store_random_equipment          = 2258    # (store_random_equipment,<destination>)
store_random_armor              = 2259    # (store_random_armor,<destination>)
# I use old modsys, this works perfectly here. In modern modsys, it might now work. In this case. You should choose different approach.

Keep in mind, if you decide to use this approach, and you don't want to give someone musket without bullets, you have to code it.

Another approach would be to iterate through weapons/armors range and choose random weapon by your own.

Most importantly, in both cases you need module system knowledge to understand what I just said.
Good luck.

Right but I already have them in the game and they are randomizer but only when selecting them in the manu, but when you die you keep the weapon given to you initially and not a random one. My bad probably should have clarified that initially.
 
Upvote 0
#partizani
["russian_partizan","Partizani","Partisan Irregulars",tf_guarantee_all,0,0,fac_russia,
[itm_rus_partizan1,itm_rus_partizan2,itm_rus_militia_ranker_pants,itm_rus_militia_ranker_pants1,itm_rus_opol_hat_ranker,itm_rus_partisan_hat1,itm_rus_partisan_hat2,itm_rus_partisan_hat3,itm_rus_partisan_hat4,itm_rus_partisan_hat5,itm_rus_opol_hat_ranker,itm_rus_drummer_shako,itm_bullets,itm_russian_dragoon_musket,itm_russian_peasant_fork,itm_russian_peasant_pitchfork,itm_russian_peasant_sap,itm_russian_peasant_kosa,itm_russian_peasant_kosa2,itm_birch_trunk,itm_brokenbottle,itm_russian_peasant_club,itm_russian_peasant_birch_club,itm_russian_peasant_axe,itm_russian_peasant_knife,itm_russian_peasant_serp,itm_russian_peasant_pike,itm_russian_peasant_kuvalda,itm_russian_peasant_2handed_axe,itm_russian_peasant_rogatina,itm_russian_gusarskiy_karabin],
def_attrib_multiplayer|level(20),wpex(80,5,80,5,130,80),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],

#my troop:
["Militia_rebels","militia rebels","rebels",tf_guarantee_all,0,0,fac_austria,
[itm_militia_rebel_coat,itm_rebel_hat,itm_prussian_landwehr_pants,itm_russian_peasant_sap,itm_russian_peasant_kosa,itm_russian_peasant_kosa2,itm_russian_peasant_pike,itm_russian_peasant_rogatina,itm_russian_cossack_pike,itm_russian_opolcheniye_pike],
def_attrib_multiplayer|level(20),wpex(50,5,130,5,300,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_10,swadian_face_middle_1, swadian_face_old_2],
 
Upvote 0
Back
Top Bottom