Tutorial:Pooled Resources Updated

From Total War Modding

Intro:

This here tutorial is going to go over the basics of a Pooled Resource, why they’re awesome, and how to use them to their fullest potential. I’m going to try and not pigeon-hole readers into a specific usage of pooled resources, but I will try at all points to cover all realistic paths to go down, and all functionality that pooled resources have. Do note this tutorial will focus specifically on Warhammer III, and some of this may apply to Warhammer II and Troy.

Alright! A pooled resource is a type of game object that’s becoming more prevalent in Total War – being first introduced throughout Total War Warhammer II’s development (to my knowledge), and becoming increasingly important in Three Kingdoms where it powers many systems like population and food supplies.

A pooled resource is pretty basic, conceptually – it’s a custom resource (of whatever make or model) that is contained within a pool. In Warhammer III, pooled resources can be attached to a number of “locations”.

Pool Type Description Example
FACTION This is a resource which is tracked at a global level. Oathgold, chivalry, devotion, harmony
MILITARY FORCE These types of pools are tracked at the army level, and can be different values at each army. Chaos authority, winds of magic, Ogre Meat.
GEOGRAPHIC PROVINCE Pools tracked at the province level, values can be different at each province – but is shared for all factions. Corruption.
REGION Assumed to operate on specific regions None
REGION GROUP Assumed to operate on specific regions None
FACTION_PROVINCE Pools tracked at provincial level. If a province has multiple owners, each gets a separate pool. None
CHARACTER Assumed to operate on individual characters None
SIEGE A pool attached to a specific siege instance. Supplies

In WH2, some modders have created pooled resources for a gromril resource for the Dwarfs, the “stored lives” mechanic and the resource “Necromantic Power” (in return of the lichemaster).

The uses of pooled resources are far, in big part due to how absolutely versatile and moddable they are. They can stand for basically any numerical data you want on the campaign.

Anatomy of a pooled Resource:

Pooled resources are at the centre of a web of DB entries, and it can be quite overwhelming when first trying to learn. So to help compartmentalise things a bit, let is break it down.

Pooled Resource Breakdown.png
  1. You have setups for the pooled resource itself.
    1. You have setups to hook that resource to the game as a campaign group.
  2. You set up “factors” – essentially variables which can impact the value of a pooled resource.
    1. And tables to hook these up to effects.
  3. You set up usual modifiers making use of those effects (events, effect bundles, buildings etc.)


This is overly simplified, but it provides a good framework to learn the ropes!

Initial Setup:

The first place to go will be the pooled resource table. This is fairly simple to set up.

Value Description
Key Unique key for your resource
Minimum/ maximum Lowest/highest value this pool can be
Positive/ negative factor display name Text values to categorise factors in UI.
description Text description of the resource in the UI
Ai_ignored Make this a pool the AI ignores.
Default_factor ?
Optional_icon_path Icon for resource
Income policy Determines when the pool updates
Reset before income Resets the pool before recalculating new values
scope Where the resource is attached (e.g. faction)
Has persistent factors For resources where it’s modifiers applyonce and stack vs adding up (tor yvress defence)
Sort order ?
Battle conversion This resource converts into a battle resource.
Apply income on creation ?
Always display zero factors ?

Usually these items are the important ones you need to define and these values, are important based on what you want to do. Typically, you’re probably going to want the AI to ignore the resource, have your income policy be end of round, not reset income and not have persistent factors (although this is not always the case!)

Hooking up the Resource:

The seed has been planted, the next thing we need to do is hook that resource up to something. To do this we need to create a campaign group to represent the pooled resource. It would probably be good to get a campaign group tutorial up somewhere!

Camapign_groups: In this table you only have 1 value to enter, a new key for the group representing your resource.

Camapign_group_members: Much like campaign groups, this is easy enough, create a new member to represent your resource, and attach it to the campaign group above.

Campaign_group_pooled_resources: In this table add a new record, hook up your campaign group to your resource and set an initial value if needed. This is essentially the starting value in a pool.

NOTE! If you have this set up for forces, provinces and other non-faction scopes, this will apply to each new army/ province you get. You may want to consider setting this to 0 and script-adding resource on turn 1.

Camapign_group_member_criteria_XXX: These are a host of tables that you can use to help further define your resource. For this guide, I am going to assume a basic need to use these – and that you want to associate the resource to a specific culture. As such, refer to Camapign_group_member_criteria_cultures: Here you want to create a new record, attach your campaign group member created above, associate it with the culture you want to add it to and then define that cultures relationship to that member.

ACTOR ?
ORIGINATOR ?
OWNER ?

With the above done, you now have a resource and have attached it to a culture!

Factor in the factors:

Now you have a resource, you have to set up the things that modify it! When setting up a factor correctly, it ensures that when an effect bundle/ effect is used to modify a resource, the pooled resource is correctly modified and the UI categorises it/ breaks it down for the player.

Pooled_resource_factors: Take a look at this table – hopefully much of what you want to do is already covered by the base game setups. If not, or you want to create your own versions, add a new factor for each way your pooled resource can be edited.

NOTE: If you have any factors which can positively or negatively impact a resource, the UI will not show that breakdown – only the NET value in the UI. If you wish to show a breakdown, consider splitting your factors e.g. buildings and buildings_negative.

Pooled_resource_factor_junctions: In this table, you are connecting your factor to the pooled resource and giving that connection a unique ID. You are also able to set the min/Max amount this factor can contribute in any one transaction. Do this for EACH factor you have set up.

Effects: Factors need to be tied to effects. Which can then be referenced by buildings/bundles. Create an effect for EACH factor you have set up.

Effect_bonus_value_pooled_resource_factor_junctions: This is the table that hooks up your factor to an effect. Noteworthy point relating to the value Bonus Value ID:

Base Amount An effect with this increments by a base vale e.g. 10.
Income Disabled Used by Norsca?
Percentage Multiplier An effect with this will modify the resource by a percentage
Neighbouring Area Base Amount Something to do with corruption?

Effect_bonus_value_pooled_resource_junctions: This table is a sneaky one – it’s very similar to the above, but is not tied to a specific factor. This is typically best used for when you want an effect to increase your resource cap.

Closing:

You should not have yourself a number of effects all hooked up to your resource and its factors. From here, you can add them to effect bundles/ or junction them off to buildings/ ancillaries etc.

Do some testing, make sure things work – and then consider how you can represent your resource in the UI.