Incorrect description for modifying the BatchTimeModifier #6755

Open
opened 2023-03-07 19:51:53 +00:00 by Langbart · 2 comments
Langbart commented 2023-03-07 19:51:53 +00:00

to reproduce

  • start a game with Athens
  • build a barracks and look at the time it takes to train Hoplites in different batches
  • research Conscription ![]source:ps/trunk/binaries/data/mods/public/art/textures/ui/session/portraits/technologies/fist_spear_fire.png@27570 and look at the time it takes to train Hoplites again
{
	"genericName": "Conscription",
	"description": "Significantly increase training speed of infantry by training them in large batches or companies.",
	"cost": {
		"food": 500
	},
	"requirements": {
		"all": [
			{ "tech": "phase_city" },
			{ "notciv": "pers" }
		]
	},
	"requirementsTooltip": "Unlocked in City Phase.",
	"icon": "ist_spear_fire.pngf",
	"researchTime": 40,
	"tooltip": "Barracks −10% batch training time.",
	"modifications": [
		{ "value": "Trainer/BatchTimeModifier", "add": -0.1 }
	],
	"affects": ["Barracks"],
	"soundComplete": "interface/alarm/alarm_upgradearmory.xml"
}
Batch size Normal Time\ (in seconds) Conscription Time\ (in seconds) % Change
5 37 31 -16.22%
10 64 51 -20.3%
15 88 67 -23.86%
20 110 82 -25.45%

A reduction of 0.1 will not result in a 10% reduction in batch time.
It will always depend on the batch size, thus any description claiming a constant percentage reduction is incorrect.

Batch Training Time = costBuildTime * batchSize^batchTimeModifier^

Changing the Cost Build Time\
Batch Training Time change = newCostBuildTime/oldCostBuildTime -1\\

Changing the Batch Time Modifier\
Batch Training Time change = batchSize^newBatchTimeModifier - oldBatchTimeModifier^ -1

affected files:

  • .json
  • [barracks_batch_training.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/barracks_batch_training.json@27570 added with [13400]
  • [stable_batch_training.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/stable_batch_training.json@27570 added with [13407]
  • [phase_city_pers.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/phase_city_pers.json@27570 added with [26996]
  • [phase_town_pers.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/phase_town_pers.json@27570 added with [26996]
  • .xml
  • [civil_centre_court.xml]source:ps/trunk/binaries/data/mods/public/simulation/templates/structures/han/civil_centre_court.xml@27570 added with [26634]
  • batch time modifier was halved
  • batch size x would lead to a Batch Training Time change of: x^0.4-0.8^-1
    - batch size 16 = -67%
    - batch size 32 = -75%
    - batch size 64 = -81%
    - ...

possible solution (1)

  • Adapt description to vaguely describe that there is a reduction
  • it must be short and precise, no long, overly complex, compound sentences

possible solution (2)

  • modify Cost/BuildTime instead of Trainer/BatchTimeModifier
	"modifications": [
		{ "value": "Cost/BuildTime", "multiply": 0.9 },
- vaguely reported in the forum by `wang_wei_2` - [Incredibly fast training times](https://wildfiregames.com/forum/topic/106426-incredibly-fast-training-times/) (3/Mar/23) #### to reproduce - start a game with `Athens` - build a barracks and look at the time it takes to train `Hoplites` in different batches - research `Conscription` ![]source:ps/trunk/binaries/data/mods/public/art/textures/ui/session/portraits/technologies/fist_spear_fire.png@27570 and look at the time it takes to train `Hoplites` again ```#!json lineno 1 marks=16 { "genericName": "Conscription", "description": "Significantly increase training speed of infantry by training them in large batches or companies.", "cost": { "food": 500 }, "requirements": { "all": [ { "tech": "phase_city" }, { "notciv": "pers" } ] }, "requirementsTooltip": "Unlocked in City Phase.", "icon": "ist_spear_fire.pngf", "researchTime": 40, "tooltip": "Barracks −10% batch training time.", "modifications": [ { "value": "Trainer/BatchTimeModifier", "add": -0.1 } ], "affects": ["Barracks"], "soundComplete": "interface/alarm/alarm_upgradearmory.xml" } ``` <div align="center" style="background: #F5DDDC; border: 2px solid #C0392C; width: 500px; margin: auto"> | | | | | |---|---|---|---| | **Batch size** | **Normal Time**\\ (in seconds) | **Conscription Time**\\ (in seconds) | **% Change** | | 5 | 37 | 31 | -16.22% | | 10 | 64 | 51 | -20.3% | | 15 | 88 | 67 | -23.86% | | 20 | 110 | 82 | -25.45% | </div> A reduction of `0.1` will not result in a 10% reduction in batch time. It will always depend on the batch size, thus any description claiming a constant percentage reduction is incorrect. <div style="padding:1px 1px 1px 10px; background: #DBEAF3; border-left: 5px solid #2980B9"> **Batch Training Time** = costBuildTime * batchSize^batchTimeModifier^ *Changing the Cost Build Time*\\ **Batch Training Time change** = newCostBuildTime/oldCostBuildTime -1\\\\ *Changing the Batch Time Modifier*\\ **Batch Training Time change** = batchSize^newBatchTimeModifier - oldBatchTimeModifier^ -1 </div> - `BatchTimeFactor` was added with [12877] - renamed to `BatchTimeModifier` in [12883] - see <https://gitea.itms.ovh/wfg/0ad/issues/1717#issuecomment-223316> by `zoot` - the name change was done to better clarify that it is an exponent #### affected files: - `.json` - [barracks_batch_training.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/barracks_batch_training.json@27570 added with [13400] - [stable_batch_training.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/stable_batch_training.json@27570 added with [13407] - [phase_city_pers.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/phase_city_pers.json@27570 added with [26996] - [phase_town_pers.json]source:ps/trunk/binaries/data/mods/public/simulation/data/technologies/phase_town_pers.json@27570 added with [26996] - `.xml` - [civil_centre_court.xml]source:ps/trunk/binaries/data/mods/public/simulation/templates/structures/han/civil_centre_court.xml@27570 added with [26634] - batch time modifier was halved - batch size x would lead to a Batch Training Time change of: x^0.4-0.8^-1 - batch size 16 = -67% - batch size 32 = -75% - batch size 64 = -81% - ... #### possible solution (1) - Adapt description to vaguely describe that there is a reduction - it must be short and precise, no long, overly complex, compound sentences #### possible solution (2) - modify `Cost/BuildTime` instead of `Trainer/BatchTimeModifier` ```#!json "modifications": [ { "value": "Cost/BuildTime", "multiply": 0.9 }, ```
TracUser added the
Theme
UI & Simulation
Priority
3: Should Have
Type
Defect
labels 2023-03-07 19:51:53 +00:00
TracUser added this to the Alpha 27 milestone 2023-03-07 19:51:53 +00:00

See e94003fd2c

[Gameplay] - Adjust batch modifier from upgraded Han CC

Reported on the Forums: https://wildfiregames.com/forum/topic/106426-incredibly-fast-training-times/

Solution: Use half the current value (for now)

Refs: #6755 because of the description

accepted by: no one, but there seemed to be a general agreement that a reduction would be ok.

Differential Revision: https://code.wildfiregames.com/D4961
See e94003fd2cf834168fd5850192433c000f3b68e4 ``` [Gameplay] - Adjust batch modifier from upgraded Han CC Reported on the Forums: https://wildfiregames.com/forum/topic/106426-incredibly-fast-training-times/ Solution: Use half the current value (for now) Refs: #6755 because of the description accepted by: no one, but there seemed to be a general agreement that a reduction would be ok. Differential Revision: https://code.wildfiregames.com/D4961 ```

costBuildTime * batchSize^Modifier,,Building,, + Modifier,,Tech0,, + Modifier,,Tech1,,^

can also be expressed like this:

costBuiltTime * batchSize^Modifier,,Building,,^ * batchSize^Modifier,,Tech0,,^ * batchSize^Modifier,,Tech1,,^

Then the description of the tech would only had to talk about it's factor: `Changes the training time by a factor of batchSize^-0,1.` or `Devides the training time by batchSize^0,1.`

A tech which does multiply (only the Han CC) can't be represented in this notion.

<div style="font-size: 80%"> costBuildTime * batchSize^Modifier,,Building,, + Modifier,,Tech0,, + Modifier,,Tech1,,^ </div> can also be expressed like this: <div style="font-size: 80%"> costBuiltTime * batchSize^Modifier,,Building,,^ * batchSize^Modifier,,Tech0,,^ * batchSize^Modifier,,Tech1,,^ </div> Then the description of the tech would only had to talk about it's factor: `Changes the training time by a factor of batchSize^-0,1.` or `Devides the training time by batchSize^0,1.` A tech which does multiply (only the Han CC) can't be represented in this notion.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: wfg/0ad#6755
No description provided.