Resource filter in globe layer

Xyth

History Rewritten
Joined
Jul 14, 2004
Messages
4,106
Location
Aotearoa
I'm not sure if this is part of standard BTS or part of BUG 4.4 but when you have resource icons toggled on and zoom the map all the way out you get 4 filter options above the minimap:

Food
Luxuries
General
Everything

Is it possible to change these filters or add new ones? (in Python or XML, SDK not an option for Mac). I ask because I'm experimenting with resources not giving +1 health/happiness and it seems that this filter relies on whether a resource gives health or happiness to determine its category. i.e, if it give health it's considered food, if it gives happiness it's considered a luxury and if it gives neither it's considered general. I'm hoping to change this.

Additionally, does anyone familiar with the SDK know if removing this health/happiness distinction affects the AI in any way? I would have thought that it would use the BONUSCLASS tags but if this filter doesn't, maybe it's the same elsewhere?
 
The globe layers and their options are constructed in the DLL, and called directly from the exe.
So no solution for Mac, sorry.

Specifically the code for deciding when a bonus is displayed is:
Code:
	bool bOfInterest = false;
	switch (eOption)
	{
	case SHOW_ALL_RESOURCES:
		bOfInterest = true;
		break;
	case SHOW_STRATEGIC_RESOURCES:
		bOfInterest = (kBonusInfo.getHappiness() == 0) && (kBonusInfo.getHealth() == 0);
		break;
	case SHOW_HAPPY_RESOURCES:
		bOfInterest = (kBonusInfo.getHappiness() != 0 ) && (kBonusInfo.getHealth() == 0);
		break;
	case SHOW_HEALTH_RESOURCES:
		bOfInterest = (kBonusInfo.getHappiness() == 0) && (kBonusInfo.getHealth() != 0);
		break;
	}

I don't think changing this will affect the AI, but again, I guess it doesn't matter anymore.
 
The globe layers and their options are constructed in the DLL, and called directly from the exe.
So no solution for Mac, sorry.

Suspected as much. It's a pity but I can live without it. Thanks for clarifying.

I don't think changing this will affect the AI, but again, I guess it doesn't matter anymore.

This is more the concern, if the AI treats resources differently when trading or anything I'll need to abandon the idea.
 
On a semi-unrelated note is it there a (un)obvious way to make population increase unhealthiness/unhappiness by 2 instead of 1? Without the SDK?
 
This is more the concern, if the AI treats resources differently when trading or anything I'll need to abandon the idea.

Not sure what you mean here, but the AI values a resource the same whether it's for trade or anything else (except for factors such as peace treaty length), and this value is based on the resource's properties and what it allows to build.

On a semi-unrelated note is it there a (un)obvious way to make population increase unhealthiness/unhappiness by 2 instead of 1? Without the SDK?

For unhealthiness there isn't any that I'm aware of. Maybe someone can think of a Python hack.

For unhappiness there's the "PERCENT_ANGER_DIVISOR" Global Define which affects the value, but the anger part which is multiplied by population is divided by this value.

So I guess if you replace the existing value of 1000 with 500, it'll sort of do what you want.
 
Back
Top Bottom