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 Modding Revisited
Thread: Heroes 4 Modding Revisited This thread is 18 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 · «PREV
bbhero
bbhero

Tavern Dweller
posted February 26, 2025 11:07 PM

First of all, congrats and big thanks to everyone for sharing these tips!

Before getting into modding exe, I have a (hopefully) simpler question regarding the editor, is it possible (and how) to:

1) use non-listed conditions?
i.e., I would like to make a conditional event based on permanent bonus to attack (the one you get from red crystals and wrestling pits), let's say: if the Hero has >=20 attack bonus, it gets 1000 gold  

2) use 'variables' as outcome (instead of a fixed numbers)?
i.e., as a result of a script, I would like to give a Hero amount of gold based on his/ her level, let's say 100 * lvl

Thanks!

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


Honorable
Famous Hero
posted February 28, 2025 01:32 AM

bbhero said:
2) use 'variables' as outcome (instead of a fixed numbers)?
i.e., as a result of a script, I would like to give a Hero amount of gold based on his/ her level, let's say 100 * lvl



Sure this scripting can be done. How it's done depends on whether the scripting is meant to be on a specific hero or a quest hut. It's easier and cleaner if on a specific hero, but can be done either way.

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

Tavern Dweller
posted March 08, 2025 12:35 AM

iliveinabox05 said:
bbhero said:
2) use 'variables' as outcome (instead of a fixed numbers)?
i.e., as a result of a script, I would like to give a Hero amount of gold based on his/ her level, let's say 100 * lvl



Sure this scripting can be done. How it's done depends on whether the scripting is meant to be on a specific hero or a quest hut. It's easier and cleaner if on a specific hero, but can be done either way.


In this case, my intent is to make it on specific Hero!
How to do such script?

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


Honorable
Famous Hero
posted March 10, 2025 04:40 AM

bbhero said:
In this case, my intent is to make it on specific Hero!
How to do such script?


Here's a basic set of events to do what you want:

Triggerable event on the hero. Call it something like Give Gold for Level

Set goldToGive to level of this hero times 100
trigger custom event Give Gold

-------

Triggerable event on the hero called Give Gold

if goldToGive >= 1
   give 1 gold to owner
   set goldToGive to goldToGive - 1

if goldToGive > 0
   trigger custom event Give Gold

-------

Whenever you want to give the hero gold based on his / her level, just call the Give Gold for Level event (or whatever you decide to name it). If you want to do it daily, you'll need to add a timed event (preferably on the hero to keep everything together) that just calls the triggerable event.

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

Tavern Dweller
posted March 26, 2025 06:53 AM

Hi, everybody...

I hope this isn't too off-topic, but since most everyone involved with this thread probably has some experience with unraveling H4's code, I thought I'd ask about something that's been bugging me for a while now...

(It seems a bit too slight to make its own thread for, and anyways I don't quite have the post-count to open a new one...)

At the very end of "Elwin and Shaera," why does the text-box explaining how Lord Harke's loyalists switched sails on Elwin in the middle of the night not trigger? It's still in the code, right? I first read it in [url=https://www.celestialheavens.com/homam-iv/general-hiv/heroes-iv-text-collection]Celestial Heavens' text collection[/url] (it's titled "The Red Sails") and for years took it for granted, but when I recently looked up Let's-Plays of this very campaign, none of them had this text pop up, and many of the players were mighty confused at whether they'd taken the "wrong" ship!

Is the text dummied or glitched out? Is it something that got lost an in one of the Expansions? Are you supposed to sail over a super-specific tile on the lake? (I used to think it was a matter of you needing to stay on the lake for X number of days, but I've seen multiple players dawdle for over a week. No go.)

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


Honorable
Famous Hero
posted March 26, 2025 01:41 PM

RubberLotus said:
At the very end of "Elwin and Shaera,"


Hey there! No need to look in the code, just open up the campaign in the editor, go to the map in question, and look for the event in question. There are map events, which this probably falls under. Maybe placed events? Look in the area on the map where you expect it to occur and see if a placed event object is there.

You can download the campaigns on maps4heroes.

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: Next Thread » This thread is 18 pages long: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 · «PREV
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0644 seconds