|
Thread: Is it possible to measure the offset of a HD mod window? | |
|
Archer30
Adventuring Hero
|
posted May 08, 2020 09:16 AM |
|
Edited by Archer30 at 10:37, 09 May 2020.
|
A new way of playing animation on adv map and question
Hi guys, I'm posting this thread on behalf of my friend @Hawaiing. He's a shy lad, afraid of sharing his great findings so I'm helping him out.
What has he got?
A new way of playing an animation on adv map
The animation from the link is a set of consistent PNGs. It plays on the window of H3 instead of "the internal way" and thus bypasses the build-in graphics limitation (8-bit BMP). By using his way it allows H3 to play some high-quality clips in-game.
And here comes his question.
Is it possible to measure the black edges of an HD window?
The idea is to trigger an animation on a certain map object. But there is one thing stopping this from happening on the HD window mode.
As we can see, the HD mod allows an H3 window to zoom freely with black edges filled in either on top/bottom or left/right to keep the game running in a fixed ratio. There seems to be no way to measure the offset of coordinates between an H3 window and the actual game content.
Let me know if you have any thought about this
Edit:
Here I uploaded another screenshot to explain my question better.
So what I have is the coordinate of the red rectangle. And I'm trying to get the coordinate of the blue rectangle instead. Usually, these 2 have the same coordinate except for HD window mode. Users are allowed to reshape the window freely thus there is an offset between red and blue.
|
|
avatar
Promising
Supreme Hero
|
posted May 08, 2020 09:40 AM |
|
|
Native resolution is x=800, y = 600.
I GUESS when you set in hd mod resolution x = 1280, y = 720 - x offset = (1280-800)/2 = 240 pixels.
____________
|
|
FirePaladin
Promising
Legendary Hero
DoR Modder
|
posted May 08, 2020 09:57 AM |
|
|
avatar said: Native resolution is x=800, y = 600.
I GUESS when you set in hd mod resolution x = 1280, y = 720 - x offset = (1280-800)/2 = 240 pixels.
Crap, you were faster. But I'm totally okay with what you wrote.
____________
Enshackling time itself, heralds of the Ancients among their heat-depleted land.... Who could they be, who could rally the beings of the East and the North and control the mortals' fate?
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 10:18 AM |
|
Edited by Archer30 at 10:36, 08 May 2020.
|
avatar said: Native resolution is x=800, y = 600.
I GUESS when you set in hd mod resolution x = 1280, y = 720 - x offset = (1280-800)/2 = 240 pixels.
Hi, avatar! Glad you are here to help!
Although I'm afraid I did not describe my question correctly. Let me make it better. The facts:
1. The animation is played on the screen and only associated with the window, it knows nothing about the actual game resolution (aka resolution without black edges).
2. H3 window in HD can be reshaped by the user freely. It adds black edges to allow the game to run in a fixed ratio (which related to the HD resolution settings)
So here's my question again - how can we measure the black edges generated by HD mod/user?
|
|
FirePaladin
Promising
Legendary Hero
DoR Modder
|
posted May 08, 2020 10:44 AM |
|
|
I guess it depends upon screen size. For example, if I have 1680 x 1050 and run the game in 1369 x 856, then x offset will be equal to 311/2 (which is 155/156, but I dunno which is left/right). y offset will be 97.
So basically, (screen x - H3 x)/2= x offset
(screen y - H3 y)/2= y offset
Window is something else. I'll try to see what I can manage there.
Edit: I think there are programs which can do that. Tbh, one of the reasons I almost never ask anything here is because I first google my question/need.
What I found in several seconds: https://www.google.com/search?q=how+to+calculate+window+size+program&oq=how+to+calculate+window+size+program&aqs=chrome..69i57j33.10487j0j7&sourceid=chrome&ie=UTF-8
I mean, the first links look promising.
____________
Enshackling time itself, heralds of the Ancients among their heat-depleted land.... Who could they be, who could rally the beings of the East and the North and control the mortals' fate?
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 11:11 AM |
|
Edited by Archer30 at 11:57, 08 May 2020.
|
Firepaladin, thanks for your reply!
I have 0 issues with playing an animation on full screen, the black edge is only for windows mode in HD (as you can see from my screenshot in the first post).
I have also no problem with the coordinates of the window. The animation could be set to play in the H3 window.
The only question is, between the H3 window and the actual H3 game -> there are black edges.
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 11:14 AM |
|
|
Okay, I start to believe my question is very confusing...
Let me ask another question - is it possible to play a def on adv map?
|
|
FirePaladin
Promising
Legendary Hero
DoR Modder
|
posted May 08, 2020 11:15 AM |
|
|
Archer30 said: Okay, I start to believe my question is very confusing...
Let me ask another question - is it possible to play a def on adv map?
Everything on adv map is a def (probably except for non-animated objects, but I don't remember for sure).
____________
Enshackling time itself, heralds of the Ancients among their heat-depleted land.... Who could they be, who could rally the beings of the East and the North and control the mortals' fate?
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 11:19 AM |
|
Edited by Archer30 at 11:20, 08 May 2020.
|
FirePaladin said:
Everything on adv map is a def (probably except for non-animated objects, but I don't remember for sure).
Right. Is there a way to play a def as I showed in the first post? The idea is to give animation to adv magic.
|
|
FirePaladin
Promising
Legendary Hero
DoR Modder
|
posted May 08, 2020 11:23 AM |
|
|
Archer30 said:
FirePaladin said:
Everything on adv map is a def (probably except for non-animated objects, but I don't remember for sure).
Right. Is there a way to play a def as I showed in the first post? The idea is to give animation to adv magic.
So, I see you're playing WoG. I think it should be possible somehow, but don't ask me, 'cus the only thing I know about ERM is that it's a programming language used by ERA 2 and has lots of numbers in it.
____________
Enshackling time itself, heralds of the Ancients among their heat-depleted land.... Who could they be, who could rally the beings of the East and the North and control the mortals' fate?
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 11:45 AM |
|
Edited by Archer30 at 12:00, 08 May 2020.
|
FirePaladin,
Yes, I'm looking for an erm solution for playing a def on adv map. Didn't see such a thing from erm help.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted May 08, 2020 12:52 PM |
|
|
I don't know what you mean by "playing a def". All defs play on adventure map, once they are placed, the frames succeed in a loop, that's playing.
Or you mean place a new def during the game and play it? That also works with erm commands.
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 12:58 PM |
|
Edited by Archer30 at 13:03, 08 May 2020.
|
Salamandre said: I don't know what you mean by "playing a def". All defs play on adventure map, once they are placed, the frames succeed in a loop, that's playing.
Or you mean place a new def during the game and play it? That also works with erm commands.
Thanks, Sal. Exactly! Could you kindly provide an erm example of playing a new def on adv map please?
|
|
FirePaladin
Promising
Legendary Hero
DoR Modder
|
posted May 08, 2020 01:02 PM |
|
|
Salamandre said: I don't know what you mean by "playing a def". All defs play on adventure map, once they are placed, the frames succeed in a loop, that's playing.
Or you mean place a new def during the game and play it? That also works with erm commands.
Yeah, but I guess archer here wants it to play the def only for a short time after the spell is cast, not in a loop, right?
____________
Enshackling time itself, heralds of the Ancients among their heat-depleted land.... Who could they be, who could rally the beings of the East and the North and control the mortals' fate?
|
|
Archer30
Adventuring Hero
|
posted May 08, 2020 01:05 PM |
|
|
FirePaladin said:
Yeah, but I guess archer here wants it to play the def only for a short time after the spell is cast, not in a loop, right?
Exactly!
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted May 08, 2020 01:08 PM |
|
|
No way with erm, at least from what I know. Tried also in Atlantis this idea, the loop couldn't be controlled.
____________
Era II mods and utilities
|
|
|