Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

return old precisions (3.1 branch) #387

Merged
merged 4 commits into from Jun 17, 2019

Conversation

@maxsupermanhd
Copy link
Contributor

commented Jun 14, 2019

No description provided.

fallback shortRange longRange shortHit and longHit to 3.1 branch (als…
…o add some other weapons (from old weapons.txt))
"waterGfx": "FXSSplsh.PIE",
"weaponClass": "KINETIC",
"weaponEffect": "ANTI PERSONNEL",
"weaponSubClass": "MACHINE GUN",
"weaponWav": "mgbar3.ogg",
"weight": 1
},

This comment has been minimized.

Copy link
@Forgon2100

Forgon2100 Jun 15, 2019

Contributor

This line should be left out.

This comment has been minimized.

Copy link
@maxsupermanhd

maxsupermanhd Jun 15, 2019

Author Contributor

Ok

"waterGfx": "FXSSplsh.PIE",
"weaponClass": "KINETIC",
"weaponEffect": "ANTI PERSONNEL",
"weaponSubClass": "MACHINE GUN",
"weaponWav": "mgbar3.ogg",
"weight": 1
},
"TUTMG": {
"shortRange": 512,

This comment has been minimized.

Copy link
@Forgon2100

Forgon2100 Jun 15, 2019

Contributor

Do not include these incomplete entries for obsolete weapons.

This comment has been minimized.

Copy link
@maxsupermanhd

maxsupermanhd Jun 15, 2019

Author Contributor

Oh ok. I can remove this.

@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

Range orders were removed in 64d8d40
and shortly after, CSV files containing old ranges were converted to INI
format in 376c8c6.
Thus, it is correct to use the old weapons.txt file to restore the range
values. To retrieve these old values, I executed

git show 376c8c65fcc33eb31541a971e6c8b7e9c2013f~1:data/mp/stats/weapons.txt \
| cut -d , -f 1,17-20 > old_weapon_ranges.csv

To compare them with the new values of this PR, I created a CSV out of
the range values in the current weapons.json file:

head -n 1 old_weapon_ranges.csv > new_weapon_ranges.csv

jq '.[] | [.id,.shortRange,.longRange,.shortHit,.longHit] | @csv' \
data/mp/stats/weapons.json | tr -d '\\"' >> new_weapon_ranges.csv

When both files are sorted, they can be easily compared with comm:

for f in old new
do
  sort ${f}_weapon_ranges.csv > ${f}_weapon_ranges_sorted.csv
done

comm -3 old_weapon_ranges_sorted.csv new_weapon_ranges_sorted.csv \
> range_differences.comm

The differences between old and new range stats, as shown by comm:

CommandTurret2,1792,1792,100,100
CommandTurret3,2048,2048,100,100
CommandTurret4,2304,2304,100,100
Howitzer105Mk1,1920,4992,40,50
	Howitzer105Mk1,1920,5120,40,50
	Howitzer150Mk1,1920,8192,40,50
Howitzer150Mk1,1920,9984,40,50
NEXUSlink,512,896,99,100
NX-CyborgChaingun,512,768,70,50
NX-CyborgMiss,640,2048,70,80
NX-CyborgPulseLas,768,1536,80,65
NX-Cyb-Rail1,768,1536,80,70
Superweapon2,256,11008,99,90
Superweapon,512,768,99,90
TUTMG,512,768,75,50

The differences in the longRange values of Howitzer and Ground Shaker
are caused by cb407b5, and correct.
Therefore, I approve this pull request.

@Forgon2100
Copy link
Contributor

left a comment

As an enhancement, you could merge the second commit into the first one.

@maxsupermanhd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

But in master orders was restored in 733b5d8. As somebody said in our community its not working bc of this file.

@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

But in master orders was restored in 733b5d8. As somebody said in our community its not working bc of this file.

Not sure whether you misunderstood something.
I agree with your changes.

@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

A few weapons have the same accuracies with different ranges.

  • Stormbringer AA Laser
  • VTOL Hyper Velocity Cannon
  • Hyper Velocity Cannon
  • Super HPV Cyborg
  • Laser Satellite Command Post
  • Plasma Cannon
  • Nexus Link Turret

This is inconsistent with all the other weapons. Perhap we should also warn about this situation when loading the weapon stats.

@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

A few weapons have the same accuracies with different ranges.

* Stormbringer AA Laser

* VTOL Hyper Velocity Cannon

* Hyper Velocity Cannon

* Super HPV Cyborg

* Laser Satellite Command Post

* Plasma Cannon

* Nexus Link Turret

This is inconsistent with all the other weapons. Perhap we should also warn about this situation when loading the weapon stats.

I doubt that many users would notice that warning.
Do you have a proposal for better stats?

Running awk -F , '$4==$5' new_weapon_ranges.csv shows many weapons
with the same accuracy at different ranges, not just those you listed:

AAGunLaser,768,2048,80,80
Bomb1-VTOL-LtHE,384,384,80,80
Bomb2-VTOL-HvHE,384,384,80,80
Bomb3-VTOL-LtINC,384,384,80,80
Bomb4-VTOL-HvyINC,384,384,80,80
Bomb5-VTOL-Plasmite,384,384,80,80
Bomb6-VTOL-EMP,384,384,80,80
Cannon4AUTO-VTOL,768,1280,65,65
Cannon4AUTOMk1,768,1280,65,65
CommandTurret1,1536,1536,100,100
Cyb-Hvywpn-HPV,758,1152,65,65
Cyb-Hvywpn-PulseLsr,1792,1792,80,80
Cyb-Wpn-Laser,1536,1536,80,80
HeavyLaser,2048,2048,80,80
HeavyLaser-VTOL,2048,2048,80,80
LasSat,640,23040,100,100
Laser2PULSE-VTOL,1792,1792,80,80
Laser2PULSEMk1,1792,1792,80,80
Laser3BEAM-VTOL,1536,1536,80,80
Laser3BEAMMk1,1536,1536,80,80
Laser4-PlasmaCannon,960,1280,65,65
SpyTurret01,256,1536,100,100
ZNULLWEAPON,0,0,0,0
@maxsupermanhd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 15, 2019

No. Only this patched with 3.1 long/short values. Can make some changes but need to test that all. Ill talk with Vaut about that.

@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

No. Only this patched with 3.1 long/short values. Can make some changes but need to test that all. Ill talk with Vaut about that.

Thank you. It would be good to get some opinions of experienced players.

My personal preference is to have consistent behavior, so that a player
can estimate the effects of using different weapon ranges without doing
a lot of mental calculation.

@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2019

Ah, sorry for the confusion. I left out an important part. The weapons I listed have a constant accuracy, but have different ranges. This could make players think those weapons have a better accuracy at a certain range.

For example, all the lasers, except the StormBringer, have no range or accuracy differences. The StormBringer has different ranges which suggests it has better accuracy at a certain range.

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 16, 2019
Fix range and accuracy stats of MP weapons
* avoid identical accuracy values for different ranges
* try to make similar weapons behave consistently, e.g. all cannons
  should be more accurate at short ranges than at long ranges

Stormbringer AA Laser should not have ranges, like other lasers:
* shortRange: 768 -> 2048

HPV cannons receive the accuracy stats of the similar assault cannons:

Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Super HPV Cyborg
* shortHit: 65 -> 60
* longHit: 65 -> 50

VTOL Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Plasma cannons require the Hyper Velocity Cannon in the research tree,
therefore they, too, receive the accuracy stats of assault cannons:

Plasma Cannon
shortHit: 65 -> 60
longHit: 65 -> 50

*Heavy Plasma Launcher*
shortHit: 40, 60,
longHit: 99, 50

Nexus Link Turret should not have ranges, like the Command Turret:
* shortRange: 256 -> 1536

VTOL Mini-Rocket should be at least as accurate as the Mini-Rocket Pod,
but with a bonus, similar to other VTOL weapons:
* longHit: 30 -> 60

The scanvengers' mini-rocket weapons (a gun and a pillbox) receive the
accuracy stats of the Mini-Rocket Pod:

*BabaRocket*:
* longHit: 20 -> 45
* shortHit: 30 -> 40

*Baba Rocket Pit Launcher*
* longHit: 30 -> 45
* shortHit: 60 -> 40

*AT Rocket Pit* is a scavengers' pillbox with a lancer and receives the
accuracy stats of the Lancer:
* longHit: 30 -> 60
* shortHit: 50 -> 30

Fixes Warzone2100#387
@Forgon2100

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

Ah, sorry for the confusion. I left out an important part. The weapons I listed have a constant accuracy, but have different ranges. This could make players think those weapons have a better accuracy at a certain range.

For example, all the lasers, except the StormBringer, have no range or accuracy differences. The StormBringer has different ranges which suggests it has better accuracy at a certain range.

Indeed.
When running awk -F , '$2!=$3 && $4==$5' new_weapon_ranges.csv, I get
the same list as you:

AAGunLaser,768,2048,80,80
Cannon4AUTO-VTOL,768,1280,65,65
Cannon4AUTOMk1,768,1280,65,65
Cyb-Hvywpn-HPV,758,1152,65,65
LasSat,640,23040,100,100
Laser4-PlasmaCannon,960,1280,65,65
SpyTurret01,256,1536,100,100

However, it should also be checked whether short or long ranges are more
accurate while similar weapons show the opposite behavior.

PR #1 in maxsupermanhd's repository contains a proposal for new stats.

Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 16, 2019
Fix range and accuracy stats of MP weapons
* avoid identical accuracy values for different ranges
* try to make similar weapons behave consistently, e.g. all cannons
  should be more accurate at short ranges than at long ranges

Stormbringer AA Laser should not have ranges, like other lasers:
* shortRange: 768 -> 2048

HPV cannons receive the accuracy stats of the similar assault cannons:

Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Super HPV Cyborg
* shortHit: 65 -> 60
* longHit: 65 -> 50

VTOL Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Plasma cannons require the Hyper Velocity Cannon in the research tree,
therefore they, too, receive the accuracy stats of assault cannons:

Plasma Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

*Heavy Plasma Launcher*
* shortHit: 40, 60,
* longHit: 99, 50

Nexus Link Turret should not have ranges, like the Command Turret:
* shortRange: 256 -> 1536

VTOL Mini-Rocket should be at least as accurate as the Mini-Rocket Pod,
but with a bonus, similar to other VTOL weapons:
* longHit: 30 -> 60

The scanvengers' mini-rocket weapons (a gun and a pillbox) receive the
accuracy stats of the Mini-Rocket Pod:

*BabaRocket*:
* longHit: 20 -> 45
* shortHit: 30 -> 40

*Baba Rocket Pit Launcher*
* longHit: 30 -> 45
* shortHit: 60 -> 40

*AT Rocket Pit* is a scavengers' pillbox with a lancer and receives the
accuracy stats of the Lancer:
* longHit: 30 -> 60
* shortHit: 50 -> 30

Fixes Warzone2100#387
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 16, 2019
Fix range and accuracy stats of MP weapons
* avoid identical accuracy values for different ranges
* try to make similar weapons behave consistently, e.g. all cannons
  should be more accurate at short ranges than at long ranges

Stormbringer AA Laser should not have ranges, like other lasers:
* shortRange: 768 -> 2048

HPV cannons receive the accuracy stats of the similar assault cannons:

Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Super HPV Cyborg
* shortHit: 65 -> 60
* longHit: 65 -> 50

VTOL Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Plasma cannons require the Hyper Velocity Cannon in the research tree,
therefore they, too, receive the accuracy stats of assault cannons:

Plasma Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

*Heavy Plasma Launcher*
* shortHit: 40 -> 60
* longHit: 99 -> 50

Nexus Link Turret should not have ranges, like the Command Turret:
* shortRange: 256 -> 1536

VTOL Mini-Rocket should be at least as accurate as the Mini-Rocket Pod,
but with a bonus, similar to other VTOL weapons:
* longHit: 30 -> 60

The scanvengers' mini-rocket weapons (a gun and a pillbox) receive the
accuracy stats of the Mini-Rocket Pod:

*BabaRocket*:
* longHit: 20 -> 45
* shortHit: 30 -> 40

*Baba Rocket Pit Launcher*
* longHit: 30 -> 45
* shortHit: 60 -> 40

*AT Rocket Pit* is a scavengers' pillbox with a lancer and receives the
accuracy stats of the Lancer:
* longHit: 30 -> 60
* shortHit: 50 -> 30

Fixes Warzone2100#387
Forgon2100 added a commit to Forgon2100/warzone2100 that referenced this pull request Jun 16, 2019
Fix range and accuracy stats of MP weapons
* avoid identical accuracy values for different ranges
* try to make similar weapons behave consistently, e.g. all cannons
  should be more accurate at short ranges than at long ranges

Stormbringer AA Laser should not have ranges, like other lasers:
* shortRange: 768 -> 2048

HPV cannons receive the accuracy stats of the similar assault cannons:

Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Super HPV Cyborg
* shortHit: 65 -> 60
* longHit: 65 -> 50

VTOL Hyper Velocity Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

Plasma cannons require the Hyper Velocity Cannon in the research tree,
therefore they, too, receive the accuracy stats of assault cannons:

Plasma Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

*Heavy Plasma Launcher*
* shortHit: 40 -> 60
* longHit: 99 -> 50

Nexus Link Turret should not have ranges, like the Command Turret:
* shortRange: 256 -> 1536

VTOL Mini-Rocket should be at least as accurate as the Mini-Rocket Pod,
but with a bonus, similar to other VTOL weapons:
* longHit: 30 -> 60

The scanvengers' mini-rocket weapons (a gun and a pillbox) receive the
accuracy stats of the Mini-Rocket Pod:

*BabaRocket*
* longHit: 20 -> 45
* shortHit: 30 -> 40

*Baba Rocket Pit Launcher*
* longHit: 30 -> 45
* shortHit: 60 -> 40

*AT Rocket Pit* is a scavengers' pillbox with a lancer and receives the
accuracy stats of the Lancer:
* longHit: 30 -> 60
* shortHit: 50 -> 30

Fixes Warzone2100#387
@vaut

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

The balance in 3.1.5 version was created for many years with small edits. HV gun has such accuracy is not accidental. This parameter has been tested by thousands of games.

Maybe a decrease in accuracy will improve the game, but it can also make the whole cannon branch too weak. In the 3.1.5 version, a delicate balance between missiles and cannons was achieved. Although the guns were probably a little bit weaker, it was possible to defeat equal opponents.

After fixing the bug with mod loading, we can relatively easily test the new balance. I am for keeping the balance from 3.1.5 unchanged.

vaut and others added 2 commits Jun 16, 2019
Fix range and accuracy stats of MP weapons
Modified patch from Forgon2100.
The characteristics of the HW are no longer changing.

Fix range and accuracy stats of MP weapons

* avoid identical accuracy values for different ranges


Stormbringer AA Laser should not have ranges, like other lasers:
* shortRange: 768 -> 2048

HPV cannons should not have ranges:

Hyper Velocity Cannon
* shortRange: 768 -> 1280

Super HPV Cyborg
* shortRange: 758 -> 1152

VTOL Hyper Velocity Cannon
* shortRange:  768 -> 1280

Plasma cannons require the Hyper Velocity Cannon in the research tree,
therefore they, too, receive the accuracy stats of assault cannons:

Plasma Cannon
* shortHit: 65 -> 60
* longHit: 65 -> 50

*Heavy Plasma Launcher*
* shortHit: 40 -> 60
* longHit: 99 -> 50

Nexus Link Turret should not have ranges, like the Command Turret:
* shortRange: 256 -> 1536

VTOL Mini-Rocket should be at least as accurate as the Mini-Rocket Pod,
but with a bonus, similar to other VTOL weapons:
* longHit: 30 -> 60

The scanvengers' mini-rocket weapons (a gun and a pillbox) receive the
accuracy stats of the Mini-Rocket Pod:

*BabaRocket*
* longHit: 20 -> 45
* shortHit: 30 -> 40

*Baba Rocket Pit Launcher*
* longHit: 30 -> 45
* shortHit: 60 -> 40

*AT Rocket Pit* is a scavengers' pillbox with a lancer and receives the
accuracy stats of the Lancer:
* longHit: 30 -> 60
* shortHit: 50 -> 30
Merge pull request #2 from vaut/patch-1
Fix range and accuracy stats of MP weapons
@maxsupermanhd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2019

And + patch from Forgon2100 except HPV

@KJeff01 KJeff01 added this to the 3.3.0_beta2 milestone Jun 16, 2019

@maxsupermanhd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 16, 2019

So will this patch be in 3.3.0 beta2?

@KJeff01

This comment has been minimized.

Copy link
Contributor

commented Jun 16, 2019

So will this patch be in 3.3.0 beta2?

Yes, might as well. Unless this isn't ready? Master already has my mod download fix so this, packed as a mod, will be easier to test.

@maxsupermanhd

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2019

Will be clear here. We have already tested that with Vaut and others. Mod downloading works good and new balance packed to mod works fine. Vaut also said that play with this much better.

@KJeff01 KJeff01 merged commit b1d5f8e into Warzone2100:master Jun 17, 2019

6 of 8 checks passed

LGTM analysis: C/C++ No code changes detected
Details
LGTM analysis: Python No code changes detected
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
WIP Ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
freebsd_build FreeBSD:freebsd-11-2-release-amd64 Task Summary
Details
freebsd_build FreeBSD:freebsd-12-0-release-amd64 Task Summary
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.