Revising the lore of each civic

@raxo2222 I'm doing that while I wait the two weeks.
No one said anything about new civic strategy text within two weeks :p

Edit: saw your edits now.

Your text files are now bit outdated - I cleaned up random question marks in meantime.
 
Last edited:
Looks nice, @Toffer90 in civic screen strategy text is black and is hard to read, is it possible to change its color to white?
By the way unlock tech covers category and upkeep info a bit - unlock tech could be somewhere bit lower.

Spoiler :

Civ4BeyondSword 2018-09-16 23-14-11-62.jpg
Civ4BeyondSword 2018-09-16 23-14-41-72.jpg

 
Last edited:
Looks nice, @Toffer90 in civic screen strategy text is black and is hard to read, is it possible to change its color to white?
I don't feel like looking at the python code for the civic screen just yet.
DH is working on some extensive changes for it atm, and I'm keeping clear of it for now to avoid complications.
By the way unlock tech covers category and upkeep info a bit - unlock tech could be somewhere bit lower.
I see, it's an issue specific for low resolutions.
I'll look into re-positioning it so it's good for all resolutions.
 
I don't feel like looking at the python code for the civic screen just yet.
DH is working on some extensive changes for it atm, and I'm keeping clear of it for now to avoid complications.

@Dancing Hoskuld what changes to civic screen are you doing?
 
@Dancing Hoskuld what changes to civic screen are you doing?
At this exact moment none and what I have done can be redone. I went down a wrong path.

One of the main problems with the old code is that the text was not actually placed in the boxes but placed on the screen where the boxes were expected to be. This meant that changing resolutions would shift things.
 
I think "Disables construction of".... line can be removed from game altogether - it just clutters space in later civics.
It happens with buildings, that are unlocked by default civics, but doesn't happen with buildings unlocked by later civics.

Spoiler :

Civ4BeyondSword 2018-09-17 20-00-31-86.jpg
Civ4BeyondSword 2018-09-17 20-00-34-33.jpg



This must be DLL/Python stuff - I couldn't find XML source of it.

I noticed some religious buildings and national/world wonders locked behind civics.
 
Last edited:
It's in CvGameTextMgr.cpp at line 18157:
Code:
BuildingTypes eLoopBuilding;
bFirst = true;
for (iI = 0; iI < GC.getNumBuildingClassInfos(); ++iI)
{
    if (bPlayerContext && NO_PLAYER != GC.getGameINLINE().getActivePlayer())
    {
        eLoopBuilding = (BuildingTypes)GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationBuildings(iI);
    }
    else
    {
        eLoopBuilding = (BuildingTypes)GC.getBuildingClassInfo((BuildingClassTypes)iI).getDefaultBuildingIndex();
    }
    if (eLoopBuilding != NO_BUILDING)
    {
        if (GC.getGameINLINE().canEverConstruct(eLoopBuilding))
        {
            if ((GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics(eCivic) || GC.getBuildingInfo(eLoopBuilding).isPrereqAndCivics(eCivic)))
            {
                CvWString szBuilding;
HERE -------->  szFirstBuffer.Format(L"%s%s", NEWLINE, gDLL->getText("TXT_KEY_CIVIC_UNLOCKS_BUILDING").c_str());
                szBuilding.Format(L"<link=literal>%s</link>", GC.getBuildingInfo(eLoopBuilding).getDescription());
                setListHelp(szHelpText, szFirstBuffer, szBuilding, L", ", bFirst);
                bFirst = false;
            }
        }
    }
}
The next one shows buildings that get obsoleted, line 12805:
Code:
bFirst = true;
if (NO_PLAYER != GC.getGameINLINE().getActivePlayer())
{
    if (!GET_PLAYER(GC.getGameINLINE().getActivePlayer()).isCivic(eCivic))
    {
        for (iI = 0; iI < GC.getNumBuildingClassInfos(); ++iI)
        {
            eLoopBuilding = (BuildingTypes)GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationBuildings(iI);
          
            if (eLoopBuilding != NO_BUILDING)
            {
                if (GC.getGameINLINE().canEverConstruct(eLoopBuilding))
                {
                    bool bObsolete = false;
                    CivicTypes eCurCivic = GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivics((CivicOptionTypes)GC.getCivicInfo(eCivic).getCivicOptionType());
                    if (GC.getBuildingInfo(eLoopBuilding).isPrereqAndCivics(eCurCivic))
                    {
                        bObsolete = true;
                    }
                    else if (GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics(eCurCivic) && !GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics(eCivic))
                    {
                        bObsolete = true;
                        for (int iJ = 0; iJ < GC.getNumCivicInfos(); iJ++)
                        {
                            if (iJ != eCurCivic && iJ != eCivic)
                            {
                                if (GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics((CivicTypes)iJ))
                                {
                                    if (GET_PLAYER(GC.getGameINLINE().getActivePlayer()).isCivic((CivicTypes)iJ))
                                    {
                                        bObsolete = false;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    if (bObsolete)
                    {
                        CvWString szBuilding;
HERE -----------------> szFirstBuffer.Format(L"%s%s", NEWLINE, gDLL->getText("TXT_KEY_CIVIC_BLOCKS_BUILDING").c_str());
                        szBuilding.Format(L"<link=literal>%s</link>", GC.getBuildingInfo(eLoopBuilding).getDescription());
                        setListHelp(szHelpText, szFirstBuffer, szBuilding, L", ", bFirst);
                        bFirst = false;
                    }
                }  
            }
        }
    }
}
 
Last edited:
It's in CvGameTextMgr.cpp at line 18157:

Code:
        BuildingTypes eLoopBuilding;
        bFirst = true;
        for (iI = 0; iI < GC.getNumBuildingClassInfos(); ++iI)
        {
            if (bPlayerContext && NO_PLAYER != GC.getGameINLINE().getActivePlayer())
            {
                eLoopBuilding = (BuildingTypes)GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationBuildings(iI);
            }
            else
            {
                eLoopBuilding = (BuildingTypes)GC.getBuildingClassInfo((BuildingClassTypes)iI).getDefaultBuildingIndex();
            }
            if (eLoopBuilding != NO_BUILDING)
            {
                if (GC.getGameINLINE().canEverConstruct(eLoopBuilding))
                {
                    if ((GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics(eCivic) || GC.getBuildingInfo(eLoopBuilding).isPrereqAndCivics(eCivic)))
                    {
                        CvWString szBuilding;
HERE                    szFirstBuffer.Format(L"%s%s", NEWLINE, gDLL->getText("TXT_KEY_CIVIC_UNLOCKS_BUILDING").c_str());
                        szBuilding.Format(L"<link=literal>%s</link>", GC.getBuildingInfo(eLoopBuilding).getDescription());
                        setListHelp(szHelpText, szFirstBuffer, szBuilding, L", ", bFirst);
                        bFirst = false;
                    }
                }
            }
        }
Now I wonder if this Disallows.... meant to appear in all civics, that doesn't support given building.
It seems like there is bug in code, since that Disallows... text appears only if building needs default civic as one of its prereqs.
@Thunderbrd @makotech222 @alberts2 may check this and correct it either by getting rid of Disallows.... text or by fixing it.
It seems like we don't have active DLL modders for now.
Edit: Other piece of code shows Disallow.... text trigger.
 
It seems like we don't have active DLL modders for now.

I'm training to be one but that takes time, especially with an object-oriented language like C++.

It helps a little that I have a background in R and Visual Basic, but I'm still not comfortable to work and compile stuff in c++ just yet.
 
I'm training to be one but that takes time, especially with an object-oriented language like C++.

It helps a little that I have a background in R and Visual Basic, but I'm still not comfortable to work and compile stuff in c++ just yet.
Well the first thing to figure out is what is or is not an object. You will get 17 different answers to that on any given project with about 3 different ones per person. Settle on a Data Model and that will usually reduce it to 3-5 different answers. If you can agree on three data models one each for data storage, program use and user use, you can usually get to an agreement. The biggest problem in Civ is that they use the same data model for everything which means there is a lot of overhead and you have to make the model fit what you want to do.

Visual Basic was a good object oriented event driven language. It was basically object oriented on the user usage data model. "They" got rid of it (or made it more C like) because too many ordinary people were writing programs that were user friendly and fun.:lol:
 
I think "Disables construction of".... line can be removed from game altogether - it just clutters space in later civics.
It happens with buildings, that are unlocked by default civics, but doesn't happen with buildings unlocked by later civics.



This must be DLL/Python stuff - I couldn't find XML source of it.

I noticed some religious buildings and national/world wonders locked behind civics.
I might want to help except that as a player I find it enormously useful to see this line!
 
I might want to help except that as a player I find it enormously useful to see this line!
Then it should be fixed, so it shows for rest for civics, not just when building uses default civics as prereq.

Code:
bFirst = true;
if (NO_PLAYER != GC.getGameINLINE().getActivePlayer())
{
    if (!GET_PLAYER(GC.getGameINLINE().getActivePlayer()).isCivic(eCivic))
    {
        for (iI = 0; iI < GC.getNumBuildingClassInfos(); ++iI)
        {
            eLoopBuilding = (BuildingTypes)GC.getCivilizationInfo(GC.getGameINLINE().getActiveCivilizationType()).getCivilizationBuildings(iI);
         
            if (eLoopBuilding != NO_BUILDING)
            {
                if (GC.getGameINLINE().canEverConstruct(eLoopBuilding))
                {
                    bool bObsolete = false;
                    CivicTypes eCurCivic = GET_PLAYER(GC.getGameINLINE().getActivePlayer()).getCivics((CivicOptionTypes)GC.getCivicInfo(eCivic).getCivicOptionType());
                    if (GC.getBuildingInfo(eLoopBuilding).isPrereqAndCivics(eCurCivic))
                    {
                        bObsolete = true;
                    }
                    else if (GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics(eCurCivic) && !GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics(eCivic))
                    {
                        bObsolete = true;
                        for (int iJ = 0; iJ < GC.getNumCivicInfos(); iJ++)
                        {
                            if (iJ != eCurCivic && iJ != eCivic)
                            {
                                if (GC.getBuildingInfo(eLoopBuilding).isPrereqOrCivics((CivicTypes)iJ))
                                {
                                    if (GET_PLAYER(GC.getGameINLINE().getActivePlayer()).isCivic((CivicTypes)iJ))
                                    {
                                        bObsolete = false;
                                        break;
                                    }
                                }
                            }
                        }
                    }
                    if (bObsolete)
                    {
                        CvWString szBuilding;
HERE -----------------> szFirstBuffer.Format(L"%s%s", NEWLINE, gDLL->getText("TXT_KEY_CIVIC_BLOCKS_BUILDING").c_str());
                        szBuilding.Format(L"<link=literal>%s</link>", GC.getBuildingInfo(eLoopBuilding).getDescription());
                        setListHelp(szHelpText, szFirstBuffer, szBuilding, L", ", bFirst);
                        bFirst = false;
                    }
                }
            }
        }
    }
}
 
@pepper2000 would you allow me to change the names of Programmed Morality and Utility Maximization to Phronetic and Eudaimonic, respectively? I was inspired by SMAC's civics and found that these two names correspond pretty well to what the descriptions you wrote try to convey.

---

For Programmed Morality, the description says that "all people are engineered to live with lofty values, and all machines are programmed to maximize well-being".

The wikipedia description for Phronesis states that "it is more specifically a type of wisdom relevant to practical action, implying both good judgement and excellence of character and habits, or practical virtue".

---

For Utility maximization, the description says that "Omnibenevolence is a philosophical tradition that your society's objective is to maximize the well-being of all conscious entities throughout the multiverse."

The wikipedia description for Eudaimonia states that "In his Nicomachean Ethics Aristotle says that everyone agrees that eudaimonia is the highest good for human being:", and "Aristotle takes virtue and its exercise to be the most important constituent in eudaimonia but acknowledges also the importance of external goods such as health, wealth, and beauty".

The SMAC description also states that "The happy life is thought to be one of excellence; now an excellent life requires exertion, and does not consist of amusement. If Eudaimonia, or happiness, is activity in accordance with excellence, it is reasonable that it should in accordance with the highest excellence; and this will be that of the best thing in us."
 
@pepper2000 The SMAC description also states that "The happy life is thought to be one of excellence; now an excellent life requires exertion, and does not consist of amusement. If Eudaimonia, or happiness, is activity in accordance with excellence, it is reasonable that it should in accordance with the highest excellence; and this will be that of the best thing in us."

Is it just me, or does that description sound a bit... fashy? Or, at least authoritarian? The idea that society can only be perfect if people are explicitly coerced to act within its reference of what it constitute as good morals doesn't really strike me as very utopian, and also perpetuates the idea that evil is some kind of inherent force caused by human nature, rather than a consequence of systemic ills and faulty communication
 
  • Like
Reactions: tmv
Back
Top Bottom