Pikmin 4 enemy parameters
In Pikmin 4, enemy behaviour parameters are configured in each enemy's blueprint file, or sometimes its superclass file. These exist in Carrot4/Placeables/Teki and Carrot4/Placeables/Teki/Base for superclasses and can be edited as JSON, once decoded. For enemy parameters relating to economy/health/carrying/damage see Data Table/Actor Parameters.
While the blueprint files are quite large, they are mostly full of irrelevant code for the common user. The file is split into "generator variables" which are used to set the base characteristics of an enemy at runtime, likely laid underneath an enemy's instance-parameters, which come from ActorSerializeParameter and AI.
The gen variables one is likely looking for are:
| Gen var | Meaning |
|---|---|
AttackAffordance_GEN_VARIABLE |
Possibly the properties of if an entity believes it can attack |
{EntityName}AI_GEN_VARIABLE |
Configures this specific enemy's behaviour and values |
TekiAIParameter |
Universal parameters all enemies have in common, mostly including detection, search, and territory, flick parameters, and drop parameters |
CarrotMove_GEN_VARIABLE |
Speed values |
Life_GEN_VARIABLE |
Health, health bar and some damage properties |
PointerAssist_GEN_VARIABLE |
Cursor properties |
TekiAIParameter[edit]
These parameters are shared aspects all enemies have in common, including territory, detection and vision areas, how the enemy flicks off Pikmin, and what they drop by default when defeated.
Search and Territory[edit]
Parameters[edit]
These values determine how and what an enemy can see.
| Parameter | Meaning |
|---|---|
Radius |
The distance up to which the enemy can see or be aware of any captains or Pikmin. |
Angle |
The angle of its vision, essentially creating a vision cone. Determines line of sight. When set to 0, the enemy skips checking if its vision has targets in it. |
SphereRadius |
The size of the enemy. Used to determine if an enemy is currently in the search area. |
Center |
The center point of the enemy, used to determine where the vision cone and SphereRadius begin from.
|
TerritoryNestRatio |
A value between 0 and 1 that determines how much of the territory is the creature's nest. This is used in conjunction with the boolean below to limit certain behaviours to only occur within the nest or to occur within the entire territory. |
bSearchOuterTerritory |
A boolean usually set to false by default. This allows the enemy to use its full territory zone within the search area instead of just its nest, allowing them to roam further from home, be more alert, and act more aggressively. |
SearchArea Categories[edit]
The different categories and circumstances in which the enemy will be looking for targets or not.
| SearchArea Category | Meaning |
|---|---|
SearchAreaGoToHome |
The enemy will attempt to go home if it is outside of or cannot see its home nest or territory. |
SearchAreaRest |
Used when an enemy is not aware of the player yet. For sleeping bulborbs and the Man-At-Legs, this determines when they begin to wake up once a Pikmin or captain gets close enough. |
SearchAreaCaution |
Used when an enemy is already alerted to the presence of the player, usually giving increased awareness compared to SearchAreaRest.
|
SearchAreaOtakaraCarry |
The enemy's awareness of objects being carried nearby. Usually the highest search area for enemies so they can interrupt carrying routes. |
EatArea |
The distance and line of sight from which the enemy will attack. Increases to these values can often result in bulborb family members attacking when there are no Pikmin, but it will make Wollyhops jump much farther and Swooping Snitchbugs swoop toward Pikmin from farther distances. |
Territory |
The enemies total territory and home, which it will try to return to. Has an inner nest zone and an outer territory zone determined by TerritoryNestRatio.
|
Flick Parameters[edit]
| Parameter | Meaning |
|---|---|
MaxFlickNum |
How many Pikmin the enemy will shake off. By default this value is 50 when not specified and needs to have a new line added to FlickArg to change. This default is easiest to see on the Empress Bulbax (Queen), Porquillion (Hari), and Waddlepus (Awadako) when charged.
|
Item Drop Parameters[edit]
dropOption[edit]
In Pikmin 4, there are two ways enemies and objects will drop loot. Most enemies roll the chances for their drops individually independent of other loot in their drop list. This means you can give them multiple drops with multiple percent chances, and they will roll individually for each item and possibly drop multiple things. Eggs, Mitites, and Honeywisp, however, roll for one item and use their drops section as a cumulative table, meaning the percentages should add up to 100% and will only produce one result. This behavior occurs when dropOption is set to 1. To change that behavior to what most enemies use by default, change dropOption to 6.
Changing Drops Manually[edit]
For various reasons, you may want to change the default drops in an enemy's JSON file. The main reason you may want to do this is that creatures and eggs spawned in via ActorSpawners can't have their drops set and will use the defaults in their JSON. The Honeywisp, Iridescent Flint Beetle, Iridescent Glint Beetle, and Doodlebug ignore drops given to them in area spawns, and always use their default in their JSON. If you go into enemy JSON files to edit drops manually, you will notice a section like this:
"DropParameter": {
"DropItemParameter": [
{
"SpawnMiniInfo": {
"DropActor": {
"UnknownImport": "-6652779844111892794"
},
...
},
"UniqueId": 18446744073709551615,
"MinNum": 1,
"MaxNum": 2,
"DropRatio": 1.0,
"bRegistGenerator": false,
"DropConditions": []
}
],
...
"UnknownImport" correlates to specific items or objects being dropped. In this case, the number in this example will produce Raw Material. You can change how many of the item drop using "MinNum" and "MaxNum", either dropping a random amount between the two numbers, or producing the exact amount if you set both to the same number. "DropRatio" is the percent chance to drop the item as a decimal with 1.0 equaling 100%. For dropping multiple items at once, you would use something like the following:
"DropParameter": {
"DropItemParameter": [
{
"SpawnMiniInfo": {
"DropActor": {
"UnknownImport": "-4916160322636296702"
},
...
},
"UniqueId": 18446744073709551615,
"MinNum": 1,
"MaxNum": 1,
"DropRatio": 0.8,
"bRegistGenerator": false,
"DropConditions": []
},
{
"SpawnMiniInfo": {
"DropActor": {
"UnknownImport": "-4763302052886507494"
},
...
},
"UniqueId": 18446744073709551615,
"MinNum": 1,
"MaxNum": 1,
"DropRatio": 0.2,
"bRegistGenerator": false,
"DropConditions": []
},
],
...
This is the Mitite's default drops, with 1 nectar at 80% and 1 Ultra-Spicy Spray at 20%.
UnknownImport Table[edit]
Most importantly, here is a table with all the most useful drops:
| Item | UnknownImport |
|---|---|
| Raw Material | -6652779844111892794 |
| Nectar | -4916160322636296702 |
| Ultra-Spicy Spray | -4763302052886507494 |
| either ice blast or bomb rock (soon to be tested) | -7152833028850840769 |
| either ice blast or bomb rock (soon to be tested) | -5755297407425022786 |
| 1 Pellet | -7913393397111906650 |
| 5 Pellet | -9111098510939959663 |
| Mitite | -4725210440768732887 |
| Glow Pellet Pile | -4985278700699515859 |
| Unknown found in GHageDamagumo.json | -6636693793515779733 |