[H5 EDITOR] Troubleshooting topic
(rdeford quote)
Try it and keep me posted. Don't worry about pestering me. It is one of my passions to have more people doing scripted H5 maps. My reward will be seeing you post a new map to the CH archives.[/quote]
rdeford,
I compledted two scripts on a map. If I only use the first one, the map is OK, but when adding the second script I am getting an error message as follows:
(Script)ERROR: expected;
last token read `,' at line 19 in string "DoString script"
Script failed, unknown error
The script is as follows:
Trigger(NEW_DAY_TRIGGER, "day1");
function day1()
if(GetDate( DAY_OF_WEEK ) == 3) then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
Trigger(NEW_DAY_TRIGGER, "day2");
function day2()
if(GetDate( DAY_OF_WEEK ) == 5)then
car=(CARAVAN..GetDate(DAY);
CreateCaravan(car,Player_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car),180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
Can you tell me what the error message means and what do I need to do to do a "DoString script" as the error message suggest. Secondly, what is wrong with the script as it is written?
Try it and keep me posted. Don't worry about pestering me. It is one of my passions to have more people doing scripted H5 maps. My reward will be seeing you post a new map to the CH archives.[/quote]
rdeford,
I compledted two scripts on a map. If I only use the first one, the map is OK, but when adding the second script I am getting an error message as follows:
(Script)ERROR: expected;
last token read `,' at line 19 in string "DoString script"
Script failed, unknown error
The script is as follows:
Trigger(NEW_DAY_TRIGGER, "day1");
function day1()
if(GetDate( DAY_OF_WEEK ) == 3) then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
Trigger(NEW_DAY_TRIGGER, "day2");
function day2()
if(GetDate( DAY_OF_WEEK ) == 5)then
car=(CARAVAN..GetDate(DAY);
CreateCaravan(car,Player_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car),180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
Can you tell me what the error message means and what do I need to do to do a "DoString script" as the error message suggest. Secondly, what is wrong with the script as it is written?
ransomdl
Warlock
Warlock
First, you cannot have two trigger(NEW_DAY_TRIGGER, " ")sransomdl wrote:
Trigger(NEW_DAY_TRIGGER, "day1");
function day1()
if(GetDate( DAY_OF_WEEK ) == 3) then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
Trigger(NEW_DAY_TRIGGER, "day2");
function day2()
if(GetDate( DAY_OF_WEEK ) == 5)then
car=(CARAVAN..GetDate(DAY);
CreateCaravan(car,Player_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car),180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
?
second, look carefully at these odd lines:
Code: Select all
SetObjectRotation(car),180);
Code: Select all
car=(CARAVAN..GetDate(DAY);
Code: Select all
Trigger(NEW_DAY_TRIGGER, "days");
function days()
day1;
day2;
end;
function day1()
if GetDate( DAY_OF_WEEK ) == 3 then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
function day2()
if GetDate( DAY_OF_WEEK ) == 5 then
car=("CARAVAN"..GetDate(DAY));
CreateCaravan(car,PLAYER_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car,180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
Avatar image credit: N Lüdimois
[quote="Pitsu"][quote="ransomdl"]
?[/quote]
So I would suggest:
[code]
Trigger(NEW_DAY_TRIGGER, "days");
function days()
day1;
day2;
end;
function day1()
if GetDate( DAY_OF_WEEK ) == 3 then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
function day2()
if GetDate( DAY_OF_WEEK ) == 5 then
car=("CARAVAN"..GetDate(DAY));
CreateCaravan(car,PLAYER_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car,180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
[/code][/quote]
I wrote the Script as you suggested and got the following Error message in the console when I started the game:
"Script Error: `=' expected;
last token read: `;' at line 4 in string "DoString script"
Script failed, unnown error
The Script did not activate. Not sure what the error message means and I don't know what to do about "DoString Script", as I have not found this command in your Script Guide, the Practical Editor Manual or in the literature on the "lua" website. The line 4 in the script is the line script reference [day1;].
Any thoughts?
?[/quote]
So I would suggest:
[code]
Trigger(NEW_DAY_TRIGGER, "days");
function days()
day1;
day2;
end;
function day1()
if GetDate( DAY_OF_WEEK ) == 3 then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
function day2()
if GetDate( DAY_OF_WEEK ) == 5 then
car=("CARAVAN"..GetDate(DAY));
CreateCaravan(car,PLAYER_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car,180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
[/code][/quote]
I wrote the Script as you suggested and got the following Error message in the console when I started the game:
"Script Error: `=' expected;
last token read: `;' at line 4 in string "DoString script"
Script failed, unnown error
The Script did not activate. Not sure what the error message means and I don't know what to do about "DoString Script", as I have not found this command in your Script Guide, the Practical Editor Manual or in the literature on the "lua" website. The line 4 in the script is the line script reference [day1;].
Any thoughts?
ransomdl
Warlock
Warlock
My fault, the first function should be:ransomdl wrote:
The Script did not activate. Not sure what the error message means and I don't know what to do about "DoString Script", as I have not found this command in your Script Guide, the Practical Editor Manual or in the literature on the "lua" website. The line 4 in the script is the line script reference [day1;].
Any thoughts?
Code: Select all
function days()
day1();
day2();
end;
"DoString" refers to the action where the script file is read by computer. The error message you got means: "Could not make any sensible command out of line 4. Last character that was read is ';', but for the line to make sense, it should be '='. "
It expects '=', because it saw day1 as a variable not as a command.
Avatar image credit: N Lüdimois
Pitsu,Pitsu wrote:
My fault, the first function should be:Code: Select all
function days() day1(); day2(); end;
Re-configured code to read as follows:
Code: Select all
function days()
day1;
day2;
end;
Trigger(NEW_DAY_TRIGGER, "days");
function day1()
if GetDate( DAY_OF_WEEK ) == 3) then
GiveExp("Shadwyn", 30000);
Trigger(NEW_DAY_TRIGGER, nil);
end;
end;
function day2()
if GetDate( DAY_OF_WEEK ) == 5 then
car=("CARAVAN"..GetDate(DAY));
CreateCaravan(car,PLAYER_1,GROUND,93,73,GROUND,73,62);
sleep(2);
SetObjectRotation(car,180);
AddObjectCreatures(car,CREATURE_ASSASSIN, 100);
end;
end;
(Script)ERROR: `=' expected;
last token read: `;' at line 2 in string "DoString script"
Script failed, unknown error
The line 2 reference is "day1();"
If I undestand your information of "DoString script" it is expecting an `=' sign after line 2, but that doesn't make sense as compared to the way your script for Ruinsindesert did for "function day1()". Any other thoughts on the way the script may be improperly structured?
Additionally, why when I enter the code in the message setup to you, does it utilize the tabbed spacing from the copied and pasted script, but shows up in the final posted message without the tab structure?
ransomdl
Warlock
Warlock
Is line two day1(); or day1; ? In the code that you provided you still have the day1;ransomdl wrote:
(Script)ERROR: `=' expected;
last token read: `;' at line 2 in string "DoString script"
Script failed, unknown error
The line 2 reference is "day1();"
day1 - is understood as a variable and it wants you to give it a value like day1 = 777If I undestand your information of "DoString script" it is expecting an `=' sign after line 2, but that doesn't make sense as compared to the way your script for Ruinsindesert did for "function day1()". Any other thoughts on the way the script may be improperly structured?
day() - is understood as a callup for a function. This version you should use in current case
You had BBCode disabled. Check your profile to see whether it is disabled there. But when you write a message, right below the textbox are several checkboxes. Make sure the first one is unchecked.Additionally, why when I enter the code in the message setup to you, does it utilize the tabbed spacing from the copied and pasted script, but shows up in the final posted message without the tab structure?
Avatar image credit: N Lüdimois
@ ransomdl
From what I can see in the code you posted, Pitsu is exactly correct when he tells you:
In other words, when using a function name as a command, as you are doing in line 2, you must have the () as in day1(). Without the () the compiler thinks it is a variable and expects you to be assigning a value to it with the = assignment operator.
From what I can see in the code you posted, Pitsu is exactly correct when he tells you:
day1 - is understood as a variable and it wants you to give it a value like day1 = 777
day() - is understood as a callup for a function. This version you should use in current case
In other words, when using a function name as a command, as you are doing in line 2, you must have the () as in day1(). Without the () the compiler thinks it is a variable and expects you to be assigning a value to it with the = assignment operator.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
Pitsu,
rdeford,
Thank you both for your input. I corrected the Script as suggested and in testing the script, it worked properly. I have played with how to close the function with a given date and finally resolved this part of the script.
Now I am working on a script function that will give resources to a specific Player, but have not been successful in using "SetPlayerResources" to achieve this objective.
Any suggestion of how to give a Player specific resources at a given time?
rdeford,
Thank you both for your input. I corrected the Script as suggested and in testing the script, it worked properly. I have played with how to close the function with a given date and finally resolved this part of the script.
Now I am working on a script function that will give resources to a specific Player, but have not been successful in using "SetPlayerResources" to achieve this objective.
Any suggestion of how to give a Player specific resources at a given time?
ransomdl
Warlock
Warlock
Here are actual working functions from the script of the map I'm currently working on.ransomdl wrote: Now I am working on a script function that will give resources to a specific Player, but have not been successful in using "SetPlayerResources" to achieve this objective.
Any suggestion of how to give a Player specific resources at a given time?
First here is a function that uses SetPlayerResource():
Code: Select all
function payGold(amt)
local pGold = GetPlayerResource(PLAYER_1, GOLD);
pGold = pGold - amt;
if pGold >= 0 then
SetPlayerResource(PLAYER_1, GOLD, pGold);
Play2DSound( "/Sounds/_(Sound)/Interface/Ingame/Buy.xdb#xpointer(/Sound)");
else
MessageBox(path.."notEnoughGold.txt", "");
end;
end;
Code: Select all
function dawn()
replinishTraders(); -- replenish trader resource amounts
shutDownMinesNW(); -- shutdown mines with no workers
shutDownFeedersND();-- shutdown feeders when no days of service remain
attackFeedersNI(); -- attack a feeder if no insurance policy is in force
shutDownMinesNF(); -- shutdowm mines when there arn't enough active feeders
generateWorkers(); -- generate workers in Union Hall based on active feeders
setInsuranceAmt(); -- ratchet premiums upwards
checkInsurance(); -- inform player when policy expires
sabotageMinesAI(); -- AI players sabotage mines periodically to make things fun
attackMinesAI(); -- AI players send claim jumpers periodically to make things fun
lowerMoral(); -- worker moral deteriorates daily
holdFestival(); -- raise worker moral if festival has been purchased
workerTurnover(); -- workers quit because of low moral
bankIntrestCk(); -- see if player earns any intrest
getP1BestHeroLevel(); -- save player's best hero level
upgradeAIheroes(); -- level up the best AI hero for each AI player to approach P1 best hero level
end;
Trigger(NEW_DAY_TRIGGER, "dawn");
Code: Select all
function getP1BestHeroLevel()
local day = GetDate(DAY_OF_WEEK)
local p1Heroes = GetPlayerHeroes(PLAYER_1);
local idx = length(p1Heroes) - 1;
local hLevel = 0;
local hName = "";
local bestLevel =0;
local bestName = "";
if day == 2 then
for i=0, idx do
hName = hName..p1Heroes[i];
hLevel = GetHeroLevel(hName);
if hLevel > bestLevel then
bestLevel = hLevel;
bestName = hName;
end
hName = "";
end
if bestLevel > bestP1HeroLevel then
bestP1HeroLevel = bestLevel;
bestP1HeroName = bestName;
end;
end;
end;
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
rdeford,
I was researching some of the scripts from the TotE maps and found this script function used and tried the concept in my own map script and it worked better than anything I had tried and it is pretty simple. Thought I would share it with you.
The script runs for two weeks and then I 'nil' the function and it stops.
Thanks for your help and your samples scripts. I am sure I will be able to make use of them as I am learning the scripting process.
Is there a simple way to script a "Message" that will play on the screen after a function is completed without having to develop a separate text in wordpad. Then inserting the .txt file into the map file before zipping the file and converting it to .h5m and then putting back into the maps folder?
I was researching some of the scripts from the TotE maps and found this script function used and tried the concept in my own map script and it worked better than anything I had tried and it is pretty simple. Thought I would share it with you.
Code: Select all
function day3()
if GetDate( DAY_OF_WEEK ) == 6 then
SetPlayerResource(PLAYER_1,GOLD,GetPlayerResource(PLAYER_1,GOLD)+10000);
SetPlayerResource(PLAYER_1,CRYSTAL,GetPlayerResource(PLAYER_1,CRYSTAL)+10);
SetPlayerResource(PLAYER_1,SULFUR,GetPlayerResource(PLAYER_1,SULFUR)+10);
end;
end;
Thanks for your help and your samples scripts. I am sure I will be able to make use of them as I am learning the scripting process.
Is there a simple way to script a "Message" that will play on the screen after a function is completed without having to develop a separate text in wordpad. Then inserting the .txt file into the map file before zipping the file and converting it to .h5m and then putting back into the maps folder?
ransomdl
Warlock
Warlock
No, you have to have a text resource file in order to display a message box. But, it sounds like you are creating resource files the hard way. Download the new version 2 of the H5 Scripting guide that we just made available. It tells you the correct method of creating a text resource file, which is easier than you have been doing with NotePad. It also covers how to display variables in your text files, and I know you will like to do that once you learn how.ransomdl wrote: Is there a simple way to script a "Message" that will play on the screen after a function is completed without having to develop a separate text in wordpad. Then inserting the .txt file into the map file before zipping the file and converting it to .h5m and then putting back into the maps folder?
BTW my maps often have 80, 90, or 100+ resource text files. I can do them in my sleep nowadays.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
rdeford,
Thank you for your reply. I just downloaded Version 2.0 of the Scripting Guide and at first look, you have made a lot of changes that I am anxious to review, specifically the section on creating and referring to text files.
The fans of Heroes MM V should be very greatfull for yours and Pitsu contributions to this Scripting Guide.
Thank you for your reply. I just downloaded Version 2.0 of the Scripting Guide and at first look, you have made a lot of changes that I am anxious to review, specifically the section on creating and referring to text files.
The fans of Heroes MM V should be very greatfull for yours and Pitsu contributions to this Scripting Guide.
ransomdl
Warlock
Warlock
TotE Map Editing
rdeford,
Nov 08, 2007, Apocalypse responded to your posting for converting maps into .h5m format. The posting was a proceedure to change the profile of the editor_a1.cfg file and then,how to open the editor to view the original game maps.
I have followed the process and have opened up the original maps from TotE. After making changes to the maps, I have saved the maps under the "Resource" tab using the "Save All" command. Then when I open the map in the TotE game play the changes are not there. Reopening the Map Editor and opening the map that I save the edited changes, the changes are still in the map, but don't show up in the game.
Any thoughts on this? I have extracted the map files from other versions of Heroes MM V and configured them to .h5m format and then edited them in the Editor then converted them back to the original format and re-zipped them into the data.pak files to play with the edited changes in the game. But, in the TotE version of the downloaded game, when the data.pak file is extracted with zip, the Map folders with the map files are not visible. So I am not able to find the TotE original maps even when extracted.
Nov 08, 2007, Apocalypse responded to your posting for converting maps into .h5m format. The posting was a proceedure to change the profile of the editor_a1.cfg file and then,how to open the editor to view the original game maps.
I have followed the process and have opened up the original maps from TotE. After making changes to the maps, I have saved the maps under the "Resource" tab using the "Save All" command. Then when I open the map in the TotE game play the changes are not there. Reopening the Map Editor and opening the map that I save the edited changes, the changes are still in the map, but don't show up in the game.
Any thoughts on this? I have extracted the map files from other versions of Heroes MM V and configured them to .h5m format and then edited them in the Editor then converted them back to the original format and re-zipped them into the data.pak files to play with the edited changes in the game. But, in the TotE version of the downloaded game, when the data.pak file is extracted with zip, the Map folders with the map files are not visible. So I am not able to find the TotE original maps even when extracted.
ransomdl
Warlock
Warlock
@ ransomdl
I did not ever use the procedure. Instead, I downloaded the maps from the site where they were posted. (I forget the location, but it's given in that thread where you got the procedure.)
While I don't actually know the answer to your question, I suspect that the original map is still in the game storage directory and that the game opens it instead of your modified map. I have a hunch that you will have to delete the original map or put it into a different directory.
I did not ever use the procedure. Instead, I downloaded the maps from the site where they were posted. (I forget the location, but it's given in that thread where you got the procedure.)
While I don't actually know the answer to your question, I suspect that the original map is still in the game storage directory and that the game opens it instead of your modified map. I have a hunch that you will have to delete the original map or put it into a different directory.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
rdeford,rdeford wrote:@ ransomdl
I did not ever use the procedure. Instead, I downloaded the maps from the site where they were posted. (I forget the location, but it's given in that thread where you got the procedure.)
While I don't actually know the answer to your question, I suspect that the original map is still in the game storage directory and that the game opens it instead of your modified map. I have a hunch that you will have to delete the original map or put it into a different directory.
I looked in the Game Save Folder and only the saves are there for games played. This particular campaign map from TotE for "A Murder of Crow's" has not been played yet. I am unable to delete the original map because unlike other versions of Heroes, when you unzip the "data.pak" files and extracted the files, the files for the maps were put into a folder for the different type of maps; ie. Scenario Maps, Multiplayer Maps and SingleMission Maps.
With the TotE version, when you unzip the "data.pak" files and extract the files, there are no folders for the different type maps and no map files are visible. The Map Editor shows the routing for the Campaign Map A2C0M0 which is known as "A Murder of Crow's" as follows: AdvMapDesc:/Maps/Scenarios/A2C0M0/Map.xdb#xpointer(/AdvMapDesc)
I have done a search and can not find any reference to "AdvMapDesc" on the hard drive including a search of all hidden folders which I have marked to be shown at all times as well as file extensions.
I am baffeled at this point of where to find the maps or whether you can use Editor to actually modify the game maps that are not in the Map folder with an .h5m extension.
If you have any ideas or know of someone in the Heroes Round Table, I would appreciate the help. I also downloaded the maps from the site your mentioned and have no problem opening those files with .h5m extension and making changes. These can be done within the Maps folder and opened within the game. The issue is the original maps opened in Editor and why the changes to these maps do not show the changes in the Game play.
ransomdl
Warlock
Warlock
OK, I did not express myself very well, namely because I don't know enough. But, I was not referring the the Saved games directory. Instead I was referring to the internal H5 maps. Basically, I think you will have to unpack the Data folder in the H5 TOTE directory to get at the original maps. On my computer, that director is located here:
C:\Program Files\Ubisoft\Heroes of Might and Magic V - Tribes of the East\data
It is a packed directory so that's why you couldn't find the map with the Windows search facility. The map you modified is actually located a little deeper:
C:\Program Files\Ubisoft\Heroes of Might and Magic V - Tribes of the East\data\Maps\Scenario
Again, I'm too ignorant to be giving the advice that follows, and I have NOT tried it out on my computer, so take it with that proviso.
I would try renaming the packed data file, "packedData" for example. Then unpack it and rename the unpacked directory "data". Then, remove the original map from that directory and then repack it. The result should be a new packed "data" directory without the original map, and an unchanged packed directory named packedData. Then, place your modified map in the regular Maps directory where you place other custom maps. Launch the game, which should ignore the directory you renamed "packedData", and you should see your custom map from the Maps directory. (It appears to be a Scenario map, by the way, so take that into account.)
Anyway, if this procedure doesn't work, you have the original directory as a backup. Simply delete the new "data" directory, and rename the "packedData" directory as "data" and you will be back where you started.
Calling all Experts -- please help. I am not worthy.
C:\Program Files\Ubisoft\Heroes of Might and Magic V - Tribes of the East\data
It is a packed directory so that's why you couldn't find the map with the Windows search facility. The map you modified is actually located a little deeper:
C:\Program Files\Ubisoft\Heroes of Might and Magic V - Tribes of the East\data\Maps\Scenario
Again, I'm too ignorant to be giving the advice that follows, and I have NOT tried it out on my computer, so take it with that proviso.
I would try renaming the packed data file, "packedData" for example. Then unpack it and rename the unpacked directory "data". Then, remove the original map from that directory and then repack it. The result should be a new packed "data" directory without the original map, and an unchanged packed directory named packedData. Then, place your modified map in the regular Maps directory where you place other custom maps. Launch the game, which should ignore the directory you renamed "packedData", and you should see your custom map from the Maps directory. (It appears to be a Scenario map, by the way, so take that into account.)
Anyway, if this procedure doesn't work, you have the original directory as a backup. Simply delete the new "data" directory, and rename the "packedData" directory as "data" and you will be back where you started.
Calling all Experts -- please help. I am not worthy.
rdeford, Mage Of Soquim
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
“Forgiving and being forgiven, loving and being loved,
living and letting live, is the simple basis for it all."
Ernest Holmes 1984
rdeford,
After your response, I went back and set aanother copy of the original data.pak, text.pak, sound.pak and soundfx.pak files on a separate drive.
After extracting each of the .pak files into seperate folders on the separate drive with winzip, as I have done with all previous versions of Heroes V and Heroes V Hof, I examined all of the folders specifically the data files.
In the extracted data files, there previously have been a series of folders of which one was named "Maps" and within that folder were a number of folders such as:
Multiplayer, Scenario and SingleMission
Within each of these folders were a series of folders such as in Scenario:
A1C1M1, A1C1M2, A1C1M3, A1C1M4 and A1C1M5 of which held files including map.xdb and map-tag.xdb which were the map and the reference to the map for that particular scenario (mission).
But in TotE data.pak, there are no folder "Maps" and therefore there are no additional folders for "Multiplayer, Scenario and SingleMission". So the maps are not visible even unpacked.
While we can see the Map structure in the Editor after activating the "AdvMapDesc" feature in the Editor and can make changes in a selected Map and even save the changes, the changes are not visible in the Game.
While I have unpacked the "Maps" in other versions of Heroes V, I am at a loss to understand what Ubisoft has done with the Map folders when the data.pak file is unpacked and extracted.
I am hopeful that someone can help with this problem.
After your response, I went back and set aanother copy of the original data.pak, text.pak, sound.pak and soundfx.pak files on a separate drive.
After extracting each of the .pak files into seperate folders on the separate drive with winzip, as I have done with all previous versions of Heroes V and Heroes V Hof, I examined all of the folders specifically the data files.
In the extracted data files, there previously have been a series of folders of which one was named "Maps" and within that folder were a number of folders such as:
Multiplayer, Scenario and SingleMission
Within each of these folders were a series of folders such as in Scenario:
A1C1M1, A1C1M2, A1C1M3, A1C1M4 and A1C1M5 of which held files including map.xdb and map-tag.xdb which were the map and the reference to the map for that particular scenario (mission).
But in TotE data.pak, there are no folder "Maps" and therefore there are no additional folders for "Multiplayer, Scenario and SingleMission". So the maps are not visible even unpacked.
While we can see the Map structure in the Editor after activating the "AdvMapDesc" feature in the Editor and can make changes in a selected Map and even save the changes, the changes are not visible in the Game.
While I have unpacked the "Maps" in other versions of Heroes V, I am at a loss to understand what Ubisoft has done with the Map folders when the data.pak file is unpacked and extracted.
I am hopeful that someone can help with this problem.
ransomdl
Warlock
Warlock
Im using this script with a "School of Magic" object and I cannot get it to trigger. The script works with a dwelling but not the "School of Magic" object.alavris wrote:I can try. Firstly open object properties tree (of the town which will be captured). To do this, mark by the cursor the town on the map. When it's red, press CTRL+SPACE. Now, add name of the town in this tree. It's important to do it here, because done in town properties window will not work. Now in map properties window paste the example code:Bandobras Took wrote:Hmmm . . . can someone provide an example of a function that works when capturing a town so I can compare?Pitsu wrote: Should work. I would double check that the "TestScript" function itself is correct. And the syntax everywhere...
It's all simple, but the trap is when we have to name the town. Remember to do it in right place.Code: Select all
function fun1() MessageBox("Maps/Multiplayer/Alavris 1/wiad1.txt"); end; Trigger(OBJECT_CAPTURE_TRIGGER, "TestTown", "fun1");
.
Can anyone help please?
- Grumpy Old Wizard
- Round Table Knight
- Posts: 2205
- Joined: 06 Jan 2006
- Location: Tower Grump
You don't capture things like schools of magic. You'll need to use an OBJECT_TOUCH_TRIGGER. For example, here is one of the touch triggers in my Shadow Dreams map. This touch script is activated when the Player 1 touches a particular prison.Cyanight wrote: Im using this script with a "School of Magic" object and I cannot get it to trigger. The script works with a dwelling but not the "School of Magic" object.
Can anyone help please?
If you can get your script to work after trying the on touch trigger post your script and tell us exactly what you are trying to get it to do and what it is actually doing.function CyrusRescued()
if GetCurrentPlayer () == whoishuman and GetCurrentPlayer () == PLAYER_1 and academyprison == 0 then
MessageBox(path.."Academy Heroe Rescued.txt");
GiveExp ("Tan", 8000);
humansecondaryheroe = "Tan";
academyprison = 1;
SetObjectiveState ("Rescue Cyrus", OBJECTIVE_COMPLETED,PLAYER_1);
end;
Trigger (OBJECT_TOUCH_TRIGGER, "Cyrus's Prison", nil );
end;
Trigger (OBJECT_TOUCH_TRIGGER, "Cyrus's Prison", "CyrusRescued" );
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."
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."
Who is online
Users browsing this forum: Ahrefs [Bot] and 0 guests