[H5 EDITOR] Troubleshooting topic

Maps and the art of mapmaking.
User avatar
Bandobras Took
Genie
Genie
Posts: 1019
Joined: 06 Jan 2006

Unread postby Bandobras Took » 15 Sep 2006, 18:24

Okay, I can't get any scripts to run, not even the example in the manual.

I'm typing it exactly as it's shown.

Has anybody else had this problem?
Far too many people speak their minds without first verifying the quality of their source material.

goodrix
Lurker
Lurker
Posts: 2
Joined: 14 Sep 2006

Unread postby goodrix » 15 Sep 2006, 23:50

Bandobras Took wrote:Okay, I can't get any scripts to run, not even the example in the manual.

I'm typing it exactly as it's shown.

Has anybody else had this problem?
I think that script (which is a cheat code) is not used anymore. I'm just guessing, but I think the manual was done before the 1.2 patch when they changed the cheat codes. Also, I looked for a similar script to "GiveExp" on the "script functions" help file and the closest I could find is "LevelUpHero (heroName)" or "ChangeHeroStat (heroName, STAT_EXPERIENCE, delta) <- they are on pg.25 and pg.11 of the manual, respectively

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

Unread postby Pitsu » 16 Sep 2006, 13:27

Bandobras Took wrote:Okay, I can't get any scripts to run, not even the example in the manual.
I do not know about your map but here is a note: I have NEVER got a script working in multiplayer mode. The scripts are the same as command "cheat codes" and disabled in MP. I do not think it is therefore possible to have functional scripts in a multiplayer game. A scripted MP map played in SP mode has the scripts running fine.
If you tested your map in multiplayer mode, that may be your problem.

User avatar
jeff
Moderator
Moderator
Posts: 3744
Joined: 06 Jan 2006

Unread postby jeff » 16 Sep 2006, 14:29

Ok, I have only opened it once, looked around and said this is going to take a while to learn (why did they not release this in the summer when I had the time), then closed it and said this will have to wait until Christmas. In the mean time I hope you guys publish some guides that quickly explain the editor and its various features and how to use them. (Yeah, yeah, yeah, I will eventually read the documentation, but if it is anything like what is normally provided, fan made guides will be essential.)

One thing, it appears this version cannot link games via a campaign editor, is that going to be released as part of the improved editor mentioned as being released with the expansion (and available for free download at the same time) or is it going to be released earlier as part of a patch. By not releasing it now, UBI has once again snatched defeat from the jaws of victory. :disagree:
Mala Ipsa Nova :bugsquash:

User avatar
Eternor
Super Peasant
Super Peasant
Posts: 99
Joined: 18 Feb 2006

Unread postby Eternor » 16 Sep 2006, 18:03

One thing, it appears this version cannot link games via a campaign editor


You can create and edit campaigns with this version, Nival just disabled that functionality.

Image

User avatar
jeff
Moderator
Moderator
Posts: 3744
Joined: 06 Jan 2006

Unread postby jeff » 16 Sep 2006, 23:19

Eternor wrote:
One thing, it appears this version cannot link games via a campaign editor


You can create and edit campaigns with this version, Nival just disabled that functionality.
That is good news, but it was announced that the campaign ability was going to happen. So I will rephrase my previous question, when will Nival enable the feature?
Mala Ipsa Nova :bugsquash:

User avatar
Mytical
Round Table Knight
Round Table Knight
Posts: 3780
Joined: 07 Aug 2006
Location: Mytical's Dimension

Unread postby Mytical » 17 Sep 2006, 10:44

Silly question that probably can be answered by something obvious, but I really need help with something. I place a hero, ect but can't seem to 'select' it to modify it..when i try to it is the hero icon and wont let me modify the old hero, but will let me place as many 'new' heroes as I could possibly want. What am I doing wrong...besides trying to use something I dont understand??
Warning, may cause confusion, blindness, raising of eybrows, and insanity. Image

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

Unread postby Pitsu » 17 Sep 2006, 16:40

Mytical, try using the ESC key. To edit properties of an object, make sure to have "object list panel" active (view menu or a button in the toolbar), find the object in that list, rightclick and chose properties. Of course you MAY already have the necessary windows open by default.

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 » 17 Sep 2006, 18:47

Mytical wrote:Silly question that probably can be answered by something obvious, but I really need help with something. I place a hero, ect but can't seem to 'select' it to modify it..when i try to it is the hero icon and wont let me modify the old hero, but will let me place as many 'new' heroes as I could possibly want. What am I doing wrong...besides trying to use something I dont understand??
Hit the escape key to get the heroe off your cursor. Now click on the heroe you want to edit. Hit the space bar and the heroe's properties should come up.

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

pholtz
Leprechaun
Leprechaun
Posts: 4
Joined: 12 Sep 2006

Unread postby pholtz » 18 Sep 2006, 00:58

I don't seem to be able to create a 2 player map with only one hero (like the first game in the campaign). Apparently you can't start a custom game unless there are two players (one computer). I've tried creating a garrison and making them belong to player 2 but my map still says one player when I bring it up as a custom game. And I can't seem to start a one player game.

Anyone know how they did it in the first campaign senario? I would love to be able to take a look at the supplied campaign games, but can't seem to do it.

User avatar
Mytical
Round Table Knight
Round Table Knight
Posts: 3780
Joined: 07 Aug 2006
Location: Mytical's Dimension

Unread postby Mytical » 18 Sep 2006, 01:19

Thanks Pitsu and GOW. It worked and now I am starting to work on my maps. May take me a year for a simple one, but hey at least I am making some progress now :). :tsup:
Warning, may cause confusion, blindness, raising of eybrows, and insanity. Image

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 » 18 Sep 2006, 04:03

pholtz wrote:I don't seem to be able to create a 2 player map with only one hero (like the first game in the campaign). Apparently you can't start a custom game unless there are two players (one computer). I've tried creating a garrison and making them belong to player 2 but my map still says one player when I bring it up as a custom game. And I can't seem to start a one player game.

Anyone know how they did it in the first campaign senario? I would love to be able to take a look at the supplied campaign games, but can't seem to do it.
I'm not sure how they did it. The manual says each player must have a heroe.

I've just played around with object/terrain stuff to this point. I do recall reading a script command that makes an AI heroe inactive. Maybe you could either use that or put the AI heroe in an underground chamber with no exit so it would still in effect be a single heroe map.

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 » 18 Sep 2006, 14:28

Eternor wrote:
One thing, it appears this version cannot link games via a campaign editor


You can create and edit campaigns with this version, Nival just disabled that functionality.

Image
So is there any way we can manually enable this glorious feature ?

User avatar
Bandobras Took
Genie
Genie
Posts: 1019
Joined: 06 Jan 2006

Unread postby Bandobras Took » 18 Sep 2006, 16:44

Has anybody been able to get a script to fire when a town is captured? I've named a town "TestTown" and been trying Trigger(OBJECT_CAPTURE_TRIGGER,"TestTown","TestScript"); to no avail.

P.S. Thanks, Pitsu; the map I was editing was indeed multiplayer rather than scenario.
Far too many people speak their minds without first verifying the quality of their source material.

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

Unread postby Pitsu » 18 Sep 2006, 17:44

Bandobras Took wrote:Has anybody been able to get a script to fire when a town is captured? I've named a town "TestTown" and been trying Trigger(OBJECT_CAPTURE_TRIGGER,"TestTown","TestScript"); to no avail.
.
Should work. I would double check that the "TestScript" function itself is correct. And the syntax everywhere...

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

Unread postby alavris » 18 Sep 2006, 18:08

Marzhin wrote:Ok, now I'm trying to go into scripting. I wanted to do something rather simple : make a Message Box appear on a specific day. How can I do that ?
I just "discovered" how to do this, and maybe there's someone who still is searching for the answer, so I will post it here:

At first we have to make a text file with our message. To do this, open the editor. Now select View-->Map properties tree. Choose "Add" as shown:

Image

Now click on "New" buttow as shown:

Image

Write a name for your text file, then click "Ok". New window appears. Here you can write text of your message. When finished, click "Ok".

Now in Map properties write this script:

Code: Select all

function fun1()	
	if (GetDate(DAY) == 3) then
		MessageBox("Maps/Multiplayer/Alavris_1/wiad1.txt", GenerateMonsters(40,50,52,1,3));		
	end;	
end;
Trigger(NEW_DAY_TRIGGER, "fun1");
Instead of writing "Maps/Multiplayer/Alavris_1/wiad1.txt", paste here copied value of SaveFilenameFileRef cell, which just has been edited by you (see second picture). Instead of function GenerateMonsters you can paste any other function or nothing.

I hope that now it's simple for everyone... :)

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 » 18 Sep 2006, 22:44

alavris wrote:
Marzhin wrote:Ok, now I'm trying to go into scripting. I wanted to do something rather simple : make a Message Box appear on a specific day. How can I do that ?
I just "discovered" how to do this, and maybe there's someone who still is searching for the answer, so I will post it here:

I hope that now it's simple for everyone... :)
Thank you. Your tutorial was quite helpful. :)

Edit: I created the text file. like you described.

I'm having difficulty getting the message to display. I want the introduction text for the map to display on day one. Here's the code. Any idea what I'm doing wrong?

function NewDayTrigger()
if GetDay(DAY) == 1 then
-- only do this the first day
messageBox("Intro1.txt");
end;
if GetDay(DAY_OF_WEEK) == 1 then
-- do this first day of every week.
end;
end;
Trigger(NEW_DAY_TRIGGER,"NewDayTrigger")

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
Pitsu
Round Table Hero
Round Table Hero
Posts: 1848
Joined: 22 Nov 2005

Unread postby Pitsu » 19 Sep 2006, 06:00

Grumpy Old Wizard wrote: messageBox("Intro1.txt");
Shouldn't it be messageBox("Maps/maptype/mapname/textfilename.txt"); ?

like in "Maps/Multiplayer/Alavris_1/wiad1.txt"

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 » 19 Sep 2006, 08:00

Pitsu wrote:
Grumpy Old Wizard wrote: messageBox("Intro1.txt");
Shouldn't it be messageBox("Maps/maptype/mapname/textfilename.txt"); ?

like in "Maps/Multiplayer/Alavris_1/wiad1.txt"
I have tried it both with the path, and without to no avail.
MessageBox("Maps\singlemissions\a test map\intro1.txt");

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
Pitsu
Round Table Hero
Round Table Hero
Posts: 1848
Joined: 22 Nov 2005

Unread postby Pitsu » 19 Sep 2006, 08:08

Grumpy Old Wizard wrote: I have tried it both with the path, and without to no avail.
MessageBox("Maps\singlemissions\a test map\intro1.txt");
The map type directory is either Multiplayer or Singleplayer, cannot be singlemissions or singleplayer. Not sure how blanks in "a test map" are handled.

EDIT Of course SingleMissions is the correct one. I truely have to stop eating these mushrooms and giving false advice... :wall:
Last edited by Pitsu on 19 Sep 2006, 15:56, edited 1 time in total.


Return to “Mapmaking Guild”

Who is online

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