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: ERM help and discussion
Thread: ERM help and discussion This Popular Thread is 407 pages long: 1 50 100 150 200 250 ... 261 262 263 264 265 ... 300 350 400 407 · «PREV / NEXT»
majaczek
majaczek


Supreme Hero
Work at Magic Dimmension
posted August 05, 2015 09:33 PM

How to use
BM:G
in script?

i.e. if i wanted to increase spellpower of angel or other ressurection creature? Please explain...

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


Legendary Hero
posted August 07, 2015 10:08 PM
Edited by bloodsucker at 17:35, 08 Aug 2015.

I'm not sure if this is an ERM question cause templates aren't ERM but maybe the solution will have to be.

Would it be possible to enforce a certain quest in a template?
I made this one on a map I'm making: trade the Amulet of the Undertaker for the spell Town Portal.
This avoids you to have more then one Cloak and even the first one you will have it only for a while.
If I could find a way this is a rule I should enforce.

P.S. Does this seams logical and doable? Constantly check AI army's numbers and if a slot grows above 30.000 reduce it to 30.000. I'm afraid they can get to negative numbers.

Same goes to resources: I'm giving 90.000 a day of each resource and 90.000 of gold to AI in events in each town. The creature growth I imposed will drain most of it but only if they trade them at rates of less then 75/150 each and I'm not sure if computer will try to buy all creatures in this case.

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

Tavern Dweller
posted August 10, 2015 05:32 PM

Hello guys!

How can I disable some creature abillities, like return of harpies after attack, or dwarf magic shield and some other? I did not find such flag in erm help.

Thanks.

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


Admirable
Omnipresent Hero
Wog refugee
posted August 10, 2015 05:52 PM

@bloodsucker

For the template there is no erm solution.

Resources: 90000 each resource a day is exaggerated. Just make sure he has enough to recruit the custom growth.

30 000 limit: I never worked on AI having that, but I would check when AI hero quits town (!$OB98&-1000), loop his army (HE-1:C0/x/y/z), see if any of slots exceeds 30k creatures and set it back to 29k or something like that).

Also pay attention that bigger army AI has, more time it will need for completing turns. In Conquistador, starting with week 3-4, each AI hero takes 1-2 minutes to move, hence the 3 heros limit.


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


Supreme Hero
Work at Magic Dimmension
posted August 10, 2015 09:46 PM

how to prepare script which scans all towns on map for garrisoned creaures, and if empty sets it to one peasant? it will help with my Town Guardian feature (summoning of Town Guardian creature  in siege), because AI foolishly empties towns' garrisons..

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


Admirable
Omnipresent Hero
Wog refugee
posted August 10, 2015 09:55 PM

From Conquistador, just modify the end:

!!CA300:H0/?y1; check if hero in garrison
  !!if&y1<0:; if no hero
    !!DO15010/0/6/1:Pv300/v301/v302;
  !!en:;

!?FU15010;
;remove all useless troops from garrison if no hero in
!!CAv300/v301/v302:M2/x16/-1/-1;

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


Supreme Hero
Work at Magic Dimmension
posted August 11, 2015 11:24 AM

thanks but  it is for v300 castle, and I need loop through all towns? how to loop through all towns, then check if it is empty (no hero and no garrison creatures) and if yes set it to  1 peasant... preferably do it every day ever colour?

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


Admirable
Omnipresent Hero
Wog refugee
posted August 11, 2015 12:04 PM

Something like that:

!#TM2:S1/999/1/255;
!?TM2;
!!OW:C?y1; check current player
!!OW:Iy1/?y2; human/AI 0/1
!!FU&y2<1:E; exit if human
!!UN:U98/-1/?y-1; count towns
!!VRv1:S-1;
!!DO12345/1/y-1/1:Py1; loop all towns

!?FU12345;
;x1 current player
!!UN:U98/-1/-1/1; town in v1-v3
!!CA1:O?y1; owner in y1
!!FU&x1<>y1:E; exit if not current player
!!CA1:H0/?y3 H1/?y4;
!!FU|y3>-1/y4>-1:E; exit if any hero in town or garrison
!!DO67890/0/6/1:Pv1/v2/v3; loop garrison slots

!?FU67890;
!!CAx1/x2/x3:M2/x16/?y1/?y2;
!!CAx1/x2/x3&y1<0:M2/x16/139/1; set to one peasant if slot empty

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


Supreme Hero
Work at Magic Dimmension
posted August 11, 2015 09:56 PM

really thanks! already added to the mod, however I'd like a few fixes but i hope i can add them myself

so: Really Thanks Salamandre!

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


Legendary Hero
posted August 11, 2015 10:55 PM

majaczek said:
really thanks! already added to the mod, however I'd like a few fixes but i hope i can add them myself

so: Really Thanks Salamandre!


I make your words mine. Thanks Salamandre.
I know about the turns but I don't mind. In Heroes IV I had a map that in the first days you could literally go to the cineme (by bus) and return before AI could finnish.

I often take more then a day to make one of mine, too.

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


Supreme Hero
Work at Magic Dimmension
posted August 12, 2015 01:38 PM
Edited by majaczek at 14:10, 12 Aug 2015.

here fixed script
Quote:



!#TM2:S1/999/1/255;
!?TM2;
!!OW:C?y1; check current player
!!OW:Iy1/?y2; human/AI 0/1
!_!FU&y2<1:E; exit if human
!!UN:U98/-1/?y-1; count towns
!!VRv1:S-1;
!!DO55413/1/y-1/1y1; loop all towns

!?FU55413;
;x1 current player
!!UN:U98/-1/-1/1; town in v1-v3
!!CA1?y1; owner in y1
!!OW:Iy1/?y9;  human/AI 0/1
!!FU&y9<1:E; exit if human
!_!FU&x1<>y1:E; exit if not current player
!!CA1:H0/?y3 H1/?y4;
!!FU|y3>-1/y4>-1:E; exit if any hero in town or garrison
!!SN:W^AmeUpg Town Empty^/1;
!!DO55414/0/6/1v1/v2/v3; loop garrison slots
!!SN:W^AmeUpg Town Empty^/?y8;
!!CAv1/v2/v3&y8=1:M2/1/139/1; set to one peasant if garrison empty

!?FU55414;
!!CAx1/x2/x3:M2/x16/?y1/?y2;
!_!CAx1/x2/x3&y1<0:M2/x16/139/1; set to one peasant if slot empty
!!SN&y1>=0:W^AmeUpg Town Empty^/0;


it does fill with only one peasant and also on other players turn. did I included new bugs?

EDIT: fixed my bugs

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


Admirable
Omnipresent Hero
Wog refugee
posted August 12, 2015 01:59 PM

I don't know why, but you add several commands who do nothing but the same thing as my script did. For instance you check again in FU55413 if current player is human or AI, but this was already done in TM2, so is redundant while adding more vars check. Then the last command: M2/1/139/1, adds 1 peasant only in slot 1 while my script did what you wanted, add one peasant in each empty slot, using x16 to loop all slots.

Why do you need the SW:W checks?

____________
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 August 12, 2015 02:08 PM

I check if owner is AI not if player is AI
I disabled checking if player is owner
SN:W is just global variable (i prefer SN:W than v1 v2 etc)
your  script fired on every empty slot, mine fire only if all slots empty... or  it should work that way at least

EDIT: oops i ommited one thing

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


Admirable
Omnipresent Hero
Wog refugee
posted August 12, 2015 02:14 PM
Edited by Salamandre at 14:15, 12 Aug 2015.

Owner can't be human because TM2 performs only AI towns, it exits on third command if current player is human. You said: perform on each color turn. This is what I did, each color then towns owned by that color only. And if you want to fill 1 peasant in all slots ONLY if all slots are empty, ask, I can add it, but the way is now it doesn't that.

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


Supreme Hero
Work at Magic Dimmension
posted August 12, 2015 02:26 PM
Edited by majaczek at 14:40, 12 Aug 2015.

sorry for me being misunderstood
I mean it should run every turn every color, affecting all AI garrisons which are empty and set it to one slot of 1 peasant...
note:garrison doesn't have to to be current player.

did I made some mistakes?
PS: I fixed script  quote with removing problem I introduced

EDIT: Anyway thanks because I couldn't do it without your help. I Guess it now works as I intended. Great Thanks for the base to my script

EDIT: I checked the script on two maps and it seems to work

NOTE: !_! is a  commment

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


Adventuring Hero
posted August 12, 2015 04:56 PM

kerosin said:
Hello guys!

How can I disable some creature abillities, like return of harpies after attack, or dwarf magic shield and some other? I did not find such flag in erm help.

Thanks.


ERA's UN:C is powerful.(not work at wog358f)
for example:
disable harpy(72) return after attack:
!!UN:C7725145/4/2425393296;
!!UN:C7725149/1/144;

disable Harpy Hag(73) return after attack:
!!UN:C7725150/4/2425393296;
!!UN:C7725154/1/144;

you should understand and find the hardcode first.
like the following:
0075E059 - 83 f8 48 - cmp eax,48 #Harpy(72)
0075E05C - 74 5d - je 0075e0bb
0075E05E - 83 f8 49 - cmp eax,49 #Harpy Hag(73)
0075E061 - 74 58 - je 0075e0bb
0075E063 - 3d 9b 00 00 00 - cmp eax,0000009b #Darkness Dragon(155)
0075E068 - 74 21 - je 0075e08b

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


Admirable
Omnipresent Hero
Wog refugee
posted August 13, 2015 03:01 PM

Thanks. Is a pity, I updated erm help with all the known UN:C tweaks and sent to Bersy for 2.47. But looks like 2.47 will not come anytime, he is too busy.

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


Supreme Hero
Work at Magic Dimmension
posted August 13, 2015 09:38 PM

Could you remind UN:C codes for creature in summon elementals spells?

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


Admirable
Omnipresent Hero
Wog refugee
posted August 13, 2015 10:01 PM

!#UN:C5906519/1/61;
!#UN:C5906561/1/37;
!#UN:C5906498/1/52;
!#UN:C5906540/1/12;

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


Supreme Hero
Work at Magic Dimmension
posted August 14, 2015 11:19 AM

excuse me, i don't  understand?
I wanted code to change creatures in summon elemental spells  (each one of the four).

I am sorry that I am misunderstood again

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This Popular Thread is 407 pages long: 1 50 100 150 200 250 ... 261 262 263 264 265 ... 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.6118 seconds