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

[RDY] Increase to horde interest with sound source and other small changes #20183

Merged
merged 16 commits into from Feb 24, 2017

Conversation

Projects
None yet
3 participants
@Firestorm01X2
Copy link
Contributor

commented Feb 2, 2017

Modification for #19222

That PR changed signal calculation for hordes. But interest value was bit off.

  1. It don't have to be connected with SEEX. Last time I set that to SEEX "just by example". But it is not related with player sized tiles at all. It is just for horde interest calculation.
  2. Horde interest equal 15 or less force horde to start "roam" and lost target. So setting that to 12 is not effective and make a little sense, because it leads to loosing interest almost instantly. Setting that coefficient to at least 30 keep hordes that barely heard gunshot at least focused on that for some time.

That makes hodes less aggressive in certain conditions.

Done:

  1. Set minimum interest for hordes to keep them interested in barely heard signal at least for some time.
  2. Horde interest to already pursued signal source increased.
  3. Now horde interest to already pursued sound will be increased to random value instead fixed.

Proposed changes should make hordes more aggressive and slightly less predictable. Signal calculation is the same.

Signal logic for hordes:
Signal is distance of hearing for hordes in submaps.
So signal= 30 will be heard from approximately 15 overmap tiles.
sig_power is that signal value

noise signal ( also range in submaps) = range in overmaps (approximately)
80 7 submaps = 3-4 overmaptiles
110 10 submaps = 4-5 overmap tiles
180 15 submaps =7-8 overmap tiles
100000 26 submaps (capped) =13 overmap tiles
shot count signal power (in submaps) distance from source (in submaps) interest
first shot 15 15 interest = 30 (min cap)
next shots 15 15 interest += random (3, 15)
shot count signal power (in submaps) distance from source (in submaps) interest
first shot 16 15 interest = 30 (min cap)
next shots 16 15 interest += random (3, 30)
shot count signal power (in submaps) distance from source (in submaps) interest
first shot 17 15 interest = 45
next shots 17 15 interest += random (3, 45)
shot count signal power (in submaps) distance from source (in submaps) interest
first shot 18 15 interest = 60
next shots 18 15 interest += random (3, 60)

interest is value between [15, 100]. If it will be seto to value more than 100 - then it will be capped to 100. Also for lower cap.

interest is chance for horde to move. So it is speed also. If interest is 15 or less than horde lost target and start roaming (get new random target with new interest). Horde loss 1 point of interest every few minutes on plain. In forest horde drain interest 6 time faster. On river - 10 times faster.

About hordes targeting. If horde gets signal for the first time than interest will be just set. But if horde get signal near it's current target than interest will be increased for some value.

@Firestorm01X2 Firestorm01X2 changed the title [RDY] Small increase to horde interest with sound source [RDY] Small increase to horde interest with sound source and other small changes Feb 2, 2017

@Firestorm01X2 Firestorm01X2 changed the title [RDY] Small increase to horde interest with sound source and other small changes [RDY] Increase to horde interest with sound source and other small changes Feb 2, 2017

Set minimum horde interest
Roll horde interest increase instead straightforward increase

@Firestorm01X2 Firestorm01X2 changed the title [RDY] Increase to horde interest with sound source and other small changes [WIP] Increase to horde interest with sound source and other small changes Feb 3, 2017

Horde has 33% to ignore signal
Added constants
Tweaked constants
@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2017

Ready.

@Firestorm01X2 Firestorm01X2 changed the title [WIP] Increase to horde interest with sound source and other small changes [RDY] Increase to horde interest with sound source and other small changes Feb 3, 2017

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2017

15 overmap tiles is a little too much imho, but I like the other changes that make them less predictable.

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2017

15 overmap tiles is a little too much imho, but I like the other changes that make them less predictable.

  1. It is just maximum value. Not so much things can give sound to 10 overmap tiles for hordes. Maybe hight powered sniper rifle give you 11. Most likely you will get around 7-10 for gunshot or even less. Maybe only mininuke give you 15 overmap tiles. Simple formula is: Sound/24 rounded to higher.
  2. Thing is that more signal overlap horde distance from source - the more interested in that source horde become.
    15 overmap tiles is maximum cap.So horde with distance of 15 overmap tiles from player get interest 35. It is low value. That horde will move very slowly and forget about signal source quickly enough. That is why I increase it. In this way horde with distance 13 from player at least get enough interest to really engage player.
  3. One of the major reason for that PR that here: #19222 I don't give enough attention with horde interest system. But it is important thing. Interest is chance to move for horde. So very low interest lead to very low speed. Also interest decrease with time. After last changes horde that barely hear sound got interest 12 and almost instantly forget about it. If horde interest is 15 or less that horde simply change direction and start randomly roaming. That is why I set minimum interest to 35.
  4. Also I gave every horde 33% chance to ignore sound at all.

@Firestorm01X2 Firestorm01X2 changed the title [RDY] Increase to horde interest with sound source and other small changes [WIP] Increase to horde interest with sound source and other small changes Feb 3, 2017

@Firestorm01X2 Firestorm01X2 changed the title [WIP] Increase to horde interest with sound source and other small changes [RDY] Increase to horde interest with sound source and other small changes Feb 3, 2017

@Firestorm01X2 Firestorm01X2 changed the title [RDY] Increase to horde interest with sound source and other small changes [WIP Increase to horde interest with sound source and other small changes Feb 3, 2017

Firestorm01X2 added some commits Feb 3, 2017

Capping minimum horde interest to bypass roaming interest and give en…
…ough interest for horde to really investigate the target.
@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2017

Ready.

@Firestorm01X2 Firestorm01X2 changed the title [WIP Increase to horde interest with sound source and other small changes [RDY] Increase to horde interest with sound source and other small changes Feb 3, 2017

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2017

Can you add a table depicting some common values? It's always good to have noise->(interest, range) conversion, to make sure the thing is actually working as expected.
Plus, tables of "conversions" like that can be actually implemented as a regression test later on.

EDIT: I mean in the PR description, nothing code-related.

@@ -3020,25 +3020,37 @@ void overmap::signal_hordes( const tripoint &p, const int sig_power)
if( !mg.horde ) {
continue;
}
// Horde has 33% chance to simply ignore signal.
if( one_in( 3 ) ) {

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Feb 3, 2017

Contributor

I don't like that one. Consider nuke going off vs. 3 shots in a row.

This comment has been minimized.

Copy link
@Firestorm01X2

Firestorm01X2 Feb 3, 2017

Author Contributor

About 3 gunshots and minuke. It s=not about it. It is about

It should make horde reaction less predictable for player.
"Do I lure them now or maybe not?"
"How fast do they come to me? Do they reach me in one hour or I have more time?"
Also it is scramble horde reaction on continous shooting. Possbile horde that closer to you do not start to run toward you faster but other will.

Also it is slight buff to player survivability after setting minimum horde interest.

Also not that there is luring tactis so player specially shooting to lure hordes from scavenging places.
http://smf.cataclysmdda.com/index.php?topic=14089.0

Right now hordes leave the intended aria in the city and ghater up in the center or somewere close ,leaving you free hoses and other building to loot you can go around the outskirts of a city the first time to activate them and then when the gather up you will have tons of loot to take ...or shoot HEAT or HE tank rounds in the middle of them :)

So adding a little more randomness may help to make that tactics a little more problematic.

It is not perfect solution but it make sense.

Of course it can be easily removed. Or lowered to 25%, for example.

Also we should note that now there is a lot mini hordes that contain few zombies. So results of that 33% may be very unpredictable.

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2017

Tables are ready. I can quickly remove 33% chance if needed.

Anyway real results about how it plays should come from prolonged game session from multiple users.

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Feb 3, 2017

You can make clean tables in github like this:

A | B
--- | ---
C | D
A B
C D
@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2017

Tables are ready. Also fixed interest after second shot in tables.

Firestorm01X2 added some commits Feb 3, 2017

Get rid of 33% to pass signal for horde
Added bonus to random roll to prevent guaranteed reaction to more loud signal
Other small changes
@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 3, 2017

I thought about that 33% and decided to remove that chance. Instead I changed roll to signal reaction a bit to prevent guaranteed reaction on more loud signal.

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 6, 2017

Reduced interest per signal value to 15 from 18. Just small adjustment. Tables were updated also.

Firestorm01X2 added some commits Feb 6, 2017

31
@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 6, 2017

Set initial signal to for horde to 30. Tables updated.

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 6, 2017

Bonus roll to give horde ability to miss the signal removed. Actually city horde already has good chance to miss signal, because horde that roaming to city already get interest 100 to random city target by roaming behavior. There is already good chance for city horde to miss the sound. So my bonus do not needed.

This way horde, targeted outside the city will react to shot for sure. Horde that targeted city - not guaranteed. Looks like that this is not intended behavior of roaming logic. But it is logical.
Crowded city full of Zeds may produce a lot of distraction noises for Zeds.

Let's keep that logic.

Ready.

Reduced maximum signal to 13 overmap tiles again. Even C4 reach 15 ov…
…ermap tiles. Let's make like it was before.

Added distance to debug messages
@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 7, 2017

Just decreased maximum hearing distance for horded to 13 overmap tiles as it was before. Well, hordes are not supposed to be full on hardcore mode.

Still ready.

@Firestorm01X2

This comment has been minimized.

Copy link
Contributor Author

commented Feb 17, 2017

Ready.
Also it shoud be pretty easy to merge because it affects only one function.

@Coolthulhu Coolthulhu self-assigned this Feb 23, 2017

@Coolthulhu Coolthulhu merged commit bd4f6e5 into CleverRaven:master Feb 24, 2017

1 check passed

default This has been rescheduled for testing as the 'master' branch has been updated.
@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Feb 24, 2017

Wasn't easy to test because while it's just one function, the horde functionality looks totally broken.

@Firestorm01X2 Firestorm01X2 deleted the Firestorm01X2:hordeinterest branch Mar 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.