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: Make Quest Huts reduce movement?
Thread: Make Quest Huts reduce movement?
NimoStar
NimoStar


Responsible
Legendary Hero
Modding the Unmoddable
posted May 20, 2021 09:17 AM
Edited by NimoStar at 09:20, 20 May 2021.

Make Quest Huts reduce movement?

I have noticed there is an "add army movement" in scripts, but there is NOT a reduce army movement script.

This is really a shame since a quest hut deducting the whole army's movement for the day would be incredibly useful.

For example, there are great difficulties in making quest huts scripts work as "one a day only", this requires map events and so on...

However with reducing movement this would not be needed (they would work like scarlet swan lake in h3).

The "increae movement" however only allows unsigned integers in the dialog, so positive natural numbers...

If there was a way to use negative instead, this would be achievable.

Maybe by hex editing the script, this is possible, as it may be limited to positive numbers only by the dialog interface. Worth a shot for anyone who knows?

And then, the map editor could be edited to always allow this as negative number (assuming it works)

If this was achievable, lots of "new objects" could be made just via quest scripts, without having to add timed events to the map (to not make them infinitely repeatable with each movement point).
____________
Never changing = never improving

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


Famous Hero
posted May 20, 2021 02:25 PM

It might be a silly but what about making quest hut only passable by sea? But it took 2 full days right..

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


Honorable
Famous Hero
posted May 20, 2021 05:19 PM

I had thought about this at some point, but hadn't tested it out.

My thoughts were this: We could potentially decrease movement by increasing movement until the unsigned value wraps back around to 0 and starts over.

The idea is similar to your gold going negative, eventually the number will wrap back around.

I don't remember for sure, but I think the number in question is a 2 byte number (short), so 0 to 65,535.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted May 20, 2021 10:42 PM
Edited by NimoStar at 22:46, 20 May 2021.

vulcancolak said:
It might be a silly but what about making quest hut only passable by sea? But it took 2 full days right..


Good idea, for some things, but there are still problems:

If you include that even on a boat, you can go to the quest hut many times as you want and get rewarded every time.

Even if you put the quest hut on land after water, when you land, you have the same problem: Use quest hut once for every movement point.

Quote:
I had thought about this at some point, but hadn't tested it out.

My thoughts were this: We could potentially decrease movement by increasing movement until the unsigned value wraps back around to 0 and starts over.

The idea is similar to your gold going negative, eventually the number will wrap back around.

I don't remember for sure, but I think the number in question is a 2 byte number (short), so 0 to 65,535.


Had thought about this too, but there is an additional complication: It's only "add" movement not "set" movement, so the point of reset depends on the current movement of the hero.

In other words even if it resets at 65535 , by adding the whole range of value you just wrap back at the movement when you started. There is no function to evaluate current remaining movement.

In all, I would like to see if a signed integer for negative works.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted May 20, 2021 10:59 PM
Edited by iliveinabox05 at 23:00, 20 May 2021.

NimoStar said:
Had thought about this too, but there is an additional complication: It's only "add" movement not "set" movement, so the point of reset depends on the current movement of the hero.

In other words even if it resets at 65535 , by adding the whole range of value you just wrap back at the movement when you started. There is no function to evaluate current remaining movement.

In all, I would like to see if a signed integer for negative works.


Yep, that is certainly the dilemma There should be a way to calculate a hero's movement points at the start of each turn, but after the hero moves you're out of luck. But then it could only be applied to a hero with the script on it, and not from a quest hut.

Still, at the moment trying to figure it out this way is the only option.

Can't remember if I tried putting in a negative number for the script or not. I would think I did try it and nothing happened, but I'm not sure. Can relook at some point.

If that does work then the advanced options map editor could certainly handle it.

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


Responsible
Legendary Hero
Modding the Unmoddable
posted May 21, 2021 03:40 AM
Edited by NimoStar at 03:40, 21 May 2021.

It would be cool if you could try the negative experiment now and not "maybe" many years ago, so we can at least be sure of that, before trying anything else

The other option would be to write the script to dimish movement into the EXEs but of course, this presents greater problems.
____________
Never changing = never improving

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


Honorable
Famous Hero
posted June 07, 2021 05:40 PM

Tested this a while back and forgot to post, but using negative numbers causes the editor to crash when loading the map, so it's a no go.

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


Responsible
Supreme Hero
posted June 22, 2021 11:10 PM

iliveinabox05 said:
NimoStar said:
Had thought about this too, but there is an additional complication: It's only "add" movement not "set" movement, so the point of reset depends on the current movement of the hero.

In other words even if it resets at 65535 , by adding the whole range of value you just wrap back at the movement when you started. There is no function to evaluate current remaining movement.

In all, I would like to see if a signed integer for negative works.


Yep, that is certainly the dilemma There should be a way to calculate a hero's movement points at the start of each turn, but after the hero moves you're out of luck. But then it could only be applied to a hero with the script on it, and not from a quest hut.

Still, at the moment trying to figure it out this way is the only option.

Can't remember if I tried putting in a negative number for the script or not. I would think I did try it and nothing happened, but I'm not sure. Can relook at some point.

If that does work then the advanced options map editor could certainly handle it.


Calculating a heros or an armys movement I would think to be a nightmare. You'd have to count in artifacts that increase movements, creature in the army in/decreasing movement, visited movement boosters (some last for days). Not saying it can't be done though, just believing it to be a pain.. there also a decrease health point, or there should've been according to the script guide, but this was also never added in the final game. Also keep in mind that could be issues when splitting an army. Cant recall in details but I recall it can move/cause army to lose it. In which case you'd have to pre script it on existing hero(es) so it wont be able to affect hired ones. Lots of challenges.

The only way I have been able to simulate a decrease in movement is to increase it by script, and when a certain event is triggered you go back to normal.

..dll insertion..?
____________

 Send Instant Message | Send E-Mail | View Profile | Quote Reply | Link
Jump To: « Prev Thread . . . Next Thread »
Post New Poll    Post New Topic    Post New Reply

Page compiled in 0.0387 seconds