Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > Library of Enlightenment > Thread: Diplomancy revealed??
Thread: Diplomancy revealed?? This thread is 2 pages long: 1 2 · NEXT»
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 11, 2007 01:32 AM

Diplomancy revealed??

float heroStrength = sqrt ( (attack * 0.05 + 1)*(defence * 0.05 + 1) );
float k = heroStrength * heroArmy / monsterArmy;

int v;
if (k >= 7.0) v = 11;
else if (k >= 1.0) v = (k - 1) *2;
else if (k >= 0.5) v = -1;
else if (k >= 0.333) v = -2;
else v = -3;

if ( aggression > v + diplomacy + oneUnitBonus) Attack();
else if ( aggression <= diplomacy + oneUnitBonus + 1) Join();
else if ( agression <= 2*diplomacy + oneUnitBonus + 1) MoneyJoin();
else Flee();


Monster aggression can be set from 0 to 10 in the editor.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 11, 2007 01:57 AM

Quote:
float heroStrength = sqrt ( (attack * 0.05 + 1)*(defence * 0.05 + 1) );
float k = heroStrength * heroArmy / monsterArmy;

int v;
if (k >= 7.0) v = 11;
else if (k >= 1.0) v = (k - 1) *2;
else if (k >= 0.5) v = -1;
else if (k >= 0.333) v = -2;
else v = -3;

if ( aggression > v + diplomacy + oneUnitBonus) Attack();
else if ( aggression <= diplomacy + oneUnitBonus + 1) Join();
else if ( agression <= 2*diplomacy + oneUnitBonus + 1) MoneyJoin();
else Flee();


Monster aggression can be set from 0 to 10 in the editor.


Interesting:

First the Heroes Strengh will be Calculated. Primary Skills Attack and Defense do have a slight influence to the outcome (While people thought Diplomancy on a MAIN hero is a lost skill, let a scout do it).

The Calculated Heroes Strengh raise the Army Strength. The Army Strengh will be compared with Monster Army Strengh by dividing it.

The Comparison will leed to penalties:

50% =-1 33%=-2 even weaker -3

I assume that diplomcy skill is plus 2 per level. I assume that The UniteBonus (for the same alignment) is plus 1.

The if else routine shows the decision calculation. If the agression setting is higher then AmryStrenghPenalty + Diplo +Alignment the result is Join().

Other options are Attack, MoneyJoin or Flee.

The creatures can be set from 0 to 10. I assume that the creature settings can vary between two points (like 2 or 3).
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 11, 2007 11:41 PM
Edited by Xarfax111 at 23:45, 11 Oct 2007.

...well its an "unconfirmed information from an unknown source"...thats why i put it in question marks - open for discussion.

If you go through the lines it looks all logic and suits to game experiences.

I thought it would be interesting, thats why i posted it here.

Xarfax1
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted October 12, 2007 12:23 AM

I think it's more random than that. But it would be fairly easy to test by setting the agression level different for the same group of monsters.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
dimis
dimis


Responsible
Supreme Hero
Digitally signed by FoG
posted October 12, 2007 04:13 AM

It is indeed very interesting piece of information which of course needs to be verified. But count me out at them moment.
____________
The empty set

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
demarest
demarest


Known Hero
posted October 12, 2007 05:46 AM

How do you suppose heroArmy is calculated? Simple hit point total? I will see what I can do to test this out.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 12, 2007 03:51 PM

@Binabik: My personal opininion is that the formel is correct, and that there are no further influences.

Maybe the aggression level vary between two number per level on a random basis. Like 0-1 2-3 4-5 5-6 7-8 9-10. Plus if aggression is 0, it wont be calculated = always join.

According to the formel there are the following influences:

- Hero Attack and Defense
- Army Strengh
- Diplomancy Level
- Creatures Alighnment

Which other influences do you think are involved? Maybe we can test that.

@Dimis: Thanks for your comment, wouldve been nice to see results of a hardcore tester. You are one of the few peeps -like Maretti, Binabik and Angelito -why im still visiting this site.

@Demarest: There is a txt-file for AI calculations extracted from the lod files of H3. There is a list of all creature points. When i remember correct its called CreatureTraits.txt. Maybe someone can publish it here. Would be cool to see some testings from you.

Xarfax1
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Anakrom
Anakrom


Known Hero
(Scroll) Out of the blue
posted October 12, 2007 04:03 PM

Whole system of Diplomacy is fully described in game manual (at least in mine, Czech), including all chances dependant on race of creature and hero, artifacts, level, Hero Creature specialistaion etc.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 12, 2007 04:22 PM

Quote:
Whole system of Diplomacy is fully described in game manual (at least in mine, Czech), including all chances dependant on race of creature and hero, artifacts, level, Hero Creature specialistaion etc.


...well, would be kind if enlight me and the others!?

Especially the news about Artifacts and Hero Creature Specialisation sounds interesting for me.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Anakrom
Anakrom


Known Hero
(Scroll) Out of the blue
posted October 12, 2007 05:06 PM

Here you go:
Every creature on adventure map got two attributes defining its will to fight.
Courage - defines if creature "will attack", "will join" or "changable"
Mood - attitude towards your army - 4 possibilities - friendly, wild, aggressive and hostile.

Courage can be seen with skill "Silent Stalker".

Strength of army - If group is neutral (creeps), its defined only be the strength, if its army of a player, than affected by MORALE, LUCK and ARTIFACTS.

Group Strength = Base Strength * (1+C*morale of stack) * (1+C*luck of stack) * artifact mod
where C is 0.0173 if luck+morale>0, otherwise 0.0122 is morale+luck<0.

Artifact mod is artifact_mod= (1+intiative increased by artifacts/10)

EXAMPLE: Army contains 100 peasants, with morale +5 and luck +3. Heros artifact raises initiative of monsters by 10%. Peasants got Str. 41 and initiative 8 (leads to 0.8 bonus from artifact).

Str.Army=41*100*(1+5*0.0173)*(1+3*0.0173)*(1+0.8/10) = 5060.

Following examples work only if a creature got "changable" mood.
Step one - Equlibrium of Power - Equil.Str. = Str. of Heros Army/Str. of Neutral Army.
Step Two - Fight or not? - Coeficient of mood is created from Diplomacy skill and mood of monsters, and dependant on this:

Coef. Mood = 0.5 for Friendly
Coef. Mood = 1.0 for Aggressive
Coef. Mood = 1.5 for Hostile
Coef. Mood = 2.0 for Wild
Diplomacy skill lower Coef. Mood for 0.2

Joining treshold and Fighting treshold is created from Coef. Mood and Army. Str.

Joining Treshold - random(1-7)*Coef.Mood
Fighting Treshold - Joining Treshold + 3*Coef.Mood

Possibility 1: Equil.Str. < Joining Treshold - Neutrals will fight
Possibility 2: Joining Treshold < Equil.Str. < Fighting Treshold - Neutrals will fight or join for money
Possibility 3: Equil.Str. > Fighting Treshold - Will flee or join for free

Join or not?
Chance for joining dependant on mood
Friendly mood +10%
Aggressive +5%
Hosttle +0%
Wild -5%

Other modifiers:
+5% for same side evil/good
+5% for same race
+5% if your army contains stack of same creatures (basic and upgrades are not the same)
+5% if your army contains stack of upgraded creatures of that type of monster
+10% if hero has Diplomacy skill
+20% if Hero has a specialisation on that kind of monster (ex. Ossir got +20% to join elves)

This is basic scheme how diplomacy works. If you got some questions, ask, and I will try to find some info about it. I had to translate it whole from Czech, so sorry for some mistakes, hope you will appriciate it.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 12, 2007 11:47 PM

...erm ...looks like your are talking about Heroes 5.

You are in the wrong forum.

But thanks for the effort.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted October 12, 2007 11:58 PM

Are you talking about this?

Singular Fight Value AI Value
Pikeman        100        80
Halberdier 115        115
Archer        115        126
Marksman 115        184
Griffin        324        351
Royal Griffin 364        448
Swordsman 445        445
Crusader 588        588
Monk        485        485
Zealot        500        750
Cavalier 1668        1946
Champion 1800        2100
Angel        3585        5019
Archangel 6033        8776

I always wanted to run tests on this. But I assumed it had something to do with how the AI decides which creatures to build/buy. And which creatures it decides to attack in battle.


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 13, 2007 12:03 AM

yes this file is maybe involved...could be interesting cause when you edit those values into ..lets say "100" you may can calculate the outcome of a specific situation.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted October 13, 2007 12:10 AM
Edited by Binabik at 00:11, 13 Oct 2007.

I thought maybe the two values were how it rates the enemy stack and how it rates it's own stack in a battle.

Maybe it compares the value of the enemy killed to the value of the losses to it's own stack.

In a one-on-one fight with the same creature type I know for sure it does it that way. If it has a choice between attacking two stacks of the same type creature it will attack the larger stack *IF* it can kill more creatures than it loses in retal. If it can't do that, it will attack the smaller stack.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 13, 2007 12:15 AM

maybe both formel work with those values
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted October 13, 2007 12:20 AM

I'm making a test map now.

First I'm going to make a bunch of stacks exactly alike. I want to see if some join and some don't. I also have some on native terrain and some on on-native.

There are only 5 levels I can set for aggression level. So maybe like you said, there are values in between that are picked by the AI.

First, I need to find the right size army and diplo level for my hero. Maybe I'll try your formula and see if it works.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted October 13, 2007 01:17 AM

First test results.


monster = 100 pikemen


Hero att = 0
Hero def = 0
army = 100 pikemen
skill = exp diplomacy
no other skills

----------------------------------------


All I wanted to find out with this test is will the monsters always act the same way?

The answer is NO.

There are 4 possibilities and all but the third one happened.
1) fight
2) join for free
3) join for cash
4) flee

Not in the formula:
If they offer to join and you turn them down, they can flee or they can be insulted and fight. Both of these happened. My guess is that this is completely random and doesn't depend on army, diplo, hero stats, etc.

If you restart and attack the same stack, the result can change. If you save the game and restore, the same stack will always act the same way.


Conclusion of first test is that they do not always act the same way. This might be because:
1) there is a random factor
2) the aggression level can vary a little (i.e. there is a level between friendly and aggressive)
3) something else we haven’t though of


Also, I tested on dirt and grass. I didn't count, but if they acted differently on grass and dirt it wasn't obvious....that's far from conclusive though.

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 13, 2007 01:37 AM

which aggression level did you choose in the map editor for the pikes?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Binabik
Binabik


Responsible
Legendary Hero
posted October 13, 2007 01:42 AM
Edited by Binabik at 02:13, 13 Oct 2007.

Aggressive (the middle one)

If "heroArmy" and "monsterArmy" have the same value then k = 1 and v = 0.


Where did you get this info?

<<<The creatures can be set from 0 to 10
<<<I assume that diplomcy skill is plus 2 per level

____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Xarfax111
Xarfax111


Bad-mannered
Supreme Hero
The last hero standing
posted October 13, 2007 02:56 AM

Quote:
First test results.
There are 4 possibilities and all but the third one happened.
1) fight
2) join for free
3) join for cash
4) flee


Did you have enough money with you?


____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 2 pages long: 1 2 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0533 seconds