Author Topic: Maritime Control Center reduces movement to 2  (Read 950 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
Maritime Control Center reduces movement to 2
« on: May 19, 2019, 07:49:41 PM »
Maritime Control Center reduces ship movement to 2
Maritime Control Center reduces ship movement to 2

Late game in my SMAC AI Growth mod version 1.31 (not yet released).  I dominate technologically.  I've got Quantum reactors and of course orbital insertion.  I've been pursuing a policy of taking 1 city that contains a Secret Project from anyone who declares war on me, then giving them a Truce, so that they'll stop bothering me.  They'll bother me a little bit with Conventional Missile hits, although they're not scratching me much lately because of my beefy AAA defenses.  The bother is mainly having to produce more such AAA units and Flechette defenses.

I took UN Headquarters from the Peacekeepers.  I signed a Truce with them.  However the University was allied with the Peacekeepers and immediately attacked my thinly held city, since they had full rail access and a pile of adequately destructive mindworms.  They took the city, so I vowed to come back with a better garrison force later.

Finally did so.  Took UN Headquarters again this year.  Suddenly all of my ships only have movement 2!  It's not just one ship, it kept happening and I was like, huh.  So something between Quantum reactors and this SP changing hands, has a bug.  I wonder if it'll go away next turn.


Offline scient

Re: Maritime Control Center reduces movement to 2
« Reply #1 on: May 22, 2019, 04:12:26 AM »
I've actually decompiled the portion of code related to this. I couldn't reproduce the issue loading saved game into vanilla SMACX so there might be changes related to alpha/x.ini?

It may be an issue where speed_proto() is returning 0 for everything, then it gets maritime control bonus.

DWORD __cdecl speed(int vehID, BOOL skipMorale) {
   ...
   DWORD speedVal = speed_proto(protoID);
   BYTE triad = Chassis[VehPrototype[protoID].chassisID].triad;
   if (triad == TRIAD_SEA && has_project(SP_MARITIME_CONTROL_CENTER, Veh[vehID].factionID)) {
      speedVal += Rules->MoveRateRoads * 2;
   }
   ...
   return speedVal;
}

Full code is on GitHub > veh.cpp.

Edit:
I wonder if something got bugged thinking your units were fungal towers?

DWORD __cdecl speed_proto(int protoID) {
   if (protoID == BSC_FUNGAL_TOWER) {
      return 0; // cannot move
   }
   ...
   return range(speedVal, 1, 99) * Rules->MoveRateRoads;
}

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: Maritime Control Center reduces movement to 2
« Reply #2 on: May 22, 2019, 04:42:58 AM »
I've changed some flags related to what ships can have.  Like for instance, drop pods are possible on my ships.  This isn't as useful as one might hope, because if a ship stops its movement on coastal land, it'll die by next turn.  Unless it drops on a port city, the one time this is actually useful, and why I've left it in there for now.  Sort of a poor man's Psi Gate.  If I believed it was causing a bug, I might get rid of it, but none of my ships actually had drop pods.  Any kind of change over vanilla could theoretically trigger some dormant bug in the code somewhere though.  Not like such scenarios were ever tested.

Right now I'm in "watch and see" mode.  Since I've never seen this bug before, I'm guessing that capturing and retaking the city the Maritime Control Center was in, has the most to do with the problem.

 

* 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

A brave little theory, and actually quite coherent for a system of five or seven dimensions ? if only we lived in one.
~Academician Prokhor Zakharov 'Now We Are Alone'

* 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: 38.

[Show Queries]