Author Topic: General Discussion  (Read 3821642 times)

0 Members and 28 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8760 on: October 29, 2016, 05:58:11 AM »
I added a simple alcohol system which allows you to get Drunk effect if you drink too much. The effect disappear on the next day no matter what, except it only does so for characters. MC can get the effect but it never disappears, meaning his effects system is not working as it should.
Code: [Select]
            elif effect == "Drunk":
                for key in self.effects["Drunk"]:
                    self.effects["Drunk"][key] = False

This code makes little sense. It should destroy description, counter and disable the effect. I am too tired to try and find out why it is working for chars and not MC, it should mess up the effect for everyone.
This code is the direct copy of your code from Food Poisoning effect, with a bit different mechanics of counters.
Which needs to be updated as it kills description as well. It is still unclear why it works differently for MC and Chars. I'll see if I can figure it out tomorrow morning.
::)

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8761 on: October 29, 2016, 06:00:06 AM »
Rgr.

The MC issue is due to the fact that we're not running parents class nd method for him. The other issue is just bad code, I'll fix it and push.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8762 on: October 29, 2016, 06:04:09 AM »
Actually resetting everything is more or less of because we are setting everything up again at the effect activation. We just need to make sure that description is left out of that loop.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8763 on: October 29, 2016, 06:12:00 AM »
You can alias stuff for better readable code: unstable = self.effects['Unstable']. It's a matter of personal preference, just as an example:

Code: [Select]
            elif effect == "Unstable":
                unstable = self.effects['Unstable']
                unstable['day_log'] += 1
                if unstable['day_log'] == unstable['day_target']:
                    self.joy += unstable['joy_mod']
                    unstable['day_log'] = day
                    unstable['day_target'] = day + randint(2,4)
                    unstable['joy_mod'] = randint(20, 30)
                    if dice(50):
                        unstable['joy_mod'] = -unstable['joy_mod']

Everything should be fixed, try it.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8764 on: October 29, 2016, 06:21:58 AM »
We need to check disposition mods on next day... they are absurdly powerful ranging from -130 to 350 in just 14 days without any user interactions... but it might be old code that just gives incorrect bonuses when wages are paid.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8765 on: October 29, 2016, 06:31:49 AM »
Well, effects do not ignore missing stats properly. For Drunk:
Code: [Select]
  File "game/library/screens/next_day.rpy", line 81, in script call
    call next_day_calculations
  File "game/library/screens/next_day.rpy", line 228, in script
    python:
  File "game/library/screens/next_day.rpy", line 288, in <module>
    pytfall.next_day()
  File "game/library/classes - support.rpy", line 133, in next_day
    hero.next_day()
  File "game/library/characters/classes - characters.rpy", line 3317, in next_day
    super(Player, self).next_day()
  File "game/library/characters/classes - characters.rpy", line 2763, in next_day
    self.apply_effects(key)
  File "game/library/characters/classes - characters.rpy", line 2710, in apply_effects
    self.joy -= 5
  File "game/library/characters/classes - characters.rpy", line 1274, in __getattr__
    (self.__class__, key))
AttributeError: <class 'store.Player'> object has no attribute 'joy'


We need to check disposition mods on next day... they are absurdly powerful ranging from -130 to 350 in just 14 days without any user interactions... but it might be old code that just gives incorrect bonuses when wages are paid.
Wages code is mostly disabled anyway.
« Last Edit: October 29, 2016, 06:34:21 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8766 on: October 29, 2016, 06:43:47 AM »
I moved the dict with all stats to parent class, should work now as we discussed couple of days ago (dummy stats for MC/Mobs).
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8767 on: October 29, 2016, 09:38:26 AM »
We need to check disposition mods on next day... they are absurdly powerful ranging from -130 to 350 in just 14 days without any user interactions... but it might be old code that just gives incorrect bonuses when wages are paid.
Paying wages is a perfectly normal thing. It shouldn't increase disposition infinitely. At best it could give +1 as long as disposition is < 0, or even < -100.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8768 on: October 29, 2016, 12:02:00 PM »
Paying wages is a perfectly normal thing. It shouldn't increase disposition infinitely. At best it could give +1 as long as disposition is < 0, or even < -100.

Yeah, once we have teirs, next day methods should be rewritten as well.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8769 on: October 30, 2016, 06:34:17 AM »
If character has very low vitality, all stats will be red at the equipment screen.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8770 on: October 30, 2016, 01:39:49 PM »
It's weird because I was sure that we've fixed it. Gonna take a look at it tomorrow. Do you really think that this new coin is better? It's like a shiny blob on the screen that your sight instantly goes to, if nothing else, it stands out way too much.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8771 on: October 30, 2016, 04:03:51 PM »
Yeah, can't say I like it. I'll search for better ones. The old one has the $ symbol, which kinda breaks the forth wall, but we always can return it if there is nothing better out there.

How about improving the load_frame_by_frame_animations_from_dir function to automatically register webms too with name=folder name? I tried to, but since it runs before other places, it doesn't know about MovieLooped function and cannot use it.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8772 on: October 30, 2016, 06:13:17 PM »
How about improving the load_frame_by_frame_animations_from_dir function to automatically register webms too with name=folder name? I tried to, but since it runs before other places, it doesn't know about MovieLooped function and cannot use it.

Sure, what pattern is best to scan for? Do we need it to try and find mask movie as well?
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8773 on: October 31, 2016, 05:13:30 AM »
If renpy cannot easily check if the folder has webms inside and not just pictures, then folder should start with "webm". Otherwise there are name, channel and loop. Spaces are separators, just like with usual images.

So it would be "image_name channel_name 1" folder name for looped movie, or "image_name channel_name" for non looped one. We could use a default channel, probably main_gfx_attacks since I use it everywhere if possible to not create new channels.
So it also could be image_name 1 for default channel + looped or just image_name for non looped + default channel.

As for webms names inside he folder, they are always "movie.webm" and optional "mask.webm".
« Last Edit: October 31, 2016, 05:20:59 AM by DarkTl »

Offline lamoli

  • Hero Member
  • *****
  • Posts: 553
Re: General Discussion
« Reply #8774 on: October 31, 2016, 06:55:21 AM »
Good news..


Im finally able to get full rig for bodies and hair/clothing in blender so now animations will be really easy.. but i need to rework a few things since in the past i had 1 render file for a pose ( around 100 in total ) but now i could do everything with 1 so it will be simpler to use for anyone else than me.. and there s almost a perfect conversion now so save up a lot of time when importing and assembling assets.. but for the creating process its the same.. but once we created enough content it will be really easy to create the scene you want for whatever we might need the renders for..


The fbx animation with correcting shape keys wont do anything good for Pytfall unless you want to do something with UE4 where most of my normal work is but you can render every frame of the animation in blender to make a webm for possible animated scenes in Pytfall