The editor wasn't included before patch 1.3. Your friend should download the latest patch (1.4) to have access to the editor. The patches can be found on Ubi's site or there are links here on Celestial heavens.EDN wrote:Ok, this post is for a friend; he bought Heroes 5 but can't find the editor. May someone help?
[H5 EDITOR] Troubleshooting topic
thxs for the script meows.
i looked over it and found my error. its ok to have multiple statements in an if then statement, so that wasnt the problem, the problem was that i had objective_complete, when it should have been objective_completed
but im still having problems with my 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 '`'
that is the exact place i have the bind command and i still cannot pull up the console to do troubleshooting. im totally confused why.
anyone have any ideas?
i looked over it and found my error. its ok to have multiple statements in an if then statement, so that wasnt the problem, the problem was that i had objective_complete, when it should have been objective_completed
but im still having problems with my 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 '`'
that is the exact place i have the bind command and i still cannot pull up the console to do troubleshooting. im totally confused why.
anyone have any ideas?
I think there needs to be the schwinge des dodes thingie too (see the cheating guide in edito documentation folder). Moreover, there are several input.cfg files. You don't need to modify the one in game directory but the one in My Documents/MyGames/profile... As it is not told anywhere I kept editing the wrong file myself for a long time...myythryyn wrote:
that is the exact place i have the bind command and i still cannot pull up the console to do troubleshooting. im totally confused why.
anyone have any ideas?
Avatar image credit: N Lüdimois
thxs pitsu i completely forgot there was an input.cfg file in mydocuments.
i myself didnt succeed at getting this command to work well, i would almost say its bugged unless someone can say they have gotten the AI attractor to work. in the map i made i ended up having to use the move hero command and other scripts to force the AI to attack a city, though it did create a region stop trigger outside the city that some players noticed a pause in movment when entering, so im not sure such a script would be suitable for your map. i could provide the script i used if you want....Marzhin wrote:I'm wondering how the SetAIPlayerAttractor works exactly... I have a line that says :
With "arkania" being the script name of a town...Code: Select all
SetAIPlayerAttractor("arkania",PLAYER_2,2);
But the AI player doesn't seem to care, he's just chasing after my heroes... Anyone else tried to toy with this ?
.
.
.
Ok may i trade? here is a attractor code that works,
Now we have the AI's attention lets help him go get player 1 !
OK the chase code works very well if the AI and PLAYER_1 town is within 1/4 of the map. if the AI is further away i notice LONG turns and he seems to mess around gathering troops for a week before heading out to find PLAYER_1.
**************************************************
Now my Problem is thus. I have Isabel in a Prison, PLAYER_1 must go free her and bring her to region "isabelhome" Now I have tried her ingame name Isabell and the name in the Prison Isabel yet although the code is error free it does not triger the win when she is taken to the regon. what is missing?.
Many thanks !
Any scripts that are posted help everyone so please post it myythryynmyythryyn wrote:thxs pitsu i completely forgot there was an input.cfg file in mydocuments.
i myself didnt succeed at getting this command to work well, i would almost say its bugged unless someone can say they have gotten the AI attractor to work. in the map i made i ended up having to use the move hero command and other scripts to force the AI to attack a city, though it did create a region stop trigger outside the city that some players noticed a pause in movment when entering, so im not sure such a script would be suitable for your map. i could provide the script i used if you want....Marzhin wrote:I'm wondering how the SetAIPlayerAttractor works exactly... I have a line that says :
With "arkania" being the script name of a town...Code: Select all
SetAIPlayerAttractor("arkania",PLAYER_2,2);
But the AI player doesn't seem to care, he's just chasing after my heroes... Anyone else tried to toy with this ?
.
.
Ok may i trade? here is a attractor code that works,
Code: Select all
function AIPlayerAttractor()
if GetDate( DAY ) == 12 and (IsInfernoTownDefeated == 0) then
print("Thread SetAIHeroAttractor has been started...");
while 1 do
sleep(10);
if IsHeroAlive(heroname) == true then
Priority = 2;
SetAIPlayerAttractor("holin", heroname, Priority);
print("Now is a third day enemy os heading to player1.");
MessageBox("Maps/SingleMissions/Grail/enemy.txt");
break;
end;
end;
end;
end;
--next
Code: Select all
-- fighting starts
function AIPressingTownHolin(heroname)
if GetDate(DAY) == 15 and (IsInfernoTownDefeated == 0) then
print("Thread AIPressingTownHolin has been started...")
repeat
sleep(20);
until GetObjectOwner("holin") == PLAYER_2;
print("Town Holin has been captured by Player2");
local x,y = GetObjectPosition("holin");
while 1 do
sleep(20);
if IsHeroAlive(heroname) == true then
HeroMovePointsToHolin = CalcHeroMoveCost(heroname,x,y);
AgraelMovePointsToHolin = CalcHeroMoveCost("Agrael",x,y);
x1,y1,Floor = GetObjectPosition("Agrael");
if IsObjectVisible(PLAYER_2, "Agrael") == nil or Floor ~= 0 then
Priority = 2;
SetAIHeroAttractor("holin", heroname, Priority);
else
if HeroMovePointsToHolin <= AgraelMovePointsToHolin then
Priority = 2;
SetAIHeroAttractor("holin", heroname, Priority);
else
Priority = -1;
SetAIHeroAttractor("holin", heroname, Priority);
end;
end;
else
print("Hero ",heroname," is dead.");
break;
end;
end;
end;
end;
**************************************************
Now my Problem is thus. I have Isabel in a Prison, PLAYER_1 must go free her and bring her to region "isabelhome" Now I have tried her ingame name Isabell and the name in the Prison Isabel yet although the code is error free it does not triger the win when she is taken to the regon. what is missing?.
Code: Select all
function IsabelH()
-- while 1 do
if IsObjectExists ("Isabel") then
if IsObjectInRegion ("Isabel", "isabelhome") then
MessageBox("Maps/SingleMissions/a test3/win.txt");
win(void);
else sleep(1)
end;
end;
end;
startThread(IsabelH);
Maybe the AIattractor commands indeed need to be in threads in order to run properly. Doesn't sound very practical solution from Nival, but who knows.meows wrote:.
**************************************************
Now my Problem is thus. I have Isabel in a Prison, PLAYER_1 must go free her and bring her to region "isabelhome" Now I have tried her ingame name Isabell and the name in the Prison Isabel yet although the code is error free it does not triger the win when she is taken to the regon. what is missing?.
startThread(IsabelH);[/code]
Many thanks !
But why do you use a thread for region entering? Wouldnt it be simpler and less memory demanding to use region enter and non stop trigger? Additionally, not sure if it makes any difference but I always used win(); not win(void);
Avatar image credit: N Lüdimois
Hi again!
My question would be that: is there a way to make the taverns only show those gossips, what I wrote in the editor? And altough I changed the price of the gossips, it still asks for 100 gold for them. Is it a bug or a not fully functional option of the editor, or just I'm the clumsy one...?
My question would be that: is there a way to make the taverns only show those gossips, what I wrote in the editor? And altough I changed the price of the gossips, it still asks for 100 gold for them. Is it a bug or a not fully functional option of the editor, or just I'm the clumsy one...?
humm gosh i wasn't thinking at all. no thread is needed for a region.Pitsu wrote: **************************************************
Now my Problem is thus. I have Isabel in a Prison, PLAYER_1 must go free her and bring her to region "isabelhome" Now I have tried her ingame name Isabell and the name in the Prison Isabel yet although the code is error free it does not triger the win when she is taken to the regon. what is missing?.
startThread(IsabelH);[/code]
Many thanks !
Maybe the AIattractor commands indeed need to be in threads in order to run properly. Doesn't sound very practical solution from Nival, but who knows.
But why do you use a thread for region entering? Wouldnt it be simpler and less memory demanding to use region enter and non stop trigger? Additionally, not sure if it makes any difference but I always used win(); not win(void);
I tried win() and win(void) the win(void) is what they have in the manual
and now I am brain dead.. LOL. so i took Isabel out of the Prison and placed her so now need to figure out a region (code) she can go to and win the game.
As for the AIPlayerAttractor threads, that is all on a different map my Grail.h5m map and it would not run without starting the function. I put it up because
I did some expermentation with the AIPlayerAttractor and it seems to work like this. HE Cheats!Marzhin wrote:
I'm wondering how the SetAIPlayerAttractor works exactly... I have a line that says :
Code:
SetAIPlayerAttractor("arkania",PLAYER_2,2);
What I mean by cheats is if PLAYER_1 town is low on mobs and Priority = 2 he will make haste to come and put you out of your misery. However of you have built up your town the same Priority = 2 will make him wait a week or three and build up troops. This tells me he has spys in PLAYER_1 towns, but if you make Priority = 3
he will come at you with what ever he has as a army.
So I should make a priority of 3 ? Strange, according to the manual (scripting functions) we can only put priorities of -1, 0, 1 and 2...meows wrote:I did some expermentation with the AIPlayerAttractor and it seems to work like this. HE Cheats!Marzhin wrote:
I'm wondering how the SetAIPlayerAttractor works exactly... I have a line that says :
Code:
SetAIPlayerAttractor("arkania",PLAYER_2,2);
What I mean by cheats is if PLAYER_1 town is low on mobs and Priority = 2 he will make haste to come and put you out of your misery. However of you have built up your town the same Priority = 2 will make him wait a week or three and build up troops. This tells me he has spys in PLAYER_1 towns, but if you make Priority = 3
he will come at you with what ever he has as a army.
there is a setting for 3 for AI attractor? can anyone confirm that?
it would be nice if there was a third setting, a kamikazee, suicidal, attack no matter what setting. the AI is such a coward sometimes and refuses to attack things unless it knows for sure that it completely outnumbers you.
as for the script i made, i think yours sounds like a much better solution and i might try it for the map i made. the script i made involved using the move hero command directing the AI to move right in front of the city i wanted the AI to attack. Only then would it attack the city if it was right outside it. which would confirm your idea that the closer the AI is to the target you want it to attack, the more likely it will directly move to attack it.
it would be nice if there was a third setting, a kamikazee, suicidal, attack no matter what setting. the AI is such a coward sometimes and refuses to attack things unless it knows for sure that it completely outnumbers you.
as for the script i made, i think yours sounds like a much better solution and i might try it for the map i made. the script i made involved using the move hero command directing the AI to move right in front of the city i wanted the AI to attack. Only then would it attack the city if it was right outside it. which would confirm your idea that the closer the AI is to the target you want it to attack, the more likely it will directly move to attack it.
has anyone used successfully, or know how to use the
startcombat script?
the documentation for this command is just horrible and confusing, and no example is given.
i tried this
startcombat ("heroname", "enemyAIheroname", 5 , 5, 5);
then left the rest out since by default the last parameters are supposed to be nil anyways.
what i had hoped was that enemyAIhero would have five creatures, with a creatureID of 5, and five in a group. or something like that.
well anyways, it didnt work as i expected.
can anyone provide a working example of the script for this command?
startcombat script?
the documentation for this command is just horrible and confusing, and no example is given.
i tried this
startcombat ("heroname", "enemyAIheroname", 5 , 5, 5);
then left the rest out since by default the last parameters are supposed to be nil anyways.
what i had hoped was that enemyAIhero would have five creatures, with a creatureID of 5, and five in a group. or something like that.
well anyways, it didnt work as i expected.
can anyone provide a working example of the script for this command?
Using this code, the game will start a combat with the hero that touched some conscripts(named "conscript") against 100 Conscripts and 1 Archangel:
And here's (my) explanation for the StartCombat function.(Don't know if I've forgotten something)
So you first have to specify the number of enemy stacks and then you need to add 2 parameters for each stack, setting the Creature ID and stack size.
Code: Select all
function fight_conscripts(heroname)
StartCombat(heroname,nil,2,2,100,14,1,nil,"winlose_conscriptfight")
end;
function winlose_conscriptfight(heroname,winlose)
if winlose==nil then
print("You lose!")
else
print("You win!")
RemoveObject("conscript")
end;
end;
SetObjectEnabled("conscript",nil)
Trigger(OBJECT_TOUCH_TRIGGER,"conscript","fight_conscripts")
Code: Select all
StartCombat(
heroname - Name of your hero, here it's the parameter of the triggered function
nil - Maybe an enemy hero, never used it
2 - Number of Groups that will attack the hero(for each group there can be two additional parameters, first is Creature ID, second is Stack size of this Creature)
2 - Creature ID of Creature 1
100 - Amount of Creature 1
14 - Creature ID of Creature 2
1 -Amount of Creature 2
nil - this could call a combat script I think, never used it.
"winlose_conscriptfight" - This function is called when the combat ends.
)
Drachenwald.Net
"Well, things just got simpler. And a lot more complicated."
My Current Project: Rappelz Character Database, a free character database for players of the mmog "Rappelz"
"Well, things just got simpler. And a lot more complicated."
My Current Project: Rappelz Character Database, a free character database for players of the mmog "Rappelz"
Hi again!
I've got a problem with the with hut script. I want to set the witch hut to give the skill 'Light magic'. So I used this script:
But it sais that 'function WitchHut not defined'. What's the problem with it?
I've got a problem with the with hut script. I want to set the witch hut to give the skill 'Light magic'. So I used this script:
Code: Select all
function WitchHut(heroname)
GiveHeroSkill(11, heroname);
MarkObjectAsVisited('witch', heroname);
Trigger(OBJECT_TOUCH_TRIGGER, 'witch', 'WitchHut');
end;
Trigger(OBJECT_TOUCH_TRIGGER, 'witch', 'WitchHut');
Well first of all this script would give you a random skill (with witch hut) then it would start the trigger and execute the function. I guess you don't want this so you should add, outside the function : SetObjectEnabled('witch', nil);
Then, the MarkObjectAsVisited command only put the hut as "visited" but it will already be since you received a skill from it. In reality that command is just useless if not to change "not visited" in the object description to "visited" when the object normal behavior is deactivate.
Then, the Trigger inside the function is supposed to cancel the normal trigger to make sure the hero doesn't receive the light magic skill again and again so it should be : Trigger(OBJECT_TOUCH_TRIGGER, 'witch', nil);
So the result in code would be :
This script will give the light magic skill to the hero if it can this mean if there is space for it. It will upgrade its light magic skill if the hero already knows it.
And the "function not defined " is a normal error.
Then, the MarkObjectAsVisited command only put the hut as "visited" but it will already be since you received a skill from it. In reality that command is just useless if not to change "not visited" in the object description to "visited" when the object normal behavior is deactivate.
Then, the Trigger inside the function is supposed to cancel the normal trigger to make sure the hero doesn't receive the light magic skill again and again so it should be : Trigger(OBJECT_TOUCH_TRIGGER, 'witch', nil);
So the result in code would be :
Code: Select all
SetObjectEnabled('witch', nil);
function WitchHut(heroname)
GiveHeroSkill(11, heroname);
MarkObjectAsVisited('witch', heroname);
Trigger(OBJECT_TOUCH_TRIGGER, 'witch',nil);
end;
Trigger(OBJECT_TOUCH_TRIGGER, 'witch', 'WitchHut');
And the "function not defined " is a normal error.
That didn't work for me. : ( I've tried it in both your way, and changing the lineNajibarr wrote:Well first of all this script would give you a random skill (with witch hut) then it would start the trigger and execute the function. I guess you don't want this so you should add, outside the function : SetObjectEnabled('witch', nil);
Then, the MarkObjectAsVisited command only put the hut as "visited" but it will already be since you received a skill from it. In reality that command is just useless if not to change "not visited" in the object description to "visited" when the object normal behavior is deactivate.
Then, the Trigger inside the function is supposed to cancel the normal trigger to make sure the hero doesn't receive the light magic skill again and again so it should be : Trigger(OBJECT_TOUCH_TRIGGER, 'witch', nil);
So the result in code would be :This script will give the light magic skill to the hero if it can this mean if there is space for it. It will upgrade its light magic skill if the hero already knows it.Code: Select all
SetObjectEnabled('witch', nil); function WitchHut(heroname) GiveHeroSkill(11, heroname); MarkObjectAsVisited('witch', heroname); Trigger(OBJECT_TOUCH_TRIGGER, 'witch',nil); end; Trigger(OBJECT_TOUCH_TRIGGER, 'witch', 'WitchHut');
And the "function not defined " is a normal error.
Code: Select all
GiveHeroSkill(11, heroname);
Code: Select all
GiveHeroSkill(heroname, 11);
did work for me. With this version :Sixy wrote: That didn't work for me. : (
Code: Select all
GiveHeroSkill(heroname, 11);
Other than that you may check that the witch hut structure has correct name "witch".
Avatar image credit: N Lüdimois
I've got a new problem (sorry...):
I wanted to make a script which opens a message box when capturing a gremlin dwelling. I used this script:
I've tried this way and without the last line, but selecting the capture trigger function on the workshop's properties.
Sorry for my annoying problems. I would just like to create a well-done map. : )
I wanted to make a script which opens a message box when capturing a gremlin dwelling. I used this script:
Code: Select all
function GetWorkshop()
MessageBox("Maps/SingleMissions/The Runaway Princess - Part I/workshop_cap.txt");
end;
Trigger(OBJECT_CAPTURE_TRIGGER, 'workshop', 'GetWorkshop');
Sorry for my annoying problems. I would just like to create a well-done map. : )
Who is online
Users browsing this forum: No registered users and 0 guests