As a French person I feel like it's my duty to explain strikes to you. - AdrienIer

Create an account  

 
Rebalancing Civ4: RtR Mod

Quote:I'd be happy with a normal spy (normal visibility) that cannot see units.

If you can get this working, then I think it's the preferred course of action.
Current games (All): RtR: PB80 Civ 6: PBEM23

Ended games (Selection): BTS games: PB1, PB3, PBEM2, PBEM4, PBEM5B, PBEM50. RB mod games: PB5, PB15, PB27, PB37, PB42, PB46, PB71. FFH games: PBEMVII, PBEMXII. Civ 6:  PBEM22 Games ded lurked: PB18
Reply

And cultural borders definitely need to still be able to see units. That may make the invisible tags difficult to use.

But it's a better type of blindness, since it only does the part that we're really worried about: unit scouting.
Reply

T-hawk Wrote:I could have a look at that cacheInterfacePlotUnits but wouldn't have time before Sunday. Next week I'm freer if you can start the PBEM a few days later.
I looked in the C++ code and couldn't see this 'function'. Maybe I am not looking in the right files - where are they typically?
I have finally decided to put down some cash and register a website. It is www.ruffhi.com. Now I remain free to move the hosting options without having to change the name of the site.

(October 22nd, 2014, 10:52)Caledorn Wrote: And ruff is officially banned from playing in my games as a reward for ruining my big surprise by posting silly and correct theories in the PB18 tech thread.
Reply

Yeah I assumed it was in the C++ when you mentioned it, but I searched and didn't find it either.

I think we're all agreed that a normal spy that can't see units is a fine implementation, but the question is how to do that technically?


Quote:On map maintenance: I would support making toroidal maps function like cylindrical ones for maintenance.

I got this done and working 100%. thumbsup
Reply

A spy that cannot see units might be difficult to code. The game has a set approach to working out if you can see the units ...

1. can you see the plot
2. show what units are on the plot (if they are visible)

Now, with the second part, you need to know why the plot is visible to determine if you can see the units.

Example
The plot is visible because I just buzzed it with an airship
Or
The plot is visible because I have a spy standing on it

For the first, you show the units. For the second, you don't. So ... the way I see it, you need two statuses of 'visible'. One that shows the units and one that doesn't. But wait!! The game already allows for this with subs. They are invisible unless there is a unit that can see it in range. So, I guess, the game looks at the unit on a plot and only says it is visible if a unit with x-ray vision is in range. I'm not sure where this test is done.

If it helps, I've been looking at getPlotUnit and getPlot Units in CvGameInterface.cpp. The secret sauce might be in there.

Edit: Also look in CvUnit.cpp and in particular the following:
Code:
bool CvUnit::isInvisible(TeamTypes eTeam, bool bDebug, bool bCheckCargo) const
{
    if (bDebug && GC.getGameINLINE().isDebugMode())
    {
        return false;
    }

    if (getTeam() == eTeam)
    {
        return false;
    }

    if (alwaysInvisible())
    {
        return true;
    }

    if (bCheckCargo && isCargo())
    {
        return true;
    }

    if (getInvisibleType() == NO_INVISIBLE)
    {
        return false;
    }

    return !(plot()->isInvisibleVisible(eTeam, getInvisibleType()));
and from CvPlot.cpp
Code:
bool CvPlot::isInvisibleVisible(TeamTypes eTeam, InvisibleTypes eInvisible)    const
{
    return (getInvisibleVisibilityCount(eTeam, eInvisible) > 0);
}


void CvPlot::changeInvisibleVisibilityCount(TeamTypes eTeam, InvisibleTypes eInvisible, int iChange)
{
    bool bOldInvisibleVisible;

    FAssertMsg(eTeam >= 0, "eTeam is expected to be non-negative (invalid Index)");
    FAssertMsg(eTeam < MAX_TEAMS, "eTeam is expected to be within maximum bounds (invalid Index)");
    FAssertMsg(eInvisible >= 0, "eInvisible is expected to be non-negative (invalid Index)");
    FAssertMsg(eInvisible < GC.getNumInvisibleInfos(), "eInvisible is expected to be within maximum bounds (invalid Index)");

    if (iChange != 0)
    {
        bOldInvisibleVisible = isInvisibleVisible(eTeam, eInvisible);

        if (NULL == m_apaiInvisibleVisibilityCount)
        {
            m_apaiInvisibleVisibilityCount = new short*[MAX_TEAMS];
            for (int iI = 0; iI < MAX_TEAMS; ++iI)
            {
                m_apaiInvisibleVisibilityCount[iI] = NULL;
            }
        }

        if (NULL == m_apaiInvisibleVisibilityCount[eTeam])
        {
            m_apaiInvisibleVisibilityCount[eTeam] = new short[GC.getNumInvisibleInfos()];
            for (int iI = 0; iI < GC.getNumInvisibleInfos(); ++iI)
            {
                m_apaiInvisibleVisibilityCount[eTeam][iI] = 0;
            }
        }

        m_apaiInvisibleVisibilityCount[eTeam][eInvisible] += iChange;

        if (bOldInvisibleVisible != isInvisibleVisible(eTeam, eInvisible))
        {
            if (eTeam == GC.getGameINLINE().getActiveTeam())
            {
                updateCenterUnit();
            }
        }
    }
}
Righto - I have totally exhausted my C++ knowledge now.
I have finally decided to put down some cash and register a website. It is www.ruffhi.com. Now I remain free to move the hosting options without having to change the name of the site.

(October 22nd, 2014, 10:52)Caledorn Wrote: And ruff is officially banned from playing in my games as a reward for ruining my big surprise by posting silly and correct theories in the PB18 tech thread.
Reply

I'm in the process of testing the modified corporations. The changes being done are as follows:

Civics:
Got a few changes going on here.
1) Free Market no longer reduces corporation maintenance. Instead, it provides a +25% boost to trade yield (which is additive on top of all of the other trade yield bonuses; this makes base foreign routes 3 commerce for same-continent, non-coastal cities, and will provide marginal increases on water-based maps)
2) Free Speech is now High Upkeep, and increases corporate costs by 50%.
Now you can't run a full cottage and corporation economy without paying through the nose in corporate maintenance; corporate maintenance is significantly increased (see below), so you'll notice the costs.
3) Environmentalism now actually lets you build bigger cities:
The corporate maintenance penalty was removed.
Environmentalism provides +2 happiness from the granary (can't do a flat +2 happy in the XML, but this provides the same benefit since you will have a granary built by this point).
Also, it is enabled at Scientific Method; this is slightly later than Merc/FM, but not so much later that you'll be as likely to skip it if it would be helpful.

Corporations themselves:
1) General Corporate Structure:
When you research the relevant tech, you get a free executive of that corporation. The very first time a specific corporation's executive is born this way, all players get a "CreateCon Executive was born in a foreign land!" message. I have not tested if one or all players on a team (in, say, a 2v2v2 game) would get the free executive.
When an executive founds a corporation for the first time, the headquarters is not created at that city. Instead, the same Great Person who would found the corporation in the base game can be used in any one city that has the corporation to build the headquarters. The Headquarters only provides 1g per city with that corporation. The Headquarters can only be built once, it's treated as a world wonder for those purposes.
Also, executives should never fail to spread a corporation; I tested it with 4 corps and 30 cities, and didn't get a single failed spread in any of them. This is mostly to keep a bad die roll from costing a player complete access to a corporation.
Executives require Corporation to be built; the Headquarters requires both Corporation and the relevant corporation's founding tech to be built; your free executive spawns regardless of whether or not you've researched Corporation (impossible to code otherwise, and the effects of doing it this way are minor).

This set of changes does three things:
a) Limits the advantage of being first to the tech.
b) Limits the power of the headquarters; right now, a Wall Street Headquarters can approximately fully pay for the maintenance costs of running a corporation.
c) Keeps the benefits of the Great Person on par with that of a new shrine, although the corporation could be spread far more widely, but on the other hand the corporation comes much later

b) Corporate yields and corporate maintenance.
Based on Corporate Maintenance Explained, I made some changes to the level of maintenance paid by a corporation.
1) Difficulty no longer affects corporate maintenance. The power of corporations shouldn't vary by difficulty level; tile improvements and specialists don't, so why should the other pillar of one's economy vary so greatly?
2) Because of how corporate maintenance is calculated, the corporate maintenance you're used to is highly dependent on the value of the corporation to the headquarters. So, if I didn't change corporate maintenance, the in-city cost of running a corporation would have decreased significantly.

Note: Under Representation, and assuming a bank, library, and university, a 2f merchant provides 6 base econ, or 9 beakers/gold after multipliers. Obviously other uses of corporate food exist, but that provides a straight-forward, always-available set of benefits for food.

Assuming a Standard Sized map (both resource benefits and costs scale with map size, see the link for more details), a size 10 city (so a population modifier of 1.5; this should be approximately one's civ-wide average), and a courthouse (costs are after inflation):
  • Sid's Sushi: 0.5f and 2 culture per resource. Costs are 2.25g per resource, or 4.5g for 1 food and 4 culture.
  • Cereal Mills: 0.5f per resource. Costs are 2g per resource, or 4g for 1f.
  • Mining Inc.: 1h per resource. Costs are 2g per base hammer.
  • Creative Constructions: 0.5h and 3 culture per resource. Costs are 1.25g per resource, or 2.5g for 1 base hammer and 6 culture.
  • Aluminum, Inc.: 3 beakers per coal. Still provides aluminum. Costs are 1g per coal. However, one has few enough coals that this plays a minor role at best. Usually there are little more than 1 coal resource per person.
  • Standard Ethanol: 2 beakers per resource. Still provides oil. Costs are 1g per resource. However, Standard Ethanol conflicts with the food corps, so its value is marginal.
  • Civ Jewelers: 1g and 4 culture per resource. Costs are 1g per resource.

Yes, the cost of generating culture is intentionally kept low; it's only truly valuable if you're going for a cultural victory, which we haven't seen seriously attempted since PBEM1, and that was at the same time as of the other victory conditions (Diplo and Space) were in play.
Reply

Sorry, I won't be able to post a working version right now, because the Executive spawning didn't fire properly when I tested it.
Reply

It's still better to run corps than not, even if you never run FS or SP, with those valuations and costs. FS/US towns+Corps > Corps + none FS, none US towns > FS/US towns > SP workshops. FS provides at least 3 gold/town there but only increases the cost per food by 2 gold.

Corps are a complete no brainer.
Current games (All): RtR: PB80 Civ 6: PBEM23

Ended games (Selection): BTS games: PB1, PB3, PBEM2, PBEM4, PBEM5B, PBEM50. RB mod games: PB5, PB15, PB27, PB37, PB42, PB46, PB71. FFH games: PBEMVII, PBEMXII. Civ 6:  PBEM22 Games ded lurked: PB18
Reply

Krill Wrote:Corps are a complete no brainer.

So are libraries. City with library > City without library EVERY TIME NO BRAINER! BAN LIBRARIES!

Spreading a corp everywhere is a no brainer? So is religion. City with religion > City without religion EVERY TIME NO BRAINER! REMOVE RELIGION NOW!

So are tile improvements. Grassland with cottage > Grassland without cottage NO BRAINER! BAN COTTAGES!

If you think the last one isn't a no brainer, you're right. The reason is competing options and tradeoffs. It's always correct to improve a tile, but any particular grassland might be best off with a farm or workshop or watermill instead of that cottage. Corps are similarly a tradeoff of opportunity cost. Corps may be always to the positive (even with the HQ gold nerfed), but so are lots of other developments in the game. The corporation techs are pretty deep into the tree along lines that don't lead to military tech; it's the same kind of tradeoff as choosing between Education - PPress or Guilds - Gunpowder tech lines. Executives themselves cost 100 hammers that isn't becoming a rifleman or tank. And there is always the tradeoff between corps and State Property where each will be better in some situations.

Finally, banning corps entirely isn't something that a rebalance mod needs to do. Corps can always simply be banned by player agreement, like War Elephants and spies have been. A rebalance mod should be bringing corporations to a reasonable power level for games and players that want to use them.
Reply

I haven't followed closely the discussion here lately, but now that I decided to check what is going on I get a feeling that Corporations have been nerfed way too much. Based on Cyneheard's example city, spreading the corporation costs 100 hammers and assuming e.g. 5 Mining inc resources you get 5 hammers at the cost of 10 gold. This feels very expensive. I wouldn't bother normally. Even for the HQ owners benefits are very marginal unless someone else spreads it for him and typically there is less than 100 turns left in the game when you're spreading. Am I understanding something wrong?
Reply



Forum Jump: