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: Heroes 2 - bug fixes and mod
Thread: Heroes 2 - bug fixes and mod This thread is 3 pages long: 1 2 3 · «PREV / NEXT»
Ben80
Ben80


Famous Hero
posted December 11, 2021 07:21 AM

In this game, each faction has something that the others don't . This is one of the advantages of Heroes 2.

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


Famous Hero
posted December 14, 2021 07:06 AM
Edited by Ben80 at 10:34, 15 Dec 2021.

Module H2_70_AI_Imrovements updated (link also updated).
----------------------------------------------------------------
Additional (further) changes:
- improved algorithm for Anti-Magic spell weighting
- more reliable algorithm for assessing the usefulness of buying a hero when an enemy hero is located near this castle
- improved algorithm for assessing the need to escape from the battle

Module H2_80_GameplayImprovement updated (link also updated).
----------------------------------------------------------------
Additional (further) changes:
- improved code for feature "the restoration of movement points for heroes fleeing the battlefield and redeemed on the same day was removed (now as in Heroes 3)" - thanks to Unknown_Hero (forums of Enroth)
- spell Haunt is disabled in Shrines on map
- cost of Set Guardian spells decreased to 12, prob. of such spells in GM decreased, cost of Town Gate spell is set to 12, cost of Town Portal spell is set to 30
- the starting number of creatures that join free of charge at map objects has been changed; Halflings 15-30 instead of 20-40, Archers 10-20 instead of 10-25, Goblins 15-30 instead of 15-40, Sprites 10-20 instead of 15-25, Dwarves 8-15 instead of 10-20
- the starting number of creatures that join for charge at map objects has been changed; Trolls (Troll bridge) 4-8 instead of 4-6, Power Liches (Dead City) 4-8 instead of 4-6
- the week growth of creatures that join for charge at map objects has been changed; Trolls (Troll bridge) 2-4 instead of 1-3, Power Liches (Dead City) 2-4 instead of 1-3, Nomads (Desert Tent) 2-4 instead of 1-3, Rogues (Wagon Camp) 4-8 instead of 3-6.
- artifact Statesman's Quill moved from level 1 to level 3

***

New small module is available - H2_30_BugFixes_Misc
It includes various small fixes (module will be updated as soon as new fixes will be done):

- updating max. movement points of heroes (but not remaining mp. !) when they go from shore to boat or vice versa (to better know where hero can go tomorrow - "brown arrows")
- bugfix of AI interactions with monsters when AI have both Diplomacy SS and Necromancy (thanks to Arstahd (forums of Enroth))
- fix of Vision spell when hero have Diplomacy (proper number of joined monsters) (thanks to Arstahd (forums of Enroth))

Download: link

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


Supreme Hero
Heroes 3 Fan
posted December 14, 2021 02:39 PM

What about making these changes compatible with fheroes 2? It also fix game and provide Heroes 3 HD mod like features.

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


Famous Hero
posted December 14, 2021 03:09 PM

zmudziak22 said:
What about making these changes compatible with fheroes 2? It also fix game and provide Heroes 3 HD mod like features.


fheroes is just a different platform. My DLL files are working at the known addresses of the original game. In fheroes, everything is different - both the addresses and the functions themselves.

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


Famous Hero
posted December 15, 2021 09:56 AM
Edited by Ben80 at 10:03, 21 Feb 2022.

A little about future plans or beyond classic Heroes 2 gameplay changes...


2 plugins will be developed, the purpose of which is to make the game even more interesting. 1 plugin is already ready:

H2_83_Anti_RedRush.
- The weekly increase in the players' castles occurs only after the corresponding player has been given a turn. That is, if a player on the 1st day of the week captures castle of some player who play later, then he will not get newborn creatures.
Download: link

However, I would like to share my plans for writing another very interesting plugin. Its purpose will be to limit the number of hero-to-hero encounters (meaning heroes of one player) for each hero to 1 per day, no more. This will limit the length of the chains of heroes and the maximum distance that troops can cover during one day (in fact, up to 2 distances that the heroes travel in a day).

We remember that in Heroes 4 this distance was in fact reduced to 1 distance traveled by the hero per day. The plugin I want to present will essentially be a trade-off between robust Heroes 4 system,  and the less robust ("instant" movement of troops from one end of the map to the other), but highly dynamic Heroes 2-3 system.
Still I hope the player will feel comfortable playing many of the classic Heroes 2 maps.

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


Legendary Hero
posted February 10, 2022 06:48 AM

Nice. Will be good add various horde growth because 8 peasants and 8 centaurs is absurdal difference. It make horde useless. Harm because we never buy 1 lvl building and horde can be in fact real city development.
And modding bulding affiliations will be good too. Sometimes you hand no choice you must build only in one order. More freedom will be good.
Hero movement dependencies for slowest units make zombies ogres golems etc not recrutable. Hero is very slow and lost turns. Additonaly these units have small chance to hit in battle. Maybe constant hero movement as option?

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


Famous Hero
posted February 10, 2022 07:11 AM
Edited by Ben80 at 08:17, 08 Jun 2022.

Thanks for the feedback. Yesterday I updated H2_84_StrongholdMod.For the Knight, the horde is useless at the moment, I agree.

Yes, this is not a modding platform, although I showed those who wished a possible approach to modding (patcher_x86.dll, Loader.asi, etc.). After all, not everyone has the desire to change the game on their own. Many would just like to play, and I gave this opportunity - all my changes that I made to the game are backed up by calculations, game analytics.

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


Famous Hero
posted February 22, 2022 08:30 AM
Edited by Ben80 at 12:35, 22 Feb 2022.

Updated modules H2_70_AI_Improvements, H2_80_GameplayImprovements, H2_30_BugFixes_Misc.
The H2_48_StrongholdMod module has been deprecated, as it is now included by default in H2_80_GameplayImprovements (increased damage from shooting towers).

Reduced prices for rare resources for the construction of magic guilds 2-5 (each by 1). This is supposed to make the gameplay more interesting and balanced.
Hero classes will be more balanced (Barbarian with Wisdom issues will no longer be so profitable. Knight's starting skill (Ballistics) will become even more important, since in my mod the shooting towers shoot stronger).

As before, a lot of attention in fashion is paid to improving AI. Moreover, the tasks are not necessarily set to "strengthen", but the changes in AI are necessarily considered in the context of making the gameplay more interesting.

All changes can be seen in first post of the theme.

***

By the way, while analyzing the game code, I noticed that the attacking AI hero loses all movement points in case of defeat (though this code does not work eventually, as movement points are restored in castle/tavern in Heroes 2).
Based on this, I will see possibility to zero movement points in above case.

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

Tavern Dweller
posted February 23, 2022 03:31 PM

Hello my friend, thank you for your work!

Does this fix the choppy/stuttery hero movement in the GOG version of Homm2?

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


Famous Hero
posted February 23, 2022 03:42 PM
Edited by Ben80 at 15:45, 23 Feb 2022.

Taiyoumaru said:
Hello my friend, thank you for your work!

Does this fix the choppy/stuttery hero movement in the GOG version of Homm2?


I have not worked with GOG version. As far as I know GOG version have 2 variants - DOS version and Windows version. I will not work with DOS version, but can consider working with Windows version.
If you want, you can send me corresponding EXE file (gandalfgray@yandex.ru) and I will see it somewhen.

***

No, I can not fix such movement as it caused by operating system/hardware (sound and so on). Try turn off sound


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

Tavern Dweller
posted May 31, 2022 05:21 PM

Really good job! I want to learn how to mod the game with plugin instead of exe hex hack. For example change peasant life from 1 to 2. The hex offset in exe(GOG Win version) is F0400. I write like this and compile successfully in VC2010:
_PI -> WriteHexPatch(0x0F0400,"02");
However,the patch dll does not work. I know there is an extra offset must be add on the exe hex offset. Could You tell me how to fix this problem?
Additionally, could you share how to make the well from +2 to +1?
My Email sandruse@163.com
Thanks!

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


Famous Hero
posted May 31, 2022 06:25 PM
Edited by Ben80 at 18:26, 31 May 2022.

sandruse said:

I want to learn how to mod the game with plugin instead of exe hex hack.



I would advice to discuss this with AlexSpl. He is active on this forum and on https://handbookhmm.ru/forum/

sandruse said:
I write like this and compile successfully in VC2010:
_PI -> WriteHexPatch(0x0F0400,"02");
However,the patch dll does not work. I know there is an extra offset must be add on the exe hex offset. Could You tell me how to fix this problem?



Yes, you have to open EXE file with IDA to see correct address.

sandruse said:

Additionally, could you share how to make the well from +2 to +1?
My Email sandruse@163.com
Thanks!


I have wrote header files for H2 structures (mainly simply copied from Ironfist project).
If you will investigate src/raw_decompiled/HEROES2.c from Ironfist project you will be able make any magic things.

Here what I have sent to Darmani long ago https://drive.google.com/file/d/1UDjstLRCNJkmDuiMbe2e6OiTxhzVo7uN/view?usp=sharing
Quite old version, but useful for learning.

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


Responsible
Supreme Hero
posted May 31, 2022 11:52 PM

Quote:
I want to learn how to mod the game with plugin instead of exe hex hack.


Quote:
I would advice to discuss this with AlexSpl. He is active on this forum and on https://handbookhmm.ru/forum/


Basically, it would take some time. Less time with more dedication. Everyone of us started from NULL. But just look at mods created by our community!

I suggest you to start from replacing your hex-edits with WriteByte(), WriteWord(), WriteDword(), and WriteHexPatch() functions. This is, I think, a good point to start if you are really don't know much about plugins. But before it, take the steps from this - this simple guide (probably you will need to translate, but Google Translate is a very decent translator and I write in Russian quite well for it to understand me correctly). Then, you may ask me or other members how to do things you aren't capable to do yet. We understand English and can respond in English as well. Good luck, future modder!

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

Tavern Dweller
posted June 01, 2022 03:38 PM

Ben80 said:
sandruse said:

I want to learn how to mod the game with plugin instead of exe hex hack.



I would advice to discuss this with AlexSpl. He is active on this forum and on https://handbookhmm.ru/forum/

sandruse said:
I write like this and compile successfully in VC2010:
_PI -> WriteHexPatch(0x0F0400,"02");
However,the patch dll does not work. I know there is an extra offset must be add on the exe hex offset. Could You tell me how to fix this problem?



Yes, you have to open EXE file with IDA to see correct address.

sandruse said:

Additionally, could you share how to make the well from +2 to +1?
My Email sandruse@163.com
Thanks!


I have wrote header files for H2 structures (mainly simply copied from Ironfist project).
If you will investigate src/raw_decompiled/HEROES2.c from Ironfist project you will be able make any magic things.

Here what I have sent to Darmani long ago https://drive.google.com/file/d/1UDjstLRCNJkmDuiMbe2e6OiTxhzVo7uN/view?usp=sharing
Quite old version, but useful for learning.



Thanks for your reply! I've went a wrong way for the hex patch. And the IDA show the true logic.

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

Tavern Dweller
posted June 01, 2022 03:41 PM

Thank you AlexSpl! After viewing your link, it's seems that a lot of things to learn.

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


Famous Hero
posted June 08, 2022 01:49 PM

zmudziak22 said:
What about making these changes compatible with fheroes 2? It also fix game and provide Heroes 3 HD mod like features.


If the rumors that fheroes2 is a promising modern platform are confirmed , then it is quite possible that in the future I will make a mod based on fheroes2 (however, for this I will have to improve my knowledge of C ++). But, I suspect that much of the "basic" part of fheroes2 will have to be redone to my liking. For example AI.

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


Famous Hero
posted August 10, 2023 08:05 AM
Edited by Ben80 at 16:39, 10 Aug 2023.

A new experimental plugin that corrects the change in movement points of heroes.
(only for English version 2.1)

Download

In the original game, movement points (MP) are calculated only at the beginning of the turn (only when interacting with certain objects do they change, for example, thanks to the Oasis).
The plugin immediately (and not at the beginning of the next turn) reduces the amount of the hero's MP if hero gets creatures slower than the slowest of the creatures which hero already has in that day.
The transfer of creatures can be from another hero, from any map object, when the hero interacts with the city. The MP reduction is proportional to the hero's current MP. For example, if a hero's army consists of Elves and then Dwarves are given to him at the start of the turn, then the MP reduction will be 200. But if Dwarves are transferred to the same hero after he has passed half of his daily maximum movement, then the reduction will be only 100.

It would be interesting to explore the implications for the game of using the proposed mechanics. Has there been less "micromanagement" (in fact - abusing) ? Were there significant additional inconveniences ? Has the variety of strategies increased ?

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


Famous Hero
posted August 10, 2023 12:27 PM
Edited by heymlich at 12:27, 10 Aug 2023.

Ben80 said:

The plugin immediately (and not at the beginning of the next turn) reduces the amount of the hero's MP if hero gets creatures slower than the slowest of the creatures which hero already has in that day.



So, when I transfer some dwarves as fodder to a (faster) hero, lose all of them in the fight, then transfer more dwarves to the same hero - will I suffer the MP reduction twice?

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


Famous Hero
posted August 10, 2023 01:17 PM

heymlich said:

So, when I transfer some dwarves as fodder to a (faster) hero, lose all of them in the fight, then transfer more dwarves to the same hero - will I suffer the MP reduction twice?


Fortunately not. When you gave the dwarves to  hero earlier in the day, that information was stored in the hero's structure. Therefore, when the dwarves were given again, the speed did not decrease.

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


Famous Hero
posted August 10, 2023 01:19 PM

I was told yesterday that in Heroes 1 there was also a decrease in the speed of the hero when transferring slow units. However, this system (in Heroes 1) worked a little differently than mine. I am currently exploring this alternative approach.

 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.0691 seconds