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 > Heroes 3.5 - WoG and Beyond > Thread: [Platform] Knightmare Kingdoms
Thread: [Platform] Knightmare Kingdoms This thread is 43 pages long: 1 2 3 4 5 ... 10 20 30 ... 39 40 41 42 43 · «PREV
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted June 07, 2019 01:42 PM
Edited by majaczek at 13:52, 07 Jun 2019.

igrik said:
majaczek said:
Igrik, could you help me with catching bugs in my mod?
I have one, but a big one (crashes during AI turn) from null pointer on structure

I saw your mod. You have so many things there that are confusing that Iím even afraid to take it to help. Sorry


I will fix myself all problems with features, only please help me debugging crashes, could  you do any help, please ?

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


Supreme Hero
Work at Magic Dimmension
posted June 20, 2019 06:03 PM
Edited by majaczek at 19:47, 23 Jun 2019.

I found which plugin is guilty for the crashes: Its my Knightmare war machines

I am thankful to new ERA which found the cause (previous versions didn't)

EDIT:
I fixed the plugin but  there are more problems

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


Famous Hero
posted July 19, 2019 07:10 PM
Edited by xericsin at 19:14, 19 Jul 2019.

hi, majaczek,

I need your help with amethyst.

I am using the one modified on 2016/06/18 8:02.
BaiduDrive
Extraction Code: 2rt9
Or OneDrive
It is highly suspiciously conflicting with functions that manipulate the memory.

I need you to verify this and hopefully a solution with guide.

!?FU16009;
**x1=creature id(22-196)
**x2:
**  0 = bind
**  1 = blind
**  2 = disease
**  3 = curse
**  4 = age
**  5 = petrify
**  6 = paralyze
**  7 = poison
**  8 = acid
**  9 = none
!!FU|x1<22/x1>196:E;
!!VRy1:Sx1 +7994570;
!!UN:Cy1/1/x2;

!?FU16010;
**x1=creature id(63-196)
**x2=0=drain hp(vampire)
** =1=thunder
** =2=death stare
** =3=dispell
** =4=acid
** =5=none
!!FU|x1<63/x1>196:E;
!!VRy1:Sx1 +7994385;
!!UN:Cy1/1/x2;

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


Supreme Hero
Work at Magic Dimmension
posted July 20, 2019 03:04 AM

in amethyst such code  doesn't work.
you need just to create cfg file for each creature
there you set those  numbers
get a sneaky look at my mod, more precisely creatures folder

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


Famous Hero
posted July 20, 2019 01:14 PM

majaczek said:
in amethyst such code  doesn't work.
you need just to create cfg file for each creature
there you set those  numbers
get a sneaky look at my mod, more precisely creatures folder


The 2 functions work well in era without amethyst.
But they do not work with amethyst for the standard creatures.

So, I need you to help explain what is preventing the function from working.
eg.
Does Amethyst declare a new patch of memory for new creatures?
Does Amethyst declare a new patch of memory for ALL creatures?
Does Amethyst change the data structure of creatures?

And I have looked at the cfg files. Creature skills can be declared there using amethyst2. However, I need to switch the creature skills on and off dynamically through ERM. So I need some other ways.

And there are other non-creature related functions as well. I need to know whether they would be affected by amethyst.

So, firstly, I need you to help me understand what amethyst is doing with the memory. Then I can judge between conflicting functionalities, which to keep, which to give up.

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


Supreme Hero
Work at Magic Dimmension
posted July 20, 2019 10:17 PM
Edited by majaczek at 22:20, 20 Jul 2019.

you may access new tables in amethyst from plugin (it's partially how my Knightmare war machines work), just the tables are relocated because game wants it in single table which is bigger than place in h3era.exe. each important stat is moved to new table. I added possibility to call Amethyst2 from other plugins and even reverted old changes so you can change via this interface parameters which originally were out of cfg files

Quote:

Does Amethyst declare a new patch of memory for new creatures?
Does Amethyst declare a new patch of memory for ALL creatures?
Does Amethyst change the data structure of creatures?

yes, yes, depends

Amethyst does dirty hack to support 1024 Creatures in creature experience instead of hardcoded 256 limit. there are also new tables for hooks.

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


Famous Hero
posted July 21, 2019 05:28 AM
Edited by xericsin at 08:12, 21 Jul 2019.

Does that mean I can do something like this to change creature skills?
!!SN:L^PluginsAmethyst.dll^/?y1 Ay1/^FunctionName^/?y2 Ey2/Creature/Skill;

In addition, does Amethyst affect battle memory? I guess no.

Edit:
In the standard era, I can modify the following bytes to disable and enable death cloud for liches(64/65/196).
!!UN&y27=64:C7764897/1/64;
!!UN&y27=65:C7764902/1/65;
!!UN&y27=196:C7764906/4/196;
However, it is not working with amethyst. I am wondering those 3 locations should be static functions. Amethyst should not be touching on them. So I think those functions must have checked the original creature table which is not used in amethyst, then the functions fail to switch AOE off subsequently. Is my thought correct?

And can you tell me what is the creature table address with and without amethyst? Something like 7700000-7900000?

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


Known Hero
posted July 21, 2019 06:47 AM
Edited by planetavril at 06:57, 21 Jul 2019.

where to find amethist 2 and how to add creatures,the flags to what corresponds?

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


Supreme Hero
Work at Magic Dimmension
posted July 21, 2019 04:24 PM
Edited by majaczek at 16:37, 21 Jul 2019.

xericsin said:
Does that mean I can do something like this to change creature skills?
!!SN:L^PluginsAmethyst.dll^/?y1 Ay1/^FunctionName^/?y2 Ey2/Creature/Skill;

In addition, does Amethyst affect battle memory? I guess no.

Edit:
In the standard era, I can modify the following bytes to disable and enable death cloud for liches(64/65/196).
!!UN&y27=64:C7764897/1/64;
!!UN&y27=65:C7764902/1/65;
!!UN&y27=196:C7764906/4/196;
However, it is not working with amethyst. I am wondering those 3 locations should be static functions. Amethyst should not be touching on them. So I think those functions must have checked the original creature table which is not used in amethyst, then the functions fail to switch AOE off subsequently. Is my thought correct?

And can you tell me what is the creature table address with and without amethyst? Something like 7700000-7900000?



it touches it of course. to make be able to add new creatures with death cloud or fireball.
I didn't checked if calling the library/plugin from ERM works, but it works from other library/plugin. Just do not reload the plugin but access it from loaded plugins. If I remember properly it gets  creature number and text line (same as from cfg file).

I suggest you to do own plugin which calls amethyst2 plugin like I did for war machines.  It  would be better than trying to  do  everything from ERM.

creature tables with amethyst are placed in plugin memory, so it depends what plugins and how much of them are loaded. and there are several tables.

EDIT: ask bersy if he could help you :| I think SN:L code won't work of the box because it says Load in erm help and the  plugin have to be loaded only once or "bad things happen" so you need to  get it adress without reloading it. there are 2 possiblities - find some kernel32.dll function for it (and use returned adress for execute function) or ask Bersy to add new SN command.

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


Famous Hero
posted July 24, 2019 06:17 AM

majaczek said:

I think SN:L code won't work of the box because it says Load in erm help and the  plugin have to be loaded only once or "bad things happen" so you need to  get it adress without reloading it. there are 2 possiblities - find some kernel32.dll function for it (and use returned adress for execute function) or ask Bersy to add new SN command.


Bersy said:

calling kernel32.dll LoadLibrary does not reload already loaded libraries. SN:L is safe.


Thanks a lot. I am confused here.

1. Is Bersy saying only kernel32 will not be double loaded? Or every plugin can be safely loaded?

The following 2 functions runs at every BA0/1 to set and unset hooks. They are currently working. But from the angle of reloading plugins, are they unsafe?
 
Func1
!!SN:L^EraPluginserm_hooker.era^/?y1 Ay1/^SetHook^/?y2;
!!SN:Ey2/1/4479447/111106; hook at 0x004459D7 => FU111106
Func2
!!SN:L^EraPluginserm_hooker.era^/?y1 Ay1/^UnsetHook^/?y2;
!!SN:Ey2/1/4479447;

2. And how can "find some kernel32.dll function for it" help set creature skills under amethyst? How would kernel32 locate addresses of things in amethyst?

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


Famous Hero
posted July 27, 2019 09:34 AM
Edited by xericsin at 09:35, 27 Jul 2019.

Haha, I managed to find the addresses of skill tables under amethyst.
They are available in the amethyst source code.

*(int*)0x440916=4458774 storing address of skill table 1 (Drain HP so on)
*(int*)0x440237=4457015 storing address of skill table 2 (Bind so on)

My problem is solved. Thank you.

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


Supreme Hero
Work at Magic Dimmension
posted August 21, 2019 02:11 PM
Edited by majaczek at 17:14, 21 Aug 2019.


Sorry it seems SN:L is safe. I am happy you found desired result.

PS: you can do that and much more using SN:L and the only exported non-main function in amethyst. it takes two arguments: creature number and a string formatted like amethyst cfg file.

PPS: could anyone wise say how to speak "call this function" to erm using the function I mentioned?

PPPS: I was under impression that SN:L uses non safe loading of library (kernel32::OpenLibrary or something) but  it seems to be safe one (kernel32::GetModuleHandle) so was the reason of my unwise claims. Sorry for that. All plugins in my plugins repo should work ok :) anyway I will check if some of them wouldn't be affected by upgrades of ERA.

Thank You for audience :)

By the way: I may return to fixing KK mod, I need to fix some things there anyway.

--------------------------------------------------------------------
@XerciSin: how to use amethyst from erm

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


Famous Hero
posted August 23, 2019 08:26 AM


 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 43 pages long: 1 2 3 4 5 ... 10 20 30 ... 39 40 41 42 43 · «PREV
Post New Poll †† Post New Topic †† Post New Reply

Page compiled in 0.0473 seconds