[H5 EDITOR] Troubleshooting topic

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

Unread postby Grumpy Old Wizard » 17 Jan 2007, 08:47

Haven't tried this, so I'm not positive it works for heroes.

SetObjectPosition(objectName, x, y, floor = -1);
Description
This function instantly moves the object into the position specified by the tile coordinates and floor number. If the floor parameter is not specified in the invocation of the function, the object’s current floor will be used by default. Only mobile objects can be moved. If the target position is inaccessible, occupied with another object, or is an interactive tile of another object, the function generates an error.
objectName – the object’s name
x, y – the target tile’s coordinates
floor – floor number (equal to -1 by default, which means ‘same’)

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: 1830
Joined: 22 Nov 2005

Unread postby Pitsu » 17 Jan 2007, 09:08

Grumpy Old Wizard wrote:Haven't tried this, so I'm not positive it works for heroes.
I have used it successfully (ruins in the desert map)

should be

Code: Select all


function teleport (heroname)

if heroname == "main heroname" then -- well the hard coded name of main hero, not "main heroname"
SetObjectPosition (heroname, x, y, z); -- position where to teleport. IMO floors (z) were either 0 or 1
MessageBox("text FOR main hero after he is teleported")
else
MessageBox("explaining that only main campaign hero may enter this area");
end; 
end;
 
Avatar image credit: N Lüdimois

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Unread postby meows » 17 Jan 2007, 12:29

Most flustrating the HOF mapeditor is.. Grrrr.. Tried to post at Navil and they don't allow it.. so went to Ubisoft forums and tried to post there and same thing.. In fact the link to the forums on the main page is wrong, i got into them from a bookmark.

I am very flustrated having the map editor freeze my computer up. Even Ctrl Alt Del will not work so I have to do a soft boot. This is even without writing one line of code in the script box.

The only somewhat fix has been to remove all maps except the one I am working on from the maps directory, this at least slows down the crashes.

running a decent machine too. 2 GIG mem and a 2.5 processor. ATI 256 meg PCI Express card.

Any one have any cures?

grindcardoso
Leprechaun
Leprechaun
Posts: 7
Joined: 12 Feb 2007
Location: Brazil

Unread postby grindcardoso » 13 Feb 2007, 18:44

I have an unusual question about scripts:
Has anyone tried to make a player to win when a given hero dies?
I´ve used this weird script below, unsucessfully:

function dead(heroname)
while IsHeroAlive("hn") do
if IsHeroAlive ("hn") == nil then
win();
sleep(10)
end;
end;

StartThread(dead);

It´s obvious that something wrong, because it didn´t work... but I cannot see what´s wrong. Any ideas?

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

Unread postby Pitsu » 13 Feb 2007, 20:01

grindcardoso wrote: Has anyone tried to make a player to win when a given hero dies?
The simplest would probably be (works for me)

Code: Select all


Trigger(PLAYER_REMOVE_HERO_TRIGGER, PLAYER_1, 'wictory');

function wictory()
	if IsHeroAlive("Agrael") == nil then
	Win();
end;
end;
Just replace Agrael with the ID of your hero. "hn" in your original script is no ID of any hero, so that is one reason why the script fails.

PS. I understand that the hero has to belong to human player and not to the AI.
Avatar image credit: N Lüdimois

grindcardoso
Leprechaun
Leprechaun
Posts: 7
Joined: 12 Feb 2007
Location: Brazil

Unread postby grindcardoso » 14 Feb 2007, 09:52

Thanks! I´ll try it today as soon as I get home...
Another question:
When I try to invoke a Message Box in a Random Generated Map, the .txt file is saved in a directory like this "Maps/RMG/132.456.4546.14598/ xxx.txt", and well, it doesn´t work at all.
When a do the same thing in a fully customized map (made from scracth, a "new" map), it is saved in "Maps/SingleMissions/made_from_scratch.txt", and it works perfectly.
I wonder what´s wrong.
Maybe should I create a "SingleMissions" folder inside RMG directory, and then put the .txt files in there?

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

Unread postby Vlaad II » 14 Feb 2007, 19:34

Which files can I use for birds (aside from the default)? For example, if I wanted Griffins flying over the adventure map, which Griffin files should I search for?

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

Unread postby Pitsu » 14 Feb 2007, 19:56

grindcardoso wrote: "Maps/RMG/132.456.4546.14598/ xxx.txt", and well, it doesn´t work at all.
No experiences with RMG, but I suspect the scripts are limited to SingleMissons only. Can you launch any other script commands on randomly generated maps? If not, then you surely must rename it to single player (Unzip the mapp file and *rename* RMG directory to SingleMissions and in message box references use Maps/SinleMissions?mymap?myfile.txt address). If you can launch other script commands on a RMG map you can try the following: A) unzip map file and replace the 123.245.678 with a normal dot-less name. B) Make sure the text file is not misplaced or with misspelled name C) if you did the txt file externally and copied into zip file, remove it and make a new file using the editor.

No more ideas at the moment.


@ Vlaad II. You probably need to ask Vitirr. Or download his map (very bottom of first post http://forums.ubi.com/eve/forums/a/tpc/ ... 1181010694 )and try to figure it out by yourself
Avatar image credit: N Lüdimois

grindcardoso
Leprechaun
Leprechaun
Posts: 7
Joined: 12 Feb 2007
Location: Brazil

Unread postby grindcardoso » 15 Feb 2007, 01:27

Scripts work nomally in RMG maps.
And, thank you very much. Both of your tips worked perfectly!
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem

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

Unread postby Vlaad II » 15 Feb 2007, 12:44

Pitsu wrote:@ Vlaad II. You probably need to ask Vitirr. Or download his map (very bottom of first post http://forums.ubi.com/eve/forums/a/tpc/ ... 1181010694 )and try to figure it out by yourself
Yeah, I'm familiar with Vitirr's work. Actually, it was that very thread which prompted me to try it in the first place.

After some trial and error, the most obvious solution proved to be the best one. ;) Now Griffins are flying everywhere! Even through mountains and treetops! Dozens of them! Hm, perhaps I should reduce the amount and raise the height. :D

P.S. Strangely, a dolmen turned into an obelisk. Gah.

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

Unread postby Pitsu » 15 Feb 2007, 13:04

Vlaad II wrote: P.S. Strangely, a dolmen turned into an obelisk. Gah.
Not sure about the birds, but some other modifications that Vitirr did on his demo map affect all maps. To retur to normal, remove the customized map from your map directory. But you perhaps already knew how these things go...
Avatar image credit: N Lüdimois

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

Unread postby Vlaad II » 15 Feb 2007, 15:32

Pitsu wrote:
Vlaad II wrote: P.S. Strangely, a dolmen turned into an obelisk. Gah.
Not sure about the birds, but some other modifications that Vitirr did on his demo map affect all maps. To retur to normal, remove the customized map from your map directory. But you perhaps already knew how these things go...
Yes, I was aware the changes might affect other files, but was keeping my fingers crossed... Blah. Surprisingly enough, two customized Military Posts haven't messed up anything, but the birds did. Perhaps it's only map properties...?

I'll have to compare notes with Vitirr.

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

Unread postby Marzhin » 19 Feb 2007, 11:20

Marzhin wrote:Sorry if it has already been asked, but does the "Music" parameter in the Map Properties actually works and if it does, how ?
Nobody answered my question yet, so if one of you knows and has time to enlighten me on this matter...

King Imp
Swordsman
Swordsman
Posts: 570
Joined: 06 Jan 2006

Unread postby King Imp » 19 Feb 2007, 16:30

This is a problem I have had since the editor was released and someone said that all you had to do was click the Soft button and then the Fills would cover 100% of the area you indicated.

Well, two problems. First off, the only Soft button is in the Tiles tab, not the Fills tab and second, I clicked Soft, set it to different strengths and then tried to fill an area. It is still not covering the entire area. I could still walk through with a hero if I so chose to.

How do you get this thing to actually fill all 100% of the area you indicated? And no, that Mask option to block things, even though you see an opening is not an option for what I need to do.

grindcardoso
Leprechaun
Leprechaun
Posts: 7
Joined: 12 Feb 2007
Location: Brazil

Unread postby grindcardoso » 22 Feb 2007, 15:22

Well, I was very excited about the possibility of making my own campaign. I´ve followed all the instructions posted by Neckie on http://elrath.com/forums/index.php?showtopic=615, but guess what, it didn´t work.
I put all my map files and the campaign files in the "C:\Program Files\Ubisoft\Heroes of Might and Magic V\Mods" folder, but still cannot see my map when trying to assign it as a campaign map. Here:
http://img133.imageshack.us/my.php?imag ... on2eb7.jpg

My "Campaign" is not able to "see" my maps, can´t choose them. I´ve tried to contact Neckie as well as registering on Elrath.com forum to reach him, both unsucessfully.
Can anyone give me a hand on this? Could anyone make a campaign?
Thanks in advance.[/img]
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Unread postby myythryyn » 23 Feb 2007, 21:06

you might want to wait until the next patch comes out, i have heard that it will finally support making campaigns.

of course, who knows when nival will ever release that patch, or if the campaign editor will even work properly:)


i have a question too.

im trying to use the settownbuildinglimit command.

first i use the transform town spell and turn a town into a necropolis.
by doing this, all existing buildings are destroyed, and the newly transformed town has no structures.

what i want is for the newly transformed town to already have an undead converter.

so i used this command
SetTownBuildingLimitLevel( "town", TOWN_BUILDING_SPECIAL_2, 1);
im actually not even sure if town special 2 is the right code for undead converter, since none of the codes match.

i even tried putting a value of "2" instead of "1", but no matter what i do, the undead converter never gets built.

anyone know what i should do?

grindcardoso
Leprechaun
Leprechaun
Posts: 7
Joined: 12 Feb 2007
Location: Brazil

Unread postby grindcardoso » 25 Feb 2007, 01:18

I think I´ve made something stupid, people.
You know when you browse in the toolbar where there are the "objects" to be put on the map´s surface? I don´t know what I did wrong, but, well the "objects" in the toolbar are gone... as simple as that, nothing appears on the right side of the screen anymore. Have anyone experienced this before? If yes, please tell me what is to be done to fix it.
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem

Neckie
Peasant
Peasant
Posts: 67
Joined: 05 Oct 2006
Location: Quebec, Canada

Unread postby Neckie » 25 Feb 2007, 16:58

@myythryyn : That command is to set the town building level required to build a certain building in a given town. But in the documentation it says it can't be lower than the usual one.

You would like to build a building... but its impossible given the script functions we have. If you have empty space on your map you could try the old move town trick. (Put it somewhere then move it instead of transform and change the town owner from neutral to the good player ID) Dunno if it would work but worth trying I think.

@grindcardoso : About the campaign thing, you can pm me if you want to contact me. I'll look at it next week. About the editor thing I think all you have to do is go to (in the menu):
View -> Tools Panel

King Imp
Swordsman
Swordsman
Posts: 570
Joined: 06 Jan 2006

Unread postby King Imp » 25 Feb 2007, 19:34

King Imp wrote:This is a problem I have had since the editor was released and someone said that all you had to do was click the Soft button and then the Fills would cover 100% of the area you indicated.

Well, two problems. First off, the only Soft button is in the Tiles tab, not the Fills tab and second, I clicked Soft, set it to different strengths and then tried to fill an area. It is still not covering the entire area. I could still walk through with a hero if I so chose to.

How do you get this thing to actually fill all 100% of the area you indicated? And no, that Mask option to block things, even though you see an opening is not an option for what I need to do.


Based on the no responses, I'm assuming there isn't a way to actually do this. Am I right or wrong?

grindcardoso
Leprechaun
Leprechaun
Posts: 7
Joined: 12 Feb 2007
Location: Brazil

Unread postby grindcardoso » 02 Mar 2007, 15:34

Gurizada ("hey guys" in portuguese),

Another question for the experts in mapmaking:

On the map I have three bridges, and a stack of Pit Lords hidden somewhere, I want to fortify the bridges also with Pit Lords, but trick are two:

1) The bridge keepers must have the same amount of creatures of the hidden Pit Lord;
2) By the day 2 and 4 of each week I want to increase the number of the hidden Pit Lord (plus 1 each two days);

Can anyone help me?
Many thanks!
"Glória do desporto nacional ó Internacional que eu vivo a exaltar" - Sport Club Internacional Anthem


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 4 guests