Age and family ties

Users who are viewing this thread

All game initialization is performed in script_game_start and other scripts it invokes. Family ties and starting age are defined in script_initialize_aristocracy.
 
Lav said:
All game initialization is performed in script_game_start and other scripts it invokes. Family ties and starting age are defined in script_initialize_aristocracy.


Thank you. I know it. Tell me exactly how to register for each lord his age and family ties.
What and where to constitute. Or at least how to copy and change the existing family ties in the game
That's all there is in a modular system

("initialize_aristocracy",
[
  #LORD OCCUPATIONS, BLOOD RELATIONSHIPS, RENOWN AND REPUTATIONS

  #King ages
  (try_for_range, ":cur_troop", kings_begin, kings_end),
(troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_hero),
(store_random_in_range, ":age", 50, 60),
(troop_set_slot, ":cur_troop", slot_troop_age, ":age"),
##diplomacy start+
#(eq, ":cur_troop", "trp_kingdom_5_lord"),#<-- There was no reason for this to be in the loop, so moved it out.
#(troop_set_slot, ":cur_troop", slot_troop_age, 47),
  (try_end),
  (troop_set_slot, "trp_kingdom_5_lord", slot_troop_age, 47),#<-- Moved from above
  ##diplomacy end+

  #The first thing - family structure
  #lords 1 to 8 are patriarchs with one live-at-home son and one daughter. They come from one of six possible ancestors, thus making it likely that there will be two sets of siblings
  #lords 9 to 12 are unmarried landowners with sisters
  #lords 13 to 20 are sons who still live in their fathers' houses
  #For the sake of simplicity, we can assume that all male aristocrats in prior generations either married commoners or procured their brides from the Old Country, thus discounting intermarriage

  (try_for_range, ":cur_troop", kingdom_ladies_begin, kingdom_ladies_end),
(troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_lady),
  (try_end),

  (assign, ":cur_lady", "trp_kingdom_1_lady_1"),

  (try_for_range, ":cur_troop", lords_begin, lords_end),
 
Lav said:
All game initialization is performed in script_game_start and other scripts it invokes. Family ties and starting age are defined in script_initialize_aristocracy.

All figured out. Thank you very much. Suggest another point. In case of reduction of Lords for example to 17, family ties will also be distributed out automatically?
 
I'm pretty certain the script was made with several assumptions about lord numbers and relative positioning within module_troops. Changing their number without thoroughly understanding the initialize_aristocracy script is likely to introduce all kinds of wonderful bugs.
 
Lav said:
I'm pretty certain the script was made with several assumptions about lord numbers and relative positioning within module_troops. Changing their number without thoroughly understanding the initialize_aristocracy script is likely to introduce all kinds of wonderful bugs.

thanks, to family connections I figured. Would you still suggest two things:
1) how to secure for each faction one banner for all Lords (of course, in the scripts, but specifically as replacing this flag is added only to the king, the rest of the remaining randomly)
2) whether it is possible to split the money to let dinars and solids, ie 2 currency (say in one SOLID - 30 dinars), such as what I've seen in the mod of the Wild West (1866 seems to be there only dollars and cents)
 
pan-boroda said:
thanks, to family connections I figured. Would you still suggest two things:
1) how to secure for each faction one banner for all Lords (of course, in the scripts, but specifically as replacing this flag is added only to the king, the rest of the remaining randomly)
2) whether it is possible to split the money to let dinars and solids, ie 2 currency (say in one SOLID - 30 dinars), such as what I've seen in the mod of the Wild West (1866 seems to be there only dollars and cents)
1) I'm afraid I don't understand. The lords are pretty much guaranteed a banner for as long as there are more banners than lords per faction. If there are less banners then lords, then there's preciously little you can do to guarantee a banner for each lord. :smile:
2) Game only tracks one kind of currency. You can however override the way it's displayed by re-writing "game_get_money_text" script.
 
Lav said:
pan-boroda said:
thanks, to family connections I figured. Would you still suggest two things:
1) how to secure for each faction one banner for all Lords (of course, in the scripts, but specifically as replacing this flag is added only to the king, the rest of the remaining randomly)
2) whether it is possible to split the money to let dinars and solids, ie 2 currency (say in one SOLID - 30 dinars), such as what I've seen in the mod of the Wild West (1866 seems to be there only dollars and cents)
1) I'm afraid I don't understand. The lords are pretty much guaranteed a banner for as long as there are more banners than lords per faction. If there are less banners then lords, then there's preciously little you can do to guarantee a banner for each lord. :smile:
2) Game only tracks one kind of currency. You can however override the way it's displayed by re-writing "game_get_money_text" script.

Okay, thank you. I will try
 
It's a simple modification of the original banner assignment script, stop assuming OSP scripts will fix everything for you.
Code:
      (try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
        (this_or_next|troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
        (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_inactive_pretender),

        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
        (neg|faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
        (try_begin), #1 banner per faction
          (eq, ":kingdom_hero_faction", "fac_kingdom_x"), #Whatever
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_banner_y"),
        (else_try), #original code
          (eq, ":kingdom_hero_faction", "fac_kingdom_6"), #Sarranid Sultanate
          (store_add, ":kingdom_6_banners_begin", banner_scene_props_begin, sarranid_banners_begin_offset),
          (store_add, ":banner_id", ":kingdom_6_banners_begin", ":num_sarranid_lords_assigned"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_sarranid_lords_assigned", 1),
        (else_try), #et alias
...
First, find whatever kingdom you want, replace fac_kingdom_x with that. Then, find the banner (its scene prop equivalent to be exact) and replace spr_banner_y with that ID.
 
(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
        (this_or_next|troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
        (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_inactive_pretender),

        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
        (neg|faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
      (try_begin), #1 banner per faction
          (eq, ":kingdom_hero_faction", "fac_kingdom_1"), #Whatever
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, "spr_banner_a03"),
       
          (else_try),     
          (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
          (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset),
          (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_khergit_lords_assigned", 1),
     
did like the way you wrote,
produces an error.
Unable to find object: spr_banner_a3
Illegal Idenfier: spr_banner_a3

What error could be?
 
Because banner_a03 is actually referenced as spr_banner_c (don't ask why)
Code:
  ("banner_a",0,"banner_a01","0", []),
  ("banner_b",0,"banner_a02","0", []),
  ("banner_c",0,"banner_a03","0", []),
...
 
Somebody said:
Because banner_a03 is actually referenced as spr_banner_c (don't ask why)
Code:
  ("banner_a",0,"banner_a01","0", []),
  ("banner_b",0,"banner_a02","0", []),
  ("banner_c",0,"banner_a03","0", []),
...

Thank you, comrade. Understand that arrogance, but may prompt you about currencies? how to make a division into dinars and, say, thalers?
 
pan-boroda said:
Thank you, comrade. Understand that arrogance, but may prompt you about currencies? how to make a division into dinars and, say, thalers?
Like I said, game tracks only one currency, but you may override it's display. Just divide whatever value game stored by 30, and you'll have your solids. Modulus of that division will be denars.
 
Back
Top Bottom