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 ... 130 131 132 133 134 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Hero_of_Light
Hero_of_Light


Responsible
Supreme Hero
posted February 03, 2012 07:50 PM
Edited by Hero_of_Light at 19:57, 03 Feb 2012.

@ Salamandre

Interesting... How do i add this message?

Quote:
Another problem I see in the script is that once artefact unequipped, it will restore previous stats, no matter how many levels you gathered between. Should store those levels and add them, a bit complicate.


You're right at that too. It needs further consideration. For instance you can have the artifact and gain knowledge and Power and this will not be calculated. Maybe if the trigger was the entering of the hero screen? The trigger would be entering the hero screen and then it will only CHECK if the artifact is equiped. I think that might work since it will calculate the new total every time.

@Solitaire

In what case are you refering to? The spell book disapearing or the spell points removed? I don't understand what you're suggesting.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2012 08:02 PM

He means storing primary stats gained in hero w vars. If I understand the concept, the hero should be able to gain only attack and defense if artefact on. So, get what he gained (att or def) and store them to w1-w2, then add those values when artefact unequipped, then set w vars to zero again. heh, you asked for...
____________
Era II mods and utilities

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


Promising
Famous Hero
posted February 03, 2012 08:05 PM
Edited by solitaire345 at 20:07, 03 Feb 2012.

the pseudo code snippet is workaround for losing skill points at hero's level up.

For example your hero has these skill levels:
1 2 3 4
He equips the sceptre and now has
4 6 0 0
He levels up and gets +1 attk
5 6 0 0
He removes sceptre and once again has
1 2 3 4
where he should have
2 2 3 4

And the use of w variables is to avoid mess when there are two heroes equipped with scepters
66 66 66 66      1 2 3 4

second one equips one sceptre, first one takes another. Their stats are now
132 132 0 0      4 6 0 0

The second one unequips sceptre and now we have such skills:
132 132 0 0      66 66 66 66


Everything applies to sorcerer's helms too.
I can write a script in a while if needed.

____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2012 08:11 PM
Edited by Salamandre at 20:31, 03 Feb 2012.

Don't forget that there is a 127 cap for stats. If you equip this artefact late game, and the result is >127, you will end with 0 stats. Should add a check, and if more than 100, set to 100.

@Edit: 127 cap, thx Bers.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 03, 2012 08:23 PM

Damn... As always it will be more difficult than i thought. Anyway, I will try and make it work tomorrow.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2012 08:29 PM
Edited by Salamandre at 20:30, 03 Feb 2012.

Is not difficult, just a bit longer than the generic I gave in a hurry. Will make it soon if really need, or Solitaire said he will do.
____________
Era II mods and utilities

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


Promising
Famous Hero
posted February 03, 2012 08:34 PM

Quote:
@Edit: 127 cap, thx Bers.


That's more like it. 114 seemed a bit strange. I believe that by byte manipulation in exe this limit could be lifted to 255 (having negative levels make no sense anyway)

In the meanwhile, I remembered that I held last update of ERM help for quite a while without sharing it, so here it is now: Download.
Added ERM tips page (a small one yet), direct link to ERA triggers, moved few data tables from receiver pages to separate formats and deleted some duplicate pages. If some link leads you to white screen, please tell me.
Also the icon for ERA-related stuff finally has transparency
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2012 08:36 PM

Is it on  the base of the one Berserker fixed? (he took yours, fixed strings)
____________
Era II mods and utilities

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


Promising
Famous Hero
posted February 03, 2012 08:38 PM

W-What? I definitely missed something.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2012 08:40 PM
Edited by Salamandre at 20:47, 03 Feb 2012.

he fixed your latest ERM help and included in ERA II release, I have it, nice work from both

Download
____________
Era II mods and utilities

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


Promising
Famous Hero
posted February 03, 2012 08:57 PM

Thanks. Maybe you know what was altered in it? I'll try to merge these two during the weekend.
____________

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


Admirable
Omnipresent Hero
Wog refugee
posted February 03, 2012 09:04 PM

Strings, wrong spaces, background colors, as I see.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 04, 2012 12:15 AM

I've been testing the artifacts script and i found out that it won't work unless you get a trigger for every time there is a click on the hero screen. I think that's !?CM2; but i'm not sure how to use it anyways. I realized that in addition to the hero leveling up or visiting a marleto tower or something you'll get problems when you equip and unequip other skill bonus artifacts as well. So the trigger can't be the artifact equipment thing.

And what Solitaire said about variables is right, i tested a map with two artifatcs and the total sum came all wrong as he predicted.

If you can help and give me something to work with i would really appreciate it. I would really like to add these artifacts in the upcoming update.
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 04, 2012 12:25 AM

After reflection, seems this feature will be very tricky to add and requires long tests. As you say, hero may visit bonus places and where to store them, he may equip other artefacts along with 162, so what's going when remove/enable again, he must also store the stats in w vars. In all, a lot of work.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 04, 2012 01:03 PM

@Salamandre

I've been trying to edit the creature bank changing script you gave me in order to edit the WOG creature banks as well. However, i wasn't able to work it through. I wanted to make the Home of the Bat be guarded by Storm Elementals and to give all kinds of Elementals as reward. However, the lines are skiped and nothing happens. Can you show me what went wrong? I also would like a way to edit the original stack numbers and set them to random (let's say 4 - 8) and edit the bonus accordingly. If you could help me with that i would really appreciate it.

**Griffin Conservatory
!#TM2:S1/1/1/255; Once
!?TM2;
!!UN:U16/-1/?y-1;  [creature banks number]
!!VRv1:S-1;
!!DO102/1/y-1/1:P16; [run through]
!!DO103/1/y-1/1:P16; [run through]

!?FU102;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OBv1/v2/v3:U?y1; [subtype]
!!FU&y1<>2:E; exit if not conservatory
!!CBv1/v2/v3:G0/7/d G1/8/d G2/8/d G3/8/d G4/8/d; [Set guards]

**Home of the Bat
!?FU103;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OBv1/v2/v3:U?y2; [subtype]
!!FU&y2<>17:E; exit if not Home of the bat
!!CBv1/v2/v3:G0/127/d G1/127/d G2/127/d G3/127/d G4/127/d; [Set guards]
!!CBv1/v2/v3:M0/112/d M1/113/d M2/114/d M3/115/d;  [ creature reward]
____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 04, 2012 04:28 PM

Home of the bat is subtype 18, not 17. Here is it, change the monster reward as you wish:

**Griffin Conservatory
!#TM2:S1/1/1/255; Once
!?TM2;
!!UN:U16/-1/?y-1;  [creature banks number]
!!VRv1:S-1;
!!DO102/1/y-1/1:P16; [run through]

!?FU102;
!!UN:Ux1/-1/-1/1; [Creature Bank coordinates in v1/v2/v3]
!!OBv1/v2/v3:U?y2; [subtype]
!!if&y2=2:; If conservatory
!!CBv1/v2/v3:G0/7/d G1/8/d G2/8/d G3/8/d G4/8/d; [Set guards]
!!en:;
!!if&y2=18:; if home of the bat
!!CBv1/v2/v3:G0/127/d G1/127/d G2/127/d G3/127/d G4/127/d; [Set guards]
!!CBv1/v2/v3:M1/100;  [ creature reward]**gives 100 halberds
!!en:;

The monster reward was wrong scripted, ERM says:

M$1/$2 - set/get/check a bonus creature type $1 and number $2

To add any creature bank you wish to this list, just use again after the last line:

!!if&y2=[CB subtype]:;
[Guards, reward]
!!en:;
etc.
____________
Era II mods and utilities

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


Responsible
Supreme Hero
posted February 04, 2012 05:06 PM

Thanks! It worked  

And i found a way to randomize the number of guardians and the elemental that is given as a bonus as well. Thanks again!
____________
Not idly do the leaves of Lorien fall.

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


Promising
Famous Hero
posted February 04, 2012 10:33 PM

I think I'm done with this script. It's 276 lines, so I uploaded it to my 4shared instead of pasting it here: Download

I merged all suggestions that were posted yesterday, though I'm not sure if all cases are covered. Feel free to modify.
____________

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


Responsible
Supreme Hero
posted February 04, 2012 11:57 PM

Thanks for the effort! However, it doesn't really work. When i try to equip it there are lots of ERM errors messages and (i don't know why) all of a sudden it starts the tavern card game script.

I'm beggining to think that it isn't really worth all that fuss. I mean checking all the time if the hero has leveled up, or visited a wizard's Tower or anything...

Maybe if we returned back to the basic script... If the trigger was any click on the hero screen then i guess it would work. Maybe it can be triggered by the equipment or unequipment of ANY artifact. This way it will be right most of the times. Then there would be only the problem of having two same artifacts on the map (which i think you solved).


____________
Not idly do the leaves of Lorien fall.

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


Admirable
Omnipresent Hero
Wog refugee
posted February 05, 2012 12:46 AM

All custom scripts are for not wogified maps/mods. If your map is wogified, then you must change Solitaire functions/variables to not used ones, he can't read your mind.

Probably variables overlap.
____________
Era II mods and utilities

 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 ... 130 131 132 133 134 ... 150 200 250 300 350 400 407 · «PREV / NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 1.0318 seconds