|
|
Hero_of_Light
Responsible
Supreme Hero
|
posted February 03, 2012 07:50 PM |
|
|
@ 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.
|
|
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
|
|
solitaire345
Promising
Famous Hero
|
posted February 03, 2012 08:05 PM |
|
|
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.
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 03, 2012 08:11 PM |
|
|
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
|
|
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.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 03, 2012 08:29 PM |
|
|
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
|
|
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
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 03, 2012 08:36 PM |
|
|
|
solitaire345
Promising
Famous Hero
|
posted February 03, 2012 08:38 PM |
|
|
W-What? I definitely missed something.
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 03, 2012 08:40 PM |
|
|
|
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.
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted February 03, 2012 09:04 PM |
|
|
|
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.
|
|
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
|
|
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.
|
|
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
|
|
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.
|
|
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.
____________
|
|
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.
|
|
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
|
|
|