Help needed testing 3.2.x Campaign games!

Discuss the future of Warzone 2100 with us.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Post by Berserk Cyborg »

alfred007 wrote: @Berserk Cyborg
You can read my answer to Eugen here.
Alright, I'll add it in there somewhere.
alfred007 wrote: A little bit off-topic: How is accuracy working actually? I found a thread with a discussion what system should be used to calculate accuracy. But in the end, if I understand it right, accuracy is set to 100% except for the long range. For this range, a value is set in the weapons.js file in stats. I've thought a few things about accuracy but before I post it I want to be sure that I understood the current system right.
Looks like direct weapons use long range accuracy at all times. https://github.com/Warzone2100/warzone2 ... af38f2522c
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

I searched through the forum and found again what I meant. andrvaut opened a topic in which Per confirmed that direct firing weapons now have 100% accuracy. In combat.cpp in the src folder, I found some calculation about baseHitChance and resultHitChance and in stats.cpp also some informations about base.HitChance. Due to my not existing programming knowledge, I don't understand what it means.
I'm thinking about a system to decrease the hitChance with the distance. After I read the discussion in the poll about accuracy it could be like opening Pandora's box to post a new idea. But though Warzone is a game where not everything is realistic, I think the chance to hit an opponent should decrease with the distance to the opponent. And the system I'm thinking about needs some input for some problems it has.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Post by Berserk Cyborg »

I put the bug body into the factory artifact in Alpha 5. At least players can experiment with some new designs and strategies for the next four missions before getting the Scorpion body.

camBalance.wz
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

Later than I expected I found the time to make the final test for alpha 05. I used inexperienced units and this level showed me why experience is so important. With experienced units, I have no problem to win the level without losing combat units (of course repair units I use as cannon fodder). But now I had no chance to prevent losing units. I think alpha 05 is now finished and we can finally move on. Logs are added.

Can you please help me to understand what the calculations for hitChance in combat.cpp and stats.cpp mean?
Attachments
logs alpha 05.zip
(4.03 KiB) Downloaded 112 times
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Post by Berserk Cyborg »

alfred007 wrote: Later than I expected I found the time to make the final test for alpha 05. I used inexperienced units and this level showed me why experience is so important. With experienced units, I have no problem to win the level without losing combat units (of course repair units I use as cannon fodder). But now I had no chance to prevent losing units. I think alpha 05 is now finished and we can finally move on. Logs are added.
Yeah, same. That is why I try to use inexperienced units during testing to mitigate against skewed observational results. The bonuses are really generous... for good or worse. Still, I believe there is little to be done about it since the NP are just better than you at this point in the game. Good tactics are a necessity for this mission.
alfred007 wrote: Can you please help me to understand what the calculations for hitChance in combat.cpp and stats.cpp mean?
I think it's all chance based seeing as weapons only shoot when in range, and we don't have to
worry about air resistance or gravity pulling direct weapon projectiles down.

If the distance to the target is in the max range of the weapon, and farther than the closest range, then it
just uses the max range of the weapon (plus the effects of accuracy upgrades done to the base accuracy). Otherwise the weapon won't shoot.
Spoiler:
Experienced units add a bonus to the accuracy chance while at the same time an experienced
target has the opposite effect and reduces the chances of it being hit.

Basically: gameRand(100) < (longHit(%) + accuracy related upgrades to the weapon type(%) + accuracy bonus of attacker - accuracy bonus dodge of target). Where GameRand(100) is a randomly picked number between 0-99.
alfred007 wrote: ...also some informations about base.HitChance
base.HitChance is the longHit value of a weapon found in the weapons.json stat file.
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

If I understand these calculations right it means that the hit chance doesn't depend on the distance to the target like in reality. In reality, I have a higher hit chance if the distance to my target is 1m than if it's 10m and my hit chance decreases more if the distance is 100m. Am I right?

So what I'm thinking about is a calculation like this:

hitChance(%) = 100 - resultMissPercentage(%)
resultMissPercentage = Distance in tiles x baseMissPercentage x accuracy bonuses
An example for a baseMissPercentage of 2.5 and no bonuses
Distance hitchance
1 tile 97.5 %
2 tiles 95 %
10 tiles 75 %

And to include accuracy bonuses for the player and the target
resultMissPercentage = baseMissPercentage x (1 - accuracy related upgrades to the weapon type(%)/100) x (1 + accuracy bonus dodge of target(%)/100) x ( 1 - accuracy bonus of attacker(%)/100)
An example for an hero unit witht 10% accuracy bonus shooting at a veteran unit
resultMissPercentage = 2.5 x 0.6 x 1.25 x 0.9 = 1.69 The hitChance for a distance of 10 tiles would therefore increase from 75 % to 83.1 %
Or a calculation variant
resultMissPercentage = baseMissPercentage x (1 - (accuracy related upgrades to the weapon type(%) - accuracy bonus dodge of target(%) + accuracy bonus of attacker(%) )/100
This gives us the following resultMissPercentage for the example above
resultMissPercentage = 2.5 x (1 - (40 - 25 + 10)/100 = 2.5 x 0.75 = 1.88 The hitChance for a distance of 10 tiles would therefore increase from 75 % to 81.2 %

This system only works good for direct firing weapons. For indirect firing weapons we would have to use a different system. One way we could use this system also for indirect firing weapons would be to define the distance from the sensor/commander the weapons are attached to to the target or, if they are not attached to a sensor/commander, from the nearest sensor to the target.

I know that these changes would have to be hardcoded and I have no idea if this would be difficult to implement or not. So I need your feedback what you think about it.
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

I made first tests with alpha 06 and due to their horrible accuracy, I found the Mini-Rocket Pod totally useless. I placed an inexperienced Mini-Rocket Pod near to a Repair Facility and let it shoot at a Scorpion body tank. I could have made a cup of coffee in the time it lasts.
If we want to make the Mini-Rocket Pod a viable choice to the lancer we should start with increasing the longHit value in weapons.json to 45 from 30. We could try to make the Mini-Rocket Pod better against lightly armoured enemies (Scavenger, maybe Cyborgs, tanks with Bug body), equal against tanks with Scorpion body and worse against tanks with Mantis body in comparison to the lancer.
Or we accept that the Mini-Rocket Pod is useless.

Generally, I suggest to set the damage upgrades for rockets back to 30 from 20 and split the damage upgrades. With the reduced percentage for the damage upgrades, you also affect the damage of the Mini-Rocket Artillery. The third damage upgrade could be hidden as a new artifact in the Heavy NP Factory in alpha 08. In alpha 08 the Project also gets the second slow rocket damage upgrade and the third cannon damage upgrade. So this would make more sense for me.

I didn't test the Medium Cannon very much but I will start a test today where I play the level only with Medium Cannons. First tests confirmed your results that Lancers are doing nearly no damage against hard structures but Medium Cannons do.

I think I found a way to include indirect firing weapons into my suggested new accuracy system. We could replace longHit by baseMissPercentage in weapons.json and individualize the accuracy for every weapon this way. We could set the baseMissPercentage for Mortars i.e. to 1 so that the hitChance for a shoot over 18 tiles would be 82 % and for the Ripple Rockets i.e. to 0.3 so that the hitChance for a shoot over 80 tiles would be 76 %. I would like to have your feedback before I open a new topic and present this new accuracy system to all other players.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Help needed testing 3.2.x Campaign games!

Post by NoQ »

I made first tests with alpha 06 and due to their horrible accuracy, I found the Mini-Rocket Pod totally useless. I placed an inexperienced Mini-Rocket Pod near to a Repair Facility and let it shoot at a Scorpion body tank. I could have made a cup of coffee in the time it lasts.
In campaign most of the battles happen against a group of 5-10 tanks. I believe there will be significantly more hits there, and because return-to-repair is not very common for AI, it is also not important to concentrate fire. Because of that, i'm fine with having them only be effective against large numbers of enemies and lose efficiency while finishing off a few remaining tanks - that's actually a very interesting twist that would never be possible in multiplayer balance. But, of course, overall DPS at 100% accuracy must still be good in order for that to work.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Help needed testing 3.2.x Campaign games!

Post by NoQ »

alfred007 wrote: 07 Oct 2018, 18:40 A little bit off-topic: How is accuracy working actually? I found a thread with a discussion what system should be used to calculate accuracy. But in the end, if I understand it right, accuracy is set to 100% except for the long range. For this range, a value is set in the weapons.js file in stats. I've thought a few things about accuracy but before I post it I want to be sure that I understood the current system right.
As far as i remember, the distinction between short range and long range was removed, which is good because it never had any effect on the gameplay and the only valid strategy was to set all tanks to fire at long range. Then, the chance to hit is a physics-based emergent behavior; unlike certain other games, projectiles fly deterministically according to the a simple simulation of a few laws of physics, an actual collision between the projectile and the target is necessary in order to deal direct damage, and the target at which the weapon was fired is not special in any way - any other target may be hit. Finally, the accuracy value affects the initial vector of projectile velocity. Namely, every shot is either accurate or inaccurate. The probability of making an accurate shot is equal to the accuracy stat. If the shot is accurate, the projectile's initial velocity points directly to the target. If the shot is inaccurate, a miss vector is added to the target location. Length of the miss vector is deterministic and roughly proportional to miss chance (i.e., missed shots always target a point on a specific circumference around the target), and direction of miss (polar angle on this circumference) is uniformly random.

The debated change between 2.3 and 3.1 was in fact about that last part - the inaccurate shot behavior. In 2.3, the miss would target one of two points around the tank that make the weapon miss either to the left or to the right; these points were never within the hit box of the tank. This has a downside of having misses look completely unrealistic, but the good thing about it is that it makes game balance much more predictable: you can in fact expect that if the accuracy stat is x%, then the chance to hit any target you're firing at is roughly x%. In 3.1, chance to hit is significantly higher than x%, and significantly depends on the size of the target, and the difference between situations in which the miss radius covers the whole tank of common size and situations in which it doesn't may be dramatic, which puts a lot of value into some poorly predictable accuracy upgrade tiers.

If i'm not mistaken, the chance to hit a non-moving spherical target in vacuum with a missed shot in 3.1 would be (2/π) arccos (r/R), where R is the miss radius and r is target radius, assuming R > r (otherwise the chance is 100%). It is easy to see that this chance doesn't depend on the distance to the target. Which means that my memories fail me when it comes to remembering why was it debated that the new accuracy system is significantly dependent on distance and knowing the right distance to the target is extremely important.
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

NoQ wrote:In campaign most of the battles happen against a group of 5-10 tanks. I believe there will be significantly more hits there, and because return-to-repair is not very common for AI, it is also not important to concentrate fire. Because of that, i'm fine with having them only be effective against large numbers of enemies and lose efficiency while finishing off a few remaining tanks - that's actually a very interesting twist that would never be possible in multiplayer balance. But, of course, overall DPS at 100% accuracy must still be good in order for that to work.
Thank you for this hint. I tested a group of 16 Mini-Rocket Pods, not attached to a commander, in a fight against the reinforcements coming from the eastern NP LZ. And you're right, in a larger number they are no longer useless but still not as good as lancers against NP tanks with Scorpion body. So I still suggest to change the longHit value to 45 and split the damage upgrades as I wrote in my previous post.

And also thank you for your explanations about the current accuracy system. I will still wait for the feedback of Berserk Cyborg before I open a new topic. And your feedback is also very welcome.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Post by Berserk Cyborg »

alfred007 wrote: Thank you for this hint. I tested a group of 16 Mini-Rocket Pods, not attached to a commander, in a fight against the reinforcements coming from the eastern NP LZ. And you're right, in a larger number they are no longer useless but still not as good as lancers against NP tanks with Scorpion body. So I still suggest to change the longHit value to 45 and split the damage upgrades as I wrote in my previous post.
Individually, one rocket-pod is not much of a threat and indeed misses a lot. That's why I used 9 units per test cycle at the first LZ and said they were doing a fairly high amount of damage, over only a few seconds, to the NP scorpion units.

I'll start testing the changes for the rocket-pod you mentioned.

Not sure if I see anything immediately worrisome about a projectile missing more over a greater distance given a reasonable loss per tiles. IDK, make a topic with your idea, I need to think about that more.
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

I finished alpha 06 with a group of 12 Medium Cannon Cobra tracked tanks attached to a Commander. I think Medium Cannons are now a really viable alternative to Lancers. Tracked Medium Cannons are noticeably slower than the Commander. So another alternative would be to use half-tracked Medium Cannons. They would be faster but weaker than the tracked Medium Cannons. But still with more hitpoints than Lancers. If we are able to make the Mini-Rocket Pods to another viable alternative the player will have a various number of units and tactics he can use in alpha 06. Logs are added.

I looked into the script and found that the throttle for the central factory is set to 60 seconds. This is the longest throttle except for the throttles in alpha 12 and I think we should decrease it to 45 seconds.

I also thought about the upgrades for the scavengers. I suggest in alpha 08 we give them the second MG ROF upgrade and the second cannon damage upgrade. In alpha 09 they get the third flamer damage upgrade and the third rocket damage upgrade. And finally, in alpha 11, they get the third MG ROF upgrade and the third cannon damage upgrade. Maybe we can add the first cannon ROF and the first rocket ROF upgrade in alpha 09 and 11. One in alpha 09, one in alpha 11. But this could maybe too much. We'll see.
Attachments
logs alpha 06.zip
(4.92 KiB) Downloaded 105 times
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Post by Berserk Cyborg »

alfred007 wrote: ...If we are able to make the Mini-Rocket Pods to another viable alternative the player will have a various number of units and tactics he can use in alpha 06.
I moved the last damage upgrade into the Alpha 8 factory. LongHit of 41 and bumped the tile range from 7.5 to 8.5. Going up against the NP medium-cannons is possible by either spamming many more half-tracks, or using tracks which helps the rocket-pods stay alive with lower numbers.

A set of accuracy upgrades (cannons, fast/slow rockets, and mortars) will be available starting in Alpha 9 after researching the research lab upgrades.
alfred007 wrote: I looked into the script and found that the throttle for the central factory is set to 60 seconds. This is the longest throttle except for the throttles in alpha 12 and I think we should decrease it to 45 seconds.
Done.
alfred007 wrote: I also thought about the upgrades for the scavengers. I suggest in alpha 08 we give them the second MG ROF upgrade and the second cannon damage upgrade. In alpha 09 they get the third flamer damage upgrade and the third rocket damage upgrade. And finally, in alpha 11, they get the third MG ROF upgrade and the third cannon damage upgrade. Maybe we can add the first cannon ROF and the first rocket ROF upgrade in alpha 09 and 11. One in alpha 09, one in alpha 11. But this could maybe too much. We'll see.
I gave them research, might be a bit much, but I think its manageable.

Thinking about yellow bodies, should we start making use of some NP flamer units? The flamers from the NP bunkers are able to hit cobra half-tracks kinda hard on Alpha 6 if not under repair.

camBalance.wz
User avatar
alfred007
Regular
Regular
Posts: 619
Joined: 31 Jul 2016, 06:25
Location: Stuttgart, Germany

Re: Help needed testing 3.2.x Campaign games!

Post by alfred007 »

Is it possible that I use the new balance Mod with my current alpha 06 saves or do I have to start from the end of alpha 05?

I saw your upgrades for the Scavengers in you camBalance Branch for Warzone. This will be interesting. But you know, I like competitions.
User avatar
Berserk Cyborg
Code contributor
Code contributor
Posts: 938
Joined: 26 Sep 2016, 19:56

Re: Help needed testing 3.2.x Campaign games!

Post by Berserk Cyborg »

alfred007 wrote: Is it possible that I use the new balance Mod with my current alpha 06 saves or do I have to start from the end of alpha 05?
You'll have to start over. If you don't care about the factory throttle change and have a save before getting the rocket-pod damage03 upgrade then that would work also.
Post Reply