A simple Working Quest Hut

Maps and the art of mapmaking.
User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

A simple Working Quest Hut

Unread postby Grumpy Old Wizard » 29 Sep 2006, 17:17

I finally figured out how to program the seer hut with a simple quest.

The quest is return a 4 leaf clover for 1000 experience points.

1) Place a seer hut. Click on it to highlight it. Click on th "object properties tree" button.

2) You need to make a text file at each of these fields: CaptionFileRef, DescriptionFileRef. The text files must be very short.

3) Under "Kind" chose "Obtain artifact"

4) Right click on parameters and click "Add" twice to make 2 new elements. Now, click to the right of the top element and type in 8, which is the ID for the clover artifact. Make the second element "1" , which means you need 1 clover to complete the quest.

5) Under award type chose experience and under that, type 1000.

6) Change take contribution to true so the clover will be removed.

Image

Image

Creeating a progress field message does not seem to work.

Edit: Actually the progress message goes in your quest logbook along with the description.

GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
alavris
Scout
Scout
Posts: 164
Joined: 06 Jan 2006
Location: Poland
Contact:

Unread postby alavris » 29 Sep 2006, 19:31

Nice work! As I see, in few weeks here in the Guild, will be gathered more advices of using the editor then are currently included in the official manual :)
.

vest30
Lurker
Lurker
Posts: 1
Joined: 26 Sep 2006

THANK YOU

Unread postby vest30 » 04 Oct 2006, 08:34

DUDE, Thank you so much. I've wanting to learn how to use those damn things for 2 weeks. you rock man :) :D

User avatar
Marzhin
Pit Lord
Pit Lord
Posts: 1207
Joined: 06 Jan 2006
Location: Montreuil, France
Contact:

Unread postby Marzhin » 04 Oct 2006, 09:13

Too bad the message window only handles short descriptions. Well, I guess there is still the possibility to add a MessageBox in the script somewhere...
Still, many thanks, Grumpy Old Wizard !

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 04 Oct 2006, 14:17

Marzhin wrote:Too bad the message window only handles short descriptions. Well, I guess there is still the possibility to add a MessageBox in the script somewhere...
Still, many thanks, Grumpy Old Wizard !
Remember to break up your message by hitting enter, like this so the message will display correctly:
I wish Ubi would(hit enter)
give us bigger(hit enter)
message boxes so(hit enter)
we could make(hit enter)
story maps easier! (hit enter)


GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
Marzhin
Pit Lord
Pit Lord
Posts: 1207
Joined: 06 Jan 2006
Location: Montreuil, France
Contact:

Unread postby Marzhin » 04 Oct 2006, 14:28

Yep I do it now, but isn't it really horrible to read ? :P
The magical amplifier

is protected by a

barrier that can only

be breached by the

most powerful heroes.

Malustar must be of

Level 20 before he can

take the artifact.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 04 Oct 2006, 17:14

now if only we can figure out the parameters for the "defeat neutrals objective", then well have two examples of a working seer hut :D

JagoBC
Leprechaun
Leprechaun
Posts: 29
Joined: 29 May 2006

Unread postby JagoBC » 13 Oct 2006, 01:16

Any place to find a list of artifacts and their corresponding Number? Or could they possibly be number sequentially in the order they appear in the artifact objects palate?

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 13 Oct 2006, 03:37

http://www.heroesofmightandmagic.com/he ... acts.shtml

artifact id's, they are also in your script ID documentation.

JagoBC
Leprechaun
Leprechaun
Posts: 29
Joined: 29 May 2006

Unread postby JagoBC » 13 Oct 2006, 06:01

Sadly I found that after my post (check the documentation doofus!). I meant to come back and edit my original post, to save myself looking stupid, but got distracted by something shiny.

Now another question. The Function GiveHeroSkill says it returns true if the hero gets the skill (has a slot and prerequisites, etc.). But if you use the function to test the ability to recieve the skill, as in:

If GiveHeroSkill(heroname, 29) = true

meaning the hero is able to receive the skill Estates, what is the numberical value of True? The function checker says the value of true is not recognized.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 13 Oct 2006, 06:06

yes, the editor can never make up its mind what it wants for values, sometimes it wants "yes", somtimes it wants "true", and sometimes it wants "1".
or no, false, and 0. usually the documention tells you which, but sometimes its vague, wrong, or completely leaves out the most important thing or parameter you need to make the function work....
or like with the enableheroAI command, documentation says use false to turn it off, but when you play the game it complains when you use false saying not a value or something, but function still works with false anyways....*shrugs*

User avatar
alavris
Scout
Scout
Posts: 164
Joined: 06 Jan 2006
Location: Poland
Contact:

Unread postby alavris » 13 Oct 2006, 13:47

JagoBC wrote:The function checker says the value of true is not recognized.
You can use this instead:

Code: Select all

If GiveHeroSkill(heroname, 29) then
...just without writing "= true".
.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 13 Oct 2006, 13:51

you probably have to use

Code:
If GiveHeroSkill(heroname, 29) == "value" then


i think every if then statement needs "==", unless there is an exception...

User avatar
alavris
Scout
Scout
Posts: 164
Joined: 06 Jan 2006
Location: Poland
Contact:

Unread postby alavris » 13 Oct 2006, 14:23

I've just realized that this was GiveHeroSkill() not HasHeroSkill() :) You can use code that I wrote with HasHeroSkill() function, just check it, you will see that it works :) When talking about GiveHeroSkill(), I'm not sure if this function returns any value at all, but if it does, than my code will also work with it.
.

JagoBC
Leprechaun
Leprechaun
Posts: 29
Joined: 29 May 2006

Unread postby JagoBC » 13 Oct 2006, 22:27

According to the document the GiveHeroSkill returns true or false; true if the hero was able to get the skill, false if not. But HasHeroSkill() seems better suited to what I want anyway, I simply did not know it existed.

User avatar
Vlaad II
Demon
Demon
Posts: 318
Joined: 06 Jan 2006
Location: HC

Unread postby Vlaad II » 31 Dec 2007, 01:09

If I chose "defeat hero" under the "kind" of quest, what would I have to put under "parameters"?
Cartographer - maps and mapmaking

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 31 Dec 2007, 17:02

The scripting name for the heroe to be defeated.

GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."

User avatar
Vlaad II
Demon
Demon
Posts: 318
Joined: 06 Jan 2006
Location: HC

Unread postby Vlaad II » 31 Dec 2007, 19:45

I've already tried: Naadir, Muscip, "Muscip" and MUSCIP, but to no avail.
Cartographer - maps and mapmaking

User avatar
fiur
Pixie
Pixie
Posts: 129
Joined: 06 Jan 2006

Re: A simple Working Quest Hut

Unread postby fiur » 10 Jan 2008, 08:07

Grumpy Old Wizard wrote:I finally figured out how to program the seer hut with a simple quest.

The quest is return a 4 leaf clover for 1000 experience points.

1) Place a seer hut. Click on it to highlight it. Click on th "object properties tree" button.

2) You need to make a text file at each of these fields: CaptionFileRef, DescriptionFileRef. The text files must be very short.

3) Under "Kind" chose "Obtain artifact"

4) Right click on parameters and click "Add" twice to make 2 new elements. Now, click to the right of the top element and type in 8, which is the ID for the clover artifact. Make the second element "1" , which means you need 1 clover to complete the quest.

5) Under award type chose experience and under that, type 1000.

6) Change take contribution to true so the clover will be removed.

Image

Image

Creeating a progress field message does not seem to work.

Edit: Actually the progress message goes in your quest logbook along with the description.

GOW
well this was an nice info GOW..... but if I want this as an reward:

I must give away an creature to get one border key.... how is that possible?
I saw that you could do it in the opposite way but not get a "Border" key as reward... (I'm using the creature ID 114 (snow ape) the quest with that creature works fine but I don't know how to get an key as reward
maybe you know....

User avatar
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 11 Jan 2008, 08:47

I must give away an creature to get one border key.... how is that possible?
I saw that you could do it in the opposite way but not get a "Border" key as reward... (I'm using the creature ID 114 (snow ape) the quest with that creature works fine but I don't know how to get an key as reward
maybe you know....
There is a GiveBorderguardKey script function that you will need to use. I didn't see it listed in the editor manual but you can find it in the drop down menue.

You should be able to set up a function that is triggered by a state change function. Let's say you name the function GrantKey.

You put the name of the function, GrantKey, without quotes and without the parentheses down in the state change trigger action field that is in the object properties for the quest hut. That function will have the GiveBorderguardKey function and whatever else you want to do when the quest is completed in it.

You may need to start the quest out as initially active and use the progress field or a placed event to introduce the quest to the player so that the script in the state change field does not give the player the key when he first visits the hut. Or else use a flag (which I did in some quests) that causes different parts of the function you list in the state change field to run when the player gets the quest initially and another part of the function to run when the quest is completed.

It may sound complicated, but really shouldn't be too difficult.

Have a look at the quests I set up in Shadow Dreams for some examples of using the state change fields on quests.

GOW
Frodo: "I wish the ring had never come to me. I wish none of this had happened."
Gandalf: "So do all who live to see such times but that is not for them to decide. All we have to decide is what to do with the time that is given to us."


Return to “Mapmaking Guild”

Who is online

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