devolution

Author Topic: General Discussion  (Read 3821797 times)

0 Members and 18 Guests are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8685 on: October 22, 2016, 10:29:19 AM »
Quote
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 94, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 81, in script call
    call next_day_calculations
  File "game/library/screens/next_day.rpy", line 238, in script
    python:
  File "game/library/screens/next_day.rpy", line 298, in <module>
    pytfall.next_day()
  File "game/library/classes - support.rpy", line 127, in next_day
    char.next_day()
  File "game/library/characters/classes - characters.rpy", line 4074, in next_day
    result = self.auto_buy(amount=randint(3, 7))
  File "game/library/characters/classes - characters.rpy", line 1681, in auto_buy
    hasitems = set([items for i in self.inventory]) if self.inventory else set()
KeyError: <store.Item object at 0x0F1013D0>

During next day.

Although the forum thinks that [ i ]  from the code is Italicized font  ::)
« Last Edit: October 22, 2016, 11:11:18 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8686 on: October 22, 2016, 11:38:07 AM »
Use code not quote. It looks like it should be i instead of item. I'll take a look at it tomorrow.
Like what we're doing?

Offline Sarabada

  • Newbie
  • *
  • Posts: 30
Re: General Discussion
« Reply #8687 on: October 22, 2016, 11:43:33 AM »
Why not just call the smallweapon slot the 'offhand' slot as most other RPG's? Or even just the 'secondary' slot.

And I've tried to look up what 'Fast Learner' did in the alpha before, but didn't find anything besides two blocks setting self.effects["Fast Learner"]['active'] to true and false.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8688 on: October 22, 2016, 11:58:59 AM »
It appears that your old normalizations prevent vitality based effects from working (and also starting the game if said effects exist).
Code: [Select]
While running game code:
  File "game/script.rpy", line 110, in script
    python:
  File "game/script.rpy", line 116, in <module>
    chars = load_characters("chars", Char)
  File "game/library/functions - loading_data.rpy", line 227, in load_characters
    char.init() # Normalize!
  File "game/library/characters/classes - characters.rpy", line 3244, in init
    setattr(self, stat, self.get_max(stat))
  File "game/library/characters/classes - characters.rpy", line 3317, in __setattr__
    if key == 'vitality' and effects['Drowsy']['active']:
KeyError: 'Drowsy'

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8689 on: October 22, 2016, 12:08:29 PM »
I wonder what will happen if autoequipment system will use an item with "jump_to_label" field. It probably should be forbidden.

Those are quest consumables only... so they should be filtered out the first thing.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8690 on: October 22, 2016, 12:10:57 PM »
Why not just call the smallweapon slot the 'offhand' slot as most other RPG's? Or even just the 'secondary' slot.
"Secondary" slot is a very vague name. And offhand is asymmetrical to the Right Hand slot.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8691 on: October 22, 2016, 12:12:10 PM »
It appears that your old normalizations prevent vitality based effects from working (and also starting the game if said effects exist).
Code: [Select]
While running game code:
  File "game/script.rpy", line 110, in script
    python:
  File "game/script.rpy", line 116, in <module>
    chars = load_characters("chars", Char)
  File "game/library/functions - loading_data.rpy", line 227, in load_characters
    char.init() # Normalize!
  File "game/library/characters/classes - characters.rpy", line 3244, in init
    setattr(self, stat, self.get_max(stat))
  File "game/library/characters/classes - characters.rpy", line 3317, in __setattr__
    if key == 'vitality' and effects['Drowsy']['active']:
KeyError: 'Drowsy'

Noted. It does not look like vitality offhand. Effect might not be defined.

Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8692 on: October 22, 2016, 12:21:55 PM »
Ah yes, you right, there is one more place where effects should be written  :)

Those are quest consumables only... so they should be filtered out the first thing.
Quest? Nope, just consumables with unique effects. Like
Code: [Select]
    $ h = eqtarget.get_max("health")-eqtarget.health
    $ eqtarget.health += int(0.5*h)
    $ h = eqtarget.get_max("vitality")-eqtarget.vitality
    $ eqtarget.vitality += int(0.5*h)
    $ eqtarget.mp = 0
    $ eqtarget.remove_item("Emerald Tincture")
    jump char_equip
« Last Edit: October 22, 2016, 12:31:16 PM by DarkTl »

Offline Sarabada

  • Newbie
  • *
  • Posts: 30
Re: General Discussion
« Reply #8693 on: October 22, 2016, 12:31:35 PM »
"Secondary" slot is a very vague name. And offhand is asymmetrical to the Right Hand slot.

It may be vague, but it's commonly accepted as meaning "the second hand slot" in most other games that have the ability to equip items in multiple hands. It's difficult when you want to get precise for exactly the reason that you can equip all sorts of things in there, from weapons to shields to whatever else you might eventually have. That's why most games have it as a 'vague' term that could work with all kinds of equipment.

If you want to 'pair' it with the right hand slot, that slot would be called 'Main' hand, or 'Primary' which is understood as generally the slot your big/primary weapon goes.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8694 on: October 22, 2016, 12:52:05 PM »
If you want to 'pair' it with the right hand slot, that slot would be called 'Main' hand, or 'Primary' which is understood as generally the slot your big/primary weapon goes.
Yeah, primary and offhand sound nice.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8695 on: October 22, 2016, 01:24:28 PM »
It looks like it should be i instead of item.
Yeap, autobuying works again with that. Now bad news:

When stats are changed via self.loggs during jobs, they ignore effects. It's a major limitation which makes many potential interesting and fun effects almost ineffective.

For example self.loggs('vitality', -40) ignores
Code: [Select]
                if key == 'vitality' and effects['Drowsy']['active']:
                    old_val = stats.get_stat(key)
                    mod_val = value - stats.get_stat(key)
                    if mod_val < 0:
                        mod_val = int(mod_val*.5)
                        value = int(round(old_val + mod_val))
It has to be changed somehow.
« Last Edit: October 22, 2016, 02:18:09 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8696 on: October 22, 2016, 04:20:48 PM »
Gonna take a look but I already wrote about effects being applicable only trough use of default python mechs. Our own functions will ignore them, I'll try to apply correct behavior whereever sensible.


I dislike "off/main" hand aliases but I can change them on my own play-through once the game is ready and force an override through hidden testing.rpy file if it bugs me through the development.

It has to be changed somehow.

This is with regard to your post:
Another issue with effect bonuses is that we adjust them whenever stat actually increases, assuming that is achieved through default methods for accessing Python classes/instances so it will require extra effort if we want job stats to be adjusted before they are applied. Basically, job reports are simply a gathering of plain stats and girl reports are the pure, true difference between yesterdays and today's stats so there will be inconsistencies under current design unless we decide that fixing that is worth the effort.

Honestly, I'd rather remove those job logs (*Edit: I am talking about stat logs here, not the text/event logs!) from the game and roll with the final, character next day "stats" logs only. We cannot reliably log pure "per event" changes because new system is smart and may redirect workers all over the place as it sees fit and encapsulating effect calculations in functions to show correct results plainly means that we'll have to do the same calculations 2 to 20 times just to display adjusted interim stat changes while knowing for 100% that final increase at the end of the day will account for everything...
« Last Edit: October 22, 2016, 04:34:13 PM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8697 on: October 23, 2016, 01:05:20 AM »
I dislike "off/main" hand aliases but I can change them on my own play-through once the game is ready and force an override through hidden testing.rpy file if it bugs me through the development.
The problem with right/left hand slots is they are not vague enough for left-handed characters. We kinda tell them to use main weapon/tool in their right hand as if it's their main hand, which is impossible. And left-handed characters are pretty common.

Either we use names for slots without left/right part (not necessary off/main, and definitely not weapon/smallweapon), or add left-handed trait with unusual logic which makes items in left hand slot stronger compared to right hand slot. Such trait would be pretty fun, I suppose.

Speaking of aliases, shops filters still use raw slots names instead of them.


Honestly, I'd rather remove those job logs (*Edit: I am talking about stat logs here, not the text/event logs!) from the game and roll with the final, character next day "stats" logs only. We cannot reliably log pure "per event" changes because new system is smart and may redirect workers all over the place as it sees fit and encapsulating effect calculations in functions to show correct results plainly means that we'll have to do the same calculations 2 to 20 times just to display adjusted interim stat changes while knowing for 100% that final increase at the end of the day will account for everything...
Ok, how about applying effects only in the very end? We can log as much changes as we need, but the resulting difference between yesterday and tomorrow vitality will be affected by the vitality effect. We even may write about effect doing its work somewhere in the log.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8698 on: October 23, 2016, 01:16:40 AM »
Ok, how about applying effects only in the very end? We can log as much changes as we need, but the resulting difference between yesterday and tomorrow vitality will be affected by the vitality effect. We even may write about effect doing its work somewhere in the log.

I am not sure what you mean here. We gather the stats from every ND event sequence and apply them once, during that application (or any application), effects are applied over them automatically. It is close to impossible to write any of that in the ND log, unless we do something awkward like:
Code: [Select]
def on_the_run_effects_mod():
    ...

and apply it to dummy stats before exposing ND event to the player and then have the system properly apply it to the stats themselves. But it's once again, work for no huge benefit + we can always make note that stats you see in job reports are unadjusted.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8699 on: October 23, 2016, 01:18:19 AM »
Speaking of aliases, shops filters still use raw slots names instead of them.

Right, I am going to look into this now. And go over all the ways we are allowed to change stats to try and make sure they all go through the same process.
Like what we're doing?