|
Thread: Make Quest Huts reduce movement? | |
|
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).
____________
|
|
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..
|
|
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.
|
|
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.
____________
|
|
iliveinabox05
Honorable
Famous Hero
|
posted May 20, 2021 10:59 PM |
|
|
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.
|
|
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.
____________
|
|
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.
|
|
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..?
____________
|
|
|
|