3 questions

Users who are viewing this thread

Corinthian Hoplite

Sergeant Knight at Arms
1. Is it possible to have parties of the same faction attacking eachother?

2. If yes, how?

3. How can I set the wage of a soldier without using troop level?
 
for 3, I think editing this in module_scripts will do:

# script_game_get_troop_wage
  # This script is called from the game engine for calculating troop wages.
  # Input:
  # param1: troop_id, param2: party-id
  # Output: reg0: weekly wage
 
  ("game_get_troop_wage",
    [
      (store_script_param_1, ":troop_id"),
      (store_script_param_2, ":unused"), #party id
     
      (assign,":wage", 0),
      (try_begin),
        (troop_is_hero, ":troop_id"),
      (else_try),
        (store_character_level, ":troop_level", ":troop_id"),
        (assign, ":wage", ":troop_level"),
        (val_add, ":wage", 5),
        (val_mul, ":wage", ":wage"),
        (val_div, ":wage", 30),
      (try_end),
     
      (store_skill_level, ":leadership_level", "skl_leadership", "trp_player"),
      (store_mul, ":leadership_bonus", 8, ":leadership_level"),
      (store_sub, ":leadership_factor", 100, ":leadership_bonus"),
      (val_mul, ":wage", ":leadership_factor"),  #wage = wage * (100 - 8*leadership)/100
      (val_div, ":wage", 100),
     
      (assign, reg0, ":wage"),
      (set_trigger_result, reg0),
  ]),
 
Hmmm, interesting question for Part 1. I guess it depends if you want this to occur in an exact situation, or an all-out civil war.

Let's assume two specific, pre-known parties. Try creating first a temporary faction, like fac_temp or something. Make fac_temp an enemy of the other party's faction, like -1.0 for maximum effect. Then, use faction_set_slot to change the faction of the other party. Now they should fight.

If you want an all-out civil war, probably you'd need to iterate through all of a faction's parties, and set half of them to fac_temp. For good effect, you'd likely also need to change the towns and villages faction ownership to fac_temp.
 
Cumandante said:
1. Is it possible to have parties of the same faction attacking eachother?

2. If yes, how?

in the module_factions.py there is a faction cohesion field, reduce it to 0, then within the relations field set a relationship of that faction to itself to a negative 0.5.

yep. it works. i done done it. maw
 
Back
Top Bottom