Hurricane Search Pattern
Moderators: Slitherine Core, BA Moderators
Hurricane Search Pattern
I thought Hurricanes were supposed to search in a 5x5 pattern, if there is nothing in the hex designated.
I tried to attack CLOSE terrain. Turns out there was no unit in there, but there was an 8Rad 2 tiles away. But for some reason the hurricane still decided to just attack the empty hex only.
Wondering is this expected in certain cases?
I tried to attack CLOSE terrain. Turns out there was no unit in there, but there was an 8Rad 2 tiles away. But for some reason the hurricane still decided to just attack the empty hex only.
Wondering is this expected in certain cases?

Experience Ratio = (def exp level + 2)/(att exp level + 2)
Entrenchment Ratio = (def entr rate + 1) /(att entr rate + 1)
-
pipfromslitherine
- Site Admin

- Posts: 9919
- Joined: Wed Mar 23, 2005 10:35 pm
Alright, it just happened AGAIN in my next trial. This time my opponent put his 8-rad in the entrance to the fort, exactly adjacant to the center flag building. And yet my Hurricane once again avoids hitting the 8-rad, and instead straffs three totally empty tiles.

Experience Ratio = (def exp level + 2)/(att exp level + 2)
Entrenchment Ratio = (def entr rate + 1) /(att entr rate + 1)
Grrr, I'm still just not (getting it).
I targeted a light fortification (hill). Turns out there was nothing in it, but there was a PzIII 2 tiles away. Yet my Hurricane again totally ignores going after it, and simply shoots blanks instead on the hill to give me that 3-tile vision run.
I targeted a light fortification (hill). Turns out there was nothing in it, but there was a PzIII 2 tiles away. Yet my Hurricane again totally ignores going after it, and simply shoots blanks instead on the hill to give me that 3-tile vision run.

Experience Ratio = (def exp level + 2)/(att exp level + 2)
Entrenchment Ratio = (def entr rate + 1) /(att entr rate + 1)
Obsolete,
Whats the name of the scenario?
I did find a bug in the function FindAirTarget ... The x/y for the check "IsValidTile" is transposed where the parameter x is swapped with y.
If I knew the map, I can check (in the editor) the x/y location that you're attacking and see if what the transposed x/y location is on the map ... in which case, it would get screwed up.
This is the condition in question in the FindAirTarget ...
Note that x=j and y=i ... but the condition is swapping i and j for "IsValidTile" ;
Here's the entire function ;
If it thinks the tile isn't valid then it won't work correctly?
-Merr
Whats the name of the scenario?
I did find a bug in the function FindAirTarget ... The x/y for the check "IsValidTile" is transposed where the parameter x is swapped with y.
If I knew the map, I can check (in the editor) the x/y location that you're attacking and see if what the transposed x/y location is on the map ... in which case, it would get screwed up.
This is the condition in question in the FindAirTarget ...
Note that x=j and y=i ... but the condition is swapping i and j for "IsValidTile" ;
Code: Select all
if( (IsValidTile(i,j)==1) && ( j>=0) && (j<GetMapWidth()) && (i>=0) && (i<GetMapHeight()))Code: Select all
FUNCTION FindAirTarget(x, y, width, side)
{
int i ;
int j ;
int best ;
int dist ;
int bestX ;
int bestY ;
int ret ;
best = 9999 ;
for(i=y-width;i<=y+width;i++)
{
for(j=x-width;j<=x+width;j++)
{
if( (IsValidTile(i,j)==1) && ( j>=0) && (j<GetMapWidth()) && (i>=0) && (i<GetMapHeight()))
{
dist = GetUnitOnTile( j, i ) ;
if( dist != -1 )
{
if( (GetUnitSide( dist ) == side ) && (IsUnitValid(dist) == 1) )
{
dist = GetDistanceBetweenTiles( x, y, j, i ) ;
if( dist < best )
{
best = dist ;
bestX = j ;
bestY = i ;
}
}
}
}
}
}
if( best != 9999 )
{
ret = bestX ;
ret = ret << 12 ;
ret = ret | bestY ;
}
return ret ;
}-Merr
Merr, I've been trying to experiment different openings on the DESERT FORT scenario as of late.
So these are where most the anomalies occur in my games. Hopefully you found (the glitch), because I still can't make sense a lot of times from what I see.
So these are where most the anomalies occur in my games. Hopefully you found (the glitch), because I still can't make sense a lot of times from what I see.

Experience Ratio = (def exp level + 2)/(att exp level + 2)
Entrenchment Ratio = (def entr rate + 1) /(att entr rate + 1)
Yes ... I just tested the change ... it works!!Obsolete wrote:Merr, I've been trying to experiment different openings on the DESERT FORT scenario as of late.
So these are where most the anomalies occur in my games. Hopefully you found (the glitch), because I still can't make sense a lot of times from what I see.
The "IsValidTile( i, j)" should read "IsValidTile( j, i )" .
Again, the bug only appears on maps that aren't exactly square. I tested a rectangle map and made sure the target tile (when inversed) was off the playing area ... The hurricane didn't find the target that was within 5 tiles. After the change, it found the target!!!
Nice spot Obsolete ...
I checked the scenario "Desert Fort" .... The fort's center building x/y is 23,32 ... the inverse is 32,23 which is off the playing area!
Also, to make it clear ... It's not the original target tile that's the problem ... it's the search tiles.
So, with the Desert Fort map ... the forts center building is the beginning point that the scripts think it's an invalid tile.
Any tile to the right of that building (towards the German side) is INVALID, as far as the script reads it, and it won't consider those tiles to search.
- Merr
So, with the Desert Fort map ... the forts center building is the beginning point that the scripts think it's an invalid tile.
Any tile to the right of that building (towards the German side) is INVALID, as far as the script reads it, and it won't consider those tiles to search.
- Merr
-
pipfromslitherine
- Site Admin

- Posts: 9919
- Joined: Wed Mar 23, 2005 10:35 pm
-
Grimnirsson
- Senior Corporal - Destroyer

- Posts: 101
- Joined: Mon Dec 05, 2011 2:01 pm
- Location: Germany
- Contact:
-
pipfromslitherine
- Site Admin

- Posts: 9919
- Joined: Wed Mar 23, 2005 10:35 pm
-
IainMcNeil
- Site Admin

- Posts: 13558
- Joined: Fri Apr 01, 2005 10:19 am
Good, not only did we stomp a bug, but I feel more sane now.
Now if we can just PLEASE, PLEASE, PLEASE prevent the GUI from LYING to the user, and actually show the true count of ammo remaining?
It makes absolutely no sense that I have to keep tracking this by pen & paper because the extra defensive shot doesn't register on the GUI.
We've all been burned by this and I just don't get why it won't be fixed, especially since it's such a simple thing to repair. It's not like you are giving away trade secrets here, everyone knows the defending units get the extra shot, so why do you have to make this so damn bloody painful to the player?
My memory isn't getting as good as it used to, so I don't see myself giving up excel charting in my maps any time soon.
Now if we can just PLEASE, PLEASE, PLEASE prevent the GUI from LYING to the user, and actually show the true count of ammo remaining?
It makes absolutely no sense that I have to keep tracking this by pen & paper because the extra defensive shot doesn't register on the GUI.
We've all been burned by this and I just don't get why it won't be fixed, especially since it's such a simple thing to repair. It's not like you are giving away trade secrets here, everyone knows the defending units get the extra shot, so why do you have to make this so damn bloody painful to the player?
My memory isn't getting as good as it used to, so I don't see myself giving up excel charting in my maps any time soon.

Experience Ratio = (def exp level + 2)/(att exp level + 2)
Entrenchment Ratio = (def entr rate + 1) /(att entr rate + 1)


