Help a newbie scripter

Official forum of the Wake of Gods mod to Heroes of Might and Magic III.
3Dot
Lurker
Lurker
Posts: 1
Joined: 20 Dec 2006

Help a newbie scripter

Unread postby 3Dot » 20 Dec 2006, 23:52

I am a nwbie to scripts, can you guys help me make script? How do u make a hero to be able to upgrade a creature from one type to another?

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

Re: Help a newbie scripter

Unread postby doom3d » 03 Apr 2007, 16:53

3Dot wrote:I am a nwbie to scripts, can you guys help me make script? How do u make a hero to be able to upgrade a creature from one type to another?
Please, read over the HTML manual.
BTW, your are looking for the !!HE:C0 command..

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

Re: Help a newbie scripter

Unread postby Qurqirish Dragon » 04 Apr 2007, 13:32

3Dot wrote:I am a nwbie to scripts, can you guys help me make script? How do u make a hero to be able to upgrade a creature from one type to another?
Check the ERM for Dummies thread. In particular the lesson on Heroes.

I think you want one of the HE:X receivers, but you would need to be a bit more specific for me to be certain.

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

re:

Unread postby doom3d » 05 Apr 2007, 16:53

Yes, it can be done with HE:X (2 creature type to third one), or by HE:C (any type to any other choosen, upgrade dialogue via ERM).
If You simply want an upgrade specialist, then HE:X is clearly the better choice.

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Unread postby Sixy » 23 Apr 2007, 13:06

Hi! I've got a question as well. Is there a way to change a town building's properties (e.g. name, description, building cost)? I didn't find anything about this in the dummies book, nor the ERM help.

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

Unread postby doom3d » 25 Apr 2007, 19:06

Sixy wrote:Hi! I've got a question as well. Is there a way to change a town building's properties (e.g. name, description, building cost)? I didn't find anything about this in the dummies book, nor the ERM help.
One way is to change things in the lod file.
Another: You can handle the building cost by ERM, but it's a bit tricky. If You disable buildings for player, and allow to build via script, then You can control the price. (and also how many build allowed per turn)

About the name I am not sure, but there is an ERM command to change some names.. don't remember if Buildings are included. Unfortunately, we have a limited amount of free z variables. I already asked the team for +1K free z var.
(it would increase the average savegame size by ~ 4KB)

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Unread postby Sixy » 27 Apr 2007, 13:56

Oooh, thanks! I've got a new question! (Sorry, for that...) So, I wanted to do a very simple trick: I've got four border gates and four players. Each player's got his own tent for one of the gates, but it is possible to the other players to get the key as well, but not for those special four gates! (That's for the short story.) So, I wanted to do a trick, which simply blocks the gates' tile when it's another player's turn, but makes it passable, when it's one's turn.

I was using the code:

Code: Select all

ZVSE

!?OW:C?1;  -> Ha a játékos 1-es (Szadi)
!!TR34/37/0:P1; -> Piros kapu átjárható
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu

!?OW:C?2;  -> Ha a játékos 2-es (Visnó)
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P1; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu

!?OW:C?5;  -> Ha a játékos 5-ös (Sixy)
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P1; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu

!?OW:C?6;  -> Ha a játékos 6-os (Wotan)
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P1; -> Lila kapu
Instead of !?OW:C?1; I tried !?OW:C1; and !! instead of !? as well, but it still made a syntax error for me. Is there a way to solve my problem?

(doom3d, you could answer me in Hungarian as well, or you can catch me on MSN: piffpuff_@freemail.hu) ; )

Thanks!

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Unread postby Sixy » 27 Apr 2007, 14:25

Hm... It works with a timer... But maybe there's still an easier way for it... Now I use:

Code: Select all

ZVSE

!#TM90:S1/999/1/1;  -> Ha a játékos 1-es (Szadi)
!?TM90;
!!TR34/37/0:P1; -> Piros kapu átjárható
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu

!#TM91:S1/999/1/2; -> Ha a játékos 2-es (Visnó)
!?TM91;
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P1; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu

!#TM92:S1/999/1/16;  -> Ha a játékos 5-ös (Sixy)
!?TM92;
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P1; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu

!#TM93:S1/999/1/32;  -> Ha a játékos 6-os (Wotan)
!?TM93;
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P1; -> Lila kapu

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

Unread postby doom3d » 27 Apr 2007, 18:15

Yes, there is an easier way.. One ?!TM is enough.

Something like:

!#TM90:S1/999/1/255;
!?TM90;
!!OW:C?y-1;
*close all
!!TR34/37/0:P0; -> Piros kapu
!!TR46/40/0:P0; -> Kék kapu
!!TR39/42/0:P0; -> Narancs kapu
!!TR40/30/0:P0; -> Lila kapu
* open actual color
!!TR34/37/0&y-1=0:P1; -> Piros kapu átjárható
!!TR46/40/0&y-1=1:P1; -> Kék kapu
!!TR39/42/0&y-1=4:P1; -> Narancs kapu
!!TR40/30/0&y-1=5:P1; -> Lila kapu

*** BTW, You could ask me in hungarian at heroes.hardwired.hu, WoG topic.
Tényleg, Wotan a Tower-rel van?
:P

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Unread postby Sixy » 28 Apr 2007, 09:11

Oooh, nice! Thanks! I hope someday I'll get better in scripting.

***

(Nem, a Fortressel, de van rá oka -> haverikör. KÖSZI!)

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Unread postby Sixy » 06 May 2007, 14:41

Here's my next task. : ) I would like to have a script which disables the standard properties of power stones (the stones which give the commanders bonuses or act like a simple treasure chest if there are no commanders allowed), and make them giving a primary skill for the hero who gets them.

My script is now:

Code: Select all

ZVSE

!#UN:B/7/1;
!?OB101/7;
!!HE-1:F?v1/?v2/?v3/?v4/1;
!!VRv4:Sv4+1;
!!HE-1:Fv1/v2/v3/v4;
I used the UN:B code because it works for the new treasure chests... but it doesn't work for the power stones. Now this code gives a spell power to the hero but also gives 2000 golds or 1500 Exp (or whatever). Is there a way to fix it or is there another way to do this? Thanks!


Return to “Wake of Gods”

Who is online

Users browsing this forum: Bing [Bot] and 0 guests