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: Some small plugins
Thread: Some small plugins This thread is 2 pages long: 1 2 · NEXT»
OxFEA
OxFEA


Promising
Famous Hero
feanor on DF2.ru
posted July 20, 2012 10:44 PM
Edited by Corribus at 20:08, 18 Sep 2012.

Some small plugins

0. ERA plugin for adding some commands to the chat.

https://dl.dropbox.com/u/61759222/HoMM/chalk.rar - code+plugin
http://forum.df2.ru/index.php?showtopic=27732 (DF2 thread)


Commands:
- /showfps. Enable/disable showing FPS instead of chat string.
- /leveldebugger. Enable/disable internal "level debugger". Only feature that I noticed - showing coordinates on right-click on map.
- /heroid. Show current hero id, name and address in memory.
- /execerm <command>. Execute ERM command. Command must be written without starting "!!" but with ending ";" (e.g. /execerm IF:L^Hi!^; )
Aliases like HE-1, v998, v999, v1000 are supported with limitations; other aliases (CA-1; HE-10 etc) doesn't supported at all.
- !!<command>. Like previous command, but with better syntaxis: you can write !!IF:L^Hi!^; instead of /execerm IF:L^Hi!^;

Tested on ERA 2.3
I forget in which verison OnChat event had been implemented so I can't say anything about older ERA versions.

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


Honorable
Supreme Hero
posted July 21, 2012 12:57 AM

I remember simple ERM equivalent:

ZVSE
!?FU77003;
!!SN:W^InChat^/?y1;
!!SN&y1=1:Q;

!?FU77014;
!!SN:X?y1;

!!if&y1=0:;
 !!SN:W^InChat^/1;
!!en:;

!!if&y1=1:;
 !!SN:X?y1/?z1/0;
 !!SN:L^Era.dll^/?y10 Ay10/^ExecErmCmd^/?y11 Ey11/0/z1;
!!en:;

!!if&y1=2:;
 !!SN:W^InChat^/0;
!!en:;

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


Promising
Famous Hero
of infamy
posted July 22, 2012 07:30 AM

This is great! So useful for debugging actually. Or at least I think so. I think this is best when the game crashes and you can't get around it, used to mean had to stop your game. Now you can just find the problem hero or monster, and delete it from the game.


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


Promising
Famous Hero
feanor on DF2.ru
posted July 26, 2012 05:42 PM
Edited by OxFEA at 17:43, 26 Jul 2012.

Version from 26 Jul 2012, 18:03:18

[*] Cheatcodes work now
[+] Added commands /chalk (prints list of commands and date/time of plugin compilation), /console on|off (enabling/disabling of windows console)
[+] Chat output now works without ERM, so commands like "/exec IF:L^Test^;" works correctly.
[+] ERM-commands now can be written without ";"



http://zalil.ru/33613281 - plugin
https://dl.dropbox.com/u/61759222/HoMM/chalk.rar - code+plugin

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


Promising
Famous Hero
feanor on DF2.ru
posted August 23, 2012 08:53 PM

1. Additional timer receiver
https://dl.dropbox.com/u/61759222/HoMM/timerevent.era
(needs patcher_x86.dll)

Plugin run function !?FU4074700 (and fire "OnGlobalTimer" event) for any player at start of any day.

Parameters (ERM): x1 - player number (0..7), x2 - day (1,2,3,4,5,6,7,8..)


Source: https://dl.dropbox.com/u/61759222/HoMM/eratimer_code.rar
C/C++ example:
Quote:
void __stdcall TimerTest (PEvent e)
{
   char buf[128];
   int i = *(int*)(e->Data);
   sprintf(buf,"IF:L^%i %i^;",*(int*)(e->Data), *(1+(int*)(e->Data)));
   ExecErmCmd(buf);
}
..
RegisterHandler(TimerTest,"OnGlobalTimer");

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


Promising
Legendary Hero
fallen artist
posted August 23, 2012 09:14 PM

Oh man, now this is something! We'll mod the hell out of this game
____________
The future of Heroes 3 is here!

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


Promising
Famous Hero
feanor on DF2.ru
posted August 23, 2012 09:37 PM
Edited by OxFEA at 21:15, 18 Sep 2012.

I can't recognize humor or sarcasm when it was written on little-known language. Was it a some sort of?

2. In-game time managing (malachite.era)

https://dl.dropbox.com/u/61759222/malachite.era
(needs patcher_x86.dll)

Features:
- setting in-game date with exported void SetDate(short day, short week, short month) function
- changing new day/week animation with new !?FU4074218 event
Example (ERM):

Quote:
!?FU4074218; //x1 - day, x2 - week, x3 - month, z1 - defname
!!VRz1&x2=4/x3=6:S^midsumm.def^;


Example (C):

Quote:
void __stdcall Testt (PEvent e)
{
   if (EventParams[1]==4 && EventParams[2]==6)
       strcpy((char*)(e->Data),"midsumm.def");
}

RegisterHandler(Testt,"OnNewDayAnimation");

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


Promising
Famous Hero
feanor on DF2.ru
posted September 18, 2012 09:13 PM
Edited by OxFEA at 21:15, 18 Sep 2012.

3. Digging management (granite.era)

https://dl.dropbox.com/u/61759222/granite.era
(needs patcher_x86.dll)

ERM events:
!?FU4074001 - before digging
x1 - hero id
x2 - pointer to boolean flag that controls standart digging action.
Use command !!UN:Cx2/4/0; for disable standart digging.
!!UN:Cx2/4/1; reenables default action, but I can't imagine where it may be necessary.

!?FU4074003 - acts when any digging message was showing
x1 - hero id
x2 - pointer to boolean flag that controls showing message (doesn't control any other actions like consuming MP!). As previous, use command !!UN:Cx2/4/0; for disable message.
x3 - type of message:
0 - "Try tomorrow" (when some MP are consumed)
1 - "Inventory is full" (so, when inventory is full)
2 - "Try searching on land" (digging in sea)
3 - "Try searching on clear ground" (digging in incorrect place)
4 - "Congratulations!.." (first message when grail found)
5 - "ïðèíåñèòå Ãðààëü â ãîðîä.." (second message when grail found)
6 - "Where could it be?" (nothing found)

!?FU4074002 - after digging
x1 - hero id
x2 - result of digging. Like x3 in FU4074003, but without type 4 and with type -1 - "standart digging cancelled in !?FU4074001"

Example:
Quote:
!?FU4074003;
!!if&x3=6:; //when nothing was found
!!UN:Cx2/4/0; //disable standart message
!!IF:M^As you value your life or your reason keep away from the moor.^; //show ours one
!!HE-1:Tv998/v999/v1000/47/1; //run encounter
!!el:;
!!en:;


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


Admirable
Omnipresent Hero
Wog refugee
posted September 18, 2012 09:45 PM

I was wishing for such plugin, as we did not have trigger for dig. Thanks.
____________
Era II mods and utilities

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


Promising
Famous Hero
feanor on DF2.ru
posted October 19, 2012 08:00 PM
Edited by OxFEA at 20:02, 19 Oct 2012.

4. 8th slot management (obsidian.era)

https://dl.dropbox.com/u/61759222/HoMM/obsidian.era
(needs patcher_x86.dll)

Events:

!?FU4074810 (OnAdditionalMonsterAvailable) - runs on every checking of 8th slot availability
x1 - castle id
x2 - address of castle structure
x3 - pointer to boolean flag that controls 8th slot.

!?FU4074811 (OnAdditionalMonsterSetting) - runs after setting creatures in portal
x1 - castle id
x2 - address of castle structure
x3 - pointer to int32 that contains type of creatures
x4 - pointer to int16 that contains amount of creatures (see example below)

Exported functions:

extern "C" __declspec(dllexport) void SetAdditionalMonster(int castle_id, int type, int amount)
extern "C" __declspec(dllexport) int GetAdditionalMonsterType(int castle_id)
extern "C" __declspec(dllexport) int GetAdditionalMonsterAmount(int castle_id)

Example (ERM):
All Infernos allow hiring of 5 Baa clerics each week.
Quote:
ZVSE

!?FU4074811;
!!CA0/x1:T?y10;
!!SN&y10=3:L^obsidian.era^/?y10 Ay10/^SetAdditionalMonster^/?y20 Ey20/1/x1/169/5;

!?FU4074810;
!!CA0/x1:T?y10;
!!UN&y10=3:Cx3/4/1;

!?PI;
!!MA:O169/3;
!!VRz47:S^Cleric of Baa^;
!!VRz48:S^Clerics of Baa^;
!!UN:G1/169/0/47 G1/169/1/48;


Another variant of first trigger:
Quote:
!?FU4074811;
!!CA0/x1:T?y10;
!!UN&y10=3:Cx3/4/169;
!!UN&y10=3:Cx4/2/5;




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


Admirable
Omnipresent Hero
Wog refugee
posted October 19, 2012 09:55 PM
Edited by Salamandre at 21:56, 19 Oct 2012.

Thank you for your work. Combined with MoP battery we can have now a bunch of new creatures/town, looks like.
____________
Era II mods and utilities

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


Supreme Hero
Work at Magic Dimmension
posted October 22, 2012 11:29 AM

OxFEA maybe a ghost/vampire plugin?
I've once seen in WoG source that applying Ghost's Soulsuck or Blood Dragon's Vampirism was an simple application, However I've not yet tried to cook some plugin for do the same. Could you perhaps add here a plugin for enabling the abilities to any desired monster? One which would be compatible with Amethyst? Gently please.

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


Promising
Famous Hero
feanor on DF2.ru
posted October 22, 2012 09:01 PM

Quote:
Could you perhaps add here a plugin for enabling the abilities to any desired monster? One which would be compatible with Amethyst? Gently please.



I don't want to do it now. It is a huge and mostly useless work.

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


Known Hero
Editing Heroes Without Limits
posted November 01, 2012 03:54 AM

Quote:
4. 8th slot management (obsidian.era)

https://dl.dropbox.com/u/61759222/HoMM/obsidian.era
(needs patcher_x86.dll)

Events:

!?FU4074810 (OnAdditionalMonsterAvailable) - runs on every checking of 8th slot availability
x1 - castle id
x2 - address of castle structure
x3 - pointer to boolean flag that controls 8th slot.

!?FU4074811 (OnAdditionalMonsterSetting) - runs after setting creatures in portal
x1 - castle id
x2 - address of castle structure
x3 - pointer to int32 that contains type of creatures
x4 - pointer to int16 that contains amount of creatures (see example below)

Exported functions:

extern "C" __declspec(dllexport) void SetAdditionalMonster(int castle_id, int type, int amount)
extern "C" __declspec(dllexport) int GetAdditionalMonsterType(int castle_id)
extern "C" __declspec(dllexport) int GetAdditionalMonsterAmount(int castle_id)

Example (ERM):
All Infernos allow hiring of 5 Baa clerics each week.
Quote:
ZVSE

!?FU4074811;
!!CA0/x1:T?y10;
!!SN&y10=3:L^obsidian.era^/?y10 Ay10/^SetAdditionalMonster^/?y20 Ey20/1/x1/169/5;

!?FU4074810;
!!CA0/x1:T?y10;
!!UN&y10=3:Cx3/4/1;

!?PI;
!!MA:O169/3;
!!VRz47:S^Cleric of Baa^;
!!VRz48:S^Clerics of Baa^;
!!UN:G1/169/0/47 G1/169/1/48;


Another variant of first trigger:
Quote:
!?FU4074811;
!!CA0/x1:T?y10;
!!UN&y10=3:Cx3/4/169;
!!UN&y10=3:Cx4/2/5;






I copy your example to the sagamosa erm file. I downloaded granite.era  put it inside Erapluggins and activated it. But there was no 8th slot in the game. You said we need patcher_x86.dll I don't have it. Is that the problem? What do I do?
____________

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


Known Hero
Editing Heroes Without Limits
posted November 01, 2012 04:04 AM

I have patcher_x86.dll now I see it in my heroes iii folder... Why is this 8th creature not working?
____________

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


Promising
Famous Hero
feanor on DF2.ru
posted November 01, 2012 05:58 PM
Edited by OxFEA at 17:58, 01 Nov 2012.

Quote:
Quote:

https://dl.dropbox.com/u/61759222/HoMM/obsidian.era



Quote:
I downloaded granite.era  put it inside Erapluggins and activated it. But there was no 8th slot in the game. You said we need patcher_x86.dll I don't have it. Is that the problem? What do I do?

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


Known Hero
Editing Heroes Without Limits
posted November 01, 2012 11:28 PM


____________

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


Known Hero
Editing Heroes Without Limits
posted November 02, 2012 12:04 AM

Still didn't work.

I tried also to disable all the other mods. Don't understand.
____________

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


Promising
Famous Hero
feanor on DF2.ru
posted January 02, 2013 10:06 PM

5. Bad luck implementation. (c) Sav, feanor

https://dl.dropbox.com/u/61759222/HoMM/badluck.era



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


Promising
Undefeatable Hero
My BS sensor is tingling again
posted January 02, 2013 10:48 PM

Bad Luck for Era? Nice.

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

Page compiled in 0.0625 seconds