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
New_User
New_User

Tavern Dweller
posted August 27, 2019 01:00 AM

Maurice said:
Do keep in mind that the game starts with X and Y at zero.

Thanks for this comment, Maurice!
I really started with 1 at first.

AlexSpl said:
See this. You go to 6992B8 and write down four bytes (double word) there. Then you use *that* value to compute AdvMgrAddr + 5C.
Yes, MapSize is 36, 72, 108, 144, 180, 216, or 252. Z = 0 for surface, Z = 1 for underground.

Worked like a charm!

Many thanks, AlexSpl!
You guys rock!

Do you think it is worth creating a special FAQ somewhere?
I haven't seen such full instructions on editing creatures' aggression anywhere on the Internet.

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

Tavern Dweller
posted November 17, 2019 06:01 AM

My Goodness!!!!!!!

A TRANSLATOR PLEASE COME!!!

That's insanely frustrating to read all that... and unfortunately not useful a bit =(((((((
Please a normal living and breathing human being translate all that into a normal English language post for all of us!!!!!!!!!!!!!!

I understand that those people have lots and lots of fun writing down all those abbreviations and symbols and ugly math - I saw it in real life how they smile and exuberate joy seeing you're dying of frustration and keep pushing more math on you untill you're ready to cry and die.
But I once had a person explained to me a point of math in plain English - it was better than orgasm!!!

So PLEASE LORD SEND HERE A NORMAL HUMAN BEING!!!
BE SO KIND AND GENEROUS to all of us...

Let my prayer be heard...
Amen
____________

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

Hero of Order
Part of the furniture
posted November 17, 2019 10:53 AM

Iím sorry, but I donít see how you could translate those complex calculations in words, without butchering the result. It simply takes at least some mathematical understanding to figure out how the calculations and considerations in the game code work.
____________
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
JohnIm
JohnIm

Tavern Dweller
posted November 17, 2019 11:30 AM

Maurice said:
Iím sorry, but I donít see how you could translate those complex calculations in words, without butchering the result. It simply takes at least some mathematical understanding to figure out how the calculations and considerations in the game code work.


Maurice said:
Iím sorry, but I donít see how you could translate those complex calculations in words, without butchering the result. It simply takes at least some mathematical understanding to figure out how the calculations and considerations in the game code work.


Let's do it together then, step by step from both sides =)

1.
Diplomacy depends on the strength of your hero and the army of the hero.
The stronger the army - the greater is the chance monsters would join you
But at some point it doesn't matter anymore - like when your army is 2/5/10 times stronger?

2.
There's some random chance that units will join you and some chance that they will never join you even when you are 100 times stronger
Does it change week after week? Cause when you use "Visions" it says will flee... THIS WEEK! So should I wait?
And also it seems that the mood of monsters changes somehow else as well - cause I tested it with Cheats - and I go 20 monsters and all of them flee even when I have 200 Archangels and then suddenly they start offering to join - both free and paid - ON THE SAME DAY - and it looked like the further monsters from my town did that. And then when this shift happend it really started to look like truely random finally - some flee / some join (free / paid). So what is the catch about that?  

3.
Does the level of diplomacy matter in terms of chance of joining or only for the cost?
The same for the artifacts?

4.
The chance of joining also is higher when you have the same units in your army and when you have them more than any other units - all together? or more than any other unit into your army separately? You need just 1 unit more or the more the better, so that it works?

5.
Does the chance depend on your hero's moral and luck from - both from artifacts and from skills?

Did I miss something??

Please don't let me go insane... I just need to understand it, I am tired, I can't sleep and eat properly being that frustrated!!!! ((

Please make your step towards me using these 5 points I wrote...
Will be very grateful!
____________

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

Tavern Dweller
posted January 18, 2020 01:06 PM

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


@AlexSpl and Maurice,
Sorry for making a post in this thread - I will move to another one if it exists.
Can you please provide some instructions or a link to existing instructions on how to edit (in memory) the magic that appears on every mage guild level for those levels that are not yet built?
E.g. if I have a level 1 mage guild but want to edit what magic is going to be available on level 4 and 5 for the given castle.
Thanks in advance!

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

Hero of Order
Part of the furniture
posted January 18, 2020 10:21 PM

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


@AlexSpl and Maurice,
Sorry for making a post in this thread - I will move to another one if it exists.
Can you please provide some instructions or a link to existing instructions on how to edit (in memory) the magic that appears on every mage guild level for those levels that are not yet built?
E.g. if I have a level 1 mage guild but want to edit what magic is going to be available on level 4 and 5 for the given castle.
Thanks in advance!


I only know how to edit savegames, Iíve never really messed with changing stuff in memory during runtime. That being said, I will need to look into my notes to tell you the exact locations you need to look at. Will probably not be today.
____________
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
bloodsucker
bloodsucker


Legendary Hero
posted January 19, 2020 04:56 PM

Meh, if you are playing MP that is considered a cheat, if not just save and systematically build and press end-turn until you see what is there, then reload. People often complicate simple things...
____________

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

Hero of Order
Part of the furniture
posted January 20, 2020 05:42 PM
Edited by Maurice at 17:58, 20 Jan 2020.

bloodsucker said:
Meh, if you are playing MP that is considered a cheat, if not just save and systematically build and press end-turn until you see what is there, then reload. People often complicate simple things...


I don't ever play MP games in Heroes, but aren't MP games always encrypted?

And besides, you can already reveal it in SP through cheats anyway; just use NWCZION to build a Town, NWCNEBUCHADNEZZAR on a Hero to visit every Town on the map on day 1, possibly NWCWHATISTHEMATRIX to see the entire map, and NWCTHEREISNOSPOON to get access to the Fly spell to be able to travel anywhere ... but that's such a time-consuming hassle to do; parsing a save game is much easier.

Edit:
Keep in mind that savegames are simply zip files, so you need to unzip them first. But once you do and you open a savegame, it should be fairly easy to find the names of the Towns, as they're written into the savegame file in plain text.

Counting from the last byte of the Town name, you need to count a number of bytes ahead:
+84: this byte indicates how many spell slots exist at Tier 1 of the Mage Guild;
+85: Likewise, but for Tier 2;
+86: Likewise, but for Tier 3;
+87: Likewise, but for Tier 4;
+88: Likewise, but as you might guess, for Tier 5;

+113 - +136: The Spells held at Tier 1 (4 bytes per Spell ... Spell 6 is present in all Guilds, but only accessible for Tower Towns with a Library built)
+137 - +160: Likewise for Tier 2, with the note that Spell 5 is only available in Towers with a Library built and the slot of Spell 6 is garbage data that should be ignored;
+161 - +184: Likewise for Tier 3, with the note that Spell 4 is only available in Towers with a Library built and the slots of Spells 5 and 6 are garbage data that should be ignored;
+185 - +208: Likewise for Tier 4, but then Spell 3 only for Towers with a Library and Spells 4, 5 and 6 are garbage data;
+209 - +216: Only 2 Spells at this Tier, with the 2nd one only available for Towers with a Library;
____________
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
bloodsucker
bloodsucker


Legendary Hero
posted January 20, 2020 08:05 PM

Maurice said:
I don't ever play MP games in Heroes, but aren't MP games always encrypted?

I think so. And I still find my solution easier, I mean if you have the resources ahead.
____________

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


Responsible
Supreme Hero
posted January 21, 2020 08:51 PM
Edited by AlexSpl at 23:41, 21 Jan 2020.

Quote:
Can you please provide some instructions or a link to existing instructions on how to edit (in memory) the magic that appears on every mage guild level for those levels that are not yet built?

For SoD 3.2 / HD mod:

Let GameMgrAddr = DwordAt(0x699538);

TownAddr = DwordAt(GameMgrAddr + 0x21614) + Town_ID * 0x168;
Spell_ID = IntAt(TownAddr + (0x11 + 6 * Level + Slot) * 4);

Town_ID, Level, Slot - all starting from 0.

Number of towns owned by Player_ID = ByteAt(GameMgrAddr  + 0x20B0E + Player_ID * 0x168).

List of Town_IDs owned by Player_ID starts at GameMgrAddr + 0x20B10 + Player_ID * 0x168, one byte for each town, the first byte being Town_ID of the topmost town on the game screen.

* DwordAt(), IntAt() - like in the previous example, 4 bytes @ 0x{given_address};
ByteAt() - 1 byte @ 0x{given_address}.

* * *
Note

There are no simple ways to obtain town's ID just by its coordinates. You have to look up through the whole list of town structures. Yet, there are two shortcuts. First, you can use LMOracle (or another program that shows Town_ID). Second, you can search for hexadecimal sequence of town's coordinates in memory (for example, x = 30, y = 30, z = 0 => search for hexadecimal string 1E 1E 00), then subtract from the address, you found, 5. There will be town's ID. You will significantly reduce the number of addresses to check by adding town's type (for example, Conflux at x = 30, y = 30, z = 0 => search for hexadecimal string 08 1E 1E 00).

Here is the example of a successful search:



02 - Town_ID, 00 - Owner_ID (Player_ID), 08 - Conflux, 0D 05 00 - town's coordinates, FF FF - no boat, etc. You will easily recognize a town structure after some practice Of course, this is not the way you should search for Town_ID in your programs/plugins, but it's fast for humans.

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

Tavern Dweller
posted February 17, 2020 09:49 PM

AlexSpl said:

For SoD 3.2 / HD mod:
Let GameMgrAddr = DwordAt(0x699538)...

Maurice said:
Counting from the last byte of the Town name, you need to count a number of bytes ahead:
+84: this byte indicates how many spell slots exist at Tier 1 of the Mage Guild...

Thanks, AlexSpl and Maurice!
That helped a lot.

 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
Post New Poll †† Post New Topic †† Post New Reply

Page compiled in 0.0745 seconds