devolution

Author Topic: General Discussion  (Read 3821294 times)

0 Members and 29 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8640 on: October 21, 2016, 10:06:39 AM »
Ok, going take a look. I wouldn't ask you why they didn't work :D but there was a chance that I didn't understand you correctly because everything was fine last I checked.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8641 on: October 21, 2016, 11:08:54 AM »
I am in the middle of rewriting inventory code, what slots do we want "merged"?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8642 on: October 21, 2016, 11:31:46 AM »
I thought about loot + resources + quest items. They are very similar, ie cannot be used directly. I think the very last filter at the equipment screen is for quest items.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8643 on: October 21, 2016, 12:22:29 PM »
I thought about loot + resources + quest items. They are very similar, ie cannot be used directly. I think the very last filter at the equipment screen is for quest items.

Ok.

Best inventory code improvement of the day goes to:

Code: [Select]
        @property
        def max_page(self):
            return len(self.paged_items)
from:
Code: [Select]
        def calc_max_page(self):
            """Calculates the max page.
            """
            self.max_page = len(self.filtered_items) / self.page_size if len(self.filtered_items) % self.page_size not in [0, self.page_size] else (len(self.filtered_items) - 1) / self.page_size

 :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D :D

But the code in general is now 10 times better and more dynamic!
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8644 on: October 21, 2016, 12:32:22 PM »
Aaand github is down worldwide, so take your time  :)

While you are at it, shops gui is broken too once you select an item there.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8645 on: October 21, 2016, 01:38:12 PM »
Quote
192.30.253.113 github.com
in the hosts file fixes it for now.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8646 on: October 21, 2016, 02:01:55 PM »
New slots system is adaptive :) It will not display slots that we lack items for! For some reason items info gui is broken as well, I'll take a look at the shops first and fix char_equip and transfer later. Our Inventory core code is now close to perfect :D GUI/equipment/auto methods needs to catch up though.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8647 on: October 21, 2016, 03:09:36 PM »
Quote
    class GeneralStore(ItemShop):
        '''General Store (sells basic items)
        '''
        def __init__(self, name, inv_length, locations, *args, **kwargs):
            ItemShop.__init__(self, name, inv_length, locations, *args, **kwargs)
Clarify locations, please. We always run shops manually, how locations can even be used here?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8648 on: October 21, 2016, 03:26:23 PM »
What does manually mean in this context?
Code: [Select]
        def init_shops(self):
            # Shops:
            self.shops = ['General Store', 'Cafe', 'Work Shop', 'Witches Hut', 'Tailor Store']
            self.general_store = GeneralStore('General Store', 18, ['General Store'])
            self.cafe = ItemShop('Cafe', 18, ['Cafe'], sells=["food"])
            self.workshop = ItemShop('Work Shop', 18, ['Work Shop'], sells=["armor", "dagger", "fists", "rod", "claws", "sword", "bow"])
            self.witches_hut = ItemShop('Witches Hut', 18, ['Witches Hut'], sells=["amulet", "restore", "smallweapon"])
            self.tailor_store = ItemShop('Tailor Store', 18, ['Tailor Store'], sells=["dress"])
            self.hidden_village_shop = ItemShop("Ninja Tools Shop", 18, ["Ninja Shop"], gold=1000, sells=["armor", "dagger", "fists", "rod", "claws", "sword", "bow", "amulet", "smallweapon", "restore", "dress"], sell_margin=0.85, buy_margin=3.0)
       

Hidden village shop for example is called "Ninja Tools Shop" but it's location is set to "Ninja Shop" in items code. Sells is a bad name for the "sells" field, should prolly be buys... General Store is a special class cause we override some of it's methods.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8649 on: October 21, 2016, 03:32:38 PM »
Ah, so it's not a location in terms of the screen where we call it, but more like a unique id of the shop?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8650 on: October 21, 2016, 03:42:37 PM »
Ah, so it's not a location in terms of the screen where we call it, but more like a unique id of the shop?

Yeap, we using one screen for all shops. Labels are unique for every shop (and background is called using scene statement, seller sprite using show). Shop screen is now fixed (without one feature I would like it to have, but that is too difficult to code for this late at night), char_equip is next.
« Last Edit: October 21, 2016, 03:52:54 PM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8651 on: October 21, 2016, 03:53:24 PM »
I have troubles with interactions screen. After jumping to some location from interactions disposition meter and character picture remain at the screen forever. I suppose I should hide the screen first, but there are so many jumps and calls that I can't figure out it.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8652 on: October 21, 2016, 03:55:35 PM »
I have troubles with interactions screen. After jumping to some location from interactions disposition meter and character picture remain at the screen forever. I suppose I should hide the screen first, but there are so many jumps and calls that I can't figure out it.

How do you jump? There should be an example of a proper way somewhere...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8653 on: October 21, 2016, 03:56:34 PM »
Just jump to the location label, as if MC goes there normally.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8654 on: October 21, 2016, 03:58:50 PM »
The problem is, I can't return to the location where interaction was started, so I cannot use normal means.