Author Topic: General Discussion  (Read 3821593 times)

0 Members and 46 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8925 on: November 13, 2016, 02:58:00 PM »
When in doubt, use indifferent portraits, they are always suitable no matter the situation  :)

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8926 on: November 13, 2016, 08:51:19 PM »
But I am not going over new code after every push.
Fine with me. Just reporting changes here.

If there is a viewport there already or you put one in, this post is not relevant.
It was already in place there.

I've added a group equip implementation. Items are only shown, retrieved or given if all members of the group have an item or can be provided.


Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8927 on: November 14, 2016, 05:06:59 AM »
I've added a group equip implementation. Items are only shown, retrieved or given if all members of the group have an item or can be provided.

- Trying to equip items to a group of characters at least one of which doesn't want or cannot equip it causes ctd.
- Transfer button causes ctd. It should either be disabled or preferably lead to transfer screen with all of the chosen chars and mc.
- Some GUI stuff is still misaligned.

And most importantly:
- ALL item operations must go through their respective functions defined in item functions file. You should not pass items between inventories directly or equip them directly. There are cases where this doesn't matter but normal transfer/equipment is never one of those cases.

Reason for this is that in PyTFall a free character may refuse to receive, equip or give away an item. There are also counters in place that attempt to track how many items were transferred between characters (for character to which that matters) so they would give back an item that MC gave them but not one of their own items.

There may also be rules that prevent character transferring or equipping specific items.

All of those functions where such things are relevant take a "silent" argument, when set to True, characters do not try to explain or complain why they don't want to do some specific thing which is useful when dealing with them in bulk.
Like what we're doing?

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8928 on: November 14, 2016, 05:24:05 AM »
Thanks for review. Will go through it later - got to work now.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8929 on: November 14, 2016, 06:48:58 AM »
If you're gonna test new Ren'Py prerelease, pull from github. They are slowly prepping migration to Python 3 so isinstance(..., str) which Thewlis used a lot has changed it's meaning due to new imports.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8930 on: November 14, 2016, 06:54:45 AM »
...meaning schools and interactions gonna get wrecked?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8931 on: November 14, 2016, 07:08:08 AM »
...meaning schools and interactions gonna get wrecked?

They got a little bit wrecked but my last push fixed them (in python 3 all strings are unicode so there is no more splitting of "basestring" to "str" and "unicode" as there is in Python 2). When they migrate to Python 3, a lot of stuff will break... for now they just imported some stuff that partially mimics Python 3 behavior. It's not that difficult to migrate but there will be some difficult cases, like for example, in Python 2, dividing two ints returns an int, in Python 3 it returns a float...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8932 on: November 14, 2016, 07:28:12 AM »
Ah yes, I even had a testing menu where I checked python divisions. Because in delphi I was taught that division result is always float -_-
Let's see...
- xrange does not exist in python 3, for some reason you use it a lot in the code.
- .next() method does not exist in p3, we use it in quests system and calendar
- zip(), filter() and dictionary methods don't return lists any longer. We don't use zip and filter much, but dictionaries are used a lot. Also has_key method is gone, which is used in a few places.
« Last Edit: November 14, 2016, 07:54:16 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8933 on: November 14, 2016, 08:39:00 AM »
- xrange does not exist in python 3, for some reason you use it a lot in the code.

Because it's what you're supposed to use (returns generator instead of a list). It's renamed to range in Python 3 and original range is no more.

- .next() method does not exist in p3, we use it in quests system and calendar

Not relevant, these methods are defined by us so they are not subject to this change.

- zip(), filter() and dictionary methods don't return lists any longer. We don't use zip and filter much, but dictionaries are used a lot. Also has_key method is gone, which is used in a few places.

It's an easy fix.


It may be a while till they actually switch so there is no urgency.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8934 on: November 14, 2016, 08:44:14 AM »
They don't have basestring in Python 3 either so this code would have to be adjusted but I don't want to try and write compatible code like importing string types for six. I don't expect this project to have serious issues with migration. SimPy would have to be adjusted a little bit (it always needs to be for Ren'Py) but it's not hard either. I am not sure about the json validator thing but they should have Python 3 support as well.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8935 on: November 14, 2016, 09:25:02 AM »
I know what we missing  :)
We missing Continue option in the main menu which loads the most recent save, and is disabled if there are no saves. It's de facto standard in modern games. I wonder how hard it would be for renpy.
« Last Edit: November 14, 2016, 10:01:06 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8936 on: November 14, 2016, 10:18:31 AM »
We had one in alpha. It is not difficult at all, I think there is a builtin func for that or i wrote one. Gismo got rid of I think.
Like what we're doing?

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8937 on: November 14, 2016, 08:25:29 PM »
- Trying to equip items to a group of characters at least one of which doesn't want or cannot equip it causes ctd.
this seems fixed now

- Transfer button causes ctd. It should either be disabled or preferably lead to transfer screen with all of the chosen chars and mc.
Some of it fixed, but there are some issues still.

- Some GUI stuff is still misaligned.
better now?

And most importantly:
- ALL item operations must go through their respective functions defined in item functions file. You should not pass items between inventories directly or equip them directly. There are cases where this doesn't matter but normal transfer/equipment is never one of those cases.

Reason for this is that in PyTFall a free character may refuse to receive, equip or give away an item. There are also counters in place that attempt to track how many items were transferred between characters (for character to which that matters) so they would give back an item that MC gave them but not one of their own items.

There may also be rules that prevent character transferring or equipping specific items.

All of those functions where such things are relevant take a "silent" argument, when set to True, characters do not try to explain or complain why they don't want to do some specific thing which is useful when dealing with them in bulk.

I think the checks should be in place. Are you aware of a path where checks do not happen?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8938 on: November 15, 2016, 04:36:04 AM »
this seems fixed now
Some of it fixed, but there are some issues still.

ctds are gone but transfer still doesn't go through functions or something is still off.

better now?

Little bit, I can do this myself.

I think the checks should be in place. Are you aware of a path where checks do not happen?

SE is one such an examples, because we deal with consumables and it's a life and death situations so the idea is that they just share.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8939 on: November 15, 2016, 04:51:43 AM »
Speaking of consumables, don't forget that  ideally cblock field should work in SE too.