Heroes of Might and Magic Community
visiting hero! Register | Today's Posts | Games | Search! | FAQ/Rules | AvatarList | MemberList | Profile


Age of Heroes Headlines:  
5 Oct 2016: Heroes VII development comes to an end.. - read more
6 Aug 2016: Troubled Heroes VII Expansion Release - read more
26 Apr 2016: Heroes VII XPack - Trial by Fire - Coming out in June! - read more
17 Apr 2016: Global Alternative Creatures MOD for H7 after 1.8 Patch! - read more
7 Mar 2016: Romero launches a Piano Sonata Album Kickstarter! - read more
19 Feb 2016: Heroes 5.5 RC6, Heroes VII patch 1.7 are out! - read more
13 Jan 2016: Horn of the Abyss 1.4 Available for Download! - read more
17 Dec 2015: Heroes 5.5 update, 1.6 out for H7 - read more
23 Nov 2015: H7 1.4 & 1.5 patches Released - read more
31 Oct 2015: First H7 patches are out, End of DoC development - read more
5 Oct 2016: Heroes VII development comes to an end.. - read more
[X] Remove Ads
LOGIN:     Username:     Password:         [ Register ]
HOMM1: info forum | HOMM2: info forum | HOMM3: info mods forum | HOMM4: info CTG forum | HOMM5: info mods forum | MMH6: wiki forum | MMH7: wiki forum
Heroes Community > MapHaven Guild > Thread: HOMM V Tribes of the East
Thread: HOMM V Tribes of the East
rudlfax
rudlfax

Tavern Dweller
posted December 15, 2007 11:45 AM

HOMM V Tribes of the East

Hello all,

i was reading through this forum, but haven't found any clue to whether my map editor doesn't do what he is supposed to. As the title states, i got hold of Tribes of the East, and a Map editor comes with it, so i set out to create my own campaign. Having little troubles at the beginning i figured out most of the design problems, and now i got a map i'm pleased with. Since it shall be the start for a campaign, of course some storyline is needed and some things to happen during the lengthy course. So i took a look at the scripting, didn't get a thing, and downloaded JackdawJake of rdeford Mage of Soqium n took a look at his script. seemed easy enuff, so i started copying n editing. After several attempts now i have the feeling the game doesnt react at my script at all. Even the simplest thing:

-- prolog
MessageBox(path.."authorsNote.txt");
MessageBox(path.."dayOneOpener.txt");
sleep(4);
does not work. Sure enough i have tried to give the path in every possible way and extension, also directly in the messagebox order. Other problems i'm not able to tackle are region settings (SetRegionBlocked("bypassingSeer", not nil, PLAYER_1); does nothing), neither do setting for the seer hut anything (noone there every time). I havent even come so far to see whether the automated reclaim of the town does work, since its a little further on the map.

Since rdeford apparently used HOMM V for his map creation, i suspect i got hold of a different map editor version, still, his version works, but mine doesnt, and i see no aparent difference. Can anyone help me along with this thing, its driving me a little nuts?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
roy-algriffin
roy-algriffin


Supreme Hero
Chocolate ice cream zealot
posted December 15, 2007 05:52 PM

Well i know scripting in heroes 5 is done in something called LUA . Nothing else though
But perhaps this will help?
____________
"Am i a demon? No im a priest of the light! THE BLOODY RED LIGHT"

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 16, 2007 01:39 AM

i think yes will run n try it out immediately. Sorry, i didnt expect to find it in this place. Thx for info.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 17, 2007 03:55 AM

well, i followed the tutorial step by step. I had overlooked you could add the messagebox contents via the resource link, so i have done that.
name: dayoneopener
file: "maps/singlemissions/mapname/dayoneopener.txt")

I gave it a name too. I want one message to show up at start. so i put in:

MessageBox ("maps/singlemissions/mapname/dayoneopener.txt") - didnt work, so i tried

MessageBox ("maps/singlemissions/mapname/dayoneopener"), since i named it without .txt, then i also tried

MessageBox ("dayoneopener") and

MessageBox (dayoneopener).

Result: nothing happens, no messagebox is appearing.


Another thing on a sidenote, i tried the PWL thing as described in the practical editor manual, doesnt work either, though i tried both graphical formats the game is supposed to accept (tried with 1024X1024 as well as 1024x768 since i suspected a type-o).
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
roy-algriffin
roy-algriffin


Supreme Hero
Chocolate ice cream zealot
posted December 17, 2007 05:35 AM

I guess you should messege Kronos1000 since he wrote it.
You can click on the HC messenger button to see if you can find him when hes online.  Or if hes not find one of his posts and click on the button under it.
____________
"Am i a demon? No im a priest of the light! THE BLOODY RED LIGHT"

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 17, 2007 08:50 AM

i'll try to catch him. thx for ur help though
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 17, 2007 09:29 AM

one thing to add, which might be important, is, that i'm trying to build a dwarf campaign.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
skullman
skullman


Famous Hero
banned
posted December 17, 2007 04:05 PM

and you don't know how
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
pitsu
pitsu


Adventuring Hero
posted December 17, 2007 04:51 PM
Edited by pitsu at 16:54, 17 Dec 2007.

First make sure that you have Single Player map, since no scripts are allowed in multiplayer type of maps.

Quote:

MessageBox ("maps/singlemissions/mapname/dayoneopener.txt") - didnt work, so i tried



mapname must be replaced with the name of your map + paths are case sensitive, so watch your case.

my own scripting guide somewhere there: http://www.celestialheavens.com/viewpage.php?id=567 (written long ago and a few things would need update, but my interest in H5 is too low to bother)
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 18, 2007 03:14 AM
Edited by rudlfax at 03:38, 18 Dec 2007.

it is a singleplayer map, and the mapname is correct (even though i have not written it down here)

edit/

nice guide, will certainly come in handy for me later, for now i'm still at loss though why even the simple messagebox without function or anything doesn't work
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
pitsu
pitsu


Adventuring Hero
posted December 18, 2007 10:09 AM

Use a code for example

OpenCircleFog (0, 0, 0, 9999, GetCurrentPlayer())
OpenCircleFog (0, 0, 1, 9999, GetCurrentPlayer())

(removes fog of war) to verify that the scripts run at all. If it does not run, it is still either defined as multiplayer or the editor has created multiple script files and runs wrong one.

If these commands run, your reference to message box text must be wrong. If you have the text file at right place, the most common error is mistypes in path/file name. (Make sure it is "Maps/SingleMissions" not "maps/singlemissions" etc).

Enabling console and seeing the error message is good for debugging as well.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 18, 2007 10:59 AM

ok, copied the lines for fog of war removal in as they are, right the first thing in the script. strangely, the script is saved in a file thats called MapScript.1, while there still is a file MapScript. so i copied the content over, so that the same script is present in both file - result: nothing happens, apparently the script gets ignored as it is. the map is a single player scenario map, it was started as one, also appears as one in the game when u select the maps and is described as one. all the links to other files are correct, i checked.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rudlfax
rudlfax

Tavern Dweller
posted December 31, 2007 09:10 AM

just for an update, i finally came around to do one more testing. i deleted everything except the remove fog order, n see it works. So apparently there shouldn't be any mistake in the script, otherwise it doesnt work at all - which makes it a little tedious to test through. I dunno when i will have time to do exactly that, but hope i'll be able to finish it nevertheless. Thx to the ppl helping me.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
DarkShadow
DarkShadow


Legendary Hero
Cerise Princess
posted January 13, 2008 06:53 PM

Quote:
Well i know scripting in heroes 5 is done in something called LUA . Nothing else though
But perhaps this will help?
LUA scripting ?if it really is its strangest form of LUA scripting i have ever seen.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
rdeford
rdeford


Known Hero
Wyld Mapper
posted January 15, 2008 10:57 PM

Quote:
just for an update, i finally came around to do one more testing. i deleted everything except the remove fog order, n see it works. So apparently there shouldn't be any mistake in the script, otherwise it doesnt work at all - which makes it a little tedious to test through. I dunno when i will have time to do exactly that, but hope i'll be able to finish it nevertheless. Thx to the ppl helping me.


One more thing to try is to enable the console (as described in Pitsu's Guide). Then, go ahead and start to play your map with the game, but open the console screen before you move or do anything. If you see any error message, that is likely the reason your script is not running.

You simply must go back and forth between the editor and the game making changes to the scrip each time until you can get the game to "compile" your script without any errors.

Then, of course, you have to test each function from within the game while watching the console screen and go back to the editor change the script until each function runs without errors and does what you wish it to do.

You can use the print() function to display information on the console screen. Embedding print() functions inside your home-made functions to display variable contents, or just simply display short messages to yourself allows you to monitor internal processes inside your own functions to see what they are doing.

Testing and debugging scrips is very tedious. But it is also very rewarding.

I have created scripts the H5, HOF, and the TOE editors. Basically, the core functions for the scrip are all the same and the TOE editor will work with the scripts from older versions. However, since each version added new functions the scrips created with a newer version won't necessarily run on an older version if you use any of the new functions.

If you are tired of struggling, send me your map as an attachment to an email message. I will get the script working and send it back to you with a report on what I had to do and why I did it.



____________
-------------
Mage of Soquim

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
rdeford
rdeford


Known Hero
Wyld Mapper
posted January 15, 2008 11:43 PM
Edited by rdeford at 23:45, 15 Jan 2008.

Quote:
Hello all,

i was reading through this forum, but haven't found any clue to whether my map editor doesn't do what he is supposed to. As the title states, i got hold of Tribes of the East, and a Map editor comes with it, so i set out to create my own campaign. Having little troubles at the beginning i figured out most of the design problems, and now i got a map i'm pleased with. Since it shall be the start for a campaign, of course some storyline is needed and some things to happen during the lengthy course. So i took a look at the scripting, didn't get a thing, and downloaded JackdawJake of rdeford Mage of Soqium n took a look at his script. seemed easy enuff, so i started copying n editing. After several attempts now i have the feeling the game doesnt react at my script at all. Even the simplest thing:

-- prolog
MessageBox(path.."authorsNote.txt");
MessageBox(path.."dayOneOpener.txt");
sleep(4);
does not work. Sure enough i have tried to give the path in every possible way and extension, also directly in the messagebox order. Other problems i'm not able to tackle are region settings (SetRegionBlocked("bypassingSeer", not nil, PLAYER_1); does nothing), neither do setting for the seer hut anything (noone there every time). I havent even come so far to see whether the automated reclaim of the town does work, since its a little further on the map.

Since rdeford apparently used HOMM V for his map creation, i suspect i got hold of a different map editor version, still, his version works, but mine doesnt, and i see no aparent difference. Can anyone help me along with this thing, its driving me a little nuts?


You tried to use: MessageBox(path.."authorsNote.txt");

In this case, path is a global variable and the .. is the LUA concatenation operator. The concatenation operation creates a text string that is the complete path to the location of a text file that the MessageBox will display. In this case, the effect of concatenation makes the function work as if you wrote this:

MessageBox("Maps/SingleMissions/JackdawJake/authorsNote.txt");

This concatenation is possible because the script assigned the appropriate value to path prior to using it as a parameter in the MessageBox() function. If you are using TOE you may use this assignment:

path = GetMapDataPath();

Otherwise, you may use an assignment similar to this:

path = "Maps/SingleMissions/JackdawJake/";

Of course, none of this will work unless you first create a text file with the message in it. This text file must be crated from within the editor as a resource for your map.

To do that, you begin by displaying the Map Properties Tree on the left side of the editor screen. Expand the Resources list by clikcing on the + next to it. Right click on the SavesFilenames to get the pop up menu and select the Add command. Notice that you have added a blank resource to the list that has two parameters, Name and SaveFileNameFileRef and that each of these parameters has a Value field in the column to the right. (You can drag the column dividers around to display these fields if you don't see them.) Click on the blank Value field for Name and type a name for resource. Click on the blank Value field for the SaveFileNameFileRef, then click the New button. Notice that the editor opens a dialog window. Type a name for your new text file in the field. (I always use the same name as I used for the resource name.) Click the OK button. Notice that the editor opens a text editing window. Go ahead and type the text that you wish the MessageBox() function to display to the player. Click the OK button, then confirm that wish to save the file.

IMPORTANT: You will notice that SaveFileNameFileRef now has a value. That value is the complete path required by the MessageBox() function.

That's it. For the MessageBox() function, you can use the complete path mentioned above, or you can assign a value to a global path variable and use the concatenation operator. The MessageBox() function should work fine either way.

As for SetRegionBlocked("bypassingSeer", not nil, PLAYER_1);

It will work provided you created a region on the map with the Region tool that has the name bypassingSeer spelled exactly that way (case sensitive). The only reason it would not work is that the script has a compile error and the game is not running the script at all. (See my other post.)

-------
Mage of Soquim

 Send Instant Message | Send E-Mail | View Profile | PP | Quote Reply | Link
kssona
kssona

Tavern Dweller
posted June 24, 2021 08:12 AM

Can you all explain a bit about [url=https://www.bestdissertation.com/services/thesis.html]thesis help[/url] to the rest of the class here? If that's the as then we all hope Dissertation Writing is all what you needed to rely upon for the rest of that. You can see that as that was necessary for the whole class in need now.
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
nehasharmajii
nehasharmajii

Tavern Dweller
posted August 20, 2021 04:59 PM

Delhi escort service

I read an article under a comparable title some time earlier, yet this articles quality is a ton better. How you do this..

[url=https://www.escortdelhi.net/mahipalpur-escorts.html] Mahipalpur escorts service[/url]
[url=https://www.escortdelhi.net/noida-escorts.html]Call girls in Noida[/url]

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
nehasharmajii
nehasharmajii

Tavern Dweller
posted August 20, 2021 05:01 PM

Delhi call girls

I surely participating in every single piece of it. It is a remarkable site and lovely offer. I need to favor your heart. Extraordinary work! All of you do a staggering website, and have some exceptional substance. Continue to do amazing.[url=https://www.escortdelhi.net/mahipalpur-escorts.html] Mahipalpur escorts service[/url]
[url=https://www.escortdelhi.net/noida-escorts.html]Call girls in Noida[/url]

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0555 seconds