Author Topic: General Discussion  (Read 3821654 times)

0 Members and 44 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6870 on: March 19, 2016, 09:53:19 AM »
I'm confused. I have two functions that check how well the character is feeling before engaging in interaction. interactions_check_for_bad_stuff checks for major issues and jumps to "girl_interactions_end" if something's wrong.
interactions_check_for_minor_bad_stuff checks for minor stuff and with a certain probability jumps to "girl_interactions".

Except the latter one doesn't jump anywhere like it should. Even though it ends with renpy.jump("girl_interactions").

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6871 on: March 19, 2016, 10:05:16 AM »
Except the latter one doesn't jump anywhere like it should. Even though it ends with renpy.jump("girl_interactions").

Best I can tell is that it does. Which part are you having problem with? You don't really have to pass char as argument to those functions btw.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6872 on: March 19, 2016, 10:16:38 AM »
I changed it a bit to use new lines for tired chars and set dice to 100 for testing, and gave a character 39 vitality.
Quote
    def interactions_check_for_minor_bad_stuff(char_name): # we check minor issues when character might refuse to do something based on dice
        if (not("Pessimist" in char_name.traits) and char_name.joy <= 25) or (("Pessimist" in char_name.traits) and char_name.joy < 10):
            if dice(hero.charisma-char.character) and dice(80):
                narrator(choice(["Looks like she is in a bad mood, however you managed to cheer her up."]))
                char_name.disposition += 1
                char_name.joy += randint(3, 6)
            else:
                narrator(choice(["Looks like she is in a bad mood today and not does not want to do anything."]))
                renpy.jump ("girl_interactions")
        elif char_name.effects["Down with Cold"]['active']: #if she's ill, there is a chance that she will disagree to chat
            if dice(hero.charisma-char.character) and dice(80):
                narrator(choice(["Looks like she is not feeling well today, however you managed to cheer her up a bit."]))
                char_name.disposition += 2
                char_name.joy += randint(1, 5)
            else:
                narrator(choice(["She is not feeling well today and not in the mood to do anything."]))
                renpy.jump ("girl_interactions")
        elif char_name.vitality < 40 and dice (100):
            renpy.call ("interactions_refused_because_tired")
            char_name.disposition -= randint(0, 1)
            char_name.vitality -= randint(1, 2)
            renpy.jump("girl_interactions")
Now it should give a tired line from interactions_refused_because_tired and stop the interaction. Instead it gives tired line, then returns to the place where I called the function, and the interactions continues as if she had enough vitality. I mean any interaction where interactions_check_for_minor_bad_stuff(char_name) is used.

It's possible that it never worked as intended, I just didn't noticed it.
« Last Edit: March 19, 2016, 10:21:43 AM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6873 on: March 19, 2016, 10:24:14 AM »
Btw text replacement doesn't work with characters lines (I dunno if it should already). ♪ characters are not shown.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6874 on: March 19, 2016, 10:31:51 AM »
Btw text replacement doesn't work with characters lines (I dunno if it should already). ♪ characters are not shown.

I'll take a look...

This doesn't exist in my file:

Code: [Select]
renpy.call ("interactions_refused_because_tired")
It's not something you want to do.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6875 on: March 19, 2016, 10:40:13 AM »
Btw text replacement doesn't work with characters lines (I dunno if it should already). ♪ characters are not shown.

Somehow the style was still using an old, direct path to the font instead of the new object. It's fixed now.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6876 on: March 19, 2016, 10:46:09 AM »
Yeah, looks like calls are bad for python after all.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6877 on: March 19, 2016, 10:49:34 AM »
I think there is a latency in the arena minigame between click and stop...

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6878 on: March 19, 2016, 10:51:11 AM »
Yeah, looks like calls are bad for python after all.

It's Ren'Py concept, you call a label when you want to return to the last statement from the label you called from. When used in Python, it still follows the same concept so even after 1 000 000 python lines of code, it'll still fall back that statement in a label where the python statement had started making it of a limited use.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6879 on: March 19, 2016, 10:54:29 AM »
I think there is a latency in the arena minigame between click and stop...

There shouldn't be, even if there is, I am prolly not gonna try and fix that for the release. Minigame should have been a UDD, not a screen. Although even the current version can prolly be improved, maybe by removing a button in favor of just a click. Button doesn't work properly anymore after the SL rewrite.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6880 on: March 19, 2016, 11:02:51 AM »
For minigame I'd prefered something like, let's say, picking 3 cards from 9 or more upturned cards. Some of them give hp, some mp, some nothing. Gives a lot of freedom for various bonuses too.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6881 on: March 19, 2016, 11:05:47 AM »
For minigame I'd prefered something like, let's say, picking 3 cards from 9 or more upturned cards. Some of them give hp, some mp, some nothing. Gives a lot of freedom for various bonuses too.

Yeah, that we can code in at some point as well :)
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6882 on: March 19, 2016, 11:13:51 AM »
In my version I use incompatible with the current game rchars data files. They try to use our races icons like unique characters do, but fail and give CTD every time I go to any random girl screen. Iirc you use older versions of data files, where random chars use unknown race type by default and don't give CTDs.
So I'm interested in fixing #107 more than you  :D

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #6883 on: March 19, 2016, 11:19:55 AM »
In my version I use incompatible with the current game rchars data files. They try to use our races icons like unique characters do, but fail and give CTD every time I go to any random girl screen. Iirc you use older versions of data files, where random chars use unknown race type by default and don't give CTDs.
So I'm interested in fixing #107 more than you  :D

I am fairly certain that I am using your data files and rchars work for me just fine :) I am not have the latest version thought but it would be weird if you changed them ahead of scheduled and I'll need to know what you changed them to before taking out #107. In any case, I am not even close to taking out the ND thing yet (got distracted a little bit and it's sorting is pissing me off).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #6884 on: March 19, 2016, 11:26:26 AM »
Rchar files start with
Quote
    "id": "2k_tan",
    "desc": "Semi androids, semi digital creatures created by a mad scientist a long time ago with unknown purpose.",
    "race": "Digital Android"
And then at some point we give them base races, ie
Quote
    "random_traits": [
...
    ["Android", 100],
...
    ],
That leads to
Quote
  File "game/library/screens/character_profile.rpy", line 9, in script
    with dissolve
  File "game/library/screens/character_profile.rpy", line 141, in execute
    screen char_profile():
  File "game/library/screens/character_profile.rpy", line 141, in execute
    screen char_profile():
  File "game/library/screens/character_profile.rpy", line 155, in execute
    if girls:
  File "game/library/screens/character_profile.rpy", line 220, in execute
    frame:
  File "game/library/screens/character_profile.rpy", line 226, in execute
    has vbox
  File "game/library/screens/character_profile.rpy", line 346, in execute
    vbox:
  File "game/library/screens/character_profile.rpy", line 349, in execute
    if stats_display == "main":
  File "game/library/screens/character_profile.rpy", line 393, in execute
    fixed:
  File "game/library/screens/character_profile.rpy", line 407, in execute
    $ img = ProportionalScale(trait.icon, 100, 100)
  File "game/library/screens/character_profile.rpy", line 407, in <module>
    $ img = ProportionalScale(trait.icon, 100, 100)
AttributeError: 'unicode' object has no attribute 'icon'
If I remove "race": "Digital Android", everything works.

Meanwhile uchars use race line too, and work flawlessly.