[Development] Alternative Map during 1.17

I did look at the code, but I didn't see how it work work in the WB. But now I see what you mean.

I still think we need something that links the variants to the default resource for the pedia though. But that can also be done in python.
 
Last edited:
That would be entirely artificial though, I see no reason to impose such a limitation.
 
I want to modify the pedia, so it can display the different variants. The display show the variant selected by the buttons below it. There needs to be some kind of link between the resources and the variants to make the list of buttons.
 

Attachments

  • Civ4ScreenShot0220.JPG
    Civ4ScreenShot0220.JPG
    270.4 KB · Views: 195
Again, I don't think that's necessary. Just make sure the variants do not show up in the pedia.
 
- resources that are graphical varieties should not show up in civilopedia as resources or in the resources menu in worldbuilder
- worldbuilder needs a new section to set graphical resource varieties

I made a PR with this.

Currently I made the list in the resource variety mode only contain bonus varieties. I can remove the filter if you want every resource in this mode. (Or I can make it optional using the "hide inactive" button)
 
Thanks. That's exactly what I had in mind, actually I wrote the DLL code so that you can only set bGraphicalOnly resources as varieties and can never set bGraphicalOnly resources as actual resources.
 
I've been playing with it a little and I noticed some things.

1.The vanilla art displays the wine art. The path and nif files seem to be correct though.
2. Resource variants don't seem to interact with improvements. If you place a pasture on the normal cow, it moves the cows outside to fence. If you place the pasture on a brown cow, the cows don't move. Other variants show similar behavior.
 
1. The vanilla model is clearly based on the wine model, maybe a texture path in the nif is broken and it falls back on the wine texture? Just a thought.
2. Could be that when resources are rendered together with improvements, the resource type is retrieved separately to just rendering the resource, I will look into it. But it could be that the new resource types simply need to be added to PlotLSystem.xml so they are recognised as belonging to their improvement.
 
I fixed the vanilla art problem. But it also has the same improvement problems as the other variants.

Normal cows are not in PlotLSystem, so I don't think it will fix the problem.
 
The cows are from SoI, have you checked if they come up there in the XML somewhere? Otherwise I will play around with the DLL more.
 
I can't find anything in the SoI XML that could be linked to this.

EDIT:
Could it be the part after "// improved and worked states ..."? The isImprovementBonusTrade() isn't defined for the new resources. I will investigate this.

Spoiler :
Code:
void CvPlot::getVisibleBonusState(BonusTypes& eType, bool& bImproved, bool& bWorked)
{
    eType = NO_BONUS;
    bImproved = false;
    bWorked = false;

    if (GC.getGameINLINE().getActiveTeam() == NO_TEAM)
    {
        return;
    }

    if (GC.getGameINLINE().isDebugMode())
    {
        eType = getBonusVarietyType();
        if (eType == NO_BONUS)
        {
            eType = getBonusType();
        }
    }
    else if (isRevealed(GC.getGameINLINE().getActiveTeam(), false))
    {
        eType = getBonusVarietyType(GC.getGameINLINE().getActiveTeam());
        if (eType == NO_BONUS)
        {
            eType = getBonusType(GC.getGameINLINE().getActiveTeam());
        }
    }

    // improved and worked states ...
    if (eType != NO_BONUS)
    {
        ImprovementTypes eRevealedImprovement = getRevealedImprovementType(GC.getGameINLINE().getActiveTeam(), true);

        if ((eRevealedImprovement != NO_IMPROVEMENT) && GC.getImprovementInfo(eRevealedImprovement).isImprovementBonusTrade(eType))
        {
            bImproved = true;
            bWorked = isBeingWorked();
        }
    }
}

EDIT2:
This is indeed the cause. I updated the PR with the fix.
 
Last edited:
Oh yes of course. How is the game supposed to know the bonus and improvements are related. Great!
 
Merged a pull request by merijn_v1:
- world builder support for resource variety
- fixed Turquoise button
- fixed Vanilla art
- fixed improvement graphics for new resource varieties
 
New update:
- added Turquoise in Sinai, Arizona, New Mexico
- added Vanilla in Mexico

This means a few more gem resources in these areas but turquoise is really important in Egyptian, Navajo/Puebloan and Aztec and should be available to them. Some of them can deplete over the course of the game.
 
I've also thought about further spice varieties, it would be really cool if we got Cinnamon and Nutmeg at least. Cloves are kind of similar to Nutmeg in their spread and therefore not really necessary I think. The remaining spices can represent various kinds of peppers that their graphics already reflect.
 
New update:
- added Turquoise in Sinai, Arizona, New Mexico
- added Vanilla in Mexico

This means a few more gem resources in these areas but turquoise is really important in Egyptian, Navajo/Puebloan and Aztec and should be available to them. Some of them can deplete over the course of the game.
I’m not sure about this, but I feel turquoise is more similar in appearance, use and rarity to jade than to e.g. diamonds and rubies, so it’s weird to me that turquoise is distinct from jade but grouped with the precious gems. Maybe jade and turquoise should be regrouped? Or jade made a variety of the gem resource?
 
Could also see a grouping of turquoise as jade, sure.
 
Is this (WIP) good for the nutmeg? It is a reskin of the olives.

Spoiler :
olives_20190808_23-32-20-jpg.531833


 

Attachments

  • olives_20190808_23-32-20.jpg
    olives_20190808_23-32-20.jpg
    244 KB · Views: 573
Last edited:
Yeah that looks good!
 
Merged a pull request by merijn_v1:
- fixed furry pig and llama animations
- added Nutmeg variety for spices
 
Back
Top Bottom