ERM for dummies

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 12 Jun 2006, 18:23

Fly wrote:Thanks a lot. I've wrote script, like this, but i have a litlle of problems with it's using... :)
What problems are you having?
- Fnord

User avatar
Fly
Leprechaun
Leprechaun
Posts: 20
Joined: 12 Jun 2006
Location: Russia - Krasnoyarsk
Contact:

Unread postby Fly » 13 Jun 2006, 02:23

There were little differenys with your script, abd I didn't use the faster method...
During the loading I hane been got the massage: "V Flags sould be in interval v1-v9998".
I tryed to do everything i can. Nothing helps. I can't find this script, so i think that i've destroyed it... Sorry :|

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 13 Jun 2006, 06:02

Fly wrote:There were little differenys with your script, abd I didn't use the faster method...
During the loading I hane been got the massage: "V Flags sould be in interval v1-v9998".
I tryed to do everything i can. Nothing helps. I can't find this script, so i think that i've destroyed it... Sorry :|
Can you use the script exactly as I wrote it..perhaps that will work. ;)

Anyway, if you try again and run into problems, post what you've got and the error and I'll check it out.
- Fnord

User avatar
Fly
Leprechaun
Leprechaun
Posts: 20
Joined: 12 Jun 2006
Location: Russia - Krasnoyarsk
Contact:

Unread postby Fly » 13 Jun 2006, 06:28

Your script works well! Thank you! If i'll have problems i'll write. :)

User avatar
Fnord
Round Table Knight
Round Table Knight
Posts: 341
Joined: 27 Nov 2005
Location: Victoria, BC, Canada

Unread postby Fnord » 13 Jun 2006, 07:09

Fly wrote:Your script works well! Thank you! If i'll have problems i'll write. :)
That's good (because I never actually tested it ;) ). I'm glad it works. :D
- Fnord

User avatar
Fly
Leprechaun
Leprechaun
Posts: 20
Joined: 12 Jun 2006
Location: Russia - Krasnoyarsk
Contact:

Unread postby Fly » 14 Jun 2006, 01:24

I'm very, extra, almost, ordinary happy too! :D

User avatar
Burdon
Leprechaun
Leprechaun
Posts: 27
Joined: 18 Jan 2006
Location: Waiting in front of the hall of darkness

Unread postby Burdon » 15 Jan 2007, 23:18

Hi there, i'm not really asking for help, but I wanted to know if someone planned to change the !!HE:X1 receiver. It seems to only add attack and defense to the chosen creature. It doesn't work like the
WoG-creature-specialist hero.

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 16 Jan 2007, 14:07

Well I'm new to ERM and was happy when I found this guide about ERM. Than I was surprised that the lesson 2 and 3 scripts don't work! any ideas?

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Unread postby Qurqirish Dragon » 16 Jan 2007, 18:25

EliteKill wrote:Well I'm new to ERM and was happy when I found this guide about ERM. Than I was surprised that the lesson 2 and 3 scripts don't work! any ideas?
Several questions:

1) Are you getting errors, or is nothing happening at all?

2) Are you Wogifying the map when you play it? If so, then there are almost certainly variable conflicts. Do not Wogify it.

3) have you placed the appropriate objects on the map, as well as adding the code?

4) Are the scripts placed in timed events for the map?

5) Did you write the scripts in the script editor, and then (after a save) copy-paste them (to avoid problems with non-printing characters)

Any more information you can give would be helpful.

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 16 Jan 2007, 19:12

Qurqirish Dragon wrote:
EliteKill wrote:Well I'm new to ERM and was happy when I found this guide about ERM. Than I was surprised that the lesson 2 and 3 scripts don't work! any ideas?
Several questions:

1) Are you getting errors, or is nothing happening at all?

2) Are you Wogifying the map when you play it? If so, then there are almost certainly variable conflicts. Do not Wogify it.

3) have you placed the appropriate objects on the map, as well as adding the code?

4) Are the scripts placed in timed events for the map?

5) Did you write the scripts in the script editor, and then (after a save) copy-paste them (to avoid problems with non-printing characters)

Any more information you can give would be helpful.
1. I get an error instead of being given the option to Wogify the map. After that, nothing happens.

2. As I said above, I don't even get the chance to Wogify the map.

3. Both the Event (lesson 2) and the Star Axis (lesoon 3) are placed in the exact location that are mentioned in the lessons.

4. The script are written as a timed event on day 600 (what options should be disabled?)

5. I tried the copy paste way and the "binding" way.

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Unread postby Qurqirish Dragon » 17 Jan 2007, 16:19

EliteKill wrote:
Qurqirish Dragon wrote:
EliteKill wrote:Well I'm new to ERM and was happy when I found this guide about ERM. Than I was surprised that the lesson 2 and 3 scripts don't work! any ideas?
Several questions:

1) Are you getting errors, or is nothing happening at all?
1. I get an error instead of being given the option to Wogify the map. After that, nothing happens.
Well, we can stop here. If you are getting an error before even getting the Wogify dialog, then the script is never running. What is the error? If we can correct that, then the rest should be fine.

The only message at the start of the map you should get should be something like "this map has internal scripts, and Wogification may cause problems. Do you wish to Wogify anyway?"

I do not recall the exact message, but it should be something like that. You want to answer "no" to this.

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 18 Jan 2007, 06:00

Instead of being asked if to Wogify or not, I get this meassage:
ERM syntax Error.
Files: erm
Line: 5354
Reason:
"GetNum"- cannot get flag.
Save all ERM vars to WOGERMLOG.TXXT (may take time)?
After that, doesn't matter which option I choose, I get abunch of messages I don't understand and than a message that the ERM script has been disabled.

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Unread postby Qurqirish Dragon » 18 Jan 2007, 17:21

EliteKill wrote:Instead of being asked if to Wogify or not, I get this meassage:
ERM syntax Error.
Files: erm
Line: 5354
Reason:
"GetNum"- cannot get flag.
Save all ERM vars to WOGERMLOG.TXXT (may take time)?
After that, doesn't matter which option I choose, I get abunch of messages I don't understand and than a message that the ERM script has been disabled.
Unfortunately, this sounds like an error in the ERM interpreter. I have no idea what it is from.
Can you play other WoG format maps? If yes, then hopefully someone else can suggest something. If no, then there might be an error in your installation.

Sorry I can't help more :(

User avatar
doom3d
Peasant
Peasant
Posts: 73
Joined: 31 Jan 2006

Unread postby doom3d » 21 Jan 2007, 00:00

EliteKill wrote:Instead of being asked if to Wogify or not, I get this meassage:
ERM syntax Error.
Files: erm
Line: 5354
Reason:
"GetNum"- cannot get flag.
Save all ERM vars to WOGERMLOG.TXXT (may take time)?
After that, doesn't matter which option I choose, I get abunch of messages I don't understand and than a message that the ERM script has been disabled.
Hi,

It seems, that there is a conditional check with wrong ending, something like
!!VRy1&v24:S2; (instead of ..&v24=0:..)

If you don't have the same problem without the sample timed events, on other maps, then the typo is there..
If you do have the problem with any maps, then reinstall wog.

By the way, it' easier to create a new script in Data/s folder, and edit it with erm editor, then this old timed event editing methode..

Doom3d

User avatar
EliteKill
Peasant
Peasant
Posts: 66
Joined: 25 Dec 2006
Location: Somewhere in.... erm, somewhere...

Unread postby EliteKill » 21 Jan 2007, 06:01

Thanks doom3d, but I can't even find that part :( ... So can someone please give me the whole script so I can check for my mistakes?

obelisk
Leprechaun
Leprechaun
Posts: 12
Joined: 06 Mar 2007

Unread postby obelisk » 06 Mar 2007, 12:20

Hello, I too have a question about scripting basics. I use the ERM for dummies tutorials found in my wog directory, respectively Qurqirish Dragon's how to create your first script part 1 and 2. The thing is, when I wrote the script and copied it to a timed event, and set up a placed event in the coordinates 0,0,0 and tested the map, the SP change sort of works, but the script refuses to give me the intended messages. Instead it says sorry, division by zero (there are a lot of places in that script that look like 0:, can that be interpreted as division by zero?), gives me a lot of different error messages and so on. However, it does at least count the visits to the corner and adjusts SP (only tried human-neutral monsters) battles for now.

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Unread postby Qurqirish Dragon » 06 Mar 2007, 14:37

The only divisions in the script should be dividing by 10. I did notice that a few > signs were listed as gt; - probably an error in transferring the messages from the old board to this one. I corrected those in lesson 2, but you may want to double-check your script in the map. Also, be certain you aren't accidentally taking a modulus (%) with zero.

If everything other than the messages work correctly, that indicates an error in the IF:M lines. You may want to recheck those.

obelisk
Leprechaun
Leprechaun
Posts: 12
Joined: 06 Mar 2007

Unread postby obelisk » 08 Mar 2007, 09:15

well, after double-checking the script i wrote, i just copy-paste the given script into ERM Scripter, saved it and copied it to the map. still nothing.

User avatar
Qurqirish Dragon
Genie
Genie
Posts: 1011
Joined: 06 Jan 2006
Location: Flying the skies of Ohlam

Unread postby Qurqirish Dragon » 08 Mar 2007, 14:25

Are you WoGifying the map when you run it? If so, then there are probably variable conflicts. Try running the map without WoGifying it.

Other than that, I can't think of why it isn't working.

User avatar
doom3d
Peasant
Peasant
Posts: 73
Joined: 31 Jan 2006

Unread postby doom3d » 04 May 2007, 11:49

I have posted it in some places, but maybe not here..

You can create "IF.. THEN GOTO.. ELSE" sequence in WoG 3.58f
using conditional FU calls, and the same FU number.

Void Sample:
!!VRv34:S-1; reset
!!VRv34&(check your conditions):S0;
!!VRv34&(check other conditions):S1;
!!VRv34&(check yet another conditions):S2;
...
!!FU1:P;

(else don't call anything)
( You may add Here:
!!FU&v34=-1:E; [or = your reset value]
followed by your code for case else)

!?FU1&v34=0; case0
(your code here)
...
!?FU1&v34=1; case1
(your code for case1)
...
!?FU1&v34=2; case2
(your code for case2)
...

You can also reuse an FU number to do several different things.

Void Sample:

!?(your main trigger: TM, FU, OB ..)
(do something)
!!VRv34:S0;
!!FU1:P;
(do something)
!!VRv34:S1;
!!FU1:P;
(do something)
..

-- FU library --
!?FU1&v34=0;
(lib script0)
!?FU1&v34=1;
(lib script1)
...

Just keep in mind that wich variable You used with wich values and FU numbers in wich scripts.. to avoid unwanted code executions.
(I have an excel file for that)


Return to “Wake of Gods”

Who is online

Users browsing this forum: No registered users and 0 guests