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: [H3] SoD_SP: a HDmod plugin
Thread: [H3] SoD_SP: a HDmod plugin This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV
Rince
Rince


Hired Hero
posted January 08, 2020 05:22 PM

There is a relatively little known bug with the Magic mirror spell - it doesn't work against AI at all. Have you ever looked into it?

Sure, even if it worked properly the usage of that spell is limited at best. However once I've thought up a battle centered around that spell.

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


Honorable
Supreme Hero
posted January 09, 2020 02:10 AM

Rince said:
There is a relatively little known bug with the Magic mirror spell - it doesn't work against AI at all. Have you ever looked into it?

Sure, even if it worked properly the usage of that spell is limited at best. However once I've thought up a battle centered around that spell.

I have not.
If it's a coding error, I could fix it with relative ease.
If it's not coded, then it's a bit more work.
In both cases I'd provide it as an option and I think it should follow with developer intention as it doesn't make that much sense to make it work only one-way.

I'm in the final steps for version 1.18, there's a chance I could implement it shortly.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

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


Adventuring Hero
posted January 09, 2020 04:32 PM

Code wrote by igrik for some player (but I don't know whether it is final/correct version of code):

int __stdcall SetMagickMirrorForAI(LoHook* h, HookContext* c)
{
   _BattleMgr_* bm = o_BattleMgr;
   int spell = bm->Field<_int_>(+0x40);
   int target1 = bm->Field<_int_>(+0x44);
   int target2 = *(int*)(c->ebp -80);

   if (target1 != -1 && target2 == -1) {
       if (spell==15 || spell==16 || spell==17 || spell==18 || spell==47 || spell==57 || spell==62 ||
           ( (spell==42|| spell==45 || spell==50 || spell==52|| spell==54) && CALL_3(int, __thiscall, 0x4E52F0, *(int*)(c->ebx +4), spell, bm->Field<_int_>(+0x53C0)) <=2 ) ){
           _BattleStack_* st = bm->hex[target1].GetCreature();
           int chance = CALL_1(int, __thiscall,0x448510, st);
           if ( chance >= Randint(1,100) ) {
               int side = bm->current_side;
               int rand; int gex = 0;
               do {
                   rand = Randint(0,20);
                   if (bm->stack[side][rand].count_current > 0 && bm->stack[side][rand].creature_id != 148 && bm->stack[side][rand].hex_ix > 0) {
                       gex = bm->stack[side][rand].hex_ix;
                   }
               } while (gex < 1); // пока гекс с существом не найден
               *(int*)(c->ebp -80) = gex;
           }
       }
   }

   return EXEC_DEFAULT;
}
...
_PI->WriteLoHook(0x43C73C, SetMagickMirrorForAI);

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


Honorable
Supreme Hero
posted January 09, 2020 06:07 PM
Edited by RoseKavalier at 18:10, 09 Jan 2020.

Thanks, but I did it last night

Some issues with that code:
* Arrow Tower is id 149, not 148.
* reflect target selection doesn't follow game logic: AI only selects from creatures you had at the start of the combat

I didn't check the rest cos it's too painful to understand without looking up every offset with the structures in front of me.

HH @ 0x478986

____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

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

Tavern Dweller
posted January 13, 2020 11:30 PM

I am having weird issue with SoD_SP. I'm trying to play Rise of the Sun King and I need Giro to have defense overflow to 0. If I play HD mod + HD+ + Sod SP + Primary Overflow turned off in menu I get overflow in Attack skill, but still 99 defense. If I play without HD+ I get proper result, but I can't save or load, because it closes the game suddenly (without crash). I don't know what's the issue.

Secondly, I would like to mention enchanters' bug that I think was not mentioned. Killing top stacks of both sides makes enchanters skip casting at all. Killing top stack of the enchanters' side removes buffs from their "palette' of spells (so only slow/weakness) and the opposite removes debuffs. I think it doesn't always work, but I haven't sit down and study why.

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


Honorable
Supreme Hero
posted January 13, 2020 11:47 PM
Edited by RoseKavalier at 00:55, 14 Jan 2020.

Machberet said:
I am having weird issue with SoD_SP. I'm trying to play Rise of the Sun King and I need Giro to have defense overflow to 0. If I play HD mod + HD+ + Sod SP + Primary Overflow turned off in menu I get overflow in Attack skill, but still 99 defense. If I play without HD+ I get proper result, but I can't save or load, because it closes the game suddenly (without crash). I don't know what's the issue.

Which version are you using? I just looked and Giro gets 0 defense.
There was a bug a few version back when HDmod updated and SoD_SP wasn't up to date.


Machberet said:
Secondly, I would like to mention enchanters' bug that I think was not mentioned. Killing top stacks of both sides makes enchanters skip casting at all. Killing top stack of the enchanters' side removes buffs from their "palette' of spells (so only slow/weakness) and the opposite removes debuffs. I think it doesn't always work, but I haven't sit down and study why.

Interesting, I'll look at it.

EDIT:
So I've looked it up, the developers forgot something quite simple for which I have a fix. I would have included it in 1.18 but since it's a game-changing feature I need some more translation first.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

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


Honorable
Supreme Hero
posted January 14, 2020 12:38 AM bonus applied by Maurice on 16 Jan 2020.
Edited by RoseKavalier at 06:07, 14 Jan 2020.

v1.18.0

DOWNLOAD (exe installer)
DOWNLOAD (zip archive)





Version 1.18
[+] Added Advanced Dialogs to map adventure (ALT + RMB)
Players can still use normal RMB dialogs if ALT is not pressed.
Note: this can be disabled by mapmakers using Unleashed mapeditor
[+] AI cast spells may now consider Magic Mirror effects
[+] Fixed First Aid Tent crash bug when manually targetting an adjacent enemy
[+] Increased number of uniquely customized wandering monsters from 256 to 4096
[+] When the Catapult is active, you can now view your own army's information dialog
[ ] Updated H3.TextColor for HDmod 5.0RC63
[ ] Updated and improved spells turbo mode for HDmod 5.0RC63
[-] Fixed incorrect Treasure Chest values using the Unleashed Editor features
[-] Fixed incorrect disabled appearance of options within SoD_SP dialog
[-] Fixed a crash bug with display of Heroes' movement cost



The links in the first post will be edited shortly.

With the ALT+RMB advanced dialogs on the Adventure Map, you can get advanced information about what awaits you in your explorations.
Mapmakers fear not! Unleashed mapeditor has an option to prevent the use of the advanced dialogs.
Users who don't like this feature need simply not hold ALT when inspecting objects on the Adventure Map.

SOURCE
I will update some SoD_SP source code in the coming days on my H3Plugins Github repository.
The H3API headers can now be compiled as a static library and will also be updated in the coming days.

MEDIA DUMP


Dragon Utopia preview


Wandering Monster preview
Note: presence of upgraded stack and stack separation will only be valid if the matching SoD_SP options are turned on.


Town preview
Grey spells indicate that the mage guild is not yet available.


Events and Pandora's Box
If there are too many spells of artifacts present, buttons are created to show them separately.
Events will showcase player's shields to indicate who may trigger them.


Seer Huts quest, deadline and reward


Non-active heroes

A secondary dialog will be displayed to show which spells are known by the inspected hero.

Advanced Dialog for heroes is also visible from the Combat screen for any heroes currently present.

For a full list of the new dialogs, refer to the online documentation.

An update to Unleashed mapeditor will be be done later tonight to match the new SoD_SP option as well as add some new stuff.
EDIT: Unleashed has been updated.
____________
My Let's Plays: Metataxer's Revenge - The Empire of The World 2

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

Tavern Dweller
posted January 16, 2020 01:07 AM

About bugs for 1.19: There is a sound bug if you switch between windows (alt+tab). Sound effects and music become distorted and fragmented.

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


Hired Hero
posted January 17, 2020 09:35 PM

Is there a way to make possible to read enemy heroes' biographies un game? Definetely not the most useful feature ever, but I could have make use of it.

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


Adventuring Hero
posted January 18, 2020 05:09 PM

Congratulations, RoseKavalier!
Excellent work as always!

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 17 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0655 seconds