Author Topic: General Discussion  (Read 3821731 times)

0 Members and 20 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9405 on: February 03, 2017, 05:23:05 AM »
Oki... so I went over Buildings code and some of the training code.

Buildings:
- Inheritance is misused a bit, but this will be an easy fix.
- Some logic is scattered all over the place.
- A whole bunch of logic is needlessly mirrored over a whole bunch of different buildings classes.
- Training Dungeon is using older upgrades system but in a really simple way.

Most work here lies in simply making sure we don't have multiple flags, containers and methods that do the same basic function.

Training:
We did decide not to use it for Beta but the problem is that training is intertwined with Jail, SlaveMarket and Schools (very heavily). There is a lot of references to it in Interactions code but that looks isolated.

I managed to restore TD but sending a char there and trying to start training session led to errors, I've cleared 3 or 4 of those in the row and said f*ck it (cause they just kept coming) :)

Largest problem here is that I don't know 60% of Training code + it's not written in my style, everything is a proxy and everything leads to or wraps around something else... Good news is that school seems to be working!


I've cleared old building classes, NewStyle classes have renamed. A bunch of older code dealing with differences between them is also gone. There is also little bit of new stuff for SE.

This is it for pytfall for the day, we'll chat in the evening if time permits :)
« Last Edit: February 03, 2017, 05:27:39 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9406 on: February 03, 2017, 06:01:17 AM »
Training dungeon? It's part of ST, we don't even touch it until beta, it's too big to handle it right now. Schools are sufficient for everyone.

I need faster dissolve for changing backgrounds, the default one takes too long for matrix map. However, since I don't know how it was written in the first place, I cannot write the same one with faster timing.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9407 on: February 03, 2017, 07:40:09 AM »
I don't think we have a default dissolve for changing background, we do that in every location separately with a simple with statement.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9408 on: February 03, 2017, 09:56:51 AM »
Renpy does have default dissolve, and we use it. I found info about Dissolve(time, alpha, time_warp) in renpy wikia, but it tells me nothing, "with dissolve(time=0.2)" doesn't work.
« Last Edit: February 03, 2017, 10:31:39 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9409 on: February 03, 2017, 10:26:53 AM »
Renpy does have default dissolve, and we use it. I found info about Dissolve(time, alpha, time_warp) in renpy wikia, but it tells me nothing, "with dissolve(time=0.2)" doesn't work,

but

Code: [Select]
with Dissolve(.2)
will work. You can define it as well:

Code: [Select]
qdissolve = Dissolve(.2)
and do:

Code: [Select]
with qdissolve
later.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9410 on: February 03, 2017, 10:56:42 AM »
Right, that explains it. I'm still forgetting about case sensitivity in python from time to time.
I'll be in chat if you want to discuss "a large number of important decisions"  :)

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9411 on: February 04, 2017, 03:15:40 PM »
As I feared, under unusual circumstances it's impossible to use top_stripe to access MC profile and inventory  :(
It's all hardcoded to work only where it works now. You can jump there from anywhere, but the game won't return you to the place where you jumped from, effectively breaking any events including matrix dungeon.

I will have to make simplified version of profile and inventory which will work everywhere, allowing to watch over team status and heal it...
« Last Edit: February 05, 2017, 02:41:33 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9412 on: February 07, 2017, 05:15:45 AM »
As I feared, under unusual circumstances it's impossible to use top_stripe to access MC profile and inventory  :(
It's all hardcoded to work only where it works now. You can jump there from anywhere, but the game won't return you to the place where you jumped from, effectively breaking any events including matrix dungeon.

I will have to make simplified version of profile and inventory which will work everywhere, allowing to watch over team status and heal it...

Heu, I am back (at diminished capacity for the day due to hangover) :)

Stripe allows making changes to team and inventory, you do not normally want it to be available during event/quests. Also saving will rollback entire events if jump argument is unused. I can adjust the stripe disabling some buttons if you really need parts of it.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9413 on: February 07, 2017, 06:38:59 AM »
As a part of main quest, I'm making dungeon crawler based on matrix. It's not nearly as powerful as actual dungeon crawler engine like the one which picobyte tried to add, but it's also 100 times easier and doesn't require rendering textures. It's close to be finished, actually.

Player has to have access to party inventory when personally exploring a dungeon, to heal party members if nothing else.

I modified equipment screen, it now can be called in a safe mode, when actions and items which can break events are not allowed (unless I missed something). And added status screen which shows MC team portraits with levels of health, mp and vitality, where by clicking on the portraits game jumps to character inventory.

Together they provide all required team control, and can be used anywhere as long as it's possible to provide a label where the game can safely return from equipment screen at any point without ruining events.

There was a weird issue with new health/mp/vitality bars used in status screen. The empty bar picture wasn't entirely transparent, it used gray color with high alpha. It resulted in weird effect if the bar wasn't full, as if there were two bars at the same time, one normal and one half-transparent, with normal one showing actual value and half-transparent showing a bit higher value.

It might be a bug in renpy, since once I made empty bar fully transparent, this effect disappeared.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9414 on: February 07, 2017, 07:18:57 AM »
It might be a bug in renpy, since once I made empty bar fully transparent, this effect disappeared.

As long as it's working. I can look into it if you like. You need to tell me what you're doing with the top)stripe and how are the SE fields coming along.

Going to slowly start messing with tiers today if I am able to.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9415 on: February 07, 2017, 08:35:37 AM »
I just canceled bars changes, the bug is there again.

At the main screen there is a button, Test MD. Once you are inside MD, make hero health not full, I usually do hero.health -= 100 in console. There will be double health bar.  It looks like https://www.dropbox.com/s/j91i5fce8hmuwn5/1.png?dl=0

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9416 on: February 07, 2017, 01:36:35 PM »
Renpy allows syntax like
Code: [Select]
label label_name(i="default_value")However, I don't understand how to pass the i value while jumping to such label from a screen section using action.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9417 on: February 07, 2017, 03:29:42 PM »
Renpy allows syntax like
Code: [Select]
label label_name(i="default_value")However, I don't understand how to pass the i value while jumping to such label from a screen section using action.

You can't. Local vars on label are valid only when calling or calling in new context.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #9418 on: February 08, 2017, 08:27:08 AM »
Any conclusion about bars issue?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #9419 on: February 08, 2017, 09:38:53 AM »
Any conclusion about bars issue?

It's not a bug, Ren'Py simply isn't magical enough to deal with this. Bars are images cropped from right and left, besides having different amount of pixels on both sides of your images, you have a "frame" inside of the bar itself. You're also forcing the size of render and sides (xysize/im.Scale), which may be another issue (not sure about this one). There are too many things here that go wrong from the start to get this to work perfectly with just code, a very highly customized live crop would work but not the bar...

If you want a bar like that working perfectly, you need to separate the frame from the bar and make sure that there are no transparent boarders on bar images (I hate them on frame images as well, they are too time consuming to deal with and take 3 seconds to add with code may you actually need them).

Otherwise, you can do what you did before (make the inner area of the left bar fully transparent), you'd want to add gutters cause this bar does not interpolate correctly for reasons mentioned above. Might look something like:

Code: [Select]
                bar:
                    right_bar Frame"content/gfx/interface/bars/empty_bar2.png")
                    left_bar Frame"content/gfx/interface/bars/vitality2.png")
                    value l.vitality range l.get_max("vitality")
                    thumb None
                    left_gutter 10 right_gutter 10 # I am not sure about these values...
                    xysize (102, 14)

It will still be a little bit off though... due to difference in transparent pixels on the sides, if you get rid of those, it may work out fine.
Like what we're doing?