devolution

Author Topic: General Discussion  (Read 3821638 times)

0 Members and 30 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6270 on: November 30, 2015, 10:10:09 AM »
Look under ALL reports in next day screen.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6271 on: November 30, 2015, 01:47:17 PM »
Nope, still nothing but usual warning about her not doing something useful + "she had some strength left so she spent some time having fun" with profile picture. No rest pictures, while they should be because self.img = self.worker.show("rest", resize=(740, 685))

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6272 on: November 30, 2015, 01:48:10 PM »
Works for me...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6273 on: November 30, 2015, 02:28:08 PM »
My bad, it doesn't work for fighting guild. Didn't noticed that the testing girl is there.
Cannot test my changes for pics logic  :(


===
Edited by Xela per accident:

Code: [Select]
available += "stage"
should be:

Code: [Select]
available.append("stage")
at the very least. You can take a look at the testing.rpy, there is a line there that is commented out. Uncomment StripClub and add comments to Bar locally.
« Last Edit: November 30, 2015, 02:39:46 PM by Xela »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6274 on: November 30, 2015, 02:33:53 PM »
My bad, it doesn't work for fighting guild. Didn't noticed that the testing girl is there.
Damn, we don't have strippers job available too, surprisingly. Cannot test my changes for pics logic  :(

I removed it to test Bar, there is little point in both at the same time.

At the buildings screen you cannot open upgrades for test building, and if you try to open transfer item screen, you get

Minor bugs, not even worth fixing at the moment.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6275 on: December 01, 2015, 04:15:47 AM »
Alright, I improved strip pics and found a possible issue.
There is not enough randomness in showing images. If you set stripping+simple bg, you will get the very same picture for a character over and over every turn, even though there is a dozen or more stripping+simple bg pictures in her pack.

It's a waste of good pictures.
« Last Edit: December 01, 2015, 04:19:39 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6276 on: December 01, 2015, 04:21:27 AM »
Alright, I improved strip pics and found a possible issue.
There is not enough randomness in showing images. If you set stripping+simple bg, you will get the very same picture for a character over and over every turn, even though there is a dozen or more stripping+simple bg pictures in her pack.

It's a waste of good pictures.

Recheck the tags, I don't really believe that it can be a case. System is too old and always got pictures at random...

In fact, lookup order does not matter here much, when requesting an image from db, it always creates a pool of all matches and draws from it randomly, there is no way around that and I don't think that we store these pics anywhere.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6277 on: December 01, 2015, 04:42:52 AM »
The code
 
Quote
          available = list()
            if self.worker.has_image("stripping", "stage", exclude=["sad", "angry", "in pain"]):
                available.append("stage")
            if self.worker.has_image("stripping", "simple bg", exclude=["sad", "angry", "in pain"]):
                available.append("simple bg")
            if self.worker.has_image("stripping", "no bg", exclude=["sad", "angry", "in pain"]):
                available.append("no bg")
            if available:
                self.img = self.worker.show("stripping", choice(available), resize=(740, 685), type="first_default")
            elif self.worker.has_image("stripping", "indoors"):
                self.img = self.worker.show("stripping", "indoors", exclude=["sad", "angry", "in pain"], resize=(740, 685), type="first_default")
            else:
                self.img = self.worker.show("stripping", exclude=["sad", "angry", "in pain"], resize=(740, 685), type="first_default")
I tested it with multiple chars, but let's take Warrior random girl as example. She has 7 stripping+simple bg pics. Seven.
Yet the game ALWAYS shows only one picture, 00B7-nd-e2-e5-c1-ca-l2-a1.jpg. It has nothing special about it compared to others. And others don't have negative emotions I excluded.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6278 on: December 01, 2015, 05:04:30 AM »
The code
  I tested it with multiple chars, but let's take Warrior random girl as example. She has 7 stripping+simple bg pics. Seven.
Yet the game ALWAYS shows only one picture, 00B7-nd-e2-e5-c1-ca-l2-a1.jpg. It has nothing special about it compared to others. And others don't have negative emotions I excluded.

Maybe it's auto_mood, your new code looks solid... and she looks happy here: 00B7-nd-e2-e5-c1-ca-l2-a1.jpg. (high joy = happy pic)

Try:

Code: [Select]
            if available:
                self.img = self.worker.show("stripping", choice(available), resize=(740, 685), type="first_default", add_mood=False)
            elif self.worker.has_image("stripping", "indoors"):
                self.img = self.worker.show("stripping", "indoors", exclude=["sad", "angry", "in pain"], resize=(740, 685), type="first_default", add_mood=False)
            else:
                self.img = self.worker.show("stripping", exclude=["sad", "angry", "in pain"], resize=(740, 685), type="first_default", add_mood=False)

and see if that does anything useful...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6279 on: December 01, 2015, 05:10:11 AM »
Yup, it's auto_mood  :)

I'm trying to be moderate with excluding pics by background or emotions to provide enough variety. Otherwise good players (with always happy girls) will be punished by seeing only happy pics, and not confident, suggestive or indifferent.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6280 on: December 01, 2015, 05:14:49 AM »
By the way, there is a neat trick in Python:

Code: [Select]
            kwargs = dict(exclude=["sad", "angry", "in pain"], resize=(740, 685), type="first_default", add_mood=False)

            if available:
                self.img = self.worker.show("stripping", choice(available), **kwargs)
            elif self.worker.has_image("stripping", "indoors"):
                self.img = self.worker.show("stripping", "indoors", **kwargs)
            else:
                self.img = self.worker.show("stripping", **kwargs)

It does the same thing but offers better code readability and convenience, it's useful when you are working with loads of functions where you need to pass the same args over and over again. Saves time required to mass-rename stuff in editor.

Yup, it's auto_mood  :)

I'm trying to be moderate with excluding pics by background or emotions to provide enough variety. Otherwise good players (with always happy girls) will be punished by seeing only happy pics, and not confident, suggestive or indifferent.

Yeah.. it's definitely a good idea to automatically disable automood is there are mood pics in the exclude. automood is already auto-disabled when there is at least one mood tag requested...

Or maybe it's even wiser to disable auto-mood by default and only use it when specifically requested in the function... I am not sure about this one.

Edit:

Quote
Or maybe it's even wiser to disable auto-mood by default and only use it when specifically requested in the function...

is prolly a better idea, I often get too hang up on trying to get the best image and forget that variety is sometimes more preferable. If you are ok with this, I'll change it. On the other hand it's nice to get correct moods in many places... since you have been working on tags more than I, it's your call.
« Last Edit: December 01, 2015, 05:29:04 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6281 on: December 01, 2015, 05:31:55 AM »
Nah, let it be as it is. We just will need to improve it a bit in the future, like happy ≈ confident with a certain probability.
« Last Edit: December 01, 2015, 05:33:33 AM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6282 on: December 01, 2015, 06:24:57 AM »
I don't understand how this works.
Quote
def get_act(self, tags):
            acts = list()
            for t in tags:
                if isinstance(t, tuple):
                    if self.worker.has_image(*t):
                        acts.append(t)
                   elif isinstance(t, dict):
                    if self.worker.has_image(*t.get("tags", []), exclude=t.get("exclude", [])) and dice(t.get("dice", 100)):
                        acts.append(t)
I understand that you check if the girl has images with has_image.

Why do you check for types with isinstance?
What (*t.get("tags", []), exclude=t.get("exclude", [])) and dice(t.get("dice", 100)) means?
               

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6283 on: December 01, 2015, 01:39:35 PM »
I don't understand how this works.

I understand that you check if the girl has images with has_image.

Data (from def acts(self):):
Code: [Select]
              tags = (("gay", '2c lickpussy'),
                            ("gay", "bc lickpussy"),
                            ("gay", "2c lickanus"),
                            ("gay", "bc lickanus"),
                            ("gay", "2c vaginalfingering"),
                            ("gay", "bc vagnalhandjob"), # @Inconsistent tagnames!
                            ("gay", "2c analfingering"),
                            ("gay", "bc analhandjob"),  # @Inconsistent tagnames!
                            ("gay", "2c caresstits"),
                            ("gay", "bc caresstits"),
                            ("gay", "bc hug", "2c hug"),
                            ("gay", "2c vaginal"),
                            ("gay", "bc vaginal"),
                            ("gay", "2c anal"),
                            ("gay", "bc anal"),
                            ("gay", "2c vaginaltoy"),
                            ("gay", "bc toypussy"),  # @Inconsistent tagnames!
                            ("gay", "2c analtoy"),
                            ("gay", "bc toyanal"),  # @Inconsistent tagnames!
                            {"tags": ["gay"], "exclude": ["2c vaginal", "2c vaginaltoy"]}
                    )

That data is then passed to the method you mentioned and we try to figure out which acts have pictures.

Why do you check for types with isinstance?

Because the data has tuples (just tags) and dictionaries (that can have exclude and dice() as well as tags). Once we know what type of the data we are checking at the moment, we can act accordingly.

What (*t.get("tags", []), exclude=t.get("exclude", [])) and dice(t.get("dice", 100)) means?

Code: [Select]
*t.get("tags", []),
* here means unpack a tuple or list. I just provided an example of unpacking a dictionary to any func/class a few post back using **.

Code: [Select]
for t in some_container:
    # ...

Plain for loop like an any other programming language, since we checked to make sure t is a dictionary, we know what we work with here:

Code: [Select]
dict.get("key", some_default)
is a very cool thing in Python, we request a key from any dictionary, if such a key exist: we plainly get it's value, if there is no key: we use a provided default instead.

So:

Data: {tags: ("profile", "happy"), exclude=["nude"], dice=90}

becomes:

Code: [Select]
if dice(90):
   if self.worker.has_image("profile", "happy", exclude=["nude"]):
       # Add tag to the pool to randomly choose from.

Dice will default to 100 if we don't prove one (and will not be checked under my code if there is no image with provided tags found since it is following "and" (meaning that there are no extra delays)), exclude will default to an empty list and tags also default to an empty list (although that is stupid since such request would not be even remotely useful, but juse in case...).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6284 on: December 02, 2015, 01:47:17 AM »
Get_tag returns available image of position as act, then we show it via self.img = self.worker.show(*act, **kwargs).

I'd like to check what kind of image we actually show here, ie what kind of tags it has besides position tags.
This way we could add additional text based on background for example. I suppose I could modify show function to return image path too if needed, but I dunno how to get tags from image path.
« Last Edit: December 02, 2015, 03:02:29 AM by DarkTl »