Author Topic: Have a question about Modding? Ask Here!  (Read 307997 times)

0 Members and 1 Guest are viewing this topic.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1680 on: August 09, 2017, 01:46:01 pm »
A bug has occured, I have no idea how, because I haven't edited any codes related to it. Basically what happens is that, for example sapper no longer can use Construction hammer, Sapper axe and Spade at the same time, only has to choose one. Same goes for Artillery, I no longer can use Ramrod and Cannon lighter at the same time but I have to choose one from it. Does anyone know how to fix this? Thank you

Offline Grozni

  • Second Lieutenant
  • *
  • Posts: 308
    • View Profile
  • Nick: RRA_10thRH_SoH_Grozni
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1681 on: August 09, 2017, 02:04:45 pm »
By choose do you mean choose in equipment menu?

Have you been adding new items?

You must have done something. A list of areas of code you have been altering recently could help.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1682 on: August 09, 2017, 02:30:47 pm »
By choose do you mean choose in equipment menu?

Have you been adding new items?

You must have done something. A list of areas of code you have been altering recently could help.
Yes in the equipment menu. It chooses either a spade, a sapper axe or a construction hammer.
As far as I know I only added a few uniforms and hats. Well, there are thousands of codes I edited recently, from the line 6000 to line 20 000 (in module_scripts) but none of them in particular had anything to do with this problem I think. I can post some if you want but I really doubt they will be useful

If it helps you, I found out I cant even use the construction hammer, so maybe it has something to do with one script in particular? Same goes for Artillery. When I try to pick up a round or canister shot, it says that im not part of the artillery regiment
« Last Edit: August 09, 2017, 02:36:36 pm by Dazzer »

Offline Malkolm R. Lind

  • Major
  • *
  • Posts: 1591
  • Why do drugs when you can listen to music?
    • View Profile
  • Nick: Illya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1683 on: August 15, 2017, 10:39:14 am »
Greetings, gentlemen! I have a problem with my Paint.Net. Recently, the env map plug-in stopped working, and I have been in desperate search of a new plug-in that works just as well as the old one. Would anyone of you fine lads please inform me if one has seen such a plug-in?

Offline pengbuster

  • Sergeant Major
  • *
  • Posts: 231
  • Polkovnik of the 15y Ulanskii Tatarskii Polk
    • View Profile
  • Nick: pengbuster
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1684 on: August 16, 2017, 05:42:58 pm »
Ive had this issue when adding new units the drummers and fifers are not able to play music. Any help with this?

Offline usnavy30

  • Colonel
  • *
  • Posts: 1983
  • Former Freelance Modder
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1685 on: August 17, 2017, 12:05:52 am »
Ive had this issue when adding new units the drummers and fifers are not able to play music. Any help with this?
Locate the troops in module_scripts, for example trp_british_drummer and add the lines where you need them in the two separate lists of troops scripted to play music.
How To Run A Mod Installer.exe
Quote
Hello.. I have a problem... It says I don't have Mount&Blade Warband: Napoleonic War and I have to buy it
Try joining a regular Napoleonic Wars server and then re-running the installer.

Offline pengbuster

  • Sergeant Major
  • *
  • Posts: 231
  • Polkovnik of the 15y Ulanskii Tatarskii Polk
    • View Profile
  • Nick: pengbuster
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1686 on: August 19, 2017, 07:31:03 pm »
Ive had this issue when adding new units the drummers and fifers are not able to play music. Any help with this?
Locate the troops in module_scripts, for example trp_british_drummer and add the lines where you need them in the two separate lists of troops scripted to play music.
I tried putting them underneath   # script_cf_multiplayer_agent_is_musician and   # script_multiplayer_get_troop_rank but they still wont work Nvm im retarded I didnt build the module after I edited it
« Last Edit: August 19, 2017, 07:59:14 pm by pengbuster »

Offline Soartex

  • Sergeant Major
  • *
  • Posts: 131
    • View Profile
  • Nick: 1er_Huss_Lt_Soartex
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1687 on: August 29, 2017, 06:47:51 pm »
Hello,

I am a casual mapper, and while doing a siege map, I wanted to put some TNT that players could ignite in order to blow up. So I put the scene prop : crate_explosive_brit for example, and when I ignite it, it only plays the sound, but there is no smoke and the TNT doesnt explode at all.
I asked a friend and he said I had to change some stuff in scripts, and that I have to change propslots at the begining of the round. I am not very good in modding, so I looked in the module source code, but I can't manage to find the proper line to solve my problem.
If someone knows how to solve my problem it would help me a lot thank you :D

Offline pengbuster

  • Sergeant Major
  • *
  • Posts: 231
  • Polkovnik of the 15y Ulanskii Tatarskii Polk
    • View Profile
  • Nick: pengbuster
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1688 on: September 04, 2017, 06:09:48 am »
Hello,

I am a casual mapper, and while doing a siege map, I wanted to put some TNT that players could ignite in order to blow up. So I put the scene prop : crate_explosive_brit for example, and when I ignite it, it only plays the sound, but there is no smoke and the TNT doesnt explode at all.
I asked a friend and he said I had to change some stuff in scripts, and that I have to change propslots at the begining of the round. I am not very good in modding, so I looked in the module source code, but I can't manage to find the proper line to solve my problem.
If someone knows how to solve my problem it would help me a lot thank you :D
Im not sure if im right about this but im pretty sure theres like multiple types of TNT, some actually explode, and some dont, so just like try to use other ones

Offline Lilja Mariasdóttir

  • Colonel
  • *
  • Posts: 2013
  • Ist ein Schaf in einer Tasse
    • View Profile
  • Side: Confederacy
Re: Have a question about Modding? Ask Here!
« Reply #1689 on: September 04, 2017, 02:16:27 pm »
How I told you already via steam, you need to change the scene prop slot of the placed TNT props at some point in the code.
It might be enough to set the "in_use" slot to 1, when using the explosive chest (so in modules_scene_props). But I cant tell you for sure without checking.

Okay, checked now anyway, try adding
(scene_prop_set_slot, ":instance_id", scene_prop_slot_in_use, 1),
in check_common_explosive_crate_use_trigger, where those lines are:
(scene_prop_set_slot,":instance_id", scene_prop_slot_time, 5), #Seconds until exploding
(scene_prop_set_slot,":instance_id", scene_prop_slot_user_agent, ":agent_id"), #User agent


Not sure if pre-set explosives get correctly resettet then at the end of the round, just check the reset scripts, if the explosive chests are checked, like the sapperitems a Mapper sets are checked. If not copy paste it for the explosive chests aswell.
Seehofer schafft das Heer ab.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1690 on: September 09, 2017, 07:17:33 pm »
A bug has occured, I have no idea how, because I haven't edited any codes related to it. Basically what happens is that, for example sapper no longer can use Construction hammer, Sapper axe and Spade at the same time, only has to choose one. Same goes for Artillery, I no longer can use Ramrod and Cannon lighter at the same time but I have to choose one from it. Does anyone know how to fix this? Thank you
Anyone have any idea?

Offline Thunderstormer

  • FSE Developer
  • ****
  • Posts: 6309
  • Worse than Hotler
    • View Profile
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1691 on: September 09, 2017, 10:11:31 pm »
A bug has occured, I have no idea how, because I haven't edited any codes related to it. Basically what happens is that, for example sapper no longer can use Construction hammer, Sapper axe and Spade at the same time, only has to choose one. Same goes for Artillery, I no longer can use Ramrod and Cannon lighter at the same time but I have to choose one from it. Does anyone know how to fix this? Thank you
Anyone have any idea?
eh, you mean have all the items available in your inventory?

you sure you didn't change anything with how items are assigned too troops?  no accidental try begins or ends, or something that may prevent that script from working?

you can use a program called winmerge that lets you select 2 files, and it compares them, showing the differences.   handy for tracking down various tweaks you made between different files. 
Should you need to talk to me regarding NA1 or or something regarding admining or the admins, PM me here on the forums and not on steam.  *

*This does not include Official Server Admins.

Offline Dazzer

  • Donator
  • *
  • Posts: 5690
    • View Profile
  • Side: Union
Re: Have a question about Modding? Ask Here!
« Reply #1692 on: September 09, 2017, 10:23:36 pm »
A bug has occured, I have no idea how, because I haven't edited any codes related to it. Basically what happens is that, for example sapper no longer can use Construction hammer, Sapper axe and Spade at the same time, only has to choose one. Same goes for Artillery, I no longer can use Ramrod and Cannon lighter at the same time but I have to choose one from it. Does anyone know how to fix this? Thank you
Anyone have any idea?
eh, you mean have all the items available in your inventory?

you sure you didn't change anything with how items are assigned too troops?  no accidental try begins or ends, or something that may prevent that script from working?

you can use a program called winmerge that lets you select 2 files, and it compares them, showing the differences.   handy for tracking down various tweaks you made between different files.
Yes, all items at the same time. Now, you can only select only one of them. Sappers no longer can use construction hammers and artillerymen cant use cannons.
I dont recall changing anything related to that as im not expert on it so I never touched it I guess, but maybe I changed something accidentally.
I just did some comparing of module_scripts and older backups, checked every code in which trp_british/french_sapper is mentioned and it seemed the same.
Thanks for the program though, maybe It will find something I didnt notice

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1693 on: March 14, 2018, 12:11:25 am »
Hello all, module system question here. I want to change order and number of NW's troops in my Crimean War mod, but I don't know exactly, what should I change. I tried to place russian_opol on the first place and russian_foot_guard on the last, also I wnt to disable guard unit for Russian Empire (since there was no Russian Guard in the Crimea). I tried many times and many different positions of different troops, but in the end I always get 1 or 2 units in the Infantry section, and all other infantry is in the Specialists section.

Here is my troops code
Spoiler
Code
  ["russian_opol","Odesskiy Jaegerskiy Polk","Jaeger",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_odessj,itm_pants_fake,itm_rus_odessj_hat1,itm_rus_odessj_hat2,itm_rus_odessj_hat3,itm_bullets,itm_russian_musket_1808,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(50,5,130,5,150,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_opol_nco","Russian Jaeger","Sharpshooter",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_odessj_nco,itm_pants_fake,itm_rus_odessj_hat1,itm_rus_odessj_hat2,itm_rus_odessj_hat3,itm_bullets,itm_russian_musket_1808,itm_russian_rifle_1805,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_opol_officer","Russian Jaeger","Officer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_odessj_off,itm_pants_fake,itm_rus_inf_off_hat,itm_russian_officer_sword,itm_pistol_ammo,itm_russian_pistol,itm_officer_gloves,itm_spyglass],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2], 
  ["russian_opol_trump","Russian Jaeger","Bugler",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_odessj_trump,itm_pants_fake,itm_rus_odessj_hat1,itm_rus_odessj_hat2,itm_rus_odessj_hat3,itm_horn,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_foot_guard","Vladimirskiy Pehotniy Polk","Line Infantry",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_vlad,itm_pants_fake,itm_rus_vlad_hat,itm_bullets,itm_russian_musket_1808,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(50,5,145,5,150,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_foot_guard_nco","Russian Line Infantry","Skirmisher",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_vlad_nco,itm_pants_fake,itm_rus_vlad_hat,itm_bullets,itm_russian_rifle_1805,itm_russian_musket_1808,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_foot_guard_officer","Russian Line Infantry","Officer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_vlad_off,itm_pants_fake,itm_rus_vlad_off_hat,itm_russian_officer_sword,itm_pistol_ammo,itm_russian_pistol,itm_officer_gloves,itm_spyglass],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_foot_guard_drum","Russian Line Infantry","Drummer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_vlad_drum,itm_pants_fake,itm_rus_vlad_hat,itm_drummer_gloves,itm_drumstick_right,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_foot_guard_flute","Russian Line Infantry","Fifer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_vlad_fifer,itm_pants_fake,itm_rus_vlad_hat,itm_flute,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_grenadier","Sevskiy Pehotniy Polk","Line Infantry",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_sevsk,itm_pants_fake,itm_rus_sevsk_hat1,itm_rus_sevsk_hat2,itm_rus_sevsk_hat3,itm_bullets,itm_russian_musket_1808,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(50,5,130,5,150,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_grenadier_nco","Russian Line Infantry","Skirmisher",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_sevsk,itm_pants_fake,itm_rus_sevsk_hat1,itm_rus_sevsk_hat2,itm_rus_sevsk_hat3,itm_bullets,itm_russian_rifle_1805,itm_russian_musket_1808,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_grenadier_officer","Russian Line Infantry","Officer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_sevsk_off,itm_pants_fake,itm_rus_inf_off_hat,itm_russian_officer_sword,itm_pistol_ammo,itm_russian_pistol,itm_officer_gloves,itm_spyglass],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_grenadier_drum","Russian Line Infantry","Drummer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_sevsk_drum,itm_pants_fake,itm_rus_sevsk_hat1,itm_rus_sevsk_hat2,itm_rus_sevsk_hat3,itm_drummer_gloves,itm_drumstick_right,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_grenadier_flute","Russian Line Infantry","Fifer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_sevsk_fifer,itm_pants_fake,itm_rus_sevsk_hat1,itm_rus_sevsk_hat2,itm_rus_sevsk_hat3,itm_flute,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["rus_susdal","Susdalskiy Pehotniy Polk","Line Infantry",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_susdal,itm_pants_fake,itm_rus_susdal_hat1,itm_rus_susdal_hat2,itm_rus_susdal_hat3,itm_bullets,itm_russian_musket_1808,itm_russian_briquet_1807],
   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],
  ["rus_susdal_nco","Susdalskiy Pehotniy Polk","Skirmisher",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_susdal_nco,itm_pants_fake,itm_rus_susdal_hat1,itm_rus_susdal_hat2,itm_rus_susdal_hat3,itm_bullets,itm_russian_musket_1808,itm_russian_rifle_1805,itm_russian_briquet_1807],
   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],
  ["rus_susdal_off","Susdalskiy Pehotniy Polk","Officer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_susdal_off,itm_pants_fake,itm_rus_inf_off_hat,itm_russian_officer_sword,itm_pistol_ammo,itm_russian_pistol,itm_officer_gloves,itm_spyglass],
   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],
  ["rus_susdal_drum","Susdalskiy Pehotniy Polk","Drummer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_susdal_drum,itm_pants_fake,itm_rus_susdal_hat1,itm_rus_susdal_hat2,itm_rus_susdal_hat3,itm_drummer_gloves,itm_drumstick_right,itm_russian_briquet_1807],
   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],
  ["rus_susdal_flute","Susdalskiy Pehotniy Polk","Fifer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_susdal_fifer,itm_pants_fake,itm_rus_susdal_hat1,itm_rus_susdal_hat2,itm_rus_susdal_hat3,itm_flute,itm_russian_briquet_1807],
   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],
  ["russian_infantry","Borodinskiy Jaegerskiy Polk","Jaeger",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_bor,itm_pants_fake,itm_rus_bor_hat,itm_bullets,itm_russian_musket_1808,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(50,5,130,5,150,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_nco","Russian Jaeger","Sharpshooter",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_bor_nco,itm_pants_fake,itm_rus_bor_hat,itm_bullets,itm_russian_musket_1808,itm_russian_rifle_1805,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_officer","Russian Jaeger","Officer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_bor_officer,itm_pants_fake,itm_rus_bor_off_hat,itm_russian_officer_sword,itm_pistol_ammo,itm_russian_pistol,itm_officer_gloves,itm_spyglass],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_drum","Russian Jaeger","Drummer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_bor_trump,itm_pants_fake,itm_rus_bor_hat,itm_bullets,itm_russian_musket_1808,itm_russian_rifle_1805,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_flute","Russian Jaeger","Bugler",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_bor_trump,itm_pants_fake,itm_rus_bor_hat,itm_horn,itm_russian_briquet_1807],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_3|knows_power_strike_3|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_partizan","Greek Legion","Greek Volunteer",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_susdal,itm_rus_susdal_hat1,itm_rus_susdal_hat2,itm_rus_susdal_hat3,itm_bullets,itm_russian_musket_1808,itm_russian_briquet_1807],
   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],
  ["russian_infantry_rifle","2nd Foot Cossacks Battalion","Plastun",tf_guarantee_all,0,0,fac_russia,
   [itm_rus_plastun,itm_rus_plastun1,itm_rus_plastun2,itm_pants_fake,itm_rus_plastun_hat,itm_russian_rifle_1805,itm_bullets,itm_russian_jaeger_bayonet_jaeger],
   def_attrib_multiplayer|level(20),wpex(50,5,90,5,206,5),knows_common|knows_ironflesh_2|knows_power_strike_1|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_rifle_nco","Plastun","Sniper",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_plastun,itm_rus_plastun1,itm_rus_plastun2,itm_pants_fake,itm_rus_plastun_hat,itm_russian_rifle_1805,itm_bullets,itm_russian_jaeger_bayonet_jaeger],
   def_attrib_multiplayer|level(20),wpex(50,5,90,5,206,5),knows_common|knows_ironflesh_2|knows_power_strike_1|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_rifle_officer","Plastun","Officer",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_plastun_off,itm_pants_fake,itm_rus_plastun_hat,itm_russian_rifle_1805,itm_bullets,itm_russian_sabre_1798,itm_spyglass],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_2|knows_power_strike_1|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
  ["russian_infantry_rifle_horn","Plastun","Hornist",tf_guarantee_all,0,0,fac_russian_ranks,
   [itm_rus_plastun,itm_rus_plastun1,itm_rus_plastun2,itm_pants_fake,itm_rus_plastun_hat,itm_russian_rifle_1805,itm_bullets,itm_russian_jaeger_bayonet_jaeger,itm_horn],
   def_attrib_multiplayer|level(20),wpex(80,5,80,5,50,5),knows_common|knows_ironflesh_2|knows_power_strike_1|knows_athletics_3,swadian_face_middle_1, swadian_face_old_2],
[close]

and my scripts code (i changed scripts only in this part, so basically the whole file is untouched)
Spoiler
Code
     # Classes
     (try_begin), # Infantry
       (this_or_next|is_between, ":troop_no", "trp_british_infantry","trp_british_foot_guard"), # Brits
       (this_or_next|is_between, ":troop_no", "trp_british_ship","trp_wellington"), # Brits
       (this_or_next|is_between, ":troop_no", "trp_french_infantry","trp_french_old_guard"), # French
       (this_or_next|is_between, ":troop_no", "trp_french_ship","trp_napoleon"), # French
       (this_or_next|is_between, ":troop_no", "trp_prussian_infantry","trp_prussian_infantry_15"), # Prussian
       (this_or_next|is_between, ":troop_no", "trp_russian_opol","trp_russian_infantry_rifle"), # Russian
       (this_or_next|is_between, ":troop_no", "trp_austrian_infantry","trp_austrian_grenadier"), # Austrian
       (this_or_next|is_between, ":troop_no", "trp_rhine_infantry_bavaria","trp_rhine_grenadier_guard"), # Rhine
       
       (this_or_next|is_between, ":troop_no", "trp_british_infantry_ai","trp_british_foot_guard_ai"), #brits line inf
(this_or_next|is_between, ":troop_no", "trp_french_infantry_ai","trp_french_old_guard_ai"), #french line inf
(this_or_next|is_between, ":troop_no", "trp_prussian_infantry_ai","trp_prussian_infantry_15_ai"), #Prussian line inf
(this_or_next|is_between, ":troop_no", "trp_russian_foot_guard_ai","trp_russian_infantry_rifle_ai"), #Russian line inf
(this_or_next|is_between, ":troop_no", "trp_rhine_infantry_bavaria_ai","trp_rhine_grenadier_guard_ai"), #Rhine line inf
       (this_or_next|eq, ":troop_no","trp_austrian_infantry_ai"), #austrian line inf
       (this_or_next|eq, ":troop_no","trp_austrian_infantry2_ai"),       
     
       (this_or_next|eq, ":troop_no", "trp_british_ship_marine_ai"),
                    (eq, ":troop_no", "trp_french_ship_marine_ai"),
       
       (neq, ":troop_no", "trp_british_ship_cannon"), # British
       (neq, ":troop_no", "trp_french_ship_cannon"), # French     
       
       (assign, ":troop_class", multi_troop_class_mm_infantry),
     (else_try), # Guard Infantry
       (this_or_next|is_between, ":troop_no", "trp_british_foot_guard","trp_british_light_infantry"), # Brits
       (this_or_next|is_between, ":troop_no", "trp_french_old_guard","trp_french_voltigeur"), # French
       (this_or_next|is_between, ":troop_no", "trp_prussian_infantry_15","trp_prussian_infantry_rifle"), # Prussian
  #     (this_or_next|is_between, ":troop_no", "trp_russian_foot_guard","trp_russian_infantry_rifle"), # Russian
       (this_or_next|is_between, ":troop_no", "trp_austrian_grenadier","trp_austrian_infantry_rifle"), # Austrian
       (this_or_next|is_between, ":troop_no", "trp_rhine_grenadier_guard","trp_rhine_light_infantry_hessen"), # Rhine
                   
       (this_or_next|eq, ":troop_no", "trp_british_foot_guard_ai"),
       (this_or_next|eq, ":troop_no", "trp_french_old_guard_ai"),
       (this_or_next|eq, ":troop_no", "trp_prussian_infantry_15_ai"),
 #      (this_or_next|eq, ":troop_no", "trp_russian_foot_guard_ai"),
       (this_or_next|eq, ":troop_no", "trp_rhine_grenadier_guard_ai"),
                    (eq, ":troop_no", "trp_austrian_grenadier_ai"),
                   
       (assign, ":troop_class", multi_troop_class_mm_grenadier),
     (else_try), # Skirmisher
       (this_or_next|is_between, ":troop_no", "trp_british_light_infantry","trp_british_rifle"), # Brits
       (this_or_next|is_between, ":troop_no", "trp_french_voltigeur","trp_french_hussar"), # French
       (this_or_next|is_between, ":troop_no", "trp_rhine_light_infantry_hessen","trp_rhine_light_infantry_bavaria"),
       #(this_or_next|is_between, ":troop_no", "trp_russian_infantry","trp_russian_partizan"), # Russian
       # Rhine
                   
       (this_or_next|eq, ":troop_no", "trp_british_light_infantry_ai"),
       (this_or_next|eq, ":troop_no", "trp_french_voltigeur_ai"),
       (this_or_next|eq, ":troop_no", "trp_rhine_light_infantry_hessen_ai"),
       #(this_or_next|eq, ":troop_no", "trp_prussian_infantry_15_ai"), for when we add prussian inf
                    (eq, ":troop_no", "trp_austrian_grenzer_ai"),
                   
       (assign, ":troop_class", multi_troop_class_mm_skirmisher),
     (else_try), # Riflemen
       (this_or_next|is_between, ":troop_no", "trp_british_rifle","trp_british_hussar"), # Brits
       (this_or_next|is_between, ":troop_no", "trp_prussian_infantry_rifle","trp_prussian_dragoon"), # Prussian
       (this_or_next|is_between, ":troop_no", "trp_russian_infantry_rifle","trp_russian_hussar"), # Russian
       (this_or_next|is_between, ":troop_no", "trp_austrian_infantry_rifle","trp_austrian_hussar"), # Austrian
       (this_or_next|is_between, ":troop_no", "trp_rhine_light_infantry_bavaria","trp_rhine_mounted_jaeger"), # Rhine
                   
       (this_or_next|eq, ":troop_no", "trp_austrian_infantry_rifle_ai"),
       (this_or_next|eq, ":troop_no", "trp_prussian_infantry_rifle_ai"),
       (this_or_next|eq, ":troop_no", "trp_british_rifle_ai"),
       (this_or_next|eq, "trp_rhine_light_infantry_bavaria_ai"), #Rhine rifle
                    (eq, ":troop_no", "trp_russian_infantry_rifle_ai"),
                   
       (assign, ":troop_class", multi_troop_class_mm_rifle),
[close]

I really hope that someone can help me (ideally - write needed script for changing order of Russian troops and mark changed lines, so I can repeat it for other factions as well), because I'm just wasting much time on it without even slight positive results.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: Have a question about Modding? Ask Here!
« Reply #1694 on: March 15, 2018, 11:41:20 pm »
To understand, which lines and how I must change to make my own order of troops, I moved the last troop of Austrian infantry (austrian_grenadier) on the first place of list of vanilla Austrian infantry and in module_scripts.py I changed order of Austrian infantry respectively, like this.

Code
       (this_or_next|is_between, ":troop_no", "trp_austrian_grenadier","trp_austrian_infantry_rifle"), # Austrian

But after that in he game all infantry units are on their places, but austrian_grenadier is now in the Specialists section.
Can someone help me to change list of infantry units or help me to understand, what else should I change so (in this case) austrian_grenadier will be on the first place of Austrian infantry?