Author Topic: [Kit] Recruiter Kit - Version 1.30 (UPDATED 20.05.2010)  (Read 25634 times)

0 Members and 1 Guest are viewing this topic.

hessuu

  • Sergeant Knight
  • *
  • Hessuu is a vassal of King Harkinian.
    • View Profile
  • Faction: Rhodok
  • MP nick: Hessuu
  • M&BWB
[Kit] Recruiter Kit - Version 1.30 (UPDATED 20.05.2010)
« on: April 24, 2009, 10:56:57 PM »
Recruiter Kit Version 1.30

-- Download links: --
Warband:
http://www.mbrepository.com/download.php?id=1931&f=recruiter_mod_1.30.exe
Original Mount & Blade:
http://www.mbrepository.com/download.php?id=1469&f=recruiter_mod_1.20.exe

General Mod Info:
With this cool modification you can hire recruiters to recruit fresh volunteers to your garrisons. After you have chosen the amount of recruits you need and paid the expenses, a recruiter party will appear on the map. The party will then begin to gather volunteers from villages. This is especially useful for all you "bandit kings" out there, as it allows you to effectively garrison all your centers while you fight your numerous adversaries!

Screenshots showing some recruiters:



   

Current version info:
- Recruiters can be hired from castles and towns. Recruiters can not be sent during a siege. They can return during a siege, however, if they can get past the siegers.
- Recruiters can only recruit from villages.
- You are asked if you would like to have your recruits from a specific faction, or if you'd just like to get some troops of any kind as fast as possible.
- You can specify the amount of recruits the recruiter collects by choosing from preset options 5, 10, 20, 30, 40 and 50. After the recruiter has collected the amount you ordered, he brings the recruits back to the town/castle you hired him from and adds them to the garrison.
- After the recruiter has been sent on his mission, you can go and tell him to change the faction he is recruiting from.
- You can hire 2 recruiters from a castle and 4 recruiters from a town at a time.
- You must pay 20 coins for each recruit (that's double the normal price). 100% advance payment.

Adding recruiters to your module:
Warband:
Download the source code and read the README.txt here:
http://www.mbrepository.com/file.php?id=1932

Original Mount & Blade:
Here are the scripts and info about their placement in the files.
(click to show/hide)

Changelog:
1.30
- Warband compatibility.
1.20
- Change: Recruiters can now be attacked by other parties, and their nationality is visible.
- Change: Recruiters can no longer recruit from villages that have negative relation to player or from villages that belong to hostile kingdom.
- Change: A red message is displayed every time a recruiter is defeated.
- Change: The message that tells that a recruiter has returned home is now colored green.
- Fix: Two minor bugs.
1.10
- Added ability to order recruits of specified nationality.
1.0
- First version.

If you want to use this feature in your mod you don't have to ask my permission to do so. Just inform me with a PM and add as many of us* as possible in the credits.

*Credits go to:
- Hessuu                    (Coding)
- Stoker                     (Advicing me on how to implement the recruiter spawning)
- Blankin                    (Coding the dialogs)
- Alkhadias Master      (Doing most of the coding for version 1.10 scripts)
- cdvader                   (Giving an excellent example on how to implent a feature)
- Janus                      (Maker of the mod installer script)

Any help, comments, ideas and bug reports are appreciated! Feel free to modify and redistribute the mod at will!
« Last Edit: July 11, 2012, 01:40:08 PM by hessuu »

Cruger

  • Guest
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #1 on: April 24, 2009, 11:00:26 PM »
that looks pretty damn cool.. impressive :)

Rammer

  • Veteran
  • *
    • View Profile
  • Faction: Neutral
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #2 on: April 24, 2009, 11:08:23 PM »
Awesome , i am going to have to add this to my mod. 

Blankin

  • Squire
  • *
    • View Profile
  • Faction: Rhodok
  • WB
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #3 on: April 24, 2009, 11:10:37 PM »
Great! I was wondering if anyone had done something like that... I think I will put in my mod for personal use, thanks!

edit: I have some experience with dialogues, not much but I see the original dialogues and usually make what I want work ;), if you want help send me a pm today, because my mother will kill me tomorrow by the morning ;)

Dudro

  • Knight at Arms
  • *
  • -Fortis et Fidus
    • View Profile
  • Faction: Swadian
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #4 on: April 25, 2009, 01:49:25 AM »
Score one for the good guys!
Second hand smoking kills.  Just ask Martha.  Oh, that's right, you can't, because she's DEAD! -Rowan
-"What" ain't no country I ever heard of! They speak English in "What"?!
 -What?!
 -English, mother****er! Do you speak it?!

Llew

  • Cheap ass bum
  • Grandmaster Knight
  • *
    • View Profile
  • Faction: Vaegir
  • MP nick: nK_Llew
  • M&BWB
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #5 on: April 25, 2009, 03:12:57 AM »
Ho ho, dude, that is majorly awesome!  :D

So, it looks like they are taking them to a village. What happens if you own multiple villages/castles/towns? Do they take them to any particular one?

McRoddy

  • Recruit
  • *
    • View Profile
  • Faction: Nord
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #6 on: April 25, 2009, 04:55:56 AM »
Sweet coding.  I have some dialogue experience.  I actually don't have a full understanding of scripts or triggers and do most of my coding through the module_dialogue for things I want done.  Will definitely try to use your mod.  Nice work.

hessuu

  • Sergeant Knight
  • *
  • Hessuu is a vassal of King Harkinian.
    • View Profile
  • Faction: Rhodok
  • MP nick: Hessuu
  • M&BWB
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #7 on: April 25, 2009, 11:16:50 AM »
Thank you all for your great comments!

Ho ho, dude, that is majorly awesome!  :D

So, it looks like they are taking them to a village. What happens if you own multiple villages/castles/towns? Do they take them to any particular one?

Every recruiter party has it's own "slot_recruiter_party_origin" constant, which contains the id of the town/castle they were hired from. When they have gathered enough recruits they head back there.
I actually haven't tested how it works with multiple cities.  :? I'm very confident that there shouldn't be any problems but I'm gonna test it right now.

FrisianDude

  • Coitus non Awesome
  • Grandmaster Knight
  • *
  • Zis is Tshörman tärritorie!
    • View Profile
  • Faction: Neutral
  • MP nick: OLL_SirAndelot/Liudulf Ward
  • M&BWB
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #8 on: April 25, 2009, 11:37:12 AM »
Cool. :D
Now, I don't know how you did this, but how do you make them actually recruit from villages? I'm wondering if it's possible to get enemy lord parties to recruit mercenaries.
Nords ruled by King Ragnar, Khergits ruled by Sanjar Khan, Rhodoks ruled by King Graveth, Swadians ruled by King Harlaus, Vaegirs ruled by King Yaroglek. All those peoples live, fight, and die in the continent of Calradia. The Nords and Rhodoks field solely infantry and archers, the Swadians and Vaegirs have infantry, archers and cavalry and the Khergit field almost exclusively cavalry. No such things as "infarty" or "calvary" exist. Play Vikingr!

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #9 on: April 25, 2009, 12:04:25 PM »
This looks nice (can you add the word KIT to the OP?)

As for the dialogs that come up, do you run checks on the origin slot?  Would  be a good idea, to hunt down enemy recruiters(cutting supply lines).  It's odd that they won't run away with the merchant personality, unless you are forcing their movement.  I'll have to look at the code.

hessuu

  • Sergeant Knight
  • *
  • Hessuu is a vassal of King Harkinian.
    • View Profile
  • Faction: Rhodok
  • MP nick: Hessuu
  • M&BWB
Re: Recruiter Script - Hire somebody else to do the recruiting!
« Reply #10 on: April 25, 2009, 02:01:16 PM »
Cool. :D
Now, I don't know how you did this, but how do you make them actually recruit from villages? I'm wondering if it's possible to get enemy lord parties to recruit mercenaries.

First they do a search for nearest village with recruits and go there. Then the trigger takes the amount of recruits, type of the recruits and puts them into recruiter's party. Then it removes the recruits from the village. Something like that. It may be possible and it would be pretty damn cool if lords could use this to get their troops. You could attack your enemies' recruiters to cut them off of recruits! Would require lots of work though.

This looks nice (can you add the word KIT to the OP?)

As for the dialogs that come up, do you run checks on the origin slot?  Would  be a good idea, to hunt down enemy recruiters(cutting supply lines).  It's odd that they won't run away with the merchant personality, unless you are forcing their movement.  I'll have to look at the code.

Kit and also WIP added.

I have no idea about those checks. I really need somebody to do those dialogs, there is still some small bugs in target-finding, and I'm going to look at those now.
After the basis of this feature is stable I would really like to try if I could get lords to use recruiters too! It may not be even hard to do. It depends on how the current native recruitment "hardwired" to other AI behavior-controlling scripts.

Any help with the mod and bug reports are appreciated.

jik

  • Knight
  • *
    • View Profile
  • Faction: Neutral
Re: Recruiter Kit - Hire somebody else to do the recruiting! (WIP)
« Reply #11 on: April 25, 2009, 02:41:58 PM »
Again, I haven't looked at the code, but to get AI to use it would be based on how it's functionality is called.  If your dialogs/menus that recruit call a script that does all the calculations and such, then a trigger can call these scripts for AI during game map time.

hessuu

  • Sergeant Knight
  • *
  • Hessuu is a vassal of King Harkinian.
    • View Profile
  • Faction: Rhodok
  • MP nick: Hessuu
  • M&BWB
Re: Recruiter Kit - Hire somebody else to do the recruiting! (WIP)
« Reply #12 on: April 25, 2009, 02:52:12 PM »
Again, I haven't looked at the code, but to get AI to use it would be based on how it's functionality is called.  If your dialogs/menus that recruit call a script that does all the calculations and such, then a trigger can call these scripts for AI during game map time.

The menu where you choose the amount of recruits only spawns a recruiter party with the amount of recruits and city of origin as constants. After that a single "simple_trigger" does all the work. I think it would require only some minor tweaking to allow AI parties to use it. After that only a trigger that spawns recruiters and editing/removal of existing recruitment system is needed.

kt0

  • Knight
  • *
    • View Profile
  • Faction: Swadian
Re: Recruiter Kit - Hire somebody else to do the recruiting! (WIP)
« Reply #13 on: April 25, 2009, 03:03:36 PM »
The AI uses cf_reinforce_party by way of hire_men_to_kingdom_hero_party to handle recruitment/reinforcement.  There's also an AI state spai_recruiting_troops if you want to get really fancy.  My concern would be getting lords/towns into a recruitment state too often and starving the player out of recruits. 

Darwin

  • Watchin' your language...
  • Language Moderator
  • *
  • Life's a play.
    • View Profile
  • Faction: Neutral
  • M&BWBWF&S
Re: Recruiter Kit - Hire somebody else to do the recruiting! (WIP)
« Reply #14 on: April 25, 2009, 03:58:04 PM »
I get an erorr :(

spt_recruiter is not defined

Edit: it's when i run module_scripts and module_simple_triggers
« Last Edit: April 25, 2009, 04:15:31 PM by Darwin »