login

Author Topic: Storymod Chapter 2: War Feature Brainstorming  (Read 14748 times)

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Storymod Chapter 2: War Feature Brainstorming
« on: January 12, 2007, 08:26:35 PM »
Hullo chaps,

I'm soliciting implementation ideas for several features of the Storymod war system. There are some things I'm trying to fit into the war system, but I'm not sure how they would best be represented. This thread is where you should post your ideas.

The features I'm currently working on or thinking about:


1) Party morale system. This would be a party slot, tracked by triggers with various consequences. It would be generated at spawn for each individual party. Possibilities are to:

  :!:  Randomly generate morale number in a range for each party. Number is completely random.

  :!:  Randomly generate morale number in a range, where the range is defined by party template. More disciplined templates would get more points.

  :!:  Generate morale number from troop composition, with each troop type being worth X morale points.


2) Villages and the town food system. Currently towns receive food when not under siege, equal to 1 unit every 12 hours + the number of intact villages associated with that town. This is good for giving villages significance in the war, but I would like them to have even more importance.


3) Castles. Currently the front moves on after all towns on a front are seized. This does not feature castles, and I'm still thinking about ways to implement them.

One idea is to have them count as towns for the front system, so the front could move on when a faction controls a number of towns and/or castles equal to the number of towns on that front, not just when a faction controls all the towns on that front while ignoring castles. Of course, this would require some recoding of the front system, but I'm going to have to do that anyway to make castles work.

Feedback on these ideas and your own brainstorms are welcome.

Cryptically,
Winter

[EDIT]

The war system has undergone significant changes, and here's the new post regarding it:

Since the war system has changed significantly with the new version, some more brainstorming is required. :P

The system is the same with regards to siege camps and slowly starving towns into submission, but it now operates on territories, with each town and castle having its own territory and several neighbouring territories. Only neighbours can be attacked; I don't think we'll ever have effective support for behind-enemy-lines operations.

Castles have also been incorporated into the system, and drain food from surrounding friendly neighbours because they have no villages of their own.

Staging areas will be coded in soon, so that multiple parties can gather and attack a single target together.

What other features do you think are needed for the war system?
« Last Edit: May 04, 2007, 01:16:44 AM by Winter »

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #1 on: January 13, 2007, 01:30:17 PM »
Just as a thought for #3... a captured village in the shadow of a non-captured castle is a lot less valuable, arguably nigh worthless for defining a front.  So my suggestion would be that each castle projects a radius of influence (perhaps based on its troop strength, for example), and enemy-owned towns within that radius add to neither force's efforts to move the front - they're taken out of the equation.

Or, as a slightly different perspective on the idea, perhaps instead of one front, each castle projects a separate (possibly overlapping) front, based on its surrounding villages.  "The front" is a composite of the fronts of all of the associated castles.  I could do you some algorithmic "smoothing" of a multiple-overlapping-circles front, if desired.

Just some thoughts to stir the pot.
- Hellequin

Offline Fisheye

  • Blues Brother
  • Guildsman
  • ****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #2 on: January 13, 2007, 03:40:48 PM »
Please explain the front system, how does it work?

Also I just checked your old thread on War Feature brainstorming and you mentioned making troops of opposite faction into prisoners via a trigger. That was before v0.8.

You may already know that as of v0.8 we can (also) do this at the capture screen. I've got it implemented in Band of Warriors: if you liberate troops of a faction that you have hostile relations with, they become available as prisoners, not as recruits.

It's just a cut-and-paste and a couple of lines of code. I can post the how-to in the relevant subforum if anyone needs it explained.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #3 on: January 13, 2007, 05:47:38 PM »
Please explain the front system, how does it work?

Also I just checked your old thread on War Feature brainstorming and you mentioned making troops of opposite faction into prisoners via a trigger. That was before v0.8.

You may already know that as of v0.8 we can (also) do this at the capture screen. I've got it implemented in Band of Warriors: if you liberate troops of a faction that you have hostile relations with, they become available as prisoners, not as recruits.

It's just a cut-and-paste and a couple of lines of code. I can post the how-to in the relevant subforum if anyone needs it explained.

Not quite all what I meant. I've upgraded that idea to doing it for all AI parties, continually.

It's very simple. The front system keeps track of batches of vertically-arranged towns. Once all towns on a front are captured, the system moves war script inputs to the next front. Not much to it.

Intimately,
Winter

Offline Fisheye

  • Blues Brother
  • Guildsman
  • ****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #4 on: January 13, 2007, 05:53:58 PM »
I'm saying you don't have to do it continually. The troop-redistribution-after-victory script for AI vs AI is called from simple_triggers, and the same is called for player-vs-AI from game menus. You can add an extra check in the script for faction relations, straightforward, no continuous triggers iterating over every single party on the map every second.

For the fronts thing, I'm wondering why not have dynamic fronts? Like, a game of Risk rather than American Football (territories vs 50 yard line).



Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #5 on: January 13, 2007, 09:33:04 PM »
I'm saying you don't have to do it continually. The troop-redistribution-after-victory script for AI vs AI is called from simple_triggers, and the same is called for player-vs-AI from game menus. You can add an extra check in the script for faction relations, straightforward, no continuous triggers iterating over every single party on the map every second.

I've not yet looked at any of the Native code apart from the stuff relevant to Craftmod. That does sound like a better way to manage it, though.

Wanna come back to the Storymod team? We sure could use you. ;)


Quote
For the fronts thing, I'm wondering why not have dynamic fronts? Like, a game of Risk rather than American Football (territories vs 50 yard line).

There's two reasons why I went with this system, at least when starting out.

1) It's very quick and easy to code compared to other systems, and allowed me to get straight to the AI code to see what kind of use I could get out of that.
2) It forces sides to move slowly and strategically, protecting their lines of supply and so on. Territory-based systems can end up with (for example) two chains of territories leading directly to the capital cities of both sides, a completely impossible tactical position. Basically they're not very realistic.

Mystically,
Winter

Newhelper

  • Guest
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #6 on: January 15, 2007, 07:58:15 PM »
I am new to this but I would like to help out if I can.

First I would like to understand what exactly you are trying to do.  I mean are you trying to make it where the player tries to take over the world or just extra stuff for them to do.  Also on the supplies are you trying to make it where the player can lay siege to castles and take them over for themselves or where they join one of the countries in taking over castles for that county.  Along with the siege are you making it where the player can just sit outside of the castle and let the garrison starve or where the player has to storm the castle like the last storymod when the dark knights are attacking or like the native map for culmarr castle and rodaghir castle.  Also are you going to make it where the player can modify their castles to suite their liking and to make a stronger castle.  Furthermore are you going to make some castles better than others.

P.S. I also don't understand how to get things to work I just want to see if I can give good ideas for you to use.
« Last Edit: January 15, 2007, 08:04:57 PM by Newhelper »

Offline Fisheye

  • Blues Brother
  • Guildsman
  • ****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #7 on: January 16, 2007, 11:09:12 AM »
I'm saying you don't have to do it continually. The troop-redistribution-after-victory script for AI vs AI is called from simple_triggers, and the same is called for player-vs-AI from game menus. You can add an extra check in the script for faction relations, straightforward, no continuous triggers iterating over every single party on the map every second.

I've not yet looked at any of the Native code apart from the stuff relevant to Craftmod. That does sound like a better way to manage it, though.

Wanna come back to the Storymod team? We sure could use you. ;)

I'll contribute snippets when I can... which is hardly ever. Here's a snippet for your perusal.

  #BoW: script_party_add_party_prisoners
  # Troops that have poor relations with player will not join.
  # INPUT:
  # param1: Party-id to add the second party
  # param2: Party-id which will be added to the first one.
  # reg1 : Faction of victorious party who will be collecting these liberated prisoners
  # "$g_move_heroes" : controls if heroes will also be added.

  ("party_add_party_prisoners",
   [
      (store_script_param_1, ":target_party"), #Target Party_id
      (store_script_param_2, ":source_party"), #Source Party_id
      (assign, ":winner_faction", reg1),
      (party_get_num_prisoner_stacks, ":num_stacks",":source_party"),
      (try_for_range, ":stack_no", 0, ":num_stacks"),
        (party_prisoner_stack_get_troop_id,     ":stack_troop",":source_party",":stack_no"),
        (this_or_next|neg|troop_is_hero, ":stack_troop"),
        (eq, "$g_move_heroes", 1),
        (party_prisoner_stack_get_size,":stack_size",":source_party",":stack_no"),
      # Added in BoW:
      (store_troop_faction, ":troop_faction", ":stack_troop"),
      (store_relation, ":troop_relation", ":troop_faction", ":winner_faction"),
      (try_begin),
         # "amoral" troops will join you regardless of your standing with their faction
         (this_or_next|eq, ":troop_faction", "fac_outlaws"),
         (this_or_next|eq, ":troop_faction", "fac_commoners"),
         (this_or_next|eq, ":troop_faction", "fac_innocents"),
         (this_or_next|eq, ":troop_faction", "fac_neutral"),
         (ge, ":troop_relation", 0),
         (party_add_members, ":target_party", ":stack_troop", ":stack_size"),
      (else_try),
         (party_add_prisoners, ":target_party", ":stack_troop", ":stack_size"),
      (try_end),
      # End BoW:

       (try_end),
    ]),


Usage example: in module_simple triggers.py, under ti_simulate_battle... addition of a single line makes the above work. You can see Armagan already intends to do the same thing since he has code reading the party faction but he doesn't do anything with it yet.

         (store_faction_of_party, ":faction_receiving_prisoners", ":nonempty_winner_party"),
         (store_faction_of_party, ":defeated_faction", ":root_defeated_party"),

         (party_clear, "p_temp_party"),
         (assign, "$g_move_heroes", 0), #heroes are already processed above. Skip them here.      
# BoW:
         (assign, reg1, ":faction_receiving_prisoners"),
# End BoW:
         (call_script, "script_party_add_party_prisoners", "p_temp_party", ":collective_casualties"),


You'll have to do a search for call_script, "script_party_add_party_prisoners" to set the faction of the receiving party for each call, but it's just 1-2 lines extra each time this call appears (about 4-5 times in module_game_menus.py).
« Last Edit: January 16, 2007, 11:12:22 AM by Fisheye »

Offline Hellequin

  • Journeyman
  • ***
  • Posts: 254
    • View Profile
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #8 on: January 16, 2007, 12:25:29 PM »
Or you could just put a call to (store_faction_of_party) right in the add_prisoners script, and not have to bother. :P

Offline Fisheye

  • Blues Brother
  • Guildsman
  • ****
  • Posts: 427
  • My scalp's so bright, I gotta wear shades.
    • View Profile
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #9 on: January 16, 2007, 12:40:18 PM »
Or you could just put a call to (store_faction_of_party) right in the add_prisoners script, and not have to bother. :P

Store faction of which party? p_temp_party? That wouldn't be very informative.

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #10 on: January 16, 2007, 06:28:13 PM »
Or you could just put a call to (store_faction_of_party) right in the add_prisoners script, and not have to bother. :P

Wouldn't work due to the extensive use of local variables. Fisheye has it arranged properly.

Polarimetrically,
Winter

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #11 on: April 26, 2007, 01:09:42 AM »
Since the war system has changed significantly with the new version, some more brainstorming is required. :P

The system is the same with regards to siege camps and slowly starving towns into submission, but it now operates on territories, with each town and castle having its own territory and several neighbouring territories. Only neighbours can be attacked; I don't think we'll ever have effective support for behind-enemy-lines operations.

Castles have also been incorporated into the system, and drain food from surrounding friendly neighbours because they have no villages of their own.

Staging areas will be coded in soon, so that multiple parties can gather and attack a single target together.

What other features do you think are needed for the war system?

Marauder777

  • Guest
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #12 on: April 27, 2007, 12:24:31 AM »
Sabotage water supplies?
Poison or divert away from the city.

Siege engines before the battle?
Maybe have an option to buy them and have them present when the siege begins (towers, ramps, ladders, tunnels).
Battering rams... make the doors immobile "people" in a door skin with some sort of insane defense rating so normal weapons will do no damage.  You cannot walk through a person until after they are dead, so it could serve that purpose... give it a death animation of falling down. 

Flaming arrows/pitch/rocks dropped from the walls?


Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #13 on: April 27, 2007, 04:54:37 AM »
When I'm talking about the war system, I mean the AI-vs-AI system on the overland map. We already have plenty of unimplemented ideas for player involvement.

Marauder777

  • Guest
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #14 on: April 27, 2007, 11:06:44 AM »
Oh, ok.  Well count me out for this thread.   :green:

Neophyte

  • Guest
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #15 on: May 03, 2007, 07:27:09 PM »
If you want villages to have increased importance how about giving towns a money-income based on it's "connected" villages, and require money for raising/maintaining troops. Probably towns should have some level of income from itself so they're not fully dependant on villages, and also to let you tune the level of importance of villages by adjusting how much of a towns income comes from itself and how much come from the villages.


Historically, even castles with very low number of garrisoned troops were never (or at least hardly ever) ignored by invading troops, for fear that the troops would be able to disrupt supply-lines to the fighting armies. Even very low number of troops could do considerable damage to an army if they were bypassed, by disrupting the supply of food and other necessary materials.
To model this, you could have some level of attrition (simulating desertion, etc) of armies fighting in areas with unbesieged hostile castles in them.


Some other ideas:
- Raiding parties. Small-ish parties roaming enemy areas, reducing income to the controlling town while they're around.
- Patrols, primarily for keeping raiding-parties at bay.
- Razing villages, and burning them to the ground rather than attempting to capture-and-hold. Probably villages should be allowed to be rebuilt aver a period of time after being razed (the most valuable part of a small village would be the farmable land, and crops, most of which wouldn't be destroyed by razing the village).

Offline Winter

  • I am Tek Jansen!
  • Administrator
  • *****
  • Posts: 476
  • MBX Forum owner
    • View Profile
    • Street of Eyes: The Writing of Ryan A. Span
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #16 on: May 04, 2007, 01:23:50 AM »
If you want villages to have increased importance how about giving towns a money-income based on it's "connected" villages, and require money for raising/maintaining troops. Probably towns should have some level of income from itself so they're not fully dependant on villages, and also to let you tune the level of importance of villages by adjusting how much of a towns income comes from itself and how much come from the villages.

I'd like to avoid a money-based system, at least for the first release. I like the idea of hiring mercenaries and all that, but right now I don't want another stat to complicate debugging.


Quote
Historically, even castles with very low number of garrisoned troops were never (or at least hardly ever) ignored by invading troops, for fear that the troops would be able to disrupt supply-lines to the fighting armies. Even very low number of troops could do considerable damage to an army if they were bypassed, by disrupting the supply of food and other necessary materials.
To model this, you could have some level of attrition (simulating desertion, etc) of armies fighting in areas with unbesieged hostile castles in them.

Now that is an interesting idea. I could very easily code attrition scripts for any territory with a neighbouring, unsieged  hostile castle. I think I will incorporate that.


Quote
Some other ideas:
- Raiding parties. Small-ish parties roaming enemy areas, reducing income to the controlling town while they're around.

I already have orders scripts for parties to harass enemy food caravans, trade caravans and prisoner trains.


Quote
- Patrols, primarily for keeping raiding-parties at bay.

Also already done.


Quote
- Razing villages, and burning them to the ground rather than attempting to capture-and-hold. Probably villages should be allowed to be rebuilt aver a period of time after being razed (the most valuable part of a small village would be the farmable land, and crops, most of which wouldn't be destroyed by razing the village).

This was already in the plans, although maybe not rebuilding. I like the idea of forcing the player to make a conscious choice about raiding villages. If you destroy all of a city's villages permanently, then that city will be very hard to hold for any faction, and any neighbouring castles of the same faction will be negatively affected as well.

LionNinja

  • Guest
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #17 on: May 04, 2007, 01:58:13 AM »
I seem to remember in the Total war game series after taking over a town you could choose, whether to: keep the population and make some money; Kill off the population and make quite a bit of cash or completely pillage the town and leave it for dead giving you a lot of cash. There were repercussions of course, if you kept the population you had higher tax income rate but happiness would be low as the people would be loyal to their previous rulers; killing the population would end up having a lower income but a more loyal population as you would raise them under your rule and the last one is for a quick injection of cash

Kinsume

  • Guest
Re: Storymod Chapter 2: War Feature Brainstorming
« Reply #18 on: May 30, 2007, 04:11:15 PM »
Hm what i'd like to know is does each city have only one village or something? or do they have multiple... if the answer is only one, would it be possible to make it so more villages can be built for the cities?

Also something about the game has had me wondering for quite some time now, i know how your hero's party can consist of the number of people his leadership skill allows him/her to have. What i would like to know is would it be at all possible to make it so you can control more then one party.

For example say Borsha and Marid have atleast 1 in the leadership skill, would it be possible to code in something allowing them to have control of seperate parties, that in turn are under the players control as well. With an option like that being able to be done i think it would prove fairly interesting. Seigeing of multiple villages could become possible, you could use one of the smaller parties to lure in some enemies that you couldnt normally catch with your main force then move the main force in as reinforcements. Then again im not sure if the game would allow something like that to take place since the map stays centered on your main hero, just figured id see if it was possible to alter that.