Thanks to the devs for making a prototype respawn score mechanic in mech mode, though it’s still not available in the editor for custom mods.
The current configuration method is based on a fixed order, which cannot reliably and accurately configure the player’s own squad.
But he still brought a unique idea from the development team. The rebirth score changes with the number of deployments, which means that more rules can be made through this score mechanism.
We can see that the score is configured through an array, [100, 200, 300]
, the order of the array represents the number of points the player needs to spend on deployment times, and the last number will mean that all subsequent deployments will be Use the same value.
What can he do with this mechanism? Please see the example below.
Cases for existed spawnCostPerSpawnPersonalScore parameter |
Intention |
---|---|
[0] or [0, 0, 0] (just mean the same) |
This is a favorite of arcade players, which means there are no restrictions on deployment and you can send anything. This combination is compatible with player preference against personal spawn cost, it’s just the default value for arcade mode. |
[100, 200, 300] |
Spawn costs increase gradually, this is how it is done in mech mode and WarThunder |
[300, 200, 100, 0] |
As a mirror image, reduce it step by step, even down to 0, which means no need for any spawn cost finally |
[0, 1000, 0] |
The first deployment is free, then you need to accumulate 1000 points to continue deploying, finally free without costs |
[1000] |
Cost scores every deployment for some powerful weapons |
[0, 600, 0, 0, 600, 0, 0, 200] |
I this can be a point form for a medium tank in Kursk Field, he costs 600 scores for every 3 units. |
[0, 50] |
You can deploy a small tank or scout vehicle at the game start, it’s always cheap, and first deployment is free cost 0. Your small tanks now have a numerical advantage over larger tanks. |
[0, 0, 0, 0, 999999] |
Only able spawn some vehicle 4 times in your mission. A limited limit on the number of vehicles, which is very common in community mods. |
[0, 3, 2, 1, 999999] |
Same to previous one. And You can use simple spawn cost numbers as tips as a countdown counter |
[999999] |
Ban something you don’t want to appear in your mission, For eample ban king tiger in your early moscow mission. |
… |
He has too many scenarios and examples able to list.
The respawn score serves as a basic skeleton, and you don’t have to imagine it to be the same as War Thunder’s implementation. The purpose of this mechanic is not to prohibit players from using things.
Shaping rules in terms of fractions is the most commonly used tool. It works so it’s commonly used.
In CRSED it is called Soul Score, in War Thunder it is called Spawn Score, in card games it is some named numbers that each card needs to consume to use, in RTS games it is the resource deployed by each unit, he can It is a combination of multiple points or a single point.
The score can increase over time, so the score condition becomes a different cooldown time for each unit, and units with different combat power need shorter or longer cooldown times.
For example, set a timer so that players get 100 points every minute while waiting for the deployment interface, so that each player can deploy something after waiting for a period of time. Then it won’t create an undeployable situation like War Thunder.
Rules are shaped by the number of points, encouraging and allowing players to use more things in battle, each player can have their own unique combination.
You can go with powerful infantry weapons and light tanks, or some normal infantry with a powerful heavy tank, or you can choose the most powerful 8 flamethrower squads and put them in your slots queue, but you will spend more Many scores to deploy and waiting time.
To shape the rules for your custom mission, you only need to think about two things.
How do players get scores?
What do players do that consume scores?
By answering these two questions, there are countless rules of the game.
More game rules can emerge from your custom mod games.
And such spwn score cost configuration should be applied to the player’s own squads! Instead of preset squads with custom_profile
.
Because the preset squads define by custom_profile
is just not something I have accumulated in the game, so he is not sticky to me.
I’m perfer to use squads from players’ own profile, they’re set up by each player, with unique weapon combinations and different outlooks. Even premium squads and vehicles that players pay for.
The custom_profile
preset squads go against the above player’s expectations of using their stuff. You shouldn’t ban players from using their own stuff.
But allowing players to use does not mean allowing players to abuse any spam.
Score configs should be designed so that respawn scores can be set for each vehicle, per infantry, primary or secondary weapon. It can be a simple blk or json based configuration.
Based on the prototype rebirth score mechanism that the development team has produced. This should be a the expected feature to be implemt.
1. Expected configuration format proposal: (via entity in .blk
syntax)
spawnCostConfig{
spawnScoreGainPerMinute:r=20.0 // evey minute in game play gains 20 scores
"spawnCostConfig:tag"{}
"defaultSpawnCost:array"{
score:i=0
}
"spawnCostForVehicle:object"{
// [0, 500, 0, 0, 200]
"ussr_t_34_1941_moscow:array"{
score:i=0
score:i=500
score:i=0
score:i=0
score:i=200
}
// [0, 1000, 800]
"germ_pzkpfw_VI_ausf_E_tiger_normandy:array"{
score:i=0
score:i=1000
score:i=800
}
}
"spawnCostForWeapons:object"{
"mosin_m91_gun:array"{
score:i=0
}
"svt_40_gun:array"{
score:i=10
}
"mauser_98k_gun:array"{
score:i=0
}
"gewehr_43_gun:array"{
score:i=10
}
}
}
You can also design to use the form of json, I think json is easier to express
{
"spawnCostForVehicle": {
"ussr_t_34_1941_moscow": [0, 500, 0, 0, 200],
"germ_pzkpfw_VI_ausf_E_tiger_normandy": [0, 1000, 500]
},
"spawnCostForWeapons": {
"mosin_m91_gun": [0],
"svt_40_gun": [0, 10],
"mauser_98k_gun": [0],
"gewehr_43_gun": [0, 10]
}
}
2. JavaScript-style pseudocode for implement (Wish its able to read and understand).
checkout the pseudocode to implemnt
function patch_squads_score_prices(
evt,
armies,
army,
respawner__scorePricePerSquad,
respawner__scorePricePerSquadPerSpawn
) {
const squads = Array.from(armies[army]?.squads);
query(
{ es_REQUIRE: "spawnCostConfig" },
(defaultSpawnCost,
spawnCostForVehicle,
spawnCostForWeapons) =>
{
for ((index, squad) of squads) {
let squadSpawnCostBase = Array.ensure(defaultSpawnCost) || [0]
// add scores by vehicle template names of squad
if (squad.curVehicle?.gametemplate) {
const vehicleSpawnCost = spawnCostForVehicle[squad.curVehicle?.gametemplate] || [0];
// patch vehicle costs to base squad spawn cost
squadSpawnCostBase = sumToArray(squadSpawnCostBase, vehicleSpawnCost);
}
for (const squadMember of squad.squad) {
// pick each template names of weapons in human_weap__weapTemplates
//
// "human_weap__weapTemplates" : {
// "grenade" : "grenade_thrower",
// "melee" : "ger_knife_weapon",
// "primary" : "gewehr_43_gun",
// "secondary" : "rpzb_43_ofenrohr_gun",
// "tertiary" : ""
// }
//
// "gewehr_43_gun" "rpzb_43_ofenrohr_gun" etc.
for (const [_, weap] of Object.entries(squadMember.human_weap__weapTemplates)) {
const weapCost = spawnCostForWeapons[weap] || [0]
// patch weapon costs to base squad spawn cost
squadSpawnCostBase = sumToArray(squadSpawnCostBase, weapCost);
}
}
respawner__scorePricePerSquadPerSpawn[index] = squadSpawnCostBase
}
var firstSpawnPrice = 0
firstSpawnPrice = respawner__scorePricePerSquadPerSpawn?[0] ?? firstSpawnPrice;
respawner__scorePricePerSquad.push(firstSpawnPrice)
}
);
}
// combine two arrays into one by sum up their values of the same index
// sumToArray([1, 2, 3], [2, 3, 4]) => [3, 5, 7] // [1+2, 2+3, 3+4]
// sumToArray([1, 2, 3], [2, 3]) => [3, 5, 3] // [1+2, 2+3, 3+0]
function sumToArray(base, patch) {
if (base.length > array.length) {
return base.map((value, i) => {
return value + (patch[i] || 0)
})
}
return patch.map((value, i) => {
return value + (base[i] || 0)
});
}
When the player is engaged in any mod or historical accuracy or historical atmosphere battle in the custom room.
For example a historically accurate Battle of Kursk. Without such a tool, how could we express more of a T-34 against a handful of Tiger and Panther tanks on the Kursk stage?
At the same time I don’t think any weapons should be banned from joining the battle, players can bring anything they own into the mission.
If a player brings Tiger King into the early battles of Moscow, I think the appropriate game rules should make this Tiger King very verty not easy to appear, rather than ban players from entering the game.
Discuss if you have a better idea.
Can your idea take into account the scenarios in the above example for all kinds of mod games?
More importantly, is your idea as easy to implement in code as the existed spawn cost mechanism that the development team has already close to complete?