Author Topic: General Discussion  (Read 3821597 times)

0 Members and 45 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5715 on: September 05, 2015, 06:12:32 PM »
An example:
Quote
...
elif _return == "House_2":
        if not(pytfall.world_quests.check_stage("Uzumaki Clan", 1)):
            jump naruko_first_meeting

label naruko_first_meeting:
...
$ pytfall.world_quests.get("Uzumaki Clan").next_in_label("quest stage description")
As you see, at stage 0 or none we run naruko_first_meeting, where eventually quest stage becomes 1. After that the check should never ever work again in theory. And it never works indeed. Until you go to the next day, even if you finished the quest already.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5716 on: September 05, 2015, 07:57:02 PM »
if not(pytfall.world_quests.check_stage("Uzumaki Clan", 1))

I am not sure what you want to do with this. This condition means:

Jump to label if quest is not active or it's current stage is below 1.

if pytfall.world_quests.check_stage("Uzumaki Clan", 1)):

Condition would mean jump to the label if the quest is active and it's stage is 1 or bigger than 1.
===
I do not share your hunch about the next day resetting quests stages although that system is untested... If you get a chance, when you believe that a quest has reset itself, open console and:

pytfall.world_manager.get("Quest Name").stage

to check if it is indeed correct. I'll update the quest methods again to make more sense and call it a night.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5717 on: September 05, 2015, 08:08:38 PM »
Code: [Select]
        def check_stage(self, quest, stage):
            """Safe way of checking a stage of a quest.
           
            Will return True if quest is at the requested stage and active, False otherwise.
            """
            if self.is_active(quest) and self.get(quest).stage == stage:
                return True
            else:
                return False
               
        def stage_goe(self, quest, stage):
            """Safe way of checking a stage of a quest.
           
            Will return True if quest is active and it's stage equals/above the current stage, False otherwise.
            """
            if self.is_active(quest) and self.get(quest).stage >= stage:
                return True
            else:
                return False

Try this, it should be easier to read and make more sense.
Like what we're doing?

Offline Pseudononymous

  • Newbie
  • *
  • Posts: 38
  • You don't say...
Re: General Discussion
« Reply #5718 on: September 06, 2015, 12:10:35 AM »
New




I'm designing the bestiary page layout at the moment and I'm having difficulty locating some of the buttons and frames you've used here. I'd like to make the layout there in a similar style to this page, just to keep everything copacetic.


I've checked the gfx > frames and gfx > interface > buttons folders. I assume you've used mostly things from these to locations with some manipulations applied. Should I just play around with them until I get a similar look/feel or do you have an easier/more direct way that I could go about this?
"You think I CARE!?"
...
"Yeah, you're getting really angry about it."

Offline Pseudononymous

  • Newbie
  • *
  • Posts: 38
  • You don't say...
Re: General Discussion
« Reply #5719 on: September 06, 2015, 12:42:15 AM »
Calling it a night, didn't get much done tonight, but I got a good start. Here are two previews of the layout that I just started. One with a red/gold scheme and one where I tried to incorporate the old bg for the bestiary.

Any pointers?
"You think I CARE!?"
...
"Yeah, you're getting really angry about it."

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5720 on: September 06, 2015, 04:52:18 AM »
I do not share your hunch about the next day resetting quests stages although that system is untested... If you get a chance, when you believe that a quest has reset itself, open console and:

pytfall.world_manager.get("Quest Name").stage

to check if it is indeed correct. I'll update the quest methods again to make more sense and call it a night.
I believe the correct line should be pytfall.world_quests.get('Sixth Sense').stage.
Are you aware that console doesn't work well after the first day btw? At the first day it works fine, but at the second, third, etc. when I press shift+o the game freezes for ~10-20 seconds before showing the console.
« Last Edit: September 06, 2015, 05:24:47 AM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5721 on: September 06, 2015, 05:01:35 AM »
I've checked the gfx > frames and gfx > interface > buttons folders.
Other elements of gui are in gfx/frame.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5722 on: September 06, 2015, 06:17:22 AM »
I did some testing, looks like it's not about quest stage, it's about quest status.

For example, I made a function
Quote
        def check_quest_finished(self, quest):
            """Safe way of checking a quest.
           
            Will return True if quest is completed or failed, False otherwise.
            """
            if self.is_complete(quest) or self.has_failed(quest):
                return True
            else:
                return False
which should be false as long as quest is not completed or failed. That would allow me to avoid running the same quest again and again.
And for some reason after quest stage became 1 (but it wasn't finished or failed yet), that function started to give True.

I think self.is_active(quest) part that you used in your functions could mess with my checks as well...
« Last Edit: September 06, 2015, 06:20:18 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5723 on: September 06, 2015, 06:23:21 AM »
when I press shift+o the game freezes for ~10-20 seconds before showing the console.

Can't even begin to guess wtf this is...

I did some testing, looks like it's not about quest stage, it's about quest status.

For example, I made a function which should be false as long as quest is not completed or failed. That would allow me to avoid running the same quest again and again.
And for some reason after quest stage became 1 (but it wasn't finished or failed yet), that function started to give True.

I think self.is_active(quest) part that you used in your functions could mess with my checks as well...

I'll try take a look at this tonight.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5724 on: September 06, 2015, 07:22:35 AM »
Can't even begin to guess wtf this is...
A memory leak or something.
Before shift+o it took about 420'000 KB of ram. When it freezes, it goes up to 720'000 KB. After showing the console it goes down to 520'000 KB.
Oh, and it also takes all cpu time of one cpu core when it freezes.

Offline Gismo

  • Jr. Member
  • **
  • Posts: 88
Re: General Discussion
« Reply #5725 on: September 06, 2015, 07:27:03 AM »
I've checked the gfx > frames and gfx > interface > buttons folders. I assume you've used mostly things from these to locations with some manipulations applied. Should I just play around with them until I get a similar look/feel or do you have an easier/more direct way that I could go about this?

I painted almost entirely hero_profile screen in Photoshop, then divided it into two layers.
-The bottom layer is a framework on which all information
-The upper layer - frame of the screen and all the framework under which it must be something to hide.

Put in dropbox my source of hero_profile in .PSD, there you can take the styles for the frames.
With them you can create a new frames for bestiary.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5726 on: September 06, 2015, 01:02:20 PM »
One more thing, when I call the console at the brothel screen, after the freeze it becomes black. And it stays black until I close the console.
But at the first day it doesn't become black.

Console also stops animation (gold coin) at the city map, but not at the first day.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5727 on: September 06, 2015, 01:26:23 PM »
A memory leak or something.
Before shift+o it took about 420'000 KB of ram. When it freezes, it goes up to 720'000 KB. After showing the console it goes down to 520'000 KB.
Oh, and it also takes all cpu time of one cpu core when it freezes.

One more thing, when I call the console at the brothel screen, after the freeze it becomes black. And it stays black until I close the console.
But at the first day it doesn't become black.

Console also stops animation (gold coin) at the city map, but not at the first day.

It's the SimPy/Ren'Py bitching about each other, prolly some crappy Ren'Py code that makes a mess of loops. Not sure what to do about it, even on an off chance that deleting all SimPy resources from memory after ND is calculated helps, I wanted to have procedural SE and I cannot delete it there...

I'll try a couple of simple things but if nothing works, say screw it and take a look at the quests. Investigating this properly will take at least 5 - 6 hours, even if I had that, I'd rather sink it into jobs code.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5728 on: September 06, 2015, 06:01:57 PM »
I ended up trying to track the console thing. I think it's something within the last 5 or 6 smaller Ren'Py upgrades but I was unable to track it down precisely or figure out if it has an effect on anything else in the game.

===
And just as I expected, saving system is f#cked up as well... I am not even sure if it is reasonable to spend time updating jobs until I get to the button of it.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5729 on: September 06, 2015, 11:21:54 PM »
I've ended up staying up all night trying to figure out wtf is wrong with the console/saving system.

There is sadly no fix for this, unless devs can explain why the heck saving doesn't work even after all SimPy objects are destroyed we can forget about SimPy all together. All the work and excitement for nothing :( I "think" most of the work done can still be salvaged but I am not sure yet. At the very least we can keep the new Buildings/Upgrades system...
Like what we're doing?