1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Moving Cities removes Bonus-Hitpoints

Discussion in 'CivBE - Bug Reports' started by Ryika, Mar 26, 2016.

  1. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,200
    Like the title says: Moving an aquatic city removes all City Hit Points gained from Buildings and resets them to their original value of 100.

    Pretty annoying.
     
  2. Barathor

    Barathor Chieftain

    Joined:
    May 7, 2011
    Messages:
    1,202
    Ugh... Really? I've never even noticed; that's very disappointing. It also really destroys a concept I wanted to develop.
     
  3. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,200
    Yeah, I didn't notice it either, until I made hitpoints the primary city defense, then I wondered why that 800 hp beast went down in one turn and realized it had only 100 hp. ;)

    Can be fixed via lua though, by running a script that removes and re-adds all buildings with HP-bonuses attached to them at the beginning of each turn - possibly restricted to cities with full hp only, because the current hp seem to reset to 100 every turn even if the city was below that.

    That solution is of course restricted to buildings that don't grant free units/resources etc. after completion.
     
  4. CelJaded

    CelJaded DENOUNCING!

    Joined:
    Jun 3, 2015
    Messages:
    121
    Location:
    United Kingdom
    I take it this problem extends to AI cities just the same?

    That might explain why the AI crumbles so quickly when on the water, even during the late game.

    Fixing this might also give the NSA and Chungsu a fighting chance against Krakens too!...
     
  5. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,200
    Yes, it effects all cities that are moved no matter by whom. ...which means that the AI is effected the most because it keeps moving their cities around like a kid that can't sit still for a minute.

    In the unmodded game with all defensive buildings you end up with I believe around ~200 hp in aquatic cities so that's basically half their defense gone.
     
  6. legalizefreedom

    legalizefreedom Inefficiency Expert

    Joined:
    Jan 26, 2013
    Messages:
    452
    Location:
    Texas
    That is very disappointing. I'm guessing since you didn't mention anything else, the other defensive bonuses remain intact...
     
  7. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,200
    Yes, combat strength seems to work correctly. Haven't tested for the Torpedo Battery's 20% bonus to city attacks though.
     
  8. Syrkres

    Syrkres Chieftain

    Joined:
    Mar 3, 2016
    Messages:
    95
    Location:
    Mass
    did you say that you have a lua script which fixes this?
     
  9. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,200
    No finished code, just a partial fix so I can continue working on my mod:

    Code:
    function BuildingsMainFunction(iPlayer)
    	CurrentTurn = Game:GetGameTurn()
    
    	for iCity in Players[iPlayer]:Cities() do
    
    		if iCity ~= nil then 
    	
    
    			if iCity:GetNumBuilding(GameInfoTypes.BUILDING_HEADQUARTERS) > 0 then
    				iCity:SetNumRealBuilding(GameInfo.Buildings["BUILDING_HEADQUARTERS"].ID, 0)
    				iCity:SetNumRealBuilding(GameInfo.Buildings["BUILDING_HEADQUARTERS"].ID, 1)
    			end
    			if iCity:GetNumBuilding(GameInfoTypes.BUILDING_ROCKET_BATTERY) > 0 then
    				iCity:SetNumRealBuilding(GameInfo.Buildings["BUILDING_ROCKET_BATTERY"].ID, 0)
    				iCity:SetNumRealBuilding(GameInfo.Buildings["BUILDING_ROCKET_BATTERY"].ID, 1)
    			end
    			-- (etc.)
    		end
    	end
    end
    GameEvents.PlayerDoTurn.Add(BuildingsMainFunction)
    I haven't bothered implementing the HP-check that I've mentioned above yet.
     

Share This Page

Ebates: Get Paid to Shop