Author Topic: General Discussion  (Read 3821214 times)

0 Members and 32 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8610 on: October 13, 2016, 10:43:48 AM »
I don't really care to act in spirit of preventing cheating. There is a lot, lot we can do to make it harder, issue it's actually worth writing one line of code for...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8611 on: October 13, 2016, 10:50:38 AM »
They probably did it to protect steam achievements supported by the game, I don't see any other reasons.

You wanted to rewrite items sorting code btw to make it support multiple slots/types when needed  :)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8612 on: October 13, 2016, 11:00:56 AM »
You wanted to rewrite items sorting code btw to make it support multiple slots/types when needed  :)

What do you have in mind?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8613 on: October 13, 2016, 11:16:55 AM »
 
Quote
           self.ALL_FILTERS = ['all', 'weapon', 'smallweapon', 'head', 'body', 'wrist', 'feet', 'cape', 'amulet', 'ring', 'consumable', 'gift', 'misc', 'quest']
            self.GEQ_FILTERS = ['all', 'weapon', 'smallweapon', 'consumable', 'head', 'body', 'wrist', 'feet', 'cape', 'amulet', 'ring', 'misc', 'quest']
            self.FILTERS = self.ALL_FILTERS

        def set_page_size(self, size):
            self.page_size = size
            self.page = 0
            self.set_max_page()
           
        def apply_filter(self, direction):
            """Filter for items.
           
            Currently filtered by slot.
            """
            # if last_label in ("char_profile", "char_equip", "items_transfer"):
            if last_label in ("items_transfer"):
                self.FILTERS = self.GEQ_FILTERS
            else:
                self.FILTERS = self.ALL_FILTERS + ["resources", "loot"] # TODO: Fix this to a more sound design.
Current filters don't allow more than one slot per gui category. There should be enough control over filters to show any slots when needed.
Like gifts, resources and loot for example.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8614 on: October 14, 2016, 02:23:08 PM »
I just added killer class that inherits from three parent classes so you can do stuff like:

Code: [Select]
$ nika.stat += 10
$ nika.expr("face_expression")
$ nika.set_flag("fucked_the_capitain")
nika "Hi, I am Nika!"
$ n = chars["Naruko_Uzumaki"]
n "..."
Quote
  File "game/library/events/StoryI/naruto_quests.rpy", line 166, in script
    n "..."
Exception: Sayer n is not a function or string.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8615 on: October 15, 2016, 08:05:41 AM »
To BR... I thought that was made clear in the post. I am still looking into our own design, it looks like it's worth trying... maybe with some extra magic.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8616 on: October 15, 2016, 08:34:06 AM »
Ah, I thought you added it to us and then to BR, so I tried to test it.
I think it's even more a waste of time than protection vs cheating though. Because you can
$ n = chars["Naruko_Uzumaki"].say
n "..."

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8617 on: October 15, 2016, 01:14:13 PM »
This is the code from chars_list screen.
Quote
        hbox:
                style_group "content"
                spacing 14
                pos (17, 15)
                for l in chars_list:
                    vbox:
                        spacing 14
                        for c in l:
                            $ char_profile_img = c.show('portrait', resize=(98, 98), cache=True)
                            $ img = "content/gfx/frame/ink_box.png"
                            button:
                                idle_background Frame(Transform(img, alpha=0.4), 10 ,10)
                                hover_background Frame(Transform(img, alpha=0.9), 10 ,10)
                                xysize (470, 115)
                                action Return(['choice', c])
I need to build similar screen for a few characters.
"for l in chars_list" is the loop for characters, l = character. So far so good.

But then we have another loop "for c in l", where l is a character already, so it kinda starts to operate with letters. When I copy this code to another place, it says string cannot have show method. And yet this code works at the chars_list screen.
I'm confused how does it work in the first place  ::)
« Last Edit: October 15, 2016, 01:20:48 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8618 on: October 16, 2016, 01:12:50 AM »
I'll take a look... that code does look a bit strange but we're listing characters there so that's prolly why.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8619 on: October 16, 2016, 09:07:56 AM »
I suspect chars_list is not just a list of chars, but something more complex.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8620 on: October 16, 2016, 10:01:39 AM »
I suspect chars_list is not just a list of chars, but something more complex.

Yeap... it's presorted matrix (lists of lists). It was required due to a weird sorting thing longint did when he wrote that code. What are you trying to do?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8621 on: October 16, 2016, 10:36:23 AM »
I wanted to build a similar, though lesser, screen for a quest. In the end I just used imagebuttons with idles = portraits, much easier than trying to understand the chars_list logic  :)
The screen would require some improvements to look symmetrical not matter how many chars it shows, but it could be done before the release when you will recheck all events personally.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8622 on: October 16, 2016, 11:09:41 AM »
Ok, please leave comments on what needs to be done, like: @Alex: or TODO:

Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8623 on: October 18, 2016, 12:33:12 PM »
Code: [Select]
$ pytfall.world_quests.get(event.quest).next_in_label(...)
Sounds like a mouthful :D

Might be a good idea to add an alias, something like:

Code: [Select]
$ advance_quest("quest", ...)
Also... next_in_label... it should not be possible to advance any quest in init without taking extraordinary measures. So it's a weird name for a method.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8624 on: October 18, 2016, 12:50:07 PM »
You know how in many games there are generic random quests, like collect N pieces of X item or kill Y enemy T times... Often they are even repeatable, so player can get some cash and exp by completing them if needed.

I'm not entirely sure it could be done with the current system. Such quests should be generated more or less automatically based on provided lists of items and enemies. Meaning no unique names too.