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: Heroes 4 Advanced Options Map Editor
Thread: Heroes 4 Advanced Options Map Editor This thread is 7 pages long: 1 2 3 4 5 6 7 · «PREV
jakisa
jakisa

Tavern Dweller
posted March 18, 2024 10:24 PM

Is it possible to give a hero elves equal to his level whenever he defeats an army in scripts?
____________

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


Honorable
Famous Hero
posted March 18, 2024 11:27 PM

jakisa said:
Is it possible to give a hero elves equal to his level whenever he defeats an army in scripts?


More information is needed here. Is this only for a single hero that is already placed on the map? Or are you thinking of applying this to any hero, including hired heroes?

If the hero is placed on the map, then the answer is yes, and easily. Just add the scripting to the hero's Victorious event (the hero, not the army the hero is on). Then whenever the hero wins a battle, the Victorious event will be triggered and the scripts run.

I'll leave it to you to figure out how to give a number of elves equal to the hero's level Hint: you'll need to use triggerable events on the hero and recursion (or a lot of conditional scripts).

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

Tavern Dweller
posted March 19, 2024 07:35 AM

yes its for a hero who is already on the map, I am making a rpg map.i already found the victorious tab and tried to make a continous event which creates a variable that sets it to heroes level, but i cant figure out how to use this variable ( i am using the base editor btw not your advanced editor)
____________

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


Honorable
Famous Hero
posted March 19, 2024 12:36 PM

jakisa said:
yes its for a hero who is already on the map, I am making a rpg map.i already found the victorious tab and tried to make a continous event which creates a variable that sets it to heroes level, but i cant figure out how to use this variable ( i am using the base editor btw not your advanced editor)


A continuous event isn't what you want since it will be called for every action during the game. Just set the variable to the hero's level in the Victorious event.

As to how you use that variable, that's what my hint was referring to

In a triggerable event, give one elf to the hero, then subtract one from your variable. If the variable is greater than 0, call the triggerable event again. Call this triggerable event from the victorious event after setting the variable.

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

Tavern Dweller
posted March 19, 2024 08:31 PM
Edited by jakisa at 20:48, 19 Mar 2024.

wow thank you, you are a genius

I decided to make a roguelike map like slay the spire where you choose a path between things like events, treasures, normal enemy, elite enemy etc.
I plan to change some creature stats with the resource editor and also the creature level so that e.g. all level 3 enemies are elite, level 4 are boss enemy and so on. That way I can use random enemies for more different playthroughs. My question is what determines how stong a peasant is? Experience, or all stats combined. And does it change when I change the peasants stats?
Also are there any scriptable options for loading or saving the game?
____________

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


Honorable
Famous Hero
posted March 19, 2024 09:26 PM
Edited by iliveinabox05 at 21:28, 19 Mar 2024.

jakisa said:
wow thank you, you are a genius


No problem, I've just done quite a bit of advanced scripting

jakisa said:
I decided to make a roguelike map like slay the spire where you choose a path between things like events, treasures, normal enemy, elite enemy etc.
I plan to change some creature stats with the resource editor and also the creature level so that e.g. all level 3 enemies are elite, level 4 are boss enemy and so on. That way I can use random enemies for more different playthroughs. My question is what determines how stong a peasant is? Experience, or all stats combined. And does it change when I change the peasants stats?


You're talking about the PEON value on random monster objects? I would guess it's based on the experience amount of creatures, but I'm not at all sure as it's not something I've ever explored before.

If someone else that knows doesn't chime in, you can always view the various experience values for creatures from the creatures table and see if they align with the number of potential creatures on random monster objects when you change the PEON value.

jakisa said:
Also are there any scriptable options for loading or saving the game?


Not sure what you are asking here. Can you elaborate?

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

Page compiled in 0.0244 seconds