devolution

Author Topic: General Discussion  (Read 3821363 times)

0 Members and 56 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7080 on: April 16, 2016, 01:51:19 PM »
Oki, I'll take a look. I am trying to write a new method so jobs can build kind of a "moving" line-up of images, it is kicking my ass but I've almost got it.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7081 on: April 16, 2016, 03:00:03 PM »
It appears that the game treats mobs without elemental traits as creatures without elements at all. In truth however they should be neutral, as if they had the Neutral trait. Even if I fix it inside the bestiary gui, that still would be a problem inside BE, so a more general fix is needed, when the game just loads mobs from the json.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7082 on: April 16, 2016, 04:34:57 PM »
It appears that the game treats mobs without elemental traits as creatures without elements at all. In truth however they should be neutral, as if they had the Neutral trait. Even if I fix it inside the bestiary gui, that still would be a problem inside BE, so a more general fix is needed, when the game just loads mobs from the json.

Could you add Neutral for all mobs? We do not create them as objects because mobs do not "live" and "evolve" like normal characters. They WILL have all stats, traits and go the normal normalization routines when they are actually created as mobs before battles but Bestiary works off raw data before any normalization routines and it's close to stupid to create advanced objects just to display their base info.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7083 on: April 16, 2016, 04:56:35 PM »
Ok, I'll do it.

Aside from sorting mobs by min_level, there are few things unfinished at the beast screen. First, in the second stats column for some reason numbers ignore xalign 0.98, unlike the first column. No idea why.
Second, the whole part from description to spells should be scrollable (with one general scrollbar), otherwise there won't be enough space on the screen. I know there is viewport for that, but can't make it work.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7084 on: April 16, 2016, 05:55:14 PM »
Aside from sorting mobs by min_level, there are few things unfinished at the beast screen. First, in the second stats column for some reason numbers ignore xalign 0.98, unlike the first column. No idea why.

You went out of bound of the main frame xysize so it aligned against the the bounds of the main container. I've increased it's size (leaving your code unchanged) so it's better now.

Second, the whole part from description to spells should be scrollable (with one general scrollbar), otherwise there won't be enough space on the screen. I know there is viewport for that, but can't make it work.

Also done, I decided to go with edgescroll instead of a scrollbar there, it looked ugly with one.

==>
I think that the viewport for reports with many workers is more or less finished, I'll prolly test the whole design tomorrow if it can be debugged quickly...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7085 on: April 17, 2016, 05:56:00 AM »
Is there a way to tie width of a frame to width (in pixels) of a text? To make the frame size dependable on the text length.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7086 on: April 17, 2016, 06:08:09 AM »
Is there a way to tie width of a frame to width (in pixels) of a text? To make the frame size dependable on the text length.

Yes, frame is designed to take the size of the displayable it contains unless that functionality is not overwritten by providing a size to it. There are many example of that in the game, girlsmeets are one such an example (I think), we are using a frame that takes the size that is just slightly larger than the gm image. There is not much difference between Text and Images internally where frames are involved.

So basically, the answer is yes, if you do not provide a size to a frame, it should take the size of the text. padding (mostly padding I think) and margin style properties of the frame will determine how much larger the frame will be than the text.

PS: You can try this stuff on a fresh project so there is no bloat and it runs really fast.

==>
Cleaning will require a bit more luv and I'll be busy for the better part of today, so while I am typing in new code whenever I can, chances that it'll be finished and debugged today are slim.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7087 on: April 17, 2016, 08:28:14 AM »
The good news: beast screen is finished. The bad news: the new button that is supposed to return you to the previous screen suddenly stopped working, even though it used to at some point, and I changed nothing about it  ::)

Also, I still hope for advanced elements icons algorithm that uses circle sectors instead of circle slices. I bet it would looked much better.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7088 on: April 17, 2016, 09:32:29 AM »
The good news: beast screen is finished.

Looks good, maybe we should use a fixed description size and change the size of the font to accommodate that but it can be done later. We'll have to handle image prediction as well at some point. We can't do everything at once, we still don't have anything good for MC setups even through code is more or less ready and items/base traits system is done.

The bad news: the new button that is supposed to return you to the previous screen suddenly stopped working, even though it used to at some point, and I changed nothing about it  ::)

I doubt it, you removed the comma from it's action when you changed the button (kind of a big deal there), it should not have worked at all.

Also, I still hope for advanced elements icons algorithm that uses circle sectors instead of circle slices. I bet it would looked much better.

I have a pretty good idea on how to get that done but it's cool as it stands. Also, there are other options like dissolving one element into another or adding movement from left to right.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7089 on: April 17, 2016, 09:56:15 AM »
Damn. No idea how the comma has been deleted, there was no reason to do so, I just copied that code from another screen  :)

I reduced description font a bit. Atm all info is visible at the screen without the need to scroll it, but scrolling is still there in case if some mob will have too many spells or something.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7090 on: April 17, 2016, 10:46:06 AM »
I reduced description font a bit. Atm all info is visible at the screen without the need to scroll it, but scrolling is still there in case if some mob will have too many spells or something.

Yeah, I tried pulling your last changes and thought that it worked but git did some weird thing that mixed everything up. It looks a lot better now.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7091 on: April 17, 2016, 11:17:29 AM »
I improved characters screen a bit, for instance moved MPTrait icon where I imagined they should be when I made them. We need a better frame there that can combine both character name and MPTrait icon in one pretty frame, something like this (obviously looking more suitable).

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7092 on: April 17, 2016, 01:19:48 PM »
This one could actually be perfect...

Trait icon + status (resting/active/learning (we color the tiny round)) + name + location + action...

Interface is fine for a beta, more than fine in my opinion.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7093 on: April 17, 2016, 01:35:07 PM »
Our interface is wood based, so I'll need to add wooden textures there.

Quote
                    # Basetraits:
                    vbox:
                        xsize 315
                        xfill True
                        fixed:
                            xysize (300, 70)
                            yfill True
                            for trait in sorted(list(char.traits.basetraits)):
                                $ temp = (0.7, 0.9) if sorted(list(char.traits.basetraits)).index(trait) else (0.3, 0.1)
                                textbutton "[trait]" action NullAction() hovered tt.action(trait.desc) align temp
How does it work? Can it handle cases when the character has 2 base traits?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7094 on: April 17, 2016, 01:46:15 PM »
How does it work? Can it handle cases when the character has 2 base traits?

VBox prolly aligns more stuff (code below, not quoted here) so it's not really a part of base traits.

Fixed is the most basic container. It just creates an area, no alignments, backgrounds or any crap like that so we create an empty space of 300x70 pixels. Next line determines an alignment, .3, .1 for the first trait and .7, .9 for the second (only if there is a second trait). Then we create plain text buttons and align them appropriately, description is sent to tooltip if buttons are hovered.
Like what we're doing?