Dynamically changing player attributes during the match, and allowing the max value of abilities to be 127, which enables players to have higher abilities.
Config
dynamicPlayerAbilitiesInMatchClasses:
SpeedBooster:
icon:
file: test/scenes/icon.fmdl
color: FF6600FF # RGBA
lastFor: 10
abilities: [
{
speed: 30, # a value < 40 (or a negative value) means that the extra value is dynamically applied to the original ability of the target player
acceleration: 30
# ... abilities
}
]
TestShield:
icon:
file: 2222/scenes/icon.fmdl
color: fcc72dFF
lastFor: 10
resetStaminaTo: 90
ignoreLowStaminaLimitation: true
abilities: [
{
physicalContact: 127,
balance: 127,
stamina: 127,
defensiveAwareness: 127
# ... abilities
}
]
dynamicPlayerAbilitiesInMatchConditionGroups:
clutchPlayer:
minute99: # 分钟
skippable: true
abilities: [
{
speed: 1,
acceleration: 2
},
{
speed: 3,
acceleration: 4
# 不配置的属性 不做修改 保持原本的数值
},
]
minute30:
class: TestShield
penaltyKick:
class: TestShield
superMan:
minute1: # 分钟
class: SpeedBooster
lastFor: 30-60
allowedPlayerStatus: [3, 4]
skippable: true
freeKick:
class: TestShield
fieldGeneral:
playerActivation:
teammateStatus:
SS: 4
CF: 4
AMF: 4
ignoreLowStaminaLimitation: true
lastFor: 30-60
dynamicPlayerAbilitiesInMatch:
42575: # Player ID
conditionGroups: [fieldGeneral]
40352: # Player ID
conditionGroups: [clutchPlayer, superMan]
playerStatus0:
class: TestShield
lastFor: 10
leading1-2: # Range (random condition from 1 to 2) ,Leading by n, leading1 -> leading by one goal, leading2 -> leading by two goals
abilities: [
{
offensiveAwareness: 127, # value from 40 to 127
ballControl: 127,
dribbling: 127,
tightPossession: 127,
lowPass: 127,
loftedPass: 127,
finishing: 127,
heading: 127,
setPieceTaking: 127,
curl: 127,
speed: 127,
acceleration: 127,
kickingPower: 127,
jump: 127,
physicalContact: 127,
balance: 127,
stamina: 127,
defensiveAwareness: 127,
ballWinning: 127,
aggression: 127,
gkAwareness: 127,
gkCatching: 127,
gkClearing: 127,
gkReflexes: 127,
gkReach: 127,
nonDomLegUsage: 3, # from 0 to 3, 0 is value 1 in the game, 3 is value 4 in the game
nonDomLegPrecision: 3, # from 0 to 3
conditioning: 7, # from 0 to 7, 0 is value 1 in the game, 7 is value 8 in the game
injuryResistance: 2, # from 0 to 2
},
]
trailing1: # Trailing by n, trailing1 -> trailing by one goal, trailing2 -> trailing by two goals
lastFor: 10
abilities: [
{
offensiveAwareness: 60,
ballControl: 60,
# ... abilities
},
]
7511: # Player ID
minute10: # Minute
skippable: true
abilities: [
{
speed: 99,
acceleration: 99
# ... abilities
},
]
penaltyKick:
class: TestShield
freeKick:
class: SpeedBooster
key names start with minute followed by a minute number.
For example, minute1 refers to the first minute, minute20 refers to the 20th minute, and minute80 refers to the 80th minute, and so on.
playerStatus
key names start with playerStatus followed by a status id.
status: 0: ⬇️, 1: ↘️, 2: ➡️, 3: ↗️, 4: ⬆️
For example, playerStatus4 refers to the player's status being ⬆️.
This condition will be triggered if the player's status changes during the match. The initial player status will be used at the 10th minute of the match as the first change in status to attempt to trigger.
leading
key names start with leading followed by score number.
For example, leading1 refers to leading by one goal, leading2 refers to leading by two goals
trailing
key names start with trailing followed by score number.
For example, trailing1 refers to trailing by one goal, and trailing2 refers to trailing by two goals.
penaltyKick
key name equals to penaltyKick. This condition will be triggered during the penalty kick and reverts to the previous state after the penalty kick ends.
freeKick
key name equals to freeKick. This condition will be triggered during the free kick and reverts to the previous state after the free kick ends.
playerActivation
key name equals to playerActivation. This condition will be triggered once when a starting player enters the field or when a substitute player is brought onto the field.
Config Items
Config Key
Value
Description
abilities
Array (Optional)
Abilities, if there are multiple sets of abilities in the array, one will be randomly selected for use.
allowedPlayerStatus
Array (Optional)
Add a limitation with the player's status.
status: 0: ⬇️, 1: ↘️, 2: ➡️, 3: ↗️, 4: ⬆️
For example, [3, 4] refers to triggering the abilities only when the player's status is ↗️ or ⬆️.
class
String (Optional)
You can use a class to reuse config items.
conditionGroups
Array (Optional)
This allows you to reuse groups of condition configs.
icon
Object (Optional)
An icon appears above the player's head. If not set, nothing will be displayed.
ignoreLowStaminaLimitation
true/false (Optional)
The default value is false. If set to true, it will ignore the low stamina limitation.
lastFor
Number / Range (Optional)
Duration, which can be a fixed number like 10 to indicate lasting for 10 minutes, or a range like 10-30 to indicate a random duration between 10 and 30 minutes.
resetStaminaTo
Number (Optional)
It will reset the stamina to the specified value when the condition is met. Value from 0 to 100
skippable
true/false (Optional)
The default value is false. If set to true, it will randomly determine whether to skip this change.
teammateStatus
Object (Optional)
This allows you to set the status of teammates.
icon
Key
Value
Description
file
String
A fmdl file name. Base folder: /Asset/model/game2d/badge/, you only need to specify the file name, for example: test/scenes/icon.fmdl means /Asset/model/game2d/badge/test/scenes/icon.fmdl
color
Hex
RGBA color in Hex, for example: FF6600FF
abilities
Ability Item
Value Range
offensiveAwareness
Fixed: 40 to 127 , Dynamic: -87 to 39
ballControl
Fixed: 40 to 127 , Dynamic: -87 to 39
dribbling
Fixed: 40 to 127 , Dynamic: -87 to 39
tightPossession
Fixed: 40 to 127 , Dynamic: -87 to 39
lowPass
Fixed: 40 to 127 , Dynamic: -87 to 39
loftedPass
Fixed: 40 to 127 , Dynamic: -87 to 39
finishing
Fixed: 40 to 127 , Dynamic: -87 to 39
heading
Fixed: 40 to 127 , Dynamic: -87 to 39
setPieceTaking
Fixed: 40 to 127 , Dynamic: -87 to 39
curl
Fixed: 40 to 127 , Dynamic: -87 to 39
speed
Fixed: 40 to 127 , Dynamic: -87 to 39
acceleration
Fixed: 40 to 127 , Dynamic: -87 to 39
kickingPower
Fixed: 40 to 127 , Dynamic: -87 to 39
jump
Fixed: 40 to 127 , Dynamic: -87 to 39
physicalContact
Fixed: 40 to 127 , Dynamic: -87 to 39
balance
Fixed: 40 to 127 , Dynamic: -87 to 39
stamina
Fixed: 40 to 127 , Dynamic: -87 to 39
defensiveAwareness
Fixed: 40 to 127 , Dynamic: -87 to 39
ballWinning
Fixed: 40 to 127 , Dynamic: -87 to 39
aggression
Fixed: 40 to 127 , Dynamic: -87 to 39
gkAwareness
Fixed: 40 to 127 , Dynamic: -87 to 39
gkCatching
Fixed: 40 to 127 , Dynamic: -87 to 39
gkClearing
Fixed: 40 to 127 , Dynamic: -87 to 39
gkReflexes
Fixed: 40 to 127 , Dynamic: -87 to 39
gkReach
Fixed: 40 to 127 , Dynamic: -87 to 39
nonDomLegUsage
0 - 3, 0 is value 1 in the game, 3 is value 4 in the game
nonDomLegPrecision
0 - 3
conditioning
0 - 7, 0 is value 1 in the game, 7 is value 8 in the game
injuryResistance
0 - 2
class
You can use a class to reuse config items.
dynamicPlayerAbilitiesInMatchClasses:
SpeedBooster:
icon:
file: test/scenes/icon.fmdl
color: FF6600FF
lastFor: 10
ignoreLowStaminaLimitation: true
abilities: [
{
speed: 30,
acceleration: 30
}
]
dynamicPlayerAbilitiesInMatch:
40352:
minute1:
class: SpeedBooster # use a class
7511:
minute10: # Minute
class: SpeedBooster # use a class
skippable: true
ignoreLowStaminaLimitation: false # the configuration here will override the one in the class
abilities: [
{
ballControl: 127,
dribbling: 127
# the extra abilities here will be merged with the abilities in the class. (if there is already a same ability in the class, it will be overridden by the value here)
}
]
You can set all config items in a class in dynamicPlayerAbilitiesInMatchClasses. And use the class by its name in dynamicPlayerAbilitiesInMatch.
You can use the class while continuing to configure other items, and the final configuration will include the items in the class plus the additional items. Refer to the comments in the example configuration above for details.
conditionGroups
This allows you to reuse groups of condition configs.
dynamicPlayerAbilitiesInMatchConditionGroups:
clutchPlayer:
minute80:
class: SpeedBooster
penaltyKick:
class: TestShield
superMan:
minute1:
class: SpeedBooster
lastFor: 30-60
allowedPlayerStatus: [3, 4]
freeKick:
class: TestShield
dynamicPlayerAbilitiesInMatch:
40352: # 球员id
conditionGroups: [clutchPlayer, superMan] ## <<<< use condition groups
playerStatus0:
class: TestShield
lastFor: 10
## ... of course, you can add other conditions for the player here
You can have multiple condition groups in dynamicPlayerAbilitiesInMatchConditionGroups, and use them by their key in dynamicPlayerAbilitiesInMatch. You can also use classes in the condition groups.
teammateStatus
This allows you to set the status of teammates, when its condition is met.
dynamicPlayerAbilitiesInMatchConditionGroups:
fieldGeneral:
playerActivation:
teammateStatus: ## <<<<<<<<<<<<< you can also put this in a class like other items, it's up to you, I just put it here for example
SS: 4
CF: 4
AMF: 4
ignoreLowStaminaLimitation: true
lastFor: 30-60
dynamicPlayerAbilitiesInMatch:
42575: # Player ID
conditionGroups: [fieldGeneral]