|
Thread: A few questions | This thread is pages long: 1 2 · NEXT» |
|
Helba
Tavern Dweller
Queen of Darkness
|
posted September 30, 2003 02:34 PM |
|
|
A few questions
First off would it be possible to change a heroes class from barbarian to say something else (not another class as in Choices 2.3). Also I was working on a map and was wondering if there is a way to make a hero start inside a boat, I tried to create a hero that looked like a boat but that just made it crash. Also if someone knows a more up to date ERM scripting tutorial then the one at the WoG site then a link would be appreciated.
Thanks in advance.
|
|
Gangrail
Promising
Famous Hero
Dead Man
|
posted September 30, 2003 07:44 PM |
|
|
I figure Fnord would be the best 1 to ask this question since he is the head scripter on the WoG team. Also as for tutorials the new WoG we are working on will have a new updated ERM help section. It may have what you are looking for but that is a few months away still.
____________
|
|
fnord
Promising
Famous Hero
|
posted October 01, 2003 12:41 AM |
|
|
Quote: First off would it be possible to change a heroes class from barbarian to say something else (not another class as in Choices 2.3). Also I was working on a map and was wondering if there is a way to make a hero start inside a boat, I tried to create a hero that looked like a boat but that just made it crash. Also if someone knows a more up to date ERM scripting tutorial then the one at the WoG site then a link would be appreciated.
Thanks in advance.
Unfortunately, the class types and names are all hard-coded so there's currently no way to make a new custom class or class name so all you can do is change the hero's class to another regular class.
There's also no ERM for putting a hero in a boat but it's on the official "ERM wish list". If Slava can find a way to do it and has time, this may appear in 3.58 or 3.59 (or later) but no guarantees.
The only way I know of right now to do this is to put an empty boat in the water and use ERM (the HE command) to place a hero in the water next to the boat. Usually the AI hero will then board the boat on its turn. I haven't tried this lately but I did try it awhile back and it seemed to work. If you try setting the Hero's patrol radius to just a few squares, that might also prevent it from sailing to land and disembarking (I haven't tested this at all).
QQD's is probably the most up-to-date scripting tutorial, but if you have specific questions you're welcome to post them here or the Round Table.
____________
|
|
Sagamosa
Hired Hero
|
posted October 01, 2003 03:47 PM |
|
|
ANother question:
I'm trying to do a spell which (when cast) creates a hole in the earth which can be used to fall down to the underground map.
I managed to create a hole (!!UN:I) make the square passable (!!TR:E) and I'm able to teleport the hero underground(!!HE), but i'm not able to connect these things together with OB command (when entering the new hole, teleport hero underground)
The code i'm using is something like that:
!!UN:Ix1/x2/x3/124/0/1; create hole on x1,x2,x3
!!TRx1/x2/x3:E0 P1; make the hole to a object, which can be entered
!?OBx1/x2/x3; object on x1/x2/x3 coords (i'm using normal variables to keep the numbers here)
!!IF:Q^ask if he wants to jump down^;
!!HE-1x1/x2/1; teleport undrground
But it doesn't work - looks like command !?OBx1/x2/x3 can be used only with hard numbers (i.e. OB1/1/1 and has to be processed when map is starting, otherwise ERM can't remember the coords)
Can anybody help?
sagamosa
____________
Sagamosa
[url=http://www.wog.euweb.cz]Advanced Levels[/url]
|
|
fnord
Promising
Famous Hero
|
posted October 01, 2003 09:40 PM |
|
|
Quote: ANother question:
I'm trying to do a spell which (when cast) creates a hole in the earth which can be used to fall down to the underground map.
I managed to create a hole (!!UN:I) make the square passable (!!TR:E) and I'm able to teleport the hero underground(!!HE), but i'm not able to connect these things together with OB command (when entering the new hole, teleport hero underground)
The code i'm using is something like that:
!!UN:Ix1/x2/x3/124/0/1; create hole on x1,x2,x3
!!TRx1/x2/x3:E0 P1; make the hole to a object, which can be entered
!?OBx1/x2/x3; object on x1/x2/x3 coords (i'm using normal variables to keep the numbers here)
!!IF:Q^ask if he wants to jump down^;
!!HE-1x1/x2/1; teleport undrground
But it doesn't work - looks like command !?OBx1/x2/x3 can be used only with hard numbers (i.e. OB1/1/1 and has to be processed when map is starting, otherwise ERM can't remember the coords)
Can anybody help?
sagamosa
Yes, that's correct; variables can't be used for trigger parameters. However, do not dispair yet because I believe there is a way to do this!
Instead of referring to the x/y/l coordinates in an object trigger, you can refer to type or type and subtype.
So all you have to do is use !?OB124/0; for your object trigger.
But, you say, what if I don't want people to fall down ALL holes on the map, just the ones that the spell magically creates?
No problemo! This is where you employ the PO receiver to set a custom value for the hole square that's been created. You can use PO:N to set a value (0..15) or any of the other PO numbers if you prefer (but PO:N should work fine). After placing the hole with UN:I, put in the line !!POx1/x2/x3:N1;
After your !?OB124/0; object trigger, you can read the PO value into a variable: !!POv998/v999/v1000:N?v1;
Then if it doesn't equal one, you can exit the trigger with FU:E .. !!FU&v1<>1:E;
____________
|
|
pigcanfly
Tavern Dweller
|
posted October 03, 2003 06:06 AM |
|
|
So what's the whole & correct ERM£¿
____________
|
|
Helba
Tavern Dweller
Queen of Darkness
|
posted October 05, 2003 02:35 AM |
|
|
Ok, I have a script like the one in the first mission of "In the Wake of Gods" which lets you select a portrait as well as type in a name. But I want to apply this script to multiplayer. So far I have it working but it dosn't correctly determine which player is using the script. Can you help?
|
|
fnord
Promising
Famous Hero
|
posted October 05, 2003 02:50 AM |
|
|
Quote: Ok, I have a script like the one in the first mission of "In the Wake of Gods" which lets you select a portrait as well as type in a name. But I want to apply this script to multiplayer. So far I have it working but it dosn't correctly determine which player is using the script. Can you help?
Post the script here and I'll take a look.
|
|
Helba
Tavern Dweller
Queen of Darkness
|
posted October 05, 2003 04:10 PM |
|
Edited By: Helba on 5 Oct 2003
|
It might not be the most professional code and in fact you might recognize some of it because i copied right from the campaign but here it is.
** START CODE **
ZVSE
!#TM1:S1/1/1/255;
!?TM1;
!!OW:C?y1;
!!OW:Iy1/?y2;
!!VRz100:S^Time to play a real game. Are you ready, Hero?
(it is strongly recommended to try the tutorial map).^;
!!VRz101:S^What's your name:^;
!!VRz102:S^Choose your portrait, hero:^;
!!VRz103:S^..\Data\1.bmp^;
!!VRz104:S^..\Data\2.bmp^;
!!VRz105:S^..\Data\3.bmp^;
!!VRz106:S^..\Data\4.bmp^;
!!VRz107:S^First^;
!!VRz108:S^Second^;
!!VRz109:S^Third^;
!!VRz110:S^Fourth^;
!!IF1/z100/z101/z102/z103/z104/z105/z106/z107/z108/z109/z110/z107/z108/z109/z110;
!!IF:F1/z107/z108/z109/z110/0;
!!IF&y2=0:E100/1; Get Name dialoge
!!VRz1:H1; !#VRz1&-1:S^Unnamed^;
!!VRz400:Sz1; Hero's name in z400
!!VRz398:S^1L.pcx^;
!!VRz399:S^1S.pcx^;
!!VRz398&v100=2:S^2L.pcx^;
!!VRz399&v100=2:S^2S.pcx^;
!!VRz398&v100=3:S^3L.pcx^;
!!VRz399&v100=3:S^3S.pcx^;
!!VRz398&v100=4:S^4L.pcx^;
!!VRz399&v100=4:S^4S.pcx^;
!!HE0&y1=0:L5/z398/z399; set hero's portrait
!!HE0&y1=0:B0/z400;
!!UN:R1;
!!HE1&y1=1:L5/z398/z399; set hero's portrait
!!HE1&y1=1:B0/z400;
!!UN:R1;
!!HE2&y1=2:L5/z398/z399; set hero's portrait
!!HE2&y1=2:B0/z400;
!!UN:R1;
!!HE3&y1=3:L5/z398/z399; set hero's portrait
!!HE3&y1=3:B0/z400;
!!UN:R1;
!!HE5&y1=4:L5/z398/z399; set hero's portrait
!!HE5&y1=4:B0/z400;
!!UN:R1;
!!HE6&y1=5:L5/z398/z399; set hero's portrait
!!HE6&y1=5:B0/z400;
!!UN:R1;
!!HE7&y1=6:L5/z398/z399; set hero's portrait
!!HE7&y1=6:B0/z400;
!!UN:R1;
!!HE144&y1=7:L5/z398/z399; set hero's portrait
!!HE144&y1=7:B0/z400;
!!UN:R1;
** END CODE **
I used a timer because I was fairly sure that I couldn't detect a player if it was used before the map started. Also to make sure I'm not stealing someones work, thank you to whoever scripted the campaign.
|
|
fnord
Promising
Famous Hero
|
posted October 05, 2003 10:11 PM |
|
|
Quote: It might not be the most professional code and in fact you might recognize some of it because i copied right from the campaign but here it is.
I used a timer because I was fairly sure that I couldn't detect a player if it was used before the map started. Also to make sure I'm not stealing someones work, thank you to whoever scripted the campaign.
Okay, there is a command (!!OW:A) that lets you check the active hero. I think you may be able to use this command to get the hero number of each player. Read it into a variable and use it in place of a hero number.
The way you have it now, you're setting specific heroes (see Format H in ERM Help) rather than the starting hero owned by each player.
However, I'm not certain that the hero is always set as "active" immediately after a timer (at the start of a turn). If not, that makes it a bit tricky. I think it works for a single player or the first one in the game. Perhaps something could be done using the !?HM-1; (hero movement) command and a flag so it will only name the first hero that moves on each player's turn.
(Slava made the Wake of Gods campaign so the ERM code there was written by him.)
|
|
Vlaad
Admirable
Legendary Hero
ghost of the past
|
posted October 07, 2003 09:04 PM |
|
|
The topic is "A few questions", so I might as well
post my problems here...
I cannot place guardians in a mine (that looks
a bit different on the adventure map):
!#UN:I110/112/0/53/6/63/59;
!!MN109/112/01;
!!MN109/112/0:R6;
!!MN109/112/0:M0/96/3;
!!MN109/112/0:M1/96/3;
!!MN109/112/0:M2/96/3;
!!MN109/112/0:M3/96/3;
!!MN109/112/0:M4/96/3;
!!MN109/112/0:M5/96/3;
!!MN109/112/0:M6/96/3;
!!MN109/112/0:M7/96/3;
The (gold) mine functions properly, but there are no
guardians nor syntax errors...
By the way, why slots 0-7 if there are 7 slots for
stacks on the combat map?
I've also tried to set an abandoned mine at another
coordinates, but got a sawmill instead. The help file
says it's format 7, but it's not.
Finally, I simply cannot make a Castle at x/y/0 be
a Necropolis inside. Obviously the solution is more
complicated than the help file suggests.
____________
|
|
Helba
Tavern Dweller
Queen of Darkness
|
posted October 07, 2003 10:02 PM |
|
|
I'm assuming you have a trigger for all of those statements?
|
|
Vlaad
Admirable
Legendary Hero
ghost of the past
|
posted October 07, 2003 11:32 PM |
|
Edited By: Vlaad on 8 Oct 2003
|
Quote: I'm assuming you have a trigger for all of those statements?
Yeah, I even put ZVSE in the beginning!
EDIT: Mistery solved. The problem was in placing new, so-called "castle objects" (command !#UN: I) - they have different yellow triggers than standard objects.
The help file says you should put x/y/l of the down right red squre, but it seems some WOG objects have "invisible" squares.
LOL
Anyway, my other questions are still without answers:
1)Is an abandoned mine a special mine format? I recall a help file that mentions two formats for mines (the other being 200+ ...?!) but cannot find it again.
2)Castle as Necropolis inside... Can I set only town type only or other settings as well?
____________
|
|
fnord
Promising
Famous Hero
|
posted October 08, 2003 05:59 PM |
|
|
Quote:
Quote: I'm assuming you have a trigger for all of those statements?
Yeah, I even put ZVSE in the beginning!
EDIT: Mistery solved. The problem was in placing new, so-called "castle objects" (command !#UN: I) - they have different yellow triggers than standard objects.
The help file says you should put x/y/l of the down right red squre, but it seems some WOG objects have "invisible" squares.
Yes, if you click on any object placed on the map in the editor you'll see the white outline box around it.
Quote:
Anyway, my other questions are still without answers:
1)Is an abandoned mine a special mine format? I recall a help file that mentions two formats for mines (the other being 200+ ...?!) but cannot find it again.
I don't think it's a special format but possibly it only works with certain terrain values (with UN:I). Check the editor to see which terrains have abandoned mines and then try using the advanced UN:I used for placing objects that look like other objects (just fill in the same type/subtype twice) and use the correct terrain value at the end. I don't know if this is the problem (or solution) but just a guess.
I can tell you that you, however, that you can't put guards into a regular mine unless the mine has an owner. If it's a neutral mine, it won't work.
As for the slots, it's probably an error in the help if it says 0..7 and should really be 0..6.
Quote:
2)Castle as Necropolis inside... Can I set only town type only or other settings as well?
You should be able to set everything about the town (well, everything that ERM covers). Is it still not working?
BTW, you may be happy to learn that 3.58 will include a command to change the outside of the town to match the inside.
|
|
Vlaad
Admirable
Legendary Hero
ghost of the past
|
posted October 08, 2003 06:32 PM |
|
|
Quote:
Yes, if you click on any object placed on the map in the editor you'll see the white outline box around it.
Right. I had to do some adjustments, though - WoG objects and standard objects have different triggers.
Strangely, some dwellings do not work (although the WoG objects do appear), while other dwellings of the same type function well just a few squares away. Perhaps I put more dwelling than possible?
Quote: I can tell you that you, however, that you can't put guards into a regular mine unless the mine has an owner. If it's a neutral mine, it won't work.
I figured that out.
Quote: As for the slots, it's probably an error in the help if it says 0..7 and should really be 0..6.
Yeah, but it's possible. I got 96 Behemoths in slot 7 (note that 96 is # of Behemoth in the Format C list!).
I must try to flood the combat map with Behemoths...!
Quote:
BTW, you may be happy to learn that 3.58 will include a command to change the outside of the town to match the inside.
I hate to say it, but I don't think I'm going to make more WoG maps after this. The patch is taking too long, and I will have to serve nine months in the army...
I will downloaded it and play it, of course.
____________
|
|
fnord
Promising
Famous Hero
|
posted October 09, 2003 02:11 AM |
|
|
Quote:
Right. I had to do some adjustments, though - WoG objects and standard objects have different triggers.
You mean different locations for the yellow trigger squares? They are all a bit different.
Quote:
Strangely, some dwellings do not work (although the WoG objects do appear), while other dwellings of the same type function well just a few squares away. Perhaps I put more dwelling than possible?
Hmm...perhaps. I don't think I've run into this but I also haven't tried placing tons of new dwellings with ERM.
Quote:
Quote: As for the slots, it's probably an error in the help if it says 0..7 and should really be 0..6.
Yeah, but it's possible. I got 96 Behemoths in slot 7 (note that 96 is # of Behemoth in the Format C list!).
I must try to flood the combat map with Behemoths...!
So what happened exactly? Did you get 8 stacks on the battlefield?
Behemoths are cute (if a little smelly).
Quote:
I hate to say it, but I don't think I'm going to make more WoG maps after this. The patch is taking too long, and I will have to serve nine months in the army...
I will downloaded it and play it, of course.
That's too bad, but at least you get to play it and perhaps you'll have time to do another map in a year or something (if WoG's still going strong). Some of the new ERM commands and creatures available by then may just be too tempting to pass up.
Also, in 3.58, we're going to make it a lot easier for mapmakers to use wogify scripts in custom maps.
|
|
Sagamosa
Hired Hero
|
posted October 09, 2003 10:38 AM |
|
|
One more question:
Q1:
How can I redraw the town screen? (regular UN:R command doesn't do the trick for me)
Reason: Through ERM I built a building when hero visited town, but it's not there until i reenter...
Q2: Is it possible to change headings on the wogification page?
I added my own wogification page but the heading still says something like This page will not be part of future Wog updates.
Is it hard coded or you change the name in ERS file?
____________
Sagamosa
[url=http://www.wog.euweb.cz]Advanced Levels[/url]
|
|
Vlaad
Admirable
Legendary Hero
ghost of the past
|
posted October 09, 2003 11:19 AM |
|
|
Quote: Hmm...perhaps. I don't think I've run into this but I also haven't tried placing tons of new dwellings with ERM.
I'm afraid 144 is the maximum!
Quote:
So what happened exactly? Did you get 8 stacks on the battlefield?
Unfortunately - no. If I use slots 1-7, I get 6 stacks. If I use 0-7 I get 7 stacks, but the first stack has the number of creatures equal to the # of other 6 creatures in the Format C list. ( Behemoths are 96, so I got 96 Marksmen/Hydras/Behemoths in the first upper slot although I put a different number. I didn't try to place all mixed creatures... Who knows what would I get?! )
Quote: Some of the new ERM commands and creatures available by then may just be too tempting to pass up.
Oh, I'm already in love with the Sorceress...
____________
|
|
fnord
Promising
Famous Hero
|
posted October 09, 2003 10:38 PM |
|
|
Quote: One more question:
Q1:
How can I redraw the town screen? (regular UN:R command doesn't do the trick for me)
Reason: Through ERM I built a building when hero visited town, but it's not there until i reenter...
We don't have a command for this yet and Slava hasn't found/made one yet for 3.58 but will hopefully add one at some point. He has put in a redrawn command for the town that redraws the hero+troop slots, however.
Quote:
Q2: Is it possible to change headings on the wogification page?
I added my own wogification page but the heading still says something like This page will not be part of future Wog updates.
Is it hard coded or you change the name in ERS file?
It's stored internally but can be overidden by putting a file named zsetup00.txt in your data folder. There's also a file named zsetup01.txt which is like an ERS file but has all the options in it for all pages.
I don't recall if I have your email, but if you give it to me, I could email you these two files.
|
|
Sagamosa
Hired Hero
|
posted October 10, 2003 09:17 AM |
|
|
thanx Fnord.
marek_dekastello@yahoo.com
____________
Sagamosa
[url=http://www.wog.euweb.cz]Advanced Levels[/url]
|
|
|