Bug Thread

1742241589502.png
I get unhealthiness from geothermal power station (which is a clean energy source so I don't understand why)
 

Attachments

  • 1742241516363.png
    1742241516363.png
    13.5 KB · Views: 7
1751121418263.png

There is something wrong about TEG maths. 3+2=5¬=3.
It may be related to the fact that the building isn't on any planet or at least not on one accessible with 0 culture.
 
Spoiler :

1753812014209.png



There is a loading error when you don't have any folder named "Final Frontier Plus" on the latest version. To fix it you would have to change the folder from which you load some assets (it is specified in civ4.thm file in mod folder).
as of now it's content is:
Spoiler :


// *** Control Bitmap Theme file

// Set the resource
resource_path "Mods/Final Frontier Plus/Resource";

// Setup common properties
include "Mods/Final Frontier Plus/Resource/Themes/Civ4/Civ4Theme.thm";



The shortcut provided with mod is faulty, it only works if someone has civ4 installed in steam folder on E: drive (I have it on C: drive and not a steam version).
 
Last edited:
View attachment 735586
There is something wrong about TEG maths. 3+2=5¬=3.
It may be related to the fact that the building isn't on any planet or at least not on one accessible with 0 culture.
Yes I've noticed this too
In the BROWN_TEG building ive just put it as free building
<FreeBuilding>BUILDINGCLASS_TEG_FOOD</FreeBuilding>

I think the code that picks it up (CvCity.cpp file has it on line 311) just adds it to the list of buildings in a city; it has not been updated to add it to the planets.

Or I could add a section in def onBeginPlayerTurn in FinalFrontierEvents.py to add it to pbestplanet if it exits, and see if this fixes it....

Does this only happen on turn 1 of the city only, or always?
 
Last edited:
The shortcut provided with mod is faulty, it only works if someone has civ4 installed in steam folder on E: drive (I have it on C: drive and not a steam version).
I should jut leave a readme with instructions on how to create a shortcut instead...
 
Yes I've noticed this too
In the BROWN_TEG building ive just put it as free building
<FreeBuilding>BUILDINGCLASS_TEG_FOOD</FreeBuilding>

I think the code that picks it up (CvCity.cpp file has it on line 311) just adds it to the list of buildings in a city; it has not been updated to add it to the planets.

Or I could add a section in def onBeginPlayerTurn in FinalFrontierEvents.py to add it to pbestplanet if it exits, and see if this fixes it....

Does this only happen on turn 1 of the city only, or always?
I've added the following code to line 245 in def onBeginGameTurn(self, argsList): inFinalfrontierEvents.py
Code:
                    # if tegfood add to bestplanet
                    iTegFood = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDINGCLASS_TEG_FOOD")
                    iTegFoods = pCity.getNumRealBuilding(iTegFood)
                    if (iTegFoods > 0):
                        pSystem = CvSolarSystem.getSystemAt(pCity.getX(), pCity.getY())
                        iBestPlanetIndex = getBestPlanetInSystem(pSystem)
                        pPlanet = pSystem.getPlanetByIndex(iBestPlanetIndex)
                        pPlanet.setHasBuilding(iTegFood, true)

...but it doesn't seem to work. Any ideas?
 
got it!
I made a dummy building called teg import
the TEG now provides the teg import building for free, which does nothing.
its a free building, so I need to check pCity.getNumFreeBuilding rather than pCity.getNumRealBuilding

code to line 245 in def onBeginGameTurn(self, argsList): inFinalfrontierEvents.py
Code:
                    # if tegfood add to bestplanet
                    iTEGImport = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_TEG_IMPORT")
                    iTEGFood = CvUtil.findInfoTypeNum(gc.getBuildingInfo, gc.getNumBuildingInfos(), "BUILDING_TEG_FOOD")
                    iTEGFoods = pCity.getNumRealBuilding(iTEGFood)
                    iTEGImports = pCity.getNumFreeBuilding(iTEGImport)
                    if (iTEGImports > 0) and (iTEGFoods == 0):
                        pSystem = CvSolarSystem.getSystemAt(pCity.getX(), pCity.getY())
                        iBestPlanetIndex = getBestPlanetInSystem(pSystem)
                        pBestPlanet = pSystem.getPlanetByIndex(iBestPlanetIndex)
                        pBestPlanet.setHasBuilding(iTEGFood, true)
                        pCity.setNumRealBuilding(iTEGFood, 1)

It takes 3 turns for the food to be added though...
 
Last edited:
its defined in the CIV4Civicinfos.xml file under

<CivicInfo>
<CivicOptionType>CIVICOPTION_GOVERNMENT</CivicOptionType>
<Type>CIVIC_DEMOCRACY</Type>
at the end of this civic info is
<WeLoveTheKing>TXT_KEY_CIVIC_WE_LOVE_DESPOT</WeLoveTheKing>
this is the same for all the government types.

TXT_KEY_CIVIC_WE_LOVE_DESPOT is defined in Sid Meier's Civilization IV Beyond the Sword\Assets\XML\Text\CIV4GameTextInfos.xml

So we could change this to <WeLoveTheKing>TXT_KEY_CIVIC_WE_LOVE_GALACTIC_LEADER</WeLoveTheKing>
and define TXT_KEY_CIVIC_WE_LOVE_GALACTIC_LEADER in a copy of the CIV4GameTextInfos.xml
 
Back
Top Bottom