[H5 EDITOR] Troubleshooting topic

Maps and the art of mapmaking.
User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 20 Dec 2006, 08:22

myythryyn wrote:hi, any way to stop the player from recieving enemy AI hero's artifacts after battle?
Aren't the "lootable" commands, particularly SetHeroLootable(heroname, enable/nil) for that? Never tried myself.
Avatar image credit: N Lüdimois

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

Unread postby Marzhin » 21 Dec 2006, 10:21

Aaaargh, my vampire quest still doesn't work. When I activate it, it appears in the Objective screen but when the thread containing the objective progress update starts nothing happens (the progress stays on "progress 0") ans the console give me a line which says :

Code: Select all

ERROR : objective "quest3" is not exists
(sic)

I tried to delete the objective and create it again from scratch, change its name, try to have it activated from the beginning but invisible, it still says it doesn't exist...

Here a copy-paste of the script in its last version :

Code: Select all

oldvalue=0;

----------------------------------------------

function quest_cabin()
	if GetCurrentPlayer ()==PLAYER_1 then
  MessageBox("Maps/SingleMissions/B1C4/vempirehunters-beginning.txt");
		SetObjectiveState ("quest3", OBJECTIVE_ACTIVE);
		startThread(vampquest);
		Trigger(OBJECT_TOUCH_TRIGGER, "cabin", "cabin_end");
	end;
end;

---------------------------------------------

function vampquest()
   while GetObjectiveState("quest3", OBJECTIVE_ACTIVE) do
   killed = 0;
   for i= 1, 4 do
      if IsObjectExists("vamp"..i) == nil then
         killed = killed +1;
      end;
   end;
   if oldvalue ~= killed then
      oldvalue = killed;
      SetObjectiveProgress ("quest3", killed);
   end;
sleep(5);
end;
end;
I'm thinking of forgetting the "progress states" because it's really getting on my nerves now...

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 21 Dec 2006, 12:03

Is it listed as player specific objective? When I tried it was defined as common secondary objective IIRC. And the type was manual of course. Maybe in 6 or 7 hours i can have a look at different situations again...
Avatar image credit: N Lüdimois

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

Unread postby Marzhin » 21 Dec 2006, 13:18

No, it is "player-specific". Do you think it may be the reason why it's not working ?

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 21 Dec 2006, 16:13

Yes, I get the same error when declaring it as player specific objective. Do not know exactly why.
Avatar image credit: N Lüdimois

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

Unread postby Marzhin » 21 Dec 2006, 16:15

Pitsu wrote:Yes, I get the same error when declaring it as player specific objective. Do not know exactly why.
I'll try it and if it works, I'll make an altar to you in my apartment ^^

edit : I'll definitely make this altar :P It works ! Oh yeah ! Champagne !

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

Unread postby Marzhin » 04 Jan 2007, 09:41

I just want to report a weird bug I had with the editor the other day. I was testing a map in HoF, noticed a few bugs and the like, nothing out of the ordinary so far. Then I opened the map in the editor and the rotation parameter of nearly all objects on the map was messed up. I had to manually reset all of them, it took me a (somewhat depressing...) hour. It had never happened before and didn't since (fingers crossed).

I wonder if someone else had this bug or has an idea what triggered it ?

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

Unread postby alavris » 04 Jan 2007, 16:09

I have similar problem... All began after the installation of patch 1.4. When I open my map in the editor, do no changes, then close the editor, size of the map is changed and some of the scripts stop working! Fortunately I always make a backup of my maps. There is something veeeery bad in the editor that came with patch 1.4 (or HoF, if you have it installed).
My Heroes V map: Tales of Silentia

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Unread postby meows » 05 Jan 2007, 10:51

I have a query guys.. I want Taverns that are empty. I went in the map properties and unchecked all heros, but yet Heros can still be hired. I thought there was a Campaign that had empty Taverns.
Any one have any Ideas?

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 » 05 Jan 2007, 14:05

meows wrote:I have a query guys.. I want Taverns that are empty. I went in the map properties and unchecked all heros, but yet Heros can still be hired. I thought there was a Campaign that had empty Taverns.
Any one have any Ideas?
Under player properties you could reserve all the other heroes for a nonplayable color. For example stick a teal hero in an underground closed in room and reserve all the heroes you don't want appearing in a tavern for the teal player.

I haven't tried it but it should work.

If there is only one playable position you could also reserve the heroes for that position and they shouldn't show up in the tavern.

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."

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Unread postby meows » 07 Jan 2007, 12:03

MANY MANY Thanks!
[quote="Grumpy Old Wizard]Under player properties you could reserve all the other heroes for a nonplayable color. For example stick a teal hero in an underground closed in room and reserve all the heroes you don't want appearing in a tavern for the teal player.

I haven't tried it but it should work.

If there is only one playable position you could also reserve the heroes for that position and they shouldn't show up in the tavern.

GOW[/quote]
Yes it kinda works, however after about 20ish heroes are reserved all you get is a choice of Haven or Academy heroes.. so you really can't reserve all heroes/.. but I found a workaround,, just disable the Tavern and have it do something else..

Now for my next problem.. I set a secondary objective to kill neutrals
i placed 3 stacks of wolves and in the
Parameters
Objectives.Secondary.Common.Objectives.[0].Parameters.[0] 113
Objectives.Secondary.Common.Objectives.[0].Parameters.[1] 75
I added 2 and put 113 in the first for the wolves and 75 in the second property box to kill 75 wolves.. However all you have to do it kill one stack of wolves and you win the objective..

How do i get it to wait untill they kill the 75 wolves other than making it one stack of 75?


EDIT:: Woops I reread the thread here and found my error.. So I went in and named 7 stacks of wolves
wolf1
wolf2
etc and added Parameters for each stack and put the names in, and what do you know. it worked.. and even counted the stacks down.. However. one more stack of mobs had to be killed after the 7 stacks of wolves for the objective to complete it's self.. But I can live with that..

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 » 07 Jan 2007, 13:21

meows wrote: Now for my next problem.. I set a secondary objective to kill neutrals
i placed 3 stacks of wolves and in the
Parameters
Objectives.Secondary.Common.Objectives.[0].Parameters.[0] 113
Objectives.Secondary.Common.Objectives.[0].Parameters.[1] 75
I added 2 and put 113 in the first for the wolves and 75 in the second property box to kill 75 wolves.. However all you have to do it kill one stack of wolves and you win the objective..

How do i get it to wait untill they kill the 75 wolves other than making it one stack of 75?


EDIT:: Woops I reread the thread here and found my error.. So I went in and named 7 stacks of wolves
wolf1
wolf2
etc and added Parameters for each stack and put the names in, and what do you know. it worked.. and even counted the stacks down.. However. one more stack of mobs had to be killed after the 7 stacks of wolves for the objective to complete it's self.. But I can live with that..
In the below thread I give an example of how to set up a bounty hunter quest for killing 3 neutral stacks of mages. Scroll down the thread about 8 posts until you see my post with pictures. That should work setting up what you want to do for your stacks of wolves.

viewtopic.php?t=4112&highlight=quest+bounty

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
Grumpy Old Wizard
Round Table Knight
Round Table Knight
Posts: 2205
Joined: 06 Jan 2006
Location: Tower Grump

Unread postby Grumpy Old Wizard » 08 Jan 2007, 07:57

I remember when making my HOMM5 map that there was a "Question Box" option but no documentaion on it. Has anyone successfully used Question Box?
alavris wrote:I have similar problem... All began after the installation of patch 1.4. When I open my map in the editor, do no changes, then close the editor, size of the map is changed and some of the scripts stop working! Fortunately I always make a backup of my maps. There is something veeeery bad in the editor that came with patch 1.4 (or HoF, if you have it installed).
Quite a distrubing report. And here I am thinking about starting another map soon. :( Maybe the next patch will address whatever the problem with the editor is.
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 » 08 Jan 2007, 17:22

Grumpy Old Wizard wrote:Quite a distrubing report. And here I am thinking about starting another map soon. :( Maybe the next patch will address whatever the problem with the editor is.
I'll sure start making no new map until new patch is released. There's just too much risk to do it now, with 1.4 Editor.
My Heroes V map: Tales of Silentia

User avatar
Pitsu
Round Table Hero
Round Table Hero
Posts: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 08 Jan 2007, 19:56

Grumpy Old Wizard wrote:I remember when making my HOMM5 map that there was a "Question Box" option but no documentaion on it. Has anyone successfully used Question Box?
Absolutely

QuestionBox("Maps/SingleMissions/mapname/textfile name", "function_that_runs_IF _player_clicks_Yes");

Last time when I wrote about commands that are not mentioned in editor I added also GetPlayerState(PLAYER_#) or GiveBorderguardKey (PLAYER_#, key#) to the list. Perhaps there are some more commands that work, but are not documented in official pdf.
Avatar image credit: N Lüdimois

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 » 08 Jan 2007, 21:56

Pitsu wrote:QuestionBox("Maps/SingleMissions/mapname/textfile name", "function_that_runs_IF _player_clicks_Yes");

Last time when I wrote about commands that are not mentioned in editor I added also GetPlayerState(PLAYER_#) or GiveBorderguardKey (PLAYER_#, key#) to the list. Perhaps there are some more commands that work, but are not documented in official pdf.
Ah, thanks! That will prove to be quite useful. :)

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 » 09 Jan 2007, 09:43

I think the QuestionBox is now explained in the functions doc of HoF.

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Unread postby meows » 11 Jan 2007, 08:12

[quote="Grumpy Old Wizard"]I remember when making my HOMM5 map that there was a "Question Box" option but no documentaion on it. Has anyone successfully used Question Box?

Yes here is one that works great for me in my Ashers World Series.
The Question

Code: Select all

function cast_here_2()
	Trigger( REGION_ENTER_AND_STOP_TRIGGER, "cast_here", nil);
	
	if GetCurrentPlayer () == PLAYER_1 then
		HasArtefact("Ingvar",80);
		QuestionBox("Maps/SingleMissions/Asher three2/questioncast_here.txt","callbackYes","callbackNo");
		else
		MessageBox ("Maps/SingleMissions/Asher three2/loose.txt");
end;
end;
Now for the options, if they Click yes or no.

Code: Select all

function callbackYes()
	RemoveObject("mnt1",12,42,0);
	RemoveObject("mnt2",13,48,0);
	RemoveObject("mnt3",7,42,0);
	SetObjectPosition("magethree",56,34,0);
MessageBox ("Maps/SingleMissions/Asher three2/cast_here.txt");
RemoveArtefact("Ingvar",80);
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)", "Ingvar" );
sleep (2);
MoveHero("Ingvar",16,43,-1);
SetRegionBlocked("townent", nil, 1);
SetObjectEnabled("Sonoma", true);
SetObjectOwner("Sonoma", PLAYER_1);
SetObjectEnabled("fort2", true);
MoveCamera(12,42.0,0,0,0);
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)", "Sonoma" );
sleep (2);
PlayVisualEffect( "/Effects/_(Effect)/Towns/Inferno/DemonGate.xdb#xpointer(/Effect)", "Sonoma" );
sleep (2);
PlayVisualEffect( "/Effects/_(Effect)/Spells/FireBallHit.xdb#xpointer(/Effect)", "Sonoma" );
sleep (2);
end;

function callbackNo()
	MessageBox ("Maps/SingleMissions/Asher three2/loose.txt");
	loose();
	end;
	
	----------------------- cast here ----------------------

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

Unread postby Marzhin » 11 Jan 2007, 09:46

Sorry if it has already been asked, but does the "Music" parameter in the Map Properties actually works and if it does, how ?

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 17 Jan 2007, 07:50

hello, i need some help making a script.

first off, i remember reading that there is a way to teleport a hero to a map location. if that is so, then i will need to use that command, but dont know what the syntax it is, or how to use it.

here is what i need to do. i have a scripted area that is very important that only the campaign main hero enters. if any any other player controlled hero enters that area of the map, it will cause scripted events to act funny. also note that the map has to have secondary support heroes, so removing then and just having one main hero is not an option.

so i need to find a way to block any hero except the campaign main hero from entering the area. i was thinking of using the teleport script.
something like this, though of course this is just a rough draft -

function teleport (heroname)
get heroname;
if heroname is not equal to "main heroname" then
teleport ("heroname", location);
messagebox(explaining only main campaign hero may enter this area);
end;

could someone help me finalize this script? this is something im completely unfamiliar with and havnt played around with yet.

thxs for any help :)


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 6 guests