another mercencary troop in travern?

Users who are viewing this thread

I forgot to say that you need to define new slots for them. Every type take a slot and the amount take another. So, how many is just depending on how many slots you have for them.

Edit: also, it is possible to make culture specific mercenary. This way, you can have a generic type and a culture specific type at once.
 
- Add constants in module_constants. Just after the Native ones.
Code:
slot_center_mercenary_troop_type  = 90
slot_center_mercenary_troop_amount= 91

- Modify the script in module_scripts
Code:
  #script_update_mercenary_units_of_towns
  # INPUT: none
  # OUTPUT: none
  ("update_mercenary_units_of_towns",
    [(try_for_range, ":town_no", towns_begin, towns_end),
      (store_random_in_range, ":troop_no", mercenary_troops_begin, mercenary_troops_end),
      (party_set_slot, ":town_no", slot_center_mercenary_troop_type, ":troop_no"),
      (store_random_in_range, ":amount", 3, 8),
      (party_set_slot, ":town_no", slot_center_mercenary_troop_amount, ":amount"),
    (try_end),
     ]),
You can copy that loop and use it for you new merc or insert a "try" block within to assign culture specific mercs.

- Modify the dialogs in module_dialogs. Look for "#Tavern Talk (with troops)" or the constant "slot_center_mercenary_troop_type" will lead you to the dialogs.

- Modify "Visit the tavern." menu in module_game_menus. Add the some code that spawn the new merc in the tavern if the amount is greater than zero.


 
Or you can reuse one or two of the three existing pairs of existing volunteer slots. As far as I know, towns only use mercenary slots, village recruits (for the player) are in slot_center_volunteer_troop, whereas your AI lords will use slot_center_npc_volunteer_troop if they recruit from a village.
 
Adding new troops to tavern is not difficult, but you'll mess mercenary dialog, since game will not know to which mercenary you're talking to. You'll have to change the way original mercenary dialog works.
 
Slawomir of Aaarrghh said:
Adding new troops to tavern is not difficult, but you'll mess mercenary dialog, since game will not know to which mercenary you're talking to. You'll have to change the way original mercenary dialog works.
Yeah. There are a lot of things to change in the dialogs. I replace all of the preset strings to a new string in the new dialogs. Also, need to use reg to pass the value since Native use global variable ($temp). Need to add some code to both Native dialog and new dialog to check for which troop you are talking to and make sure that you progress to the correct dialog.

How can i remove the ladies from castles etc?
Permanent or conditional?
 
Just copy-paste the mercenary dialog (renaming the ones you intend to use) and redesignate the registers and $temp to some other variable, as well as changing the slot_center_mercenary... slots to the other one that you've designated.
 
Somebody said:
Just copy-paste the mercenary dialog (renaming the ones you intend to use) and redesignate the registers and $temp to some other variable, as well as changing the slot_center_mercenary... slots to the other one that you've designated.
That's what I did. However, I didn't change the name, means I used the same dialog state. That leads the some of the problems and I had to use additional conditions to seperate the mercenary. If you use new dialog state (new name) for each new mercenary, then you won't have much problem as I did.
 
The only dialogs you should have to change are the "start" dialog, mercenary_tavern_talk, and mercenary_tavern_talk_hire.
What I did was a simple replace from mercenary_ to volunteer_, which should theoretically work since there is already a slot for volunteers (they're used only in villages). Although I've tweaked around with variable usage after that, so it's not guaranteed to work.
 
Can't you just capture the $g_talk_troop when the Dialog starts in some string register, then if X != Y, don't allow the subsequent sections to show, forcing it back to "start"?

Sorry in advance if that's stupid, I haven't had a chance to actually look at this yet.
 
Back
Top Bottom