Mount & Blade Warband: Napoleonic Wars > Modifications

How to make only certain units available for map?

(1/3) > >>

Ivkolya:
Hi all, is it possible to make certain units available for certain map? As example, I want for winter maps make available only winter uniforms

profy:
No unfortunately, there are limitations like spawn with cannon horses or not, 100% infantry / cavalry, explosives disabled and two other three things ... but to have winter skins, you have to put a skinpack client side

Ivkolya:
Ok, thank you:)

By the way - I wonder how can I completely disable cavalry on the map? I found out that adding flag sf_no_horses simply disables horses for players, but cavalry is available and bots ride horses.

Aternox:

--- Quote from: Ivkolya on May 08, 2018, 06:44:08 pm ---Ok, thank you:)

By the way - I wonder how can I completely disable cavalry on the map? I found out that adding flag sf_no_horses simply disables horses for players, but cavalry is available and bots ride horses.

--- End quote ---

For Cavalry I think use the mm_spawn_restrictions to block player cav and if bots still play as cav edit this part of multiplayer_server_spawn_bots in mission templates to to look once for 'mm_spawn_restriction = 1 (no cav)' and therefore inf only units and second for 'Cav allowed' which below code is kept same (you might be able to use $g_horses_are_avaliable instead not sure)


--- Code ---
      (try_for_range, ":cur_ai_troop", multiplayer_ai_troops_begin, multiplayer_ai_troops_end),
        (store_troop_faction, ":ai_troop_faction", ":cur_ai_troop"),
        (eq, ":ai_troop_faction", ":team_faction"),
        (val_add, ":num_ai_troops", 1),
      (try_end),
--- End code ---

And for winter uniforms, I think if you make a new in game prop similar to mm_spawn_restrictions except it uses a variable for winter (eg variable 0 is not winter, 1 is winter), keep the m_troops to have both regular and winter uniform props on one soldier, and then in module scripts edit the item assign scripts to be 'if winter = 1, give winter tunic, else give regular tunic'.

My answer isn't very specific with the code, if you need me to be specific with the code edits I can help you, and my method may not be the best way, just what I can come up with right now

Ivkolya:
Thank you, Aternox, I'll be looking into it :)

Navigation

[0] Message Index

[#] Next page

Go to full version