Flexible Examples Show Why It Works, Spawn Score Mechanic For Custom Games or Mod Missions

@1942786 @ChuchaDrucha

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.

image

image

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.


@Enginya

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?

11 Likes

so… it’s not really historically accurate.

is it.

n-no.

he should be putted to berlin / ardenne / normandy.

( unless in a arcade custom game / mod )

beside, regarding the spawn core thingy, sure, as long it will remain only for mods or custom games.

that’s a good question, i think i could make use of it, but i fear it’s gonna backfire.

for example, as i’m trying to collab with another fellow modder, make tanks only obtainable through battlepoints, i’m not sure people would eventually like lose it right away because of some bomber or similar scenarios.

as generally, people that own stuff that wants to use it, last thing that they want, is that thing being limited.

6 Likes

It can be both historically accurate or relatively accurate

Set it to [999999] if you ban King Tiger completely in your mission

Set it to [10000] if you still allow rare occurrences of King Tiger.

Historically accurate scenarios, like a tiger tank captured by a t70 opponent in a swamp in Leningrad, your enemies still have a chance against rare and powerful opponents. And they are not spam.


Unless they can figure out how to shape “rare occurrences” in the interface.

Otherwise, you only have two options: prohibit and allow, and you cannot create all the above scenarios.

If you banned tigers entirely, how do you allow players to deploy a rare tiger?


If you don’t like being restricted then you are even less likely to accept being banned, because being banned means you are completely unusable. Because stuff from your profile disappeared from the game.

If players can accept bans things, then they are more likely to accept rare occurrences,

ban stuff is completely unacceptable to me,

I would rather take all the things I have and conditionly deploy them, Also I don’t like spam


2 Likes

but it’s going to be much easier to ban it from the interfece that devs are working and will release though.

instead of having to tweak the blk.

usually, the less you have to tweak through a notepad, the better is.
( primarely because it’s time consuming as you have to open the thingy everytime, restart to check if it works, etc. which it’s somewhate the same, but saves you time in opening the blk each time and having to find the thing. even if cltr f is a thing )
( perhaps a long way before that… )

i’m surprised the score system wasn’t added as a feature for the editor if i’m being honest.

4 Likes

@ErikaKalkbrenner why are you so critical about more optional ways on how to play customs? He didn’t suggest to use it in random queues.

If you don’t want to play, you can just easily ignore it.

1 Like

i am well aware, and in no point i even mentioned random queues.

so… that’s on you pal.

1 Like

That’s nice and all, but you didn’t even bother to answer my question.

And I never said you did mention it, so… :man_shrugging: It was complement to my previous question. Not relevant on its own.

not sure what do you mean that.

it could means alot and depending the context ( if you would elaborate ) could have several answers depending again, on what you mean.

by that.

adempe thinks you refuse to support adding more options in the editor for make costum maps

:point_up:

Tldr: non ha letto una mazza del tuo post dopo le prima due rige, se fermato al

2 Likes

why am i not surprised. ( if that’s actually the case. )

giving the benefict of the doubt, but i know better.

cerco di essere pacifica, ma non credo di resistere per molto.
specialmente se consideriamo l’individuo in questione ed il suo passato…

( mi dissocio da ogni violenza, btw. ma c’è un mah )

2 Likes

This suggestion is still in active.

I’ve noticed some players on the forums are starting to come up with crappy ways to try to nerf and limit weapon usage again.

1 Like