Variable anchor for status bars, orbs, etc.
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
Variable anchor for status bars, orbs, etc.
Hi,
I don't think there's anything controversial about this, but maybe there is some technical issue that I don't know about (which wouldn't be that surprising, since I know nothing about C++ or really any of the wesnoth source code). So here it goes:
Can the sprite decorations, like the orbs, status bars, and unit_overlays, be anchored to upper left corner of the defined "image=units/foo/bar.png"? As it is right now, big sprites look silly: The top beast isn't mainline, but would still look a lot better if the bar didn't streak down its face. But even for the mainline dragon, the bars interfere with the sprite, and the info they are supposed to convey are muddled by being over the dragon's anus.
There was some work for sprite sheets, it seems like this might be relevant to that. But I haven't seen anything recent on that, so who knows.
Does anyone know if this is possible?
I don't think there's anything controversial about this, but maybe there is some technical issue that I don't know about (which wouldn't be that surprising, since I know nothing about C++ or really any of the wesnoth source code). So here it goes:
Can the sprite decorations, like the orbs, status bars, and unit_overlays, be anchored to upper left corner of the defined "image=units/foo/bar.png"? As it is right now, big sprites look silly: The top beast isn't mainline, but would still look a lot better if the bar didn't streak down its face. But even for the mainline dragon, the bars interfere with the sprite, and the info they are supposed to convey are muddled by being over the dragon's anus.
There was some work for sprite sheets, it seems like this might be relevant to that. But I haven't seen anything recent on that, so who knows.
Does anyone know if this is possible?
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: Variable anchor for status bars, orbs, etc.
might be a hacky temporary solution but it looks like the bar is placed from the origin point of the image, the lower left, from the 2 examples. I opened your bellikakosaurus (sp) file in Gimp and it looks to be justified left, as in there is empty space to the right. Can you move it to the right in the png, or even square off the png, eliminate the empty space, so the bar is in a better location?
I poked around the src and core files but I have no idea where the bar code is at.
I poked around the src and core files but I have no idea where the bar code is at.
Re: Variable anchor for status bars, orbs, etc.
Hi Crow_T,
No, the padding has nothing to do with it. Look at the Bellikakotaurus and then the Fire Dragon, you'll see the bar anchor is the 72px hex, nothing to do with the image PNG.
If I were really trying to find a hack way around this, I could specify a standing animation with the sprite image on a higher layer than the orbs & bars, but that will probably screw up terrain and combat animation interactions, so it would be better not to go down that path. And I don't want to hide the bars, I just want them out of the monster's face & anus.
No, the padding has nothing to do with it. Look at the Bellikakotaurus and then the Fire Dragon, you'll see the bar anchor is the 72px hex, nothing to do with the image PNG.
If I were really trying to find a hack way around this, I could specify a standing animation with the sprite image on a higher layer than the orbs & bars, but that will probably screw up terrain and combat animation interactions, so it would be better not to go down that path. And I don't want to hide the bars, I just want them out of the monster's face & anus.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: Variable anchor for status bars, orbs, etc.
May be you need to draw some examples of how it should be?
Re: Variable anchor for status bars, orbs, etc.
If the orbs and bars were relative to the sprite and not the hex, then it'd get terribly confusing when you'd get the bars of two units right next to each other, or worse, one on top of the other.
I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
Re: Variable anchor for status bars, orbs, etc.
May be it is possible to hide them completely by using special key in unit description?
Re: Variable anchor for status bars, orbs, etc.
An experiment:
I moved the sprite to the right of the png file This is the result I cropped the sprite to almost a square next The result Not perfect but you can manipulate it based on the png file dimensions as well as where it is located in the png.
I moved the sprite to the right of the png file This is the result I cropped the sprite to almost a square next The result Not perfect but you can manipulate it based on the png file dimensions as well as where it is located in the png.
Re: Variable anchor for status bars, orbs, etc.
Thanks, Crow_T. I take your point that the sprite can get shifted to look less ridiculous. But the bar is still covering the sprite, just like the dragon.Crow_T wrote:An experiment:
I moved the sprite to the right of the png file ....
If there were units with lots of dead-space, so that the ornaments were floating off seemingly unconnected, that would indeed be a problem. But if the sprite mostly fills the canvas, I don't see how that could be an issue.zookeeper wrote:If the orbs and bars were relative to the sprite and not the hex, then it'd get terribly confusing when you'd get the bars of two units right next to each other, or worse, one on top of the other.
I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
That's not a bad idea.Xudo wrote:May be it is possible to hide them completely by using special key in unit description?
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: Variable anchor for status bars, orbs, etc.
What I mean is that when you got situations like the attached example, there's no way to automatically offset the bars relative to the sprite so that it'd look good (yours is much smaller so it'd be less of an issue). If you put the bars in the top left corner of the dragon's sprite, then they'll overlap with the NW and N-from-NW units' bars and/or be in the dragon's face even more when it's facing left.doofus-01 wrote:If there were units with lots of dead-space, so that the ornaments were floating off seemingly unconnected, that would indeed be a problem. But if the sprite mostly fills the canvas, I don't see how that could be an issue.zookeeper wrote:If the orbs and bars were relative to the sprite and not the hex, then it'd get terribly confusing when you'd get the bars of two units right next to each other, or worse, one on top of the other.
I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
Re: Variable anchor for status bars, orbs, etc.
I suppose the info does get a bit muddled in that situation, but it's already muddled. I don't see how this breaks anything.
As for the bars being in the dragon's face, I don't believe that's an issue. It would be pretty easy to avoid it, if it is.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: Variable anchor for status bars, orbs, etc.
I like this idea, although I agree that it could cause some readability issues. I think we should give it a chance, put it into mainline and make the final decision based on the feedback received. I'm not sure though if it should be delayed until the next dev series or be put into the 1.12 branch.
Re: Variable anchor for status bars, orbs, etc.
Definitely not into 1.12.
Re: Variable anchor for status bars, orbs, etc.
Thanks, lipk. I'll submit a feature request.
EDIT: http://gna.org/bugs/index.php?22464
EDIT: http://gna.org/bugs/index.php?22464
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
- StandYourGround
- Posts: 256
- Joined: May 13th, 2009, 2:16 am
- Location: On a blue ball spinning through space at incomprehensible speed
Re: Variable anchor for status bars, orbs, etc.
Here's an idea... What if instead the health and XP bars hide by default, and appear only when a unit is selected or the cursor is hovering over it? Some kind of blinking, flashing, or small icons of some sort could be used to indicate weak units and units close to leveling. Then placement of bars for visual reasons could be less important, and only strategically critical units would immediately grab attention.
I will now resume lurking silently.
Re: Variable anchor for status bars, orbs, etc.
Why? I don't see any reason to do this. I really want to know if someone has lots of xp or no xp at all. If I need to browse all the units (own and enemies) that would be tedious.StandYourGround wrote:What if instead the health and XP bars hide by default, and appear only when a unit is selected or the cursor is hovering over it?