Amount you can recruit from a village, Honor and a little problem

正在查看此主题的用户

rambo

Veteran
Hello people,

I was borred (again) so I was being a bit messing with M&B.
How can I change the amount of recruits you can recruit from a village?

And where can I see the amount of Honor (or can I make a script or something).

At last, I have the mod Europe 1200.
I added English Lancers.

I copied
trp_temp_troop Temp_Troop Temp_Troop 16 0 0 1 0 0
  -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0
  7 5 4 4 0
0 0 0 0 0 0 0
274 655360 0 1 0 0
  0 0 0 0 0 0 0 0
and paste it in troops.txt at the begin.
Then I made English Lancers from it with Troop editor.
trp_English_Lancer English_Lancer English_Lancers 53478400 0 0 1 2 0
  357 0 117 0 129 0 140 0 139 0 243 0 340 0 346 0 357 0 462 0 463 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0 -1 0
  15 13 6 8 12
255 122 100 100 100 100 0
274 655360 0 42341 278528 0
  0 0 0 0 0 0 0 0

But now are all the cities a mess.
Whole europe is occupied by other country's.
(Sorry, I can't give a print screen... somehow it doesn t work)
What did I wrong?

 
Add you new troop at the bottom of the file. This won't mess up the troop IDs and keep your game working.
 
How can I change the amount of recruits you can recruit from a village?

And where can I see the amount of Honor (or can I make a script or something).
 
For the number of recruit in village, use TML Text tweak:
http://forums.taleworlds.com/index.php/topic,46290.msg1219966.html

You can see player's honor in statistic/info page. Already exist in Native.
 
rambo 说:
How can I change the amount of recruits you can recruit from a village?

  #script_update_volunteer_troops_in_village
  # INPUT: arg1 = center_no
  # OUTPUT: none
  ("update_volunteer_troops_in_village",
    [
      (store_script_param, ":center_no", 1),
      (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
      (party_get_slot, ":center_culture", ":center_no", slot_center_culture),
      (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
      (assign, ":volunteer_troop_tier", 1),
      (store_div, ":tier_upgrades", ":player_relation", 10),
      (try_for_range, ":unused", 0, ":tier_upgrades"),
        (store_random_in_range, ":random_no", 0, 100),
        (lt, ":random_no", 10),
        (store_random_in_range, ":random_no", 0, 2),
        (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),
        (try_begin),
          (le, ":upgrade_troop_no", 0),
          (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0),
        (try_end),
        (gt, ":upgrade_troop_no", 0),
        (val_add, ":volunteer_troop_tier", 1),
        (assign, ":volunteer_troop", ":upgrade_troop_no"),
      (try_end),
     
      (assign, ":upper_limit", 7),
      (try_begin),
        (ge, ":player_relation", 5),
        (assign, ":upper_limit", ":player_relation"),
        (val_div, ":upper_limit", 2),
        (val_add, ":upper_limit", 10),
      (else_try),
        (lt, ":player_relation", 0),
        (assign, ":upper_limit", 0),
      (try_end),

      (val_mul, ":upper_limit", 3), 
      (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"),
      (val_div, ":upper_limit", ":amount_random_divider"),
     
      (store_random_in_range, ":amount", 0, ":upper_limit"),
      (party_set_slot, ":center_no", slot_center_volunteer_troop_type, ":volunteer_troop"),
      (party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"),
    ]),
The default script above :
  • Volunteer's level is determined by your relation with the village. Every increase 10 relation, dice 10% chance to be upgrading 1 level.
  • if your relation with the center is above 5, then amount of volunteer = 0 to (relation div 2)+9
  • if your relation with center is 1 to 4, then  amount of volunteer =  0 to 6
  • if your relation is 0 or less, no volunteer for you.


rambo 说:
And where can I see the amount of Honor (or can I make a script or something).

Player's honor is saved in global variable "$player_honor".
 
后退
顶部 底部