[H5 EDITOR] Troubleshooting topic

Maps and the art of mapmaking.

Moderator: Moderators

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 3 2006, 14:15

I think I have a problem Houston, Is it just me or is there a problem with
garrison heros.. I garrison heros in enemy towns and now the game can't find my PLAYER_1 hero standing in front of his town once he captures it!
Is there something I need to do in the Map Properties?

Many thanks.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Postby myythryyn » Nov 4 2006, 0:02

meows wrote:I think I have a problem Houston, Is it just me or is there a problem with
garrison heros.. I garrison heros in enemy towns and now the game can't find my PLAYER_1 hero standing in front of his town once he captures it!
Is there something I need to do in the Map Properties?

Many thanks.


you might have to reword your question, im not sure what you are asking, maybe why no one has replied...
you are putting enemy AI garrisoned units in a town, and the player, PLAYER_1, attacks and captures the town killing the garrisoned AI hero, but the game cannot find the players hero afterwards? is that what you are asking?

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 4 2006, 9:28

myythryyn wrote:
meows wrote:I think I have a problem Houston, Is it just me or is there a problem with
garrison heros.. I garrison heros in enemy towns and now the game can't find my PLAYER_1 hero standing in front of his town once he captures it!
Is there something I need to do in the Map Properties?

Many thanks.


you might have to reword your question, im not sure what you are asking, maybe why no one has replied...
you are putting enemy AI garrisoned units in a town, and the player, PLAYER_1, attacks and captures the town killing the garrisoned AI hero, but the game cannot find the players hero afterwards? is that what you are asking?



After rereading my question i can see your point myythryyn, Ok i have 3 cities on the map two with garrisoned Heros and the Main Hero (PLAYER_1) standing in a clearing.. I tested the map and all went well.. Then i added the last 3 towns and garrisoned those heros and when I went to test the map I keep getting the error on start up NO Hero on the map! However if I garrison him (PLAYER_1) then the map plays.
What do I need to do to make the map play without having to Garrison (PLAYER_1)?
THanks all

Najibarr
Leprechaun
Leprechaun
Posts: 21
Joined: 22 Oct 2006

Postby Najibarr » Nov 4 2006, 14:26

If I understand what you said, you have 6 towns on your map.
5 of them get a garrisoned hero at the start of the game
and player 1 have a main hero somewhere on the map but none generated in town.

All you have to do go to "Map Properties" then in "Player properties" and set your things. For player 1, check the main town and choose the right one, don't check "generate hero in town" and choose the main hero.
For other players, choose a main town and check "generate hero in town".

Btw when you edit the properties of your hero on the map (press space after selecting it) in "settings" you must set it to player 1.

If you are talking about script, then its normal the game doesn't find the hero if he is in the garrison of a town as I said in my other post.

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 6 2006, 9:46

Many thanks for the answers.. Yes it worked.!

I have a problem with this though,, and for the life of me I can't find the error.. pulling up the cheat box when the game starts yeilds me nothing..

can any one see what I missed?
here is the code, for that section.
IsInferno1Defeated = 0;
increment = 0;
.
.
.
function CreaturesSpawn()
if GetDate( DAY_OF_WEEK ) == 1 then
if (IsiIferno1Defeated == 0) then
--GenerateMonsters(monsterTypeID, countGroupsMin, countGroupsMax,

countInGroupMin, countInGroupMax)
if GetDifficulty() == DIFFICULTY_HEROIC then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 10, 15, 50*increment, 80*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 5, 10, 30*increment, 50*increment);
GenerateMonsters(CREATURE_GRAND_ELF, 4, 8, 16*increment, 25*increment);
print("Inferno have spawned monsters. Difficulty is HEROIC");
else if GetDifficulty() == DIFFICULTY_HARD then
increment = increment+1;
GenerateMonsters(CREATURE_SPRITE, 8, 12, 40*increment, 60*increment);
GenerateMonsters(CREATURE_WAR_DANCER, 4, 8, 25*increment, 40*increment);
GenerateMonsters(CREATURE_WOOD_ELF, 3, 6, 14*increment, 22*increment);
print("Inferno have spawned monsters. Difficulty is HARD");
else if GetDifficulty() == DIFFICULTY_NORMAL then
GenerateMonsters(CREATURE_PIXIE, 8, 10, 30, 40);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 3, 6, 15, 20);
GenerateMonsters(CREATURE_WOOD_ELF, 1, 2, 8, 10);
print("Inferno have spawned monsters. Difficulty is NORMAL");
else if GetDifficulty() == DIFFICULTY_EASY then
GenerateMonsters(CREATURE_PIXIE, 4, 8, 15, 25);
GenerateMonsters(CREATURE_BLADE_JUGGLER, 2, 4, 10, 14);
print("Inferno have spawned monsters. Difficulty is EASY");
end;
end;
end;
end;
end;
end;
end;
startThread(Day2);
startThread(HeamSurvive);
DifficultyDependencies();
startThread(EnemyGate);
startThread(AIPressingTownOnisac_Empire,"Pelt");
startThread(GiarReinforcements);
SetRegionBlocked("border3BlockAI",true,PLAYER_3);
SetRegionBlocked("Border4BlockAI",true,PLAYER_4);
SetRegionBlocked("gate1",true,PLAYER_3,PLAYER_4);

Najibarr
Leprechaun
Leprechaun
Posts: 21
Joined: 22 Oct 2006

Postby Najibarr » Nov 6 2006, 13:54

Well few things...
First, you wrote IsiIferno1Defeated instead of IsInferno1Defeated.
Then, you don't have to make new if function all the time you can use elseif instead of else if, so that it doesn't need to start a new condition every time.

Here is the code i would use if i were you :

Code: Select all

IsInferno1Defeated = 0;
increment = 0;


function CreaturesSpawn()
 while 1 do
  if GetDate( DAY_OF_WEEK ) == 1 and (IsInferno1Defeated == 0) then
   if GetDifficulty() == DIFFICULTY_HEROIC then
     increment = increment+1;
     GenerateMonsters(CREATURE_SPRITE, 10, 15, 50*increment, 80*increment);
     GenerateMonsters(CREATURE_WAR_DANCER, 5, 10, 30*increment, 50*increment);
     GenerateMonsters(CREATURE_GRAND_ELF, 4, 8, 16*increment, 25*increment);
     print("Inferno have spawned monsters. Difficulty is HEROIC");
   elseif GetDifficulty() == DIFFICULTY_HARD then
     increment = increment+1;
     GenerateMonsters(CREATURE_SPRITE, 8, 12, 40*increment, 60*increment);
     GenerateMonsters(CREATURE_WAR_DANCER, 4, 8, 25*increment, 40*increment);
     GenerateMonsters(CREATURE_WOOD_ELF, 3, 6, 14*increment, 22*increment);
     print("Inferno have spawned monsters. Difficulty is HARD");
   elseif GetDifficulty() == DIFFICULTY_NORMAL then
     GenerateMonsters(CREATURE_PIXIE, 8, 10, 30, 40);
     GenerateMonsters(CREATURE_BLADE_JUGGLER, 3, 6, 15, 20);
     GenerateMonsters(CREATURE_WOOD_ELF, 1, 2, 8, 10);
     print("Inferno have spawned monsters. Difficulty is NORMAL");
   else
     GenerateMonsters(CREATURE_PIXIE, 4, 8, 15, 25);
     GenerateMonsters(CREATURE_BLADE_JUGGLER, 2, 4, 10, 14);
     print("Inferno have spawned monsters. Difficulty is EASY");
   end;
   break;
   else sleep(1)
   end;
 end;
end;

startThread(CreaturesSpawn);


I didn't check if it was working but it should on first view.

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 7 2006, 8:23

THanks it works perfectly now.. I was looking at it so long and hard I could not see the mistakes,,
Many thanks Najibarr

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Postby Sixy » Nov 14 2006, 9:40

Hi!

I started to create a single player map, but when I tried to test it, the "Start map" (or whatever it called, in my version it's hungarian) opcion remained grey. I had the map properties page in the game, but I just couldn't launch the map...

I don't know what the problem could be. If there's someone who's got some time, could you please take a look at it?

The first player's (the human player) main hero is Aleina, she's in the top left of the map. The second (computer) player's main hero is Godric (called Largo de Trallen), he's in the underworld. The goal for the first player would be to open a border guard on the bottom right of the map. (The border guard is there.) The player's haven't got a town, but I checked the option in the Map Properties Tree to make it not a problem.

I just cannot see what's wrong with it... : (

The map is available at here:

http://users.atw.hu/swdotf/princess.zip

Thanks a lot for the help!

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

Postby Pitsu » Nov 14 2006, 9:47

Sixy, did you check that the players are not allied? The editor used automatically turn "teams" active and make all players friends to each other. Peace Eternal!
If you are in game check that the numbers displayed on players flags are not all identical... Sorry, cannot check your map from the computer I am using now.
Avatar image credit: N Lüdimois

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Postby Sixy » Nov 14 2006, 9:55

I've just now noticed it. : ) Yepp, they were allies.

My only problem for now is that if I launch the map, the "Open border guard" objective is automatically completed. I'm not sure I used the right way to add this objective:

1) I choosed the kind: OBJECTIVE_KIND_OPEN_GUARD
2) At the target glance I choosed the target type ADV_TARGET_COORDS
3) I added the coords to the target coords part from the border guard's properties. (So the coords used there.)
4) I added the texts, but left the other parts unchanged.

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Postby myythryyn » Nov 14 2006, 15:50

well here i am again :)
just when i thougth that mabye ive gotten the hang of scripting, the editor succeeds in confusing me again :) and its no doubt something really simple im overlooking.
im trying to use manual objectives
as a test, i have a manual objective named obj1.
it is set to initially visable - false
and initially active - false

then i have a region, region1. when the player enters the region, the objective is supposed to become active and visable.
here is the script i made

function setobjective ()

if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState (obj1, OBJECTIVE_ACTIVE);
SetObjectiveVisible (obj1, true);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;

Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "setobjective" );

but this does not work, the objective does appear in the list when the region is entered....any ideas why?
thxs for any help

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

Postby alavris » Nov 14 2006, 16:07

Try "obj1" instead of obj1. Twice.
.

User avatar
Sixy
Leprechaun
Leprechaun
Posts: 37
Joined: 26 May 2006
Location: Budapest, Hungary

Postby Sixy » Nov 14 2006, 21:54

Oh, well, I solved the problem with the objectives as well... : ) Thanks a lot, by the way!

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 15 2006, 2:16

CreateMob(1,CREATURE_TITAN,4,66,90,1,2,1);

please what do the numbers refer to?
A TITAN is ID 70, and X,Y for location on map is only 2 spaces and one for above ground or below ground.. I can't figure this out.

Najibarr
Leprechaun
Leprechaun
Posts: 21
Joined: 22 Oct 2006

Postby Najibarr » Nov 15 2006, 3:42

This create 4 hostile (mood = 2) titans named "1" at (66,90,1) that will always fight (courage = 1) but you can get all this in the editor documentation

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 15 2006, 6:24

Najibarr wrote:This create 4 hostile (mood = 2) titans named "1" at (66,90,1) that will always fight (courage = 1) but you can get all this in the editor documentation


BLess you Najibarr, yes i read and read the doc's however in this instance
the creatureType had me all confused as I could not find anything that would reference this ID.
Thanks again!

myythryyn
Assassin
Assassin
Posts: 293
Joined: 05 Sep 2006

Postby myythryyn » Nov 15 2006, 7:53

alavris wrote:Try "obj1" instead of obj1. Twice.
.


thxs alavris, its quotes that were needed.
now im having a problem in the next step im trying to do.
here is my script so far

SetObjectiveState ("obj1", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj1", true);

function complete ()

if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState ("obj1", OBJECTIVE_COMPLETE);
SetObjectiveState ("obj2", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj2", true);
DeployReserveHero("Straker", 138, 22, 1);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;

Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "complete" );

what is supposed to happen is that when the map starts, obj1 becomes active and visiable, which it does.
then when player1 enters region1, obj1 completes and obj2 then becomes visable then active and a hero is deployed.
but that does not happen. objective1 does not complete, obj2 does not become visable, and no deployment of hero.
any ideas what ive done wrong?

and another thing that is causing me problems, i had to reinstall my game, and lost my settings for having the console screen open to check for script errors.
all the instructions say is to add this string
bind show_console '`'
somewhere in the input.cfg file, but not exacly where in the file.
i have tried placing that string in a few places, but no luck, i cant open the console with the tilde key.
between what lines do i place bind show_console '`'??

meows
Peasant
Peasant
Posts: 75
Joined: 11 Oct 2006

Postby meows » Nov 15 2006, 9:30

myythryyn wrote:
alavris wrote:Try "obj1" instead of obj1. Twice.
.


thxs alavris, its quotes that were needed.
now im having a problem in the next step im trying to do.
here is my script so far

SetObjectiveState ("obj1", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj1", true);

function complete ()

if GetCurrentPlayer () == PLAYER_1 then
SetObjectiveState ("obj1", OBJECTIVE_COMPLETE);
SetObjectiveState ("obj2", OBJECTIVE_ACTIVE);
SetObjectiveVisible ("obj2", true);
DeployReserveHero("Straker", 138, 22, 1);
Trigger( REGION_ENTER_AND_STOP_TRIGGER, "region1", nil);
end;
end;

Trigger (REGION_ENTER_AND_STOP_TRIGGER, "region1", "complete" );

what is supposed to happen is that when the map starts, obj1 becomes active and visiable, which it does.
then when player1 enters region1, obj1 completes and obj2 then becomes visable then active and a hero is deployed.
but that does not happen. objective1 does not complete, obj2 does not become visable, and no deployment of hero.
any ideas what ive done wrong?

As for your code hummm.. I am not that good.. however. In my opinion your adding too many commands to one function. ( I could be totally wrong though.) THis is code I use for a map that works and is simular to what you want to do.. pick it apart and edit to do what you want.
function Objstat()
if name=='Gillion' then
sleep(2);
MessageBox("/Maps/SingleMissions/test7/Message_GilraenDefeated.txt");
SetObjectiveState( 'prim0', OBJECTIVE_COMPLETED );
ObjectiveExp("Agrael");
DeployReserveHero("Gillion", 115, 95, GROUND);
EnableHeroAI("Gillion",nil);
startThread(EnableGilraenAI,GetDate(DAY));
Trigger( PLAYER_REMOVE_HERO_TRIGGER , PLAYER_2, nil);
SetObjectiveState( 'prim2', OBJECTIVE_ACTIVE );
end
end


all the instructions say is to add this string
bind show_console '`'
somewhere in the input.cfg file, but not exacly where in the file.
i have tried placing that string in a few places, but no luck, i cant open the console with the tilde key.
between what lines do i place bind show_console '`'??


use this in your input.cfg file
// general
bind jd_button_0 'ESC'
bind jd_button_0 'ENTER'
bind jd_button_0 'NUM_ENTER'
bind jd_button_0 'E'
bind esc_pressed 'ESC'
bind enter_pressed 'ENTER'
bind enter_pressed 'NUM_ENTER'
bind show_console '`'[code][/code][/quote]

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

Postby Marzhin » Nov 15 2006, 9:49

I'm wondering how the SetAIPlayerAttractor works exactly... I have a line that says :

Code: Select all

SetAIPlayerAttractor("arkania",PLAYER_2,2);


With "arkania" being the script name of a town...

But the AI player doesn't seem to care, he's just chasing after my heroes... Anyone else tried to toy with this ?

User avatar
EDN
Scout
Scout
Posts: 156
Joined: 10 Sep 2006

Postby EDN » Nov 15 2006, 13:06

Ok, this post is for a friend; he bought Heroes 5 but can't find the editor. May someone help?


Return to “Mapmaking Guild”

Who is online

Users browsing this forum: No registered users and 5 guests