|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 10, 2015 05:37 AM |
|
|
|
bloodsucker
Legendary Hero
|
posted April 11, 2015 12:30 AM |
|
|
Well, this is what I've got till this moment (thanks again for the script for the university, it helped a lot).
I have detected a problem I don't know how to fix. When you switch heroes using the space-bar, the receptor for the code is not actualized and you will be affecting the first hero. I have no idea how to solve this.
***
ZVSE
!?CM1&1000; town screen
!!CM:I?y-1; special building - stables
!!CA-1:T?y-2; town type
!!FU99969&y-2=0/y-1=21:P; call function IF type of town and type of building match
!?FU99969;
!!CA-1:H1/?y1;
!!IF&y1=-1:M^Only visiting heroes can use the War University^; checks for activating the script without any heroes
!!FU&y1=-1:E;
!!HE-1:N?y1; check hero ID
!!SN:W^Hero_%Y1_skill_1^/?y2; check if hero already advanced here in archery
!!SN:W^Hero_%Y1_skill_10^/?y3; ballistics
!!SN:W^Hero_%Y1_skill_19^/?y4; tactics
!!SN:W^Hero_%Y1_skill_20^/?y5; artillery
!!SN:W^Hero_%Y1_skill_22^/?y6; offense
!!SN:W^Hero_%Y1_skill_23^/?y7; armorer
!!SN:W^Hero_%Y1_skill_26^/?y8; resistence
!!SN:W^Hero_%Y1_skill_27^/?y9; first aid
!!VRz1:S^At the War University you can learn or advance up to eight might skills. Make your pick!^;
!!HEy1:S1/?y10;
!!HEy1:S10/?y11;
!!HEy1:S19/?y12;
!!HEy1:S20/?y13;
!!HEy1:S22/?y14;
!!HEy1:S23/?y15;
!!HEy1:S26/?y16;
!!HEy1:S27/?y17;
!!VRz2:S^^;
!!VRz2&y2<99/y10<3:S^Archery^; v2=1
!!VRz3:S^^;
!!VRz3&y3<99/y11<3:S^Ballistics^; v2=2
!!VRz4:S^^;
!!VRz4&y4<99/y12<3:S^Tactics^; v2=4
!!VRz5:S^^;
!!VRz5&y5<99/y13<3:S^Artillery^; v2=8
!!VRz6:S^^;
!!VRz6&y6<99/y14<3:S^Offense^; v2=16
!!VRz7:S^^;
!!VRz7&y7<99/y15<3:S^Armorer^; v2=32
!!VRz8:S^^;
!!VRz8&y8<99/y16<3:S^Resistence^; v2=64
!!VRz9:S^^;
!!VRz9&y9<99/y17<3:S^First Aid^; v2=128
!!VRz10:S^Exit^; v2=256
!!IF:G1/2/256/1/2/3/4/5/6/7/8/9/10; store result in v2
!!CM:R0;
!!FU&v2=256:E; exit
;initializ skills
!!VRy18&v2=1:S1;
!!VRy18&v2=2:S10;
!!VRy18&v2=4:S19;
!!VRy18&v2=8:S20;
!!VRy18&v2=16:S22;
!!VRy18&v2=32:S23;
!!VRy18&v2=64:S26;
!!VRy18&v2=128:S27;
!!HEy1:Sy18/?y19; get expertise of skill picked
!!VRy19:+1; increment by 1
!!VRy21&y19=1:S2500; find value to charge
!!VRy21&y19=2:S5000;
!!VRy21&y19=3:S10000;
!!OW:R-1/6/?y22; check if player has enouch money to pay
!!IF&y21>y22:M^You don't have enouch money, you need %Y21 to advance this skill^;
!!FU&y21>y22:E;
!!OW&y19=1:R-1/6/d-2500; take the money for payment
!!OW&y19=2:R-1/6/d-5000;
!!OW&y19=3:R-1/6/d-10000;
!!HEy1:Sy18/y19;
!!VRy20:Sy18*3+y19+2; find pic for dialog
!!IF:Q1/20/y20/1^Your hero gets:^;
!!SN:W^Hero_%Y1_skill_%Y18^/99; set that skill to 99 so can't be asked again
!!CM:R0; disable any other messages
Also, did anyone ever succeded in making a creature cast a spell instead of attack? I wanted to give animate dead to some undead creature (preferably the Dread Knights) but I'm founding every clue about this way over my head.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 11, 2015 10:35 AM |
|
|
This is because you have a different ID to identify hero visitor and hero in town garrison. CA-1:H#/$; 0 garrison, 1 visitor
Is easier like this:
***
ZVSE
!?CM1; town screen
!!CM:I?y-1; special building - stables
!!CA-1:T?y-2; town type
!!if&y-2=0/y-1=21:; if castle and stables
!!CA-1:H1/?y1; get hero visitor in y1 (no need for HE-1:N?y1 later, is already done)
!!IF&y1<0:M^Only visiting heroes can use the War University^;
!!FU&y1<0:E;
!!HEy1:B0/?z11; get his name in z11
!!SN:W^Hero_%Y1_skill_1^/?y2; check if hero already advanced here in archery
!!SN:W^Hero_%Y1_skill_10^/?y3; ballistics
!!SN:W^Hero_%Y1_skill_19^/?y4; tactics
!!SN:W^Hero_%Y1_skill_20^/?y5; artillery
!!SN:W^Hero_%Y1_skill_22^/?y6; offense
!!SN:W^Hero_%Y1_skill_23^/?y7; armorer
!!SN:W^Hero_%Y1_skill_26^/?y8; resistence
!!SN:W^Hero_%Y1_skill_27^/?y9; first aid
!!VRz1:S^At the War University %Z11 can learn or advance up to eight might skills. Make your pick!^; now script tells exactly only visitor will be affected
[...rest of your script]
!!en:; add this in the end to close "if" command
|
|
bloodsucker
Legendary Hero
|
posted April 11, 2015 03:35 PM |
|
|
Thanks, already tested it and it works fine.
|
|
husham123
Famous Hero
Yes
|
posted April 13, 2015 08:04 PM |
|
|
Salamandre said: Reply.
LOL
(A reply with the solution )
|
|
bloodsucker
Legendary Hero
|
posted April 13, 2015 08:34 PM |
|
|
By some reason, despise the !!CM:R0; command in the end of the script I still get the message from the Stables, that I've changed to a custom message eras ago. Is it possible that the fact I've changed it in the BldgSpec.txt is what is causing this?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 13, 2015 11:17 PM |
|
|
Husham, can you please delete your error report? If there is no reference to erm codes inside, then is useless, nobody can understand that gibberish. Mostly game internal error I think.
Bloodsucker, CM:R0 doesn't work always same way, show the script.
____________
Era II mods and utilities
|
|
husham123
Famous Hero
Yes
|
posted April 13, 2015 11:24 PM |
|
|
Salamandre said: Husham, can you please delete your error report ?
Done
|
|
bloodsucker
Legendary Hero
|
posted April 13, 2015 11:26 PM |
|
|
Salamandre, just scroll up a bit. Is the War University script you have been helping me to build.
Or here it is, completly actualized:
ZVSE
!?CM1&1000; town screen
!!CM:I?y-1; special building - stables
!!CA-1:T?y-2; town type
!!if&y-2=0/y-1=21:; if castle and stables
!!CA-1:H1/?y1; get hero visitor in y1
!!IF&y1<0:M^Only visiting heroes can use the War University^;
!!FU&y1<0:E;
!!HEy1:B0/?z11; get his name in z11
!!SN:W^Hero_%Y1_skill_1^/?y2; check if hero already advanced here in archery
!!SN:W^Hero_%Y1_skill_10^/?y3; ballistics
!!SN:W^Hero_%Y1_skill_19^/?y4; tactics
!!SN:W^Hero_%Y1_skill_20^/?y5; artillery
!!SN:W^Hero_%Y1_skill_22^/?y6; offense
!!SN:W^Hero_%Y1_skill_23^/?y7; armorer
!!SN:W^Hero_%Y1_skill_26^/?y8; resistence
!!SN:W^Hero_%Y1_skill_27^/?y9; first aid
!!VRz1:S^At the War University %Z11 can learn or advance up to eight might skills. Make your pick!^; tells only visitor will be affected
!!HEy1:S1/?y10;
!!HEy1:S10/?y11;
!!HEy1:S19/?y12;
!!HEy1:S20/?y13;
!!HEy1:S22/?y14;
!!HEy1:S23/?y15;
!!HEy1:S26/?y16;
!!HEy1:S27/?y17;
!!VRz2:S^^;
!!VRz2&y2<99/y10<3:S^Archery^; v2=1
!!VRz3:S^^;
!!VRz3&y3<99/y11<3:S^Ballistics^; v2=2
!!VRz4:S^^;
!!VRz4&y4<99/y12<3:S^Tactics^; v2=4
!!VRz5:S^^;
!!VRz5&y5<99/y13<3:S^Artillery^; v2=8
!!VRz6:S^^;
!!VRz6&y6<99/y14<3:S^Offense^; v2=16
!!VRz7:S^^;
!!VRz7&y7<99/y15<3:S^Armorer^; v2=32
!!VRz8:S^^;
!!VRz8&y8<99/y16<3:S^Resistence^; v2=64
!!VRz9:S^^;
!!VRz9&y9<99/y17<3:S^First Aid^; v2=128
!!VRz10:S^Exit^; v2=256
!!IF:G1/2/256/1/2/3/4/5/6/7/8/9/10; store result in v2
!!CM:R0;
!!FU&v2=256:E; exit
* initializ skills
!!VRy18&v2=1:S1;
!!VRy18&v2=2:S10;
!!VRy18&v2=4:S19;
!!VRy18&v2=8:S20;
!!VRy18&v2=16:S22;
!!VRy18&v2=32:S23;
!!VRy18&v2=64:S26;
!!VRy18&v2=128:S27;
!!HEy1:Sy18/?y19; get expertise of skill picked
!!VRy19:+1; increment by 1
!!VRy21&y19=1:S2500; find value to charge
!!VRy21&y19=2:S5000;
!!VRy21&y19=3:S10000;
!!OW:R-1/6/?y22; check if player has enouch money to pay
!!IF&y21>y22:M^You don't have enouch money, you need %Y21 to advance this skill^;
!!FU&y21>y22:E;
!!OW&y19=1:R-1/6/d-2500; take the money for payment
!!OW&y19=2:R-1/6/d-5000;
!!OW&y19=3:R-1/6/d-10000;
!!HEy1:Sy18/y19;
!!VRy20:Sy18*3+y19+2; find pic for dialog
!!IF:Q1/20/y20/1^%Z11 gets:^;
!!SN:W^Hero_%Y1_skill_%Y18^/99; set that skill to 99 so can't be asked again
!!CM:R0; disable any other messages
!!en:;
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 14, 2015 12:16 AM |
|
|
Hmm I don't have any additional message, but anyway, remove CM:R0 last command from en/if box and add this command after the !!en:;
!!UN:R4/1; redraw status resources
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted April 14, 2015 12:26 AM |
|
|
Thanks.
But it doesn't work also. If you don't get any other messages with the first one then probably my first guess is true: it is because I've changed the description on BldgSpec.txt.
Now, I've changed the descriptions of a lot of things there, it will take a while to test this.
By the way, while testing I found out that the Mysticism 1 script triggers when we click on the waterfall on the top left of Castle towns, I believe it is a bug.
P.S.: Well, I replaced the BldgSpec.txt with the original, deleted it and yet I still get the message.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 14, 2015 01:29 AM |
|
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 14, 2015 02:04 AM |
|
|
Can't download any of your things. I am asking for the message you get from stables, just show a screen.
@Edit: man, stop uploading pics and scripts to box.com then putting them on private: nobody can see nor download them. Use wikisend.com and imageshack.
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted April 14, 2015 03:06 AM |
|
|
Salamandre said: Can't download any of your things. I am asking for the message you get from stables, just show a screen.
Well, had to go for imageshack but here they are
Triggered Script
Post Visit
P.S. You can also see the waterfall I was talking about before.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 14, 2015 04:24 AM |
|
|
I tried your script and as expected there is no returning message, nor any mysticism scripts on waterfall. My guess is that you messed with scripts around, always do as mod, don't change anything in wog mod. So now you get strange things.
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted April 14, 2015 05:20 AM |
|
|
Salamandre said: I tried your script and as expected there is no returning message, nor any mysticism scripts on waterfall. My guess is that you messed with scripts around, always do as mod, don't change anything in wog mod. So now you get strange things.
I didn't made any changes to WoG scripts but I'm using z vars for the names of my new heroes. I've searched with Total Commander and tons of mods and they were only used by Artu's "Heroes Renovated" mod (that affects the same areas and would kill or be killed by my mod if used together) but since I've learned how to use SN:W vars (thanks) I was already intending to make the trade. I only hope it will work.
Now, where I have a lot of changes done that I'm not so sure about are the txt files like BldgSpec, Dwelling and HeroSpec.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted April 14, 2015 06:02 AM |
|
|
Is easy to check. Remove all mods except wog, add ONLY this script to test mod and try again. Text files have no influence over erm scripts, there is something else wrong.
|
|
CrazzieGamerPL
Hired Hero
|
posted April 15, 2015 05:12 PM |
|
|
Hello i have a question about ERM, i wanted to write script that would allow to apply the spell to a monster (for example, crusader would be under the prayer spell from the beggining of battle). I searched in ERM thelp that this is something about the !!BM:M Receiver but whenever i'm trying to do something with this script i'm getting 1 mile crashes and errors . So if somebody could help then i would be very pleased about that.
|
|
bloodsucker
Legendary Hero
|
posted April 15, 2015 05:30 PM |
|
|
@CrazzieGamerPL Yeah! Battle triggers are retalively complex.
If you are playing with "Troop stacks gain experience" option selected use this:
!!EA7:B12/0/////////////;
!!EA7:B12/1/115/48/0/0/0/1/1/1/2/2/2/3/3;
Like this, it goes to the last experience slot, usually free.
then read this:
http://heroescommunity.com/viewthread.php3?TID=27213
|
|
CrazzieGamerPL
Hired Hero
|
posted April 15, 2015 05:51 PM |
|
|
Well i don't play with stack experience, but sure i will read it, because it seems like a lot easier than with the !!BM:M script . Still thanks for help i will try that.
EDIT : It worked, i rode the salamandre tutorial . Thanks friend
|
|
|