Author Topic: foil probe team returned unharmed to landlocked base  (Read 1169 times)

0 Members and 1 Guest are viewing this topic.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
foil probe team returned unharmed to landlocked base
« on: April 10, 2019, 01:33:33 AM »
sent home landlocked
sent home landlocked

I was poking around in Pirate waters during sunspots.  I got interrogated and returned unharmed.  Not to the foil probe team's home, nor to the nearest base with a sea port.  Into the landlocked middle of my lands!  Weird.  GOG original game binary, my SMACX AI Growth mod version 1.30 not yet released.  Haven't changed anything weird in my mod.

Offline Geo

Re: foil probe team returned unharmed to landlocked base
« Reply #1 on: April 10, 2019, 08:55:46 AM »
It sailed upstream! ;lol

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: foil probe team returned unharmed to landlocked base
« Reply #2 on: April 10, 2019, 04:13:44 PM »
On a river that didn't actually make it to the ocean in that direction.  You have to sail around a huge amount of land, an entire continent, to get to the real mouth of the river.  So yes, these foreign powers are quite energetic about their deportation strategies.  I suppose they were given orders to leave the enemy high and dry.

Actually now that I look closer, there's a Former sitting on the "mouth" of the river.  It has diagonal adjacency to the ocean.  Pretty lame "river" !

Offline ih8regin

Re: foil probe team returned unharmed to landlocked base
« Reply #3 on: January 13, 2020, 10:07:09 AM »
Ahh, interrogated. You have been returned to the nearest base, if SMAC/X calculates distance as sum of coordinate difference. Note that it can only happen if your probe was exactly on the NW/SE line starting at Morgan Robotics, this way that base will be closer to that point by 1 than both flanking bases.

Offline scient

Re: foil probe team returned unharmed to landlocked base
« Reply #4 on: January 17, 2020, 06:39:16 AM »
I was able to reproduce this bug, track down the issue and I'm fairly certain on how to fix it. Unfortunately, it's in the massive order_veh() function that is the fifth largest in size that I likely won't get to for awhile. At first I thought it was an issue with how the game located bases, code I've already decompiled. What it's actually doing for the ENEMYPROBE option of "Interrogate them, then return them unharmed." is moving the offending probe to the base with largest population size controlled by the probe's faction. In this case, a land locked base for a sea unit. The fix would be to check the TRIAD value of the probe and if it is a sea unit then the base would also have to pass a call to is_port().

If someone wants to do binary patch, here is offset range of base search function: 00597021 - 00597044.

I've added it to my notes as a future fix.

edit:
Made an issue ticket on git detailing problem. I'll try to start opening ones for new issues I come across.
https://github.com/b-casey/OpenSMACX/issues/3
« Last Edit: January 17, 2020, 07:00:02 AM by scient »

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: foil probe team returned unharmed to landlocked base
« Reply #5 on: January 17, 2020, 07:20:56 PM »
Good diagnosis.

I don't understand why the solution should be anything other than moving the team to the closest base that is reachable by a path.  I guess a path could be obstructed.  Pathfinding could be buggy also.  I can see the need to handle the exception of no path being available.  I hope the pathfinding can take no zone of control restriction into account.  It would be reasonable to compute a path with no units on the board.  I don't know if the game can do that.

Game mechanically, I'm not in favor of sending probe teams all the way back to the player's capitol, or other arbitrarily designated city, such as by its size.  On a Huge map or larger, this can be a long walk.  It doesn't make any simulation sense, as compared to being put back to the closest base.  It's just a game mechanical penalty, to make a player walk all that distance all over again.

Offline scient

Re: foil probe team returned unharmed to landlocked base
« Reply #6 on: January 17, 2020, 09:57:49 PM »
Yeah, it does seem kind of arbitrary to move it to the largest pop base. Not even the HQ, although this would cause issues if it wasn't a port.

I made some additional comments about edge cases in the Github issue ticket so I don't forget. Example: What if you have a sea probe team but all your sea/port bases get captured? I think a better solution would be to try to move evicted probe to nearest base (taking into account sea units / port check). If no valid bases exist, probe gets moved to closest controlled valid territory square. If that fails, you get moved outside border of evicting faction.

Also, pathing doesn't even come into play in this case. It moves probe directly to base coordinates regardless of distance.

Offline bvanevery

  • Emperor of the Tanks
  • Thinker
  • *
  • Posts: 6370
  • €659
  • View Inventory
  • Send /Gift
  • Allows access to AC2's quiz & chess sections for 144 hours from time of use.  You can't do without Leadship  Must. have. caffeine. -Ahhhhh; good.  Premium environmentally-responsible coffee, grown with love and care by Gaian experts.  
  • Planning for the next 20 years of SMACX.
  • AC2 Hall Of Fame AC Text modder Author of at least one AAR
    • View Profile
    • Awards
Re: foil probe team returned unharmed to landlocked base
« Reply #7 on: January 17, 2020, 10:23:02 PM »
I was hoping pathfinding could be invoked in a hooked routine, but that might be admittedly too much to ask in an old binary.

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

We shall take only the greatest minds, the finest soldiers, the most faithful servants. We shall multiply them a thousandfold and release them to usher in a new era of glory.
~Col. Corazon Santiago 'The Council of War'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 5: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default), Aeva.english (default).
Style sheets: 0: .
Files included: 50 - 1568KB. (show)
Queries used: 40.

[Show Queries]