OSP Kit Combat Form Ranks! - A formation kit[Version1.32][Minor update: multi bug fixes]

Users who are viewing this thread

Lumos

Archduke
WBWF&SNWM&BVC
foxyman said:
And what does "select all formations" mean?
When you press it, you select/deselect all formations, and when you give commands, they apply to all formations.

@Amman de Stazia: Perhaps you could store the number of deserters into a global variable and then, after the battle, make as many parties as you wish with the people stored in this variable. I can't tell you how will you remove them from the battlefield, though. If you kill them with delivering damage, they will count as casualties, and if you deliver blunt damage, they will be capturable (as you said). So I can't help about that.
 

dunde

Count
WB
I know how to prevent them from counted as casualties or taken as prissoner. Tell me how you kill them and make their body disappears, please..
 

Lumos

Archduke
WBWF&SNWM&BVC
To kill them - easy:
Code:
(agent_set_hit_points, <agent_id>, 0, 1),
(agent_deliver_damage_to_agent, <agent_id>, <agent_id>),
But to make the bodies disappear... This, I think, is not possible.
 
(init_position,pos1),
(agent_set_position,<agent_id>,pos1),
can do the trick? seems like 00 position is outside battlefield borders
 

foxyman

Sergeant Knight
M&BWB
GetAssista said:
(init_position,pos1),
(agent_set_position,<agent_id>,pos1),
can do the trick? seems like 00 position is outside battlefield borders

(0, 0) is where player inventory is placed. But obviously you can set pos1 elsewhere outside the map
 
foxyman said:
(0, 0) is where player inventory is placed. But obviously you can set pos1 elsewhere outside the map
mm.. I always thought inventory is where entry point 0 is . Which is not x=0, y=0
 

dunde

Count
WB
Ok, consider we can teleport them to outside battle area, then kill them in mission template's trigger. Mark them as rout with slot assignment.
Code:
   (init_position,pos1),
   (agent_set_position,<agent_id>,pos1),
   (agent_set_slot, <agent_id>, <slot_agent_rout>, 1),
   (agent_set_hit_points, <agent_id>, 0, 1),
  (agent_deliver_damage_to_agent, <agent_id>, <agent_id>),

AFAIK, script 's responsible to count battle casualties is "count_mission_casualties_from_agents",  called when battle mission finished. So, I think we can exclude agents that marked as rout there.
Code:
  #script_count_mission_casualties_from_agents
  # INPUT: none
  # OUTPUT: none
  ("count_mission_casualties_from_agents",
    [(party_clear, "p_player_casualties"),
     (party_clear, "p_enemy_casualties"),
     (party_clear, "p_ally_casualties"),
     (assign, "$any_allies_at_the_last_battle", 0),
     (try_for_agents, ":cur_agent"),
       (agent_is_human, ":cur_agent"),
       (agent_get_party_id, ":agent_party", ":cur_agent"),
       (try_begin),
         (neq, ":agent_party", "p_main_party"),
         (agent_is_ally, ":cur_agent"),
         (assign, "$any_allies_at_the_last_battle", 1),
       (try_end),
       (neg|agent_is_alive, ":cur_agent"),
       ##############################################################
       # Exclude rout agents 
             # (try_begin),
             #     (agent_slot_eq, ":cur_agent", <slot_agent_rout>, 1),  
             #    (party_add_members, "p_spawned_deserter",  ":agent_troop_id", 1),
             # (try_end),
       (neg|agent_slot_eq, ":cur_agent", <slot_agent_rout>, 1),  
       ##############################################################   
       (agent_get_troop_id, ":agent_troop_id", ":cur_agent"),
       (try_begin),
         (eq, ":agent_party", "p_main_party"),
         (party_add_members, "p_player_casualties", ":agent_troop_id", 1),
         (try_begin),
           (agent_is_wounded, ":cur_agent"),
           (party_wound_members, "p_player_casualties", ":agent_troop_id", 1),
         (try_end),
       (else_try),
         (agent_is_ally, ":cur_agent"),
         (party_add_members, "p_ally_casualties", ":agent_troop_id", 1),
         (try_begin),
           (agent_is_wounded, ":cur_agent"),
           (party_wound_members, "p_ally_casualties", ":agent_troop_id", 1),
         (try_end),
       (else_try),
         (party_add_members, "p_enemy_casualties", ":agent_troop_id", 1),
         (try_begin),
           (agent_is_wounded, ":cur_agent"),
           (party_wound_members, "p_enemy_casualties", ":agent_troop_id", 1),
         (try_end),
       (try_end),
     (try_end),
     ]),

If we win the war, then members of p_enemy_casualties party will be our prisoners. Further, another commented (try_begin),  ....  (try_end), block there can be used to collect them into a party then spawned them as deserter if you wish.
 

dunde

Count
WB
I'm sorry, I think I made a mistake. The script only deal with casualties counting. Prisoners assignment's done by mnu_total_victory and mnu_total_defeat. But if we can make the rout agents always been killed, than there's no problem, the method above works. But if there's any possibilities that rout agent's knocked only than we must do something with p_temp_party in mnu_total_victory and mnu_total_defeat. We can use "p_spawned_deserter" data to remove some members of p_temp_party.
But it will be a lot easier if the rout agent 's killed always.
 

Lumos

Archduke
WBWF&SNWM&BVC
Foxyman, I've got a problem and a question.
The problem is that I can't set the default "Orders panel" key to go to "M". I tried to do it from the constants, but it goes to "C" instead. Could you tell me how?
And the question: How do you assemble the Main Battle? When I open the orders panel it always says that the troops are dismissed, I have troops in the party and when I click on a formation type nothing happens.
 

foxyman

Sergeant Knight
M&BWB
@Lumos,

  The problem looks like from interference with other modifications. For the key config thing, do you mean the key display is wrong or the actual function binding is wrong? Both might be caused by a flaw in module_constants all_keys_list.
 

Lumos

Archduke
WBWF&SNWM&BVC
I don't know, but everything looks good in there. I've checked, but it all seems OK. I think of removing the custom key configuration and setting up my own. This will remove the customization aspect, but it should fix it. And I made a help message in every mission template which points to the default controls, so I think I'll be doing that.

Foxyman, you can add my mod in the list of mods that use Form Ranks.

And how did you asemble Main Battle again?
 

Neon Assault

Recruit
@foxyman,

Hey foxyman I have downloaded and extracted the mod by just clicking the download and letting it install to Mount&Blade/Modules/FormRanks but when I try to play it I can't find the option to put a hero in charge of a battle. I know how to speak to them and when I am in battle I can tell the troops to form square, phalanx, wedge and line and they do it without a problem. I can also go into camp and look at the controls but I can't seem to figure out the problem. I have re-installed several times but nothing seems to work and it's always the same problem.
 

Lumos

Archduke
WBWF&SNWM&BVC
Foxyman, another problem. One fo the formations did not appear in battle and after the battle all the "sub-parties" were detached from me and could not be joined. Help?
 

foxyman

Sergeant Knight
M&BWB
Lumos said:
Foxyman, another problem. One fo the formations did not appear in battle and after the battle all the "sub-parties" were detached from me and could not be joined. Help?

How about telling the NPC to dismiss the battle? Your version seems to be completely out of order.

@Neo Assault:
  Check your tactic skill. You need 2 points for your first battle.Please read the first thread about the formulas of skill requirement.
 

Lumos

Archduke
WBWF&SNWM&BVC
Yeah, I noticed. The "Form Ranks" section in mnu_battle_debrief was missing, so I am reimplementing it all - who knows what else might miss... And I tried to call them back. Nothing happened. I'll tell you how it is when I finish reimplementing.
 

Lumos

Archduke
WBWF&SNWM&BVC
I re-implmeneted the kit. I think it works properly now, and the problem was with calling presentations one after another.
But I have another question. Can something (external, like different kit) screw up the position codes in Form Ranks? Because when I tell my people to hold a position, they don't do it, but rush to the end of the map and stay there.
Never mind, fixed.
 
Top Bottom