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: Diplomacy internals
Thread: Diplomacy internals This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
piggychu620
piggychu620


Adventuring Hero
posted September 21, 2018 10:07 AM

If I set a hero's specialty to Diplomacy, will it make any sense!?
Will it help me capture the monsters any easier "at all"!?

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

Hero of Order
Part of the furniture
posted September 21, 2018 10:47 AM

piggychu620 said:
If I set a hero's specialty to Diplomacy, will it make any sense!?
Will it help me capture the monsters any easier "at all"!?


I'm not sure if a Diplomacy specialty would work ... how did you envision the Diplomacy specialty? Since the Diplomacy skill basically has a value of 0, 1, 2 or 3, the best idea I think would be to add +1 (or perhaps even +2) to this skill?

Anyway, since the formula's are in the OP, it's easy to figure out what an added bonus to the skill would do.
____________
The last Reasonable Steward of Good Game Design and a Responsible Hero of HC. - Verriker

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


Admirable
Omnipresent Hero
Wog refugee
posted September 21, 2018 12:40 PM

There are 10 levels of agressivenes so diplomacy specialty could lower one level for each lets say 5 hero levels, everyone on the map virtually joining at level 50
Easy to script in wog but not interesting at all for gameplay

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


Adventuring Hero
posted September 21, 2018 05:15 PM

Maurice said:
piggychu620 said:
If I set a hero's specialty to Diplomacy, will it make any sense!?
Will it help me capture the monsters any easier "at all"!?


I'm not sure if a Diplomacy specialty would work ... how did you envision the Diplomacy specialty? Since the Diplomacy skill basically has a value of 0, 1, 2 or 3, the best idea I think would be to add +1 (or perhaps even +2) to this skill?

Anyway, since the formula's are in the OP, it's easy to figure out what an added bonus to the skill would do.


I'm not sure what the Diplomacy "specialty" would do, that's why I asked.
I don't know if it's just simply add a level to your Diplomacy skill, or lower the aggression, or up your "sympathy" level, or whatever!
I have ABSOLUTELY no idea!
That's why I'm not sure if it will make ANY sense to have it as a specialty!

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


Adventuring Hero
posted September 21, 2018 05:34 PM
Edited by PIGGYChu620 at 17:36, 21 Sep 2018.

Salamandre said:
There are 10 levels of agressivenes so diplomacy specialty could lower one level for each lets say 5 hero levels, everyone on the map virtually joining at level 50
Easy to script in wog but not interesting at all for gameplay

I have a weird habit/interest/addiction of capturing wondering monsters! So it should be very fun "for me"!
So when you set the Diplomacy as the specialty, it will automatically do that calculation for your hero!?
Or you have to write the script yourself!?
If so, could you PLEASE give me some guide as to how to write it!?
Much appreciated!!!

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


Admirable
Omnipresent Hero
Wog refugee
posted September 21, 2018 07:10 PM
Edited by Salamandre at 19:22, 21 Sep 2018.

Script for diplo specialist, each 5 hero levels lower monster aggressiveness by 1. At 0 it will always join.


ZVSE


!?OB54&1000;
!!HE-1:X0/?y1/0/0/0/0/0; [check specialty]
!!FU&y1<>4:E;    [exit if no diplo]
!!HE-1:S4/?y1;   [check level of skill]
!!FU&y1<>3:E;    [exit if no expert]
!!HE-1:Ed/?y1;   [check experience level]
!!VRy1::5;        [divide by 5, change this value (5) if you want to work faster - for example at 1 everybody will join when hero is level 10, at 10 when he is 100]
!!VRy1&y1<1:S1;    [set to a min of 1]
!!MO998:R?y2/1;    [check monster agresiveness level]
!!FU&y2=0:E;       [exit if compliant]
!!VRy2:-y1;
!!VRy2&y2<0:S0;
!!MO998:Ry2/1;     [set monster to new values]

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


Famous Hero
posted September 21, 2018 09:26 PM
Edited by Ben80 at 21:27, 21 Sep 2018.

There is code in original game for diplomacy specialists. However, diplomacy speciality allows only decrease of price for surrendering hero. It does not affect monster joining.

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


Legendary Hero
posted September 22, 2018 01:18 AM

That's an Hit & Run specialist .
____________

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


Legendary Hero
Heroes is love, Heroes is life
posted September 22, 2018 08:16 AM

Are there other unused skills, that can be used to specialise in? (HotA has Scouting specialists, which are pretty interesting)

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


Famous Hero
posted September 22, 2018 08:31 AM

phoenix4ever said:
Are there other unused skills, that can be used to specialise in? (HotA has Scouting specialists, which are pretty interesting)


There are Learning specialists

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


Legendary Hero
Heroes is love, Heroes is life
posted September 22, 2018 08:40 AM

5% per level or the HotA way that doubles xp of the skill?

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 26, 2018 10:47 AM

I still can't find how army_power is calculated. Can anyone simply copy and paste the answer here?

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


Responsible
Supreme Hero
posted September 26, 2018 11:38 AM

It's just the sum of AI values.

Army_Power = N1 * A1 + N2 * A2 + ... + N7 * A7,where
Ni is the number of creatures in the i-th stack,
Ai is AI value, or alpha power, of a single creature from the i-th stack.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted September 26, 2018 02:13 PM

Is there a wiki or page where AI value of each creature appears?

It is not featured on the most common wikis
http://heroes.thelazy.net/wiki/Gremlin_and_Master_Gremlin
http://mightandmagic.wikia.com/wiki/Master_gremlin_(H3)

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


Legendary Hero
Heroes is love, Heroes is life
posted September 26, 2018 02:15 PM

http://heroes.thelazy.net/wiki/AI_value

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

Tavern Dweller
posted August 25, 2019 02:31 PM

AlexSpl said:

7. [Aggression (X)]
X = -4 (always) for compliant neutrals;
X = 10 (always) for savage neutrals;
X = 1..7 for friendly neutrals;
X = 1..10! for aggressive neutrals;
X = 4..10! for hostile neutrals;

Note: for friendly, aggressive and hostile neutrals Õ is a pseudo-random value which is generated at creation of new game. You can see it when using LM Oracle 3.72 program.



@AlexSpl

You say that we can see creatures' mood/aggression when using LM Oracle.
But is there a way to edit these attributes in a save file?
E.g. if I want to set several creature stacks to be compliant or savage in an existing game.
If it can only be done via HEX editing, can you please describe in detail how it can be done, or provide any link if it's already described somewhere?
Thanks!

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


Responsible
Supreme Hero
posted August 25, 2019 07:02 PM

Let me rather describe how to change that value in memory. You, then, can always save a game.

1. Find the address of Adventure Manager.
a) Open main memory of heroes3 process with HxD, for example;
b) Go to 6992B8 and there you'll find four bytes of the Adventure Manager address (for example, 01 EF CD AB means ABCDEF01);
c) Write this address down, let it be AdvMgrAddr.

2. Find map offset.
Calculate MapOffset - go to AdvMgrAddr + 5C and write down four bytes there just as in the example above;

3. Find the offset of monsters with coordinates x, y, and z.
Calculate the following value MonOffset = 38 * (X + MapSize * (Y + Z * MapSize));

4. Find PackedMonInfo.
a) Go to MapOffset + D0, and yet another time write down four bytes there, it will be MapItemsAddr;
b) Go to MapItemsAddr + MonOffset, write down four bytes there as before, let it be PackedMonInfo.

5. Find aggression X.
Well, here you should unpack X from PackedMonInfo. And I will give an example.
Let PackedMonInfo = 31 50 00 00, which means PackedMonInfo = 00 00 50 31, or 5031. Here the blue part is monsters number, and the red one is our X.
In this example we have 31h = 49 monsters with aggression X = 5.

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

Tavern Dweller
posted August 25, 2019 09:52 PM

AlexSpl said:
Let me rather describe how to change that value in memory. You, then, can always save a game.

Many thanks, AlexSpl!

Sorry, but it's all quite new to me.
Please see my questions below. I would appreciate your further help with it.

1. Find the address of Adventure Manager.
a) Open main memory of heroes3 process with HxD, for example;
b) Go to 6992B8 and there you'll find four bytes of the Adventure

Please let me know if I found it correctly:
https://prnt.sc/oxda9u
If so, it should be 048C2C40, right?

2. Find map offset.
Calculate MapOffset - go to AdvMgrAddr + 5C;

Sorry for a noob question, but can you please give an example of how I should find it? Is there a specific offset that I should be looking for? I wasn't able to locate 6992B8 + 5C.

3. Find the offset of monsters with coordinates x, y, and z.
Calculate the following value MonOffset = 38 * (X + MapSize * (Y + Z * MapSize));

Is there an easy way to get coordinates? This time I was counting tiles to figure out X and Y.

As for the calculation, can you please provide an example?
I found out that the map size is 108*108 and the creature stack is in tile 58 horizontally (rom the left) and tile 65 vertically (from the top). It is located in the dungeon.
So, MonOffset seems to be 38 * (58 + 108? * (65 + Z? * 108?)), but I am not able to figure out the final formula myself, especially how I should find Z and if MapSize should be 108.

As for the other steps, I think I will be able to do it myself if you help me with these three.
Thanks again!

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


Responsible
Supreme Hero
posted August 25, 2019 10:19 PM
Edited by AlexSpl at 23:11, 25 Aug 2019.

First, check your version of the game. If it's SoD 3.2 or you have HD mod installed, then use offset 6992B8 for calculations. If it's Complete (without HD mod) then use 699268.

Second, AdvMgrAddr + 5C and similar formulas suppose that you've already found the value of AdvMgrAddr.

See this. You go to 6992B8 and write down four bytes (double word) there. Then you use *that* value to compute AdvMgrAddr + 5C.

So, in your case AdvMgrAddr + 5C = 48C2C40 + 5C = 48C2C9C. Then you go to 48C2C9C and see the next address, which is MapOffset. But note that every time you restart the game you have to find addresses from scratch because they will be different.

Quote:
So, MonOffset seems to be 38 * (58 + 108? * (65 + Z? * 108?)), but I am not able to figure out the final formula myself, especially how I should find Z and if MapSize should be 108.

Yes, MapSize is 36, 72, 108, 144, 180, 216, or 252. Z = 0 for surface, Z = 1 for underground. Note also, that 38 here is decimal, while in the rest of formulas all numbers are hexadecimal and you should use hexadecimal calculator for calculations.

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

Hero of Order
Part of the furniture
posted August 26, 2019 12:00 AM

Do keep in mind that the game starts with X and Y at zero. So the tile in the top left is actually at (0, 0), not at (1, 1). This matters when calculating the map coordinates.
____________
The last Reasonable Steward of Good Game Design and a Responsible Hero of HC. - Verriker

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

Page compiled in 0.0608 seconds