[Vote] (6-38) Cities Can Only Ask For Revealed Resources (WLTKD)

Include in VP?


  • Total voters
    79
  • Poll closed .
Status
Not open for further replies.

adan_eslavo

Archmage of all Pixels
Supporter
Joined
Apr 23, 2017
Messages
3,640
Location
Łódź, Poland
Current situation: Cities ask for resources that are not yet discovered by the player. Clarification: Only after researching Astronomy.
Proposal:
Cities ask for resources player knows (discovered). Clarification: The player has revealed that resource on the map. This requirement would also exclude any luxuries from e.g., Great Admirals, that aren't on the map.

Rationale:
Sometimes this lead to a situation when you know that particular civ is in the game (Brazil, Indonesia), because city asks for Brazilwood or Pepper. Sometimes it blocks city for a long time until you discover the place where the resource really is and this can be on the other side of the map under some lonely city-state hidden in the snow. Whole mechanic looks weird. Here you have a bonus: movie about vanilla game saying it's a bit stupid :)
 
Last edited by a moderator:
Code:
    // Create the list of invalid Luxury Resources
    set<ResourceTypes> localLuxuryResources;

    // Loop through all Plots near this City to see if there's Luxuries we should invalidate
    for (int iPlotLoop = 0; iPlotLoop < GetNumWorkablePlots(); iPlotLoop++)
    {
        CvPlot* pLoopPlot = iterateRingPlots(getX(), getY(), iPlotLoop);
        if (pLoopPlot != NULL)
        {
            ResourceTypes eResource = pLoopPlot->getResourceType();
            if (eResource != NO_RESOURCE)
            {
                if (GC.getResourceInfo(eResource)->getResourceUsage() == RESOURCEUSAGE_LUXURY)
                {
                    localLuxuryResources.insert(eResource);
                }
            }
        }
    }

    // VP: Only resources discovered by this player (or a player met by this player) are valid prior to researching Astronomy
    bool bOnlyAllowDiscoveredResources = MOD_BALANCE_VP && !GET_TEAM(getTeam()).canEmbarkAllWaterPassage();
    set<ResourceTypes> DiscoveredLuxuryResources;
    if (bOnlyAllowDiscoveredResources)
    {
        // First compile a list of the major civ teams this player has met
        vector<TeamTypes> vTeamsMet;
        vTeamsMet.push_back(getTeam());
        CvDiplomacyAI* pDiplo = GET_PLAYER(getOwner()).GetDiplomacyAI();
        for (int iPlayerLoop = 0; iPlayerLoop < MAX_MAJOR_CIVS; iPlayerLoop++)
        {
            PlayerTypes eLoopPlayer = (PlayerTypes)iPlayerLoop;
            if (pDiplo->IsPlayerValid(eLoopPlayer) && std::find(vTeamsMet.begin(), vTeamsMet.end(), GET_PLAYER(eLoopPlayer).getTeam()) == vTeamsMet.end())
                vTeamsMet.push_back(GET_PLAYER(eLoopPlayer).getTeam());
        }

        // Now go through the map and see which resources have been discovered by civs this player has met
        CvMap& theMap = GC.getMap();
        int iNumPlots = theMap.numPlots();
        for (int iI = 0; iI < iNumPlots; iI++)
        {
            CvPlot* pLoopPlot = theMap.plotByIndexUnchecked(iI);
            ResourceTypes eResource = pLoopPlot->getResourceType(getTeam()); // This check will ignore resources that haven't been discovered by this player (tech)
            if (eResource != NO_RESOURCE)
            {
                CvResourceInfo* pkResource = GC.getResourceInfo(eResource);
                if (pkResource && pkResource->getResourceUsage() == RESOURCEUSAGE_LUXURY && localLuxuryResources.find(eResource) == localLuxuryResources.end()
                    && DiscoveredLuxuryResources.find(eResource) == DiscoveredLuxuryResources.end())
                {
                    for (std::vector<TeamTypes>::iterator it = vTeamsMet.begin(); it != vTeamsMet.end(); it++)
                    {
                        if (pLoopPlot->isRevealed(*it, false))
                            DiscoveredLuxuryResources.insert(eResource);
                    }
                }
            }
        }
    }

    // Create list of valid Luxuries
    vector<ResourceTypes> veValidLuxuryResources;
    CvLeague* pLeague = GC.getGame().GetGameLeagues()->GetActiveLeague();
    for (int iResourceLoop = 0; iResourceLoop < GC.getNumResourceInfos(); iResourceLoop++)
    {
        ResourceTypes eResource = (ResourceTypes)iResourceLoop;

        // Is this a Luxury Resource?
        CvResourceInfo* pkResource = GC.getResourceInfo(eResource);
        if (pkResource && pkResource->getResourceUsage() == RESOURCEUSAGE_LUXURY)
        {
            // VP: Can't reroll the same resource as before!
            if (MOD_BALANCE_VP && ePreviousResource == eResource)
                continue;

            // VP: No unknown tech resources
            if (MOD_BALANCE_VP && !GET_TEAM(getTeam()).IsResourceRevealed(eResource))
                continue;

            // Is the Resource actually on the map?
            if (GC.getMap().getNumResources(eResource) <= 0)
                continue;

            if (pkResource->isOnlyMinorCivs())
                continue;

            if (pLeague && pLeague->IsLuxuryHappinessBanned(eResource))
                continue;

            if (localLuxuryResources.find(eResource) != localLuxuryResources.end())
                continue;

            if (bOnlyAllowDiscoveredResources && DiscoveredLuxuryResources.find(eResource) == DiscoveredLuxuryResources.end())
                continue;

            if (!MOD_BALANCE_VP && GET_PLAYER(getOwner()).getNumResourceAvailable(eResource) > 0)
                continue;

            veValidLuxuryResources.push_back(eResource);
        }
    }
 
Huh, I would swear that cities asked me for some stupid things, but it might be possible that they asked me for something from a player that I only met even not knowing where he actually is on the map...
If you don't think it can be improved somehow, then I guess I have to withdraw the proposal?
 
@azum4roll I think, currently cities only ask for resources that you can discover with your scouts?
CS quests are different from WLTKD requests. The only restrictions for the former are
  • Resource must exist on the map
  • No banned resources
  • The player's capital city's landmass must contain this resource, or the player must be able to cross the ocean
 
obvious 'yeah' on this one... nearly every game theres a point where i wonder 'how do they even know about x resource for them to want it'?

that said, theres some thematic opportunity to tie in the undiscovered demands... astronomy seems kind of arbitrary, thematically... but if the undiscovered resources started being demanded after, say, printing press, or perhaps some other information-distribution-related tech (education?), I'd find this very satisfying.
 
WLTKD is already easy enough to get. Do we really want to make it easier?
 
I voted no because the basic form of this already exists: they only ask for luxuries of people you've met, as a mechanical way of inspiring trade and interaction. This proposal incentivizes keeping at home to minimize "accidentally" revealing more luxuries than you can afford. This isn't a dynamic I want to promote in the scouting mini-game.

To me the issues to solve are:
  1. revealed luxuries vs. connected luxuries
  2. Polynesia meets everyone, and ruins their WLTKDs (similar to how Indonesia would, if you didn't spawn on their continent, before the current invalidations were added)
I think this can be done in a different, better way.

This proposal also doesn't address what I consider the more pressing issue, which is that CS will still ask for invalid luxuries. So this is only targeting half of the problem.
 
I voted no because the basic form of this already exists: they only ask for luxuries of people you've met, as a mechanical way of inspiring trade and interaction. This proposal incentivizes keeping at home to minimize "accidentally" revealing more luxuries than you can afford. This isn't a dynamic I want to promote in the scouting mini-game.

To me the issues to solve are:
  1. revealed luxuries vs. connected luxuries
  2. Polynesia meets everyone, and ruins their WLTKDs (similar to how Indonesia would, if you didn't spawn on their continent, before the current invalidations were added)
I think this can be done in a different, better way.

This proposal also doesn't address what I consider the more pressing issue, which is that CS will still ask for invalid luxuries. So this is only targeting half of the problem.
Next congress awaits then. If there's still field to improve, then why not.
 
Polynesia meets everyone, and ruins their WLTKDs (similar to how Indonesia would, if you didn't spawn on their continent, before the current invalidations were added)
You can still buy their luxuries. They'll be more than happy to sell.

The bigger hurdle for WLTKD is those rare resources (often sea-based) that are only available on a remote island or just one CS. But that's ok design-wise.

Great Admiral resources really need to be included. They currently serve no purpose for buying other than the 2 :c5happy:.
 
// Now go through the map and see which resources have been discovered by civs this player has met
...
This means if Polynesia sees the luxury while exploring the globe, they'll tell your cities about it and then you'll have requests for the luxury, even if Polynesia doesn't own it and no one else can get to it, and even if it's not improved by whoever does own it. So you can't buy it from Polynesia nor from the unknown owner of the resource.

Right? Maybe I misunderstand. Which is why I was thinking "resources revealed" => "resources improved" (until astronomy) would be the better change. It's mostly the same for most of the game, but side-steps some specific interactions that are annoying and don't feel very fair.

The rest of what you mention is all upside to me as well: if they have a copy (even their last one), you can buy it; if it's on a remote island and no one has any, you can settle it (after astronomy); and of course Admirals are just floating Leadership auras otherwise.
 
This means if Polynesia sees the luxury while exploring the globe, they'll tell your cities about it and then you'll have requests for the luxury, even if Polynesia doesn't own it and no one else can get to it, and even if it's not improved by whoever does own it. So you can't buy it from Polynesia nor from the unknown owner of the resource.

Right? Maybe I misunderstand. Which is why I was thinking "resources revealed" => "resources improved" (until astronomy) would be the better change. It's mostly the same for most of the game, but side-steps some specific interactions that are annoying and don't feel very fair.

The rest of what you mention is all upside to me as well: if they have a copy (even their last one), you can buy it; if it's on a remote island and no one has any, you can settle it (after astronomy); and of course Admirals are just floating Leadership auras otherwise.
There is no exception for Polynesia.

CvTeam::canEmbarkAllWaterPassage() will return false for Polynesia if they haven't researched Astronomy (unlike CvPlayer::CanCrossOcean(), which is used in movement checks).
 
WLTKD is already easy enough to get. Do we really want to make it easier?
I think the ease of getting WLTKD is an issue that needs to be addressed anyway, regardless of this proposal
there are a lot of "during we love the king day" effects, and they more or less translate to unconditional bonuses, and that's a problem. Also effects that start a WLTKD have very low value.
 
Status
Not open for further replies.
Back
Top Bottom