Caveman 2 Cosmos (ideas/discussions thread)

Besides changing cbegin and cend to begin and end for older C++, I'd like to add a read-only subscript operator there:
Code:
mapped_type operator[](const key_type& key) const
{
    const_iterator iter = find(key);
    return iter != end()
        ? iter->second
        : mapped_type();
}
How does this look like? If the key is not found, return zero.

This is so fun to use. I even did a trick to access the keys by index (order)...
Spoiler In practice :
Code:
flat_map<int,int> m_piPrereqNumOfBuildingClass;
int CvBuildingInfo::getPrereqNumOfBuildingClass(int i) const
{
    FAssertMsg(i < GC.getNumBuildingClassInfos(), "Index out of bounds");
    FAssertMsg(i > -1, "Index out of bounds");

    return m_piPrereqNumOfBuildingClass[i];
}
int CvBuildingInfo::getPrereqNumOfBuildingClassKeys(int i) const
{
    FAssertMsg(i < m_piPrereqNumOfBuildingClass.size(), "Index out of bounds");
    FAssertMsg(i > -1, "Index out of bounds");

//  A little hack with pointer arithmetic, maybe?
    return (m_piPrereqNumOfBuildingClass.begin()+i)->first;
}
int CvBuildingInfo::getNumPrereqNumOfBuildingClass() const
{
    return m_piPrereqNumOfBuildingClass.size();
}
Code:
void SetOptionalPairVector(flat_map<int,int>& aInfos, const wchar_t* szRootTagName)
{
    CvString szTextVal;
    aInfos.clear();
    if (TryMoveToXmlFirstChild(szRootTagName))
    {
        int iNumSibs = GetXmlChildrenNumber();
        if (0 < iNumSibs)
        {
            if (TryMoveToXmlFirstChild())
            {
                for (int j = 0; j < iNumSibs; ++j)
                {
                    if (GetChildXmlVal(szTextVal))
                    {
                        int iType = GetInfoClass(szTextVal);
                        int iModifier;
                        GetNextXmlVal(&iModifier);
                        if (iType != -1 && iModifier)
                        {
                            aInfos[iType] = iModifier;
                        }
                        MoveToXmlParent();

                    }

                    if (!TryMoveToXmlNextSibling())
                    {
                        break;
                    }

                }

                MoveToXmlParent();
            }
        }

        MoveToXmlParent();
    }
}
Code:
template<class Key, class Value>
static void CopyNonDefaultsFromFlatMap(flat_map<Key,Value> target, const flat_map<Key,Value>& source)
{
    for (flat_map<Key,Value>::const_iterator it = source.begin(); it != source.end(); ++it)
    {
        if (it->first != -1 && target.find(it->first) == target.end())
        {
            target.insert(*it);
        }
    }
}
I have some suggestions but I'am out of time today.
 
First of all I just want to say I lost this game around 2 years ago when my computer broke and I was forced to get a new one with windows 10. I’ve just finally managed to get civ4 to run on this machine and was surprised by how easy and quick the download for this mod is these days.

Anyway i’m playing on a laptop so I have a smaller screen then most. But I have issues with the diplomacy info screen not being wide enough to see all the info. Is there anyway to add a scroll bar or something to the page to scroll side to side? There may be other pages but that's the one I've noticed the most.
 
Done and Committed SO.
There were few minor errors, that I corrected.
XML wasn't capitalized in one case, two people were accidentally deleted - probably they were contributors from before 2014, and Kation was revising texts too - Prehistoric techs, and all civics.
He also did some cleanup in tech tree.
 
First of all I just want to say I lost this game around 2 years ago when my computer broke and I was forced to get a new one with windows 10. I’ve just finally managed to get civ4 to run on this machine and was surprised by how easy and quick the download for this mod is these days.

Anyway i’m playing on a laptop so I have a smaller screen then most. But I have issues with the diplomacy info screen not being wide enough to see all the info. Is there anyway to add a scroll bar or something to the page to scroll side to side? There may be other pages but that's the one I've noticed the most.
Not with any ease, I'm afraid. Most of us wouldn't know how and from what I understand it would be a massive overhaul project to even enable us to touch the diplo screen.
 
First of all I just want to say I lost this game around 2 years ago when my computer broke and I was forced to get a new one with windows 10. I’ve just finally managed to get civ4 to run on this machine and was surprised by how easy and quick the download for this mod is these days.

Anyway i’m playing on a laptop so I have a smaller screen then most. But I have issues with the diplomacy info screen not being wide enough to see all the info. Is there anyway to add a scroll bar or something to the page to scroll side to side? There may be other pages but that's the one I've noticed the most.
Only way to get it to display that screen better is to increase the resolution of the game, do you have the game at your screen's max resolution?
 
Correct.

Names already in list are: AIAndy, alberts2, calvitix, Dancing Hoskuld, faustmouse, hydromancerx, mrazure, strategyonly, Thunderbrd,
Yudishtira.

Not in list: Anq, aztur, dsma_bell, Harrier123, hx2762, JosEPh_II, KaTiON_PT, magillicutty, makotech222, pepper2000, praetyre, raledon, raxo2222, sargonthegreat2, toffer90,
There are also a number of translators that we probably should add in. Since a number of them were working at the same time they did not commit to the SVN but went through a coordinator so that they did not overwrite each other's work
Anyway i’m playing on a laptop so I have a smaller screen then most. But I have issues with the diplomacy info screen not being wide enough to see all the info. Is there anyway to add a scroll bar or something to the page to scroll side to side? There may be other pages but that's the one I've noticed the most.
If the screen was done in Python or in the dll we would have access to it to change it but it is in the exe, the code for that has not been released for modding. It is "rented" by Firaxis for use in Civ IV so there is no point asking them for permission. That means we would need to deactivate it and build a new one. Not a small task unfortunately.
 
@ The Team:

Ok, so after some consideration, I'll split the difference with y'all and let the freeze extend for another week. Or at least until Friday night most likely. Please consider it a seriously off limits time to update unless it's absolutely necessary and a time to either carefully prepare your next brilliant launch into the v40 design cycle or to sit back and play for a week. We do have to play now and then. Again, if all goes well, we'll be seeing a packaged up v39 on Friday.
 
There were few minor errors, that I corrected.
XML wasn't capitalized in one case, two people were accidentally deleted - probably they were contributors from before 2014, and Kation was revising texts too - Prehistoric techs, and all civics.
He also did some cleanup in tech tree.
SO wanted descriptions brief. So I made them brief. The Acularius line was my copy/paste line that I would then edit to a new person. Had 1 too many then. Or I skipped a name. Oh well it happens. :p

@raxo2222 ,
Got a nitpick with you over Buildings like Grammaticus, Library, etc. You reduced the :science: on these but did Nothing with the high cost in :gold:. The reason these buildings Cost so much was because Hydro designed them as Research boost buildings but with high maint cost to balance the desire to build them. By doing what you did to research overall and to these buildings in particular, the measly 1 :science: you get is abysmal for the price you pay. Might want to fix this before Release.
 
Fixed that one :)
I have not updated to the last SVN and I'm not seeing any duplication on my list. <shrug> But if you both saw one, then Okay glad you caught it.
 
SO wanted descriptions brief. So I made them brief. The Acularius line was my copy/paste line that I would then edit to a new person. Had 1 too many then. Or I skipped a name. Oh well it happens. :p

@raxo2222 ,
Got a nitpick with you over Buildings like Grammaticus, Library, etc. You reduced the :science: on these but did Nothing with the high cost in :gold:. The reason these buildings Cost so much was because Hydro designed them as Research boost buildings but with high maint cost to balance the desire to build them. By doing what you did to research overall and to these buildings in particular, the measly 1 :science: you get is abysmal for the price you pay. Might want to fix this before Release.
I would allow that to be corrected prior to release. Please asap so that testing can ensure no errors from now to Fri.
 
SO wanted descriptions brief. So I made them brief. The Acularius line was my copy/paste line that I would then edit to a new person. Had 1 too many then. Or I skipped a name. Oh well it happens. :p
ahahaahahah yes it happens, "have a fun day" . . . .
 
@raxo2222 ,
Got a nitpick with you over Buildings like Grammaticus, Library, etc. You reduced the :science: on these but did Nothing with the high cost in :gold:. The reason these buildings Cost so much was because Hydro designed them as Research boost buildings but with high maint cost to balance the desire to build them. By doing what you did to research overall and to these buildings in particular, the measly 1 :science: you get is abysmal for the price you pay. Might want to fix this before Release.

If they had +X% modifier, then now they have +X/2% modifier.
So if library or grammaticus was giving +20% to research, then now they give +10% to research.
I reduced all research modifiers from resources to +1% though.
I didn't touch any CommerceChanges though, so building that has +5:science: it still has +5:science:

According to blame tool I didn't change anything in Library and Grammaticus since SVN 10000 except for adding AIWeight.
I halved research modifiers of buildings in SVN 10565.
So those buildings you mentioned were weak when it comes to research for long time.

You can buff those buildings though - it wasn't me, who nerfed them ;)

As for brief descriptions, Kation one is brief too, just that he did a lot of XML stuff mainly texts, and he made space maps.
 
Last edited:
According to blame tool I didn't change anything in Library and Grammaticus since SVN 10000 except for adding AIWeight.
You did not commit SVN 10000 T-brd did so your Blame tool is either Off it's mark Or you just glossed over it. In fact 10060 was the closest commit you had to SVN 10000. And this time frame was late March of this year. Not a long time ago.

EDIT: Found the SVN commit that Doubled the Maint cost on Grammaticus bldg. SVN 10031 by Toffer

Will revert this change on this bldg.

EDIT2: Will be going over other Buildings of this type, like Library, Mathematics Academy, etc. for these type changes to Maint. costs from Hydro original values.
 
Last edited:
You did not commit SVN 10000 T-brd did so your Blame tool is either Off it's mark Or you just glossed over it. In fact 10060 was the closest commit you had to SVN 10000. And this time frame was late March of this year. Not a long time ago.
Blame tool is part of SVN tortoise.
It doesn't matter who did given commit in blame tool when specifying commit range.
I specified commit range between 10000 and last one, so ALL OF THEM in that range was taken under account.

I nerfed research modifiers in 10565.
But I didn't touch those two buildings at all when it comes to research.
Library and Grammaticus had unchanged research stuff since SVN 9000 according to blame tool.
So I never nerfed those buildings.

That blame tool is separate thing from "Diff..." tool.

So you just noticed, that Grammaticus and Library are very weak buildings research wise, when it could been like that for years or even be designed originally like that.
 
Last edited:
@raxo,
See my Edit in previous post.
 
So you just noticed, that Grammaticus and Library are very weak buildings research wise, when it could been like that for years or even be designed originally like that.
Please stop with the inaccurate accusations. And stop making assumptions about what and when I "notice" something. This is derogatory and not at all helpful.
 
Blame tool is really inaccurate at some points, and it doesn't have to do with the svn client bundled with Tortoise. Using another svn tool (different backend software) and I still receive some off the mark annotations. I assume it has to do with the difference data in the server storage, and in general the Subversion system's way to do diffs. Y'know, the basic diff tool can have many different implementations, and it was not designed to be "trained" like AI to be perfect, just reliable.
 
Top Bottom