VCMI 0.81d - development version (r1703)

I’m releasing another development build. It brings a number of bugfixes. All known major regressions introduced since 0.81 are fixed. Some old ones as well. :slight_smile:

If there are any other issues that are maybe not top priority but you especially want them to be looked into before the next release, let me know here.

DOWNLOAD LINK: download.vcmi.eu/vcmi_081d.7z

First dev build with feature changelog - [forum.vcmi.eu/t/vcmi-0-81b-development-version-r1689/319/1)
Previous dev build 0.81c: [forum.vcmi.eu/t/vcmi-0-81c-development-version-r1695/321/1)

Mantis changelog for 0.81d: bugs.vcmi.eu/changelog_page.php?version_id=25


Answering Zamolxis’ question from previous thread about marketplaces - I’m still wanting to make some final fixes. I’m aware of missing trader text (all that “please inspect our fine wares”), missing tooltips for buttons and some subtitles that are not fitting the boxes correctly. I hope to correct it before the 0.82.
If you encounter any non-text issues, please report them.

I was actually thinking at the badly centered yellow frames for the selected resources when I was asking that. See #562. :wink:

  1. in war mode slow animation of “arrows”. Animation speed - fastest, all OK - but arrows slow :frowning:
  2. i have localized version (russian). All strings russian - it’s ok. But when looking at neutral at map - quantity at russian, caption at russian, but “Threat : XXXX” - english! why?
  3. all ok with video :slight_smile:

IIRC this is our addition not present in original text files, so it must be translated independently (besides this, the text is currently hardcoded).

I’m just curious - whose idea was it and how is created the algorithm to define: equal, a bit weaker, a bit stronger, strong etc?

Warmonger’s.

Code goes as follows, it should be understandable even without knowledge on C++. (If not, I can give any needed explanations.)

	if(const CGHeroInstance *selHero = cb->getSelectedHero(cb->getCurrentPlayer()))
	{
		hoverName += "\n\n Threat: ";
		float ratio = ((float)getArmyStrength() / selHero->getTotalStrength());
		if (ratio < 0.1) hoverName += "Effortless";
		else if (ratio < 0.25) hoverName += "Very Weak";
		else if (ratio < 0.6) hoverName += "Weak";
		else if (ratio < 0.9) hoverName += "A bit weaker";
		else if (ratio < 1.1) hoverName += "Equal";
		else if (ratio < 1.3) hoverName += "A bit stronger";
		else if (ratio < 1.8) hoverName += "Strong";
		else if (ratio < 2.5) hoverName += "Very Strong";
		else if (ratio < 4) hoverName += "Challenging";
		else if (ratio < 8) hoverName += "Overpowering";
		else if (ratio < 20) hoverName += "Deadly";
		else hoverName += "Impossible";
	}

Yes, I need more explanation, please :wink:
getArmyStrength - does VCMI, during calculating it, “know” the exact number of creatures i.e. if we have lots (20-49), but there is 35 creatures, the strength is calculated 35xHP or is used AI Values (page 24, Tribute to Strategists)?
getTotalStrenght - by analogy, how is it calculated? Hit Points (HP) or AI values?

it’s calculated as follows, using exact amounts of creatures and AI values from Tribute to Strategists:

int CCreatureSet::getArmyStrength() const
{
	int ret = 0;
	for(TSlots::const_iterator i = slots.begin(); i != slots.end(); i++)
		ret += i->second.type->AIValue * i->second.count;
	return ret;
}

getTotalStrenght (product of strength of hero and his army):

int CGHeroInstance::getTotalStrength() const
{
	double ret = getHeroStrength() * getArmyStrength();
	return (int) ret; //just changes the type, nothing interesting
}

where getHeroStrength is (getPrimSkillLevel(0) is hero’s attack and getPrimSkillLevel(1) is his defense):

double CGHeroInstance::getHeroStrength() const
{
	return sqrt((1.0 + 0.05*getPrimSkillLevel(0)) * (1.0 + 0.05*getPrimSkillLevel(1)));
}

That strange formula was invented by Tow on April 12, 2009 in revision 793. I hope everything is clear now :).

I didn’t invent it, I’ve just implemented formulas that was given in Strategija as a part of joining rules (deciding whether a neutral creature is willing to join a hero).

Thx.
I’ve just wondered if the formula isn’t to easy to estimate the exact amount of creatures.
Maybe in final product it should be possible to disable this feature.
Don’t get me wrong, it is great as a feature :wink:
PS>I know I have warped mind :mrgreen: