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 > Heroes 4 - Lands of Axeoth > Thread: Map editing and scripting
Thread: Map editing and scripting This thread is 2 pages long: 1 2 · NEXT»
erkki2
erkki2

Tavern Dweller
posted March 09, 2014 04:27 PM

Map editing and scripting

Hello! I have added some challenge stacks on a map (like 100 megadragons). I'm trying to figure out appropriate rewards for beating those creatures. Here are some things I'd like to do:

* Give X defence and attack to all winning heroes
* Give X defence and attack only to warrior heroes
* Give X max mana to caster heroes
* Give X skill increments to all heroes
* Give random level 5 spell to all heroes

The problem with these is that in the script editor there are only options 'first hero' and 'most/least powerful hero'. So how could I differentiate between casters/warriors?
____________

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


Legendary Hero
posted March 09, 2014 04:38 PM

The problem is, if you evolve them well a hero who can beat 100 megadragons is both a caster and a warrior , but you can try:

if most powerfull hero in this army has Grandmaster Melee and Grandmaster Archery then ... else ...


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

Tavern Dweller
posted March 09, 2014 04:53 PM

Thanks, that's kind of what I was thinking about. But how can I check that condition?

How about giving bonuses to all heroes? Theoretically a player could have a team of 7 heroes.
____________

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


Legendary Hero
posted March 09, 2014 08:26 PM
Edited by bloodsucker at 20:29, 09 Mar 2014.

erkki2 said:
Thanks, that's kind of what I was thinking about. But how can I check that condition?

How about giving bonuses to all heroes? Theoretically a player could have a team of 7 heroes.


Sorry, I don't use the editor for long...

Grandmaster is a number is like "if skill mastery of melee greater then 4" and "if skill mastery of archery greater then 4" then

U can't give bonus to "all" heroes; has to be first, most powerfull or least powerfull.

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

Tavern Dweller
posted March 10, 2014 03:17 PM

Alright, thanks! I guess I'll just check the strongest and weakest hero, as the most common case is to have 1 or 2 heroes.
____________

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


Responsible
Supreme Hero
posted March 14, 2014 12:47 AM

otherwise you'd have to know the heroes and place script on each hero. I guess a check at encounter could determine which heroes are present in the battle.

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


Known Hero
posted March 14, 2014 01:09 AM

Giving spells to all heroes is hard to solve except with shrines but they take too much map space. Conservatories aren't bad too but they offer many spells and only from one school and you have to pay.

If you want to see whether a hero is a caster or a warrior there is some way that maybe isn't 100% as you intend it to be but I believe it will help you.

I use "can give skill" condition in map making to see if a hero has a certain skill, so if he has order or death or ... other magic skill he is a caster. On the other hand if he has combat or tactics or ... he is a warrior.

The problem is when he has both skills, then you have to treat him as both a caster and a warrior which in fact he is. I have one map where I give artifacts and spells to heroes from a quest hut depending on what skill they have. For example if the hero has life magic he can learn all level 3 life spells and if he has tactics he can gain the winged sandals and so on ... of course this is all limited to one hero per visit (the first hero).

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


Responsible
Supreme Hero
posted March 14, 2014 09:40 PM

concerning random spell, Again I suggest a script on each hero and a check for their presence. then you can script it to set a certain variable to a random number, each number will give a certain spell. ofcourse you could set it to only give spells which the hero can actually cast or choose not to.

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


Legendary Hero
posted March 14, 2014 11:55 PM
Edited by bloodsucker at 00:08, 15 Mar 2014.

karmakeld said:
concerning random spell, Again I suggest a script on each hero and a check for their presence. then you can script it to set a certain variable to a random number, each number will give a certain spell. ofcourse you could set it to only give spells which the hero can actually cast or choose not to.


I remember I tried to make nature heroes to summon mantises or gargantuas and I couldn't find any solution beside put a bunch of heroes in prisons with the scripting targeting them. No way I could buy an hero from tavern and had the script to function with him.

On the other hand, if u can imagine a way of do that (for instance, a quest hut where u give a scripted action to heroes that doesn't have it like wizards raising 3 genies after each battle) I would be tremendously gratefull if u post it.

Tks

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


Known Hero
posted March 15, 2014 11:34 AM
Edited by Maciek at 11:35, 15 Mar 2014.

You can put some scripts on enemies instead of heroes. Especially those that give 3 Genies after battles.
And for random spells, you can give some scrolls/parchments.

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


Responsible
Supreme Hero
posted March 15, 2014 05:52 PM

yeah, you can't place scripts on heroes you haven't placed on the map - e.g. heroes bought in taverns.. But instead you could like maciek suggest. about forcing AI to use certain spells, make sure they don't have alot of other spells and also make sure your hero ain't overpowered against AI. I've experienced a related issue and AI won't act as intended if I have a much larger army..

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


Famous Hero
posted April 24, 2014 06:10 PM

Hi,

i have a problem with a map resp. scripting (or maybe not scripting, i don't know):

I have a neutral army with heroes. A script changes that armys owner to 1 of 2 possible AI players, depending on the answer to a question. One is ally, other is enemy. So far, so good.

Now when the hero is changed to ally, he just sits there and does nothing, except maybe leave the ship i have put him into. Nothing more happens. It seems as if this hero is completely forgotten by the AI. Is there any trick, anything i could do to make the AI do something with this hero?

If the owner is changed to enemy, obviously this problem does not occur, since then an attack takes place.

____________

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


Responsible
Supreme Hero
posted April 25, 2014 01:37 AM

could you post a screenshot (possibly from editor) or e-mail the map?
It's hard to tell, based onl on your describtion..

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


Famous Hero
posted April 26, 2014 09:22 PM

Hi,

thanks for the reply. I'll try to upload the map tomorrow. Just keep in mind that this campaign is work in progress. The first 2 scenarios are technically playable, but the story is up to now only skeletal (and in German). And it still has bugs
____________

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


Disgraceful
Undefeatable Hero
posted April 26, 2014 10:23 PM

hey, siegfried's back. what've you been up to, man?

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


Famous Hero
posted April 27, 2014 10:39 AM
Edited by Siegfried at 10:40, 27 Apr 2014.

Busy searching for a new job. Now i have a new job (since about 1 year now), but still no time *grin*

But from time to time i have some spare time.
____________

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


Supreme Hero
posted April 29, 2014 04:40 PM

Siegfried said:
Hi,

i have a problem with a map resp. scripting (or maybe not scripting, i don't know):

I have a neutral army with heroes. A script changes that armys owner to 1 of 2 possible AI players, depending on the answer to a question. One is ally, other is enemy. So far, so good.

Now when the hero is changed to ally, he just sits there and does nothing, except maybe leave the ship i have put him into. Nothing more happens. It seems as if this hero is completely forgotten by the AI. Is there any trick, anything i could do to make the AI do something with this hero?

If the owner is changed to enemy, obviously this problem does not occur, since then an attack takes place.



It is possible to set a heroes movement range. I can imagine this settings remain when the hero changes alignment. Did you perhaps limit his movement to prevent the neutral hero from walking/sailing all over the place?

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


Famous Hero
posted April 30, 2014 07:28 PM
Edited by Siegfried at 19:39, 30 Apr 2014.

Hi,

sorry for late reply, i temporarily lost my password for my web space

Now the map (as is) is online:
http://www.rorkvell.de/tmp/dragonking.h4c

The question is about the first scenario. Because the messages are in german, just answer the question with yes, when coming near this "neutral" hero. He will then be converted to purple player, which is allied. So you can observe him the whole game long. I know this army is much too strong, it is just for testing for now, and will be reduced later.

Limiting the movement? I don't remember that i have limited the movement. At least the hero moves sometimes some few squares. But very few. But maybe this movement restriction is inherited from his former existence as neutral hero?

Thanks
Siegfried

Edit:
I forgot. If you want to play this scenario for some time, you should, after meeting this hero, proceed to the initial purple town. When you come there you will get your town back. After that it is mostly a normal game. On conquering the non-purple nature towns you are asked if you want to give this town to purple player. If you say yes, you will later be rewarded with some artifacts which help in the third scenario Especially useful will be if the initial purple town is conquered by enemy player, and you conquer it back and give it back to purple player. But that needs purple player not beeing eliminated at that time. This part is simply a matter of luck.
But is is not necessary to do so to complete the game. It is useful to keep at least one nature town with shipyard to help transporting peasants with caravan to a safe place.
____________

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


Known Hero
posted May 02, 2014 02:31 PM

Siegfried said:
But maybe this movement restriction is inherited from his former existence as neutral hero?

Seems so. You can set the patrol radius to whatever you want the coloured army to have (probably 'unlimited') and drop a stone on them to prevent them from moving as neutral. Then bomb the stone when you release them. A small, 1-tile rock that shows as red when you toggle passability display should do the trick.

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


Famous Hero
posted May 03, 2014 10:00 AM

I'll try that. I formerly put the hero next to the peasant dwelling inside the fenced area, but this area is a little too small. So he never moved out there. Seems i have to enlarge this "field" by 1 or 2 squares.

BTW, Equilibris should have new objects. Especially useful here would be the "impassable invisible" object. But although i have Equilibris and installed the additional equi.aop, i have none of the new objects. How could i get them?

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread » This thread is 2 pages long: 1 2 · NEXT»
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0355 seconds