This one can't be fixed easily in python without writing a lot of code that is necessary to calculate the actual effect in python.
- While mousing over building there used to be something like Actual effects part of the tooltip. It showed computed effects of bonuses of the building. Now it is gone. Is it be possible to bring it back?
@makotech222 : Would you like to help me out on the dll side? So that I don't have to write a lot of python code when the dll already has that code lying around, but currently inaccessible to python.
I need (green represents the change):
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
// Python calls this when it needs the building tooltip text.
CyGameTextMgr.cpp
std::wstring CyGameTextMgr::getBuildingHelp(int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity)
{
↓↓↓↓↓↓↓↓↓↓↓↓
std::wstring CyGameTextMgr::getBuildingHelp(int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity, bool bActual)
{
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬{
CvWStringBuffer szBuffer;
GAMETEXT.setBuildingHelp(szBuffer, (BuildingTypes)iBuilding, bCivilopediaText, bStrategyText, bTechChooserText, ((pCity != NULL) ? pCity->getCity() : NULL));
return szBuffer.getCString();
}GAMETEXT.setBuildingHelp(szBuffer, (BuildingTypes)iBuilding, bCivilopediaText, bStrategyText, bTechChooserText, ((pCity != NULL) ? pCity->getCity() : NULL));
return szBuffer.getCString();
↓↓↓↓↓↓↓↓↓↓↓↓
std::wstring CyGameTextMgr::getBuildingHelp(int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity, bool bActual)
{
CvWStringBuffer szBuffer;
GAMETEXT.setBuildingHelp(szBuffer, (BuildingTypes)iBuilding, bCivilopediaText, bStrategyText, bTechChooserText, ((pCity != NULL) ? pCity->getCity() : NULL), bActual);
return szBuffer.getCString();
}GAMETEXT.setBuildingHelp(szBuffer, (BuildingTypes)iBuilding, bCivilopediaText, bStrategyText, bTechChooserText, ((pCity != NULL) ? pCity->getCity() : NULL), bActual);
return szBuffer.getCString();
CyGameTextMgr.h
std::wstring getBuildingHelp(int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity);
↓↓↓↓↓↓↓↓↓↓↓↓
std::wstring getBuildingHelp(int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity = NULL, bool bActual = False);
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬↓↓↓↓↓↓↓↓↓↓↓↓
std::wstring getBuildingHelp(int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity = NULL, bool bActual = False);
// This is the next function called internally in the dll
CvGameTextMgr.cpp
void CvGameTextMgr::setBuildingHelp(CvWStringBuffer &szBuffer, BuildingTypes eBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CvCity* pCity)
{
↓↓↓↓↓↓↓↓↓↓↓↓
void CvGameTextMgr::setBuildingHelp(CvWStringBuffer &szBuffer, BuildingTypes eBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CvCity* pCity, bool bActual)
{
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬{
setBuildingHelpActual(szBuffer, eBuilding, bCivilopediaText, bStrategyText, bTechChooserText, pCity, false);
}↓↓↓↓↓↓↓↓↓↓↓↓
void CvGameTextMgr::setBuildingHelp(CvWStringBuffer &szBuffer, BuildingTypes eBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CvCity* pCity, bool bActual)
{
setBuildingHelpActual(szBuffer, eBuilding, bCivilopediaText, bStrategyText, bTechChooserText, pCity, bActual);
}CvGameTextMgr.h
DllExport void setBuildingHelp(CvWStringBuffer &szBuffer, BuildingTypes eBuilding, bool bCivilopediaText = false, bool bStrategyText = false, bool bTechChooserText = false, CvCity* pCity = NULL);
↓↓↓↓↓↓↓↓↓↓↓↓
DllExport void setBuildingHelp(CvWStringBuffer &szBuffer, BuildingTypes eBuilding, bool bCivilopediaText = false, bool bStrategyText = false, bool bTechChooserText = false, CvCity* pCity = NULL, bool bActual = False);
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬↓↓↓↓↓↓↓↓↓↓↓↓
DllExport void setBuildingHelp(CvWStringBuffer &szBuffer, BuildingTypes eBuilding, bool bCivilopediaText = false, bool bStrategyText = false, bool bTechChooserText = false, CvCity* pCity = NULL, bool bActual = False);
CyGameTextMgrInterface.cpp
.def("getBuildingHelp", &CyGameTextMgr::getBuildingHelp, "wstring (int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity)")
↓↓↓↓↓↓↓↓↓↓↓↓
.def("getBuildingHelp", &CyGameTextMgr::getBuildingHelp, "wstring (int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity, bool bActual)")
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬↓↓↓↓↓↓↓↓↓↓↓↓
.def("getBuildingHelp", &CyGameTextMgr::getBuildingHelp, "wstring (int iBuilding, bool bCivilopediaText, bool bStrategyText, bool bTechChooserText, CyCity* pCity, bool bActual)")
There may be more... Not sure.
Last edited: