OSP Kit Campaign [Modmerger Kit] Permanent Camps v0.2 for WB 1.166

Users who are viewing this thread

Alex_NG

Regular
This implements a similar idea to outposts, but at a more low-tier level. Specifically, instead of semi-permanent outposts that cost a lot to build, you just leave a companion with some troops in a field. This is balanced by a limit on the number of troops you can store, and by the fact that any hostile parties absolutely will attack and destroy the camp if they have enough strength.

Source on GitHub

The interface is just menus and dialogs without any scenes.


Features:
[list type=decimal]
[*]Leave a companion to command a permanent camp near a center for a small sum.

  • Garrison size is limited to player party size + commander skill bonus.
  • Prisoner count is limited based on commander skill + garrison troop count.
  • Troops draw full wage, but are assumed to buy their own food from locals.
  • If unpaid, troops desert; this can't be countered by any morale boosts.
  • Can store items, which increases bandit attraction.


[*]Camps can and will be attacked by hostile parties.

  • All stored items are lost if camp is destroyed.
  • If defeated, companion will return to party unless imprisoned by a lord.
  • Camp will join in the battle if player is attacked right on top of it.
  • Player will stop resting and join battle if current camp is attacked.

[/list]

Bugs:
  • Camp interactions leave spurious battle marks that can be seen with tracking skill after disbanding the camp.
  • AI seems unaware that camps will always join in on the battle and can be easily tricked into attacking against the odds.
  • Camp troops in battle have no banner (but still obey player commands).
Possible bugs:
  • Technically the camps can move, if AI decides to do so for some reason. This is because parties with pf_is_static won't be automatically attacked by AI. After more initialization of AI parameters this doesn't seem to happen anymore, but can't guarantee 100%.

Changes:
  • 0.2:
    • Can now create up to 3 camps, depending on leadership skill.
    • Fixed camp troops not being accounted for in mercenary payments.
 
Well, the permanent camp menu has a wait here option which does the same thing as the normal camp. Also, the Camp button when near enough to the camp will redirect to the new menu. However camps are programmed to join in on the battle simply if the distance is 0, so you can wait on top of the camp with spacebar and it will still join.

I wonder what should be the default numbers for camp commander skill contribution to camp garrison size and prisoner limit. Currently they are the same as for player - 5 per leadership, 1 per charisma, 5 prisoners per prisoner management skill; plus every 5 troops give 1 extra prisoner since they are just sitting there and might as well guard them full time. Also, the base size limit of a camp is full player party size, but zero prisoners.
 
Sorry for my question, but i don't know, how install this OSP. Do not tell me? :lol:  I should be grateful :shifty:
 
It's just a regular modmerger package.

I wonder what's the proper procedure to request this thread to be moved to the proper subforum. Sending a PM didn't seem to work.
 
Very nice, consider adding in the features to have the camp automatically recruit mercenaries from the nearby center and selling prisoners when the ransom broker is in town.
 
Very nice idea, well balanced too. And modmerger is always a plus.

You could try using party_set_speed_multiplier or whatever that game_* script is called and set camp speeds to zero. The actual icons might spin around like crazy but they wouldn't move.

Might also be interesting to have dialog options for companions to oversee changes on the player's behalf.
 
Auto-sell prisoners could be a useful no-brainer feature unless there are some technical difficulties with calculating the correct price or something. Recruiting mercenaries has a control problem since it'd have to be either just a dumb on/off switch, or lots of dialog menus; you'd also probably have to be able deposit cash in the camp so it won't magically teleport from you.

Regarding the speed multiplier, I know about that script, but adding a commented out script is something of an awkward thing with modmerger framework as there seems to be no way to nicely handle two mods doing it. Plus, after setting all AI properties I could find to extreme values camps don't seem to want to run away from bandits anymore even if there is just 1 troop in it, so maybe it's not needed.

Scenes is a complex thing, because if the scene doesn't provide any battle advantage, then it may just make things repetitive because of switching away from random generation (and there's the additional code complexity too); and if there is advantage, it needs thinking over and balancing.
 
Make use of game_check_party_sees_party and prevent your camp from seeing any hostile parties by setting the trigger result to 0 for values of param 1 equal to your camps (but check if this conflicts with them joining your battles).
Code:
##  #script_game_check_party_sees_party
##  # This script is called from the game engine when a party is inside the range of another party
##  # INPUT: arg1 = party_no_seer, arg2 = party_no_seen
##  # OUTPUT: trigger_result = true or false (1 = true, 0 = false)
##  ("game_check_party_sees_party",
##   [
##     (store_script_param, ":party_no_seer", 1),
##     (store_script_param, ":party_no_seen", 2),
##     (set_trigger_result, 1),
##    ]),
As for mercenaries, binary toggle should be fine (stop when out of gold, toggled through dialog), with a slider presentation to allow players to withdraw from the profits of selling prisoners or refill the warchest. Since there is a limit on the number of camps, adding one to three (1 for each type of centers) generalized locale per faction should work, ignoring terrain variations (if the sarranids decide to conquer snowy vaegir castles).
 
Implemented auto-ransom of prisoners.

Re that script, it has the same problems as the speed one; and besides what I mentioned, from what I read, these are commented out because they are called every frame for every party.

P.S. I wonder if the current prisoner capacity values are enough, or if companion skill or troop count should have more effect?
 
After starting a real game with this, being able to stash troops at will is indeed very useful in some quests where you have to chase down a small fast party (this was actually the main intent), while auto-ransom streamlines grinding bandits around their spawn, provided it's close enough to a city with a broker of course. I now kinda wish it were possible to implement auto-sell loot too, though; but it seems pricing logic there is much more complicated, and things like modifiers are hard-coded.
 
I like this kit.  Have you thought about adding the option to have the camp commander train troops in the camp?  How would such a thing be done?  I have looked at the Diplomacy constable training code to get an idea of how to do it but didn't figure out how to use it for the camp.
 
Redleg said:
train troops in the camp?  How would such a thing be done?

trigger (weekly or so) that either adds XP to the troops inside your camp (party) or replaces them with a better version. You can implement the rules that make sense to your mod (level limit, quantity limit, how much it costs, if you want a dialog with a trainer and some options, etc)
 
kalarhan said:
Redleg said:
train troops in the camp?  How would such a thing be done?

trigger (weekly or so) that either adds XP to the troops inside your camp (party) or replaces them with a better version. You can implement the rules that make sense to your mod (level limit, quantity limit, how much it costs, if you want a dialog with a trainer and some options, etc)

Kalarhan,
Thanks for the info.  I hadn't thought of doing it that way.  I will try it and see how it works.
 
The problem is that apparently troops outside player party don't have xp counters, so you will have to directly upgrade them, which means you will have to implement a full UI to setup what should be upgraded to what.

Also, it may generally be more efficient to train troops in your party with multiple heroes and beating up bandits. A very useful feature for camps may be selling loot in town as well as prisoners, but calculating the correct price for items is much more complex than prisoner ransom amount.
 
Alex_NG said:
The problem is that apparently troops outside player party don't have xp counters, so you will have to directly upgrade them, which means you will have to implement a full UI to setup what should be upgraded to what.

That is half right and not important at all  :mrgreen:

1) Players party has a XP counter: true
2) The counter is applied to each stack in the player's party, but to only 1 unit, so you can upgrade troops slowly as you get more xp

For a AI party you can use this operation:
Code:
party_upgrade_with_xp                 = 1673  # (party_upgrade_with_xp, <party_id>, <xp_amount>, <upgrade_path>), #upgrade_path can be:
                                              # Awards specified number of xp points to entire party (split between all stacks) and upgrades all eligible troops. Upgrade direction: (0 = random, 1 = first, 2 = second).

Or if you have a quantity in mind, instead of a random value based off XP, you can use the
Code:
party_remove_members                  = 1615  # (party_remove_members, <party_id>, <troop_id>, <number>),
                                              # Removes specified number of troops from a party. Stores number of actually removed troops in reg0.
party_add_members                     = 1610  # (party_add_members, <party_id>, <troop_id>, <number>),
                                              # Returns total number of added troops in reg0.
operations. Remove 10 recruits and add 10 knights (or whatever your upgrade path is for training) to simulate your process.

 
Back
Top Bottom