Author Topic: Reporting Errors:  (Read 109284 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4706
Re: Reporting Errors:
« Reply #690 on: March 18, 2017, 01:11:22 PM »
On the contrary, the screen shows applied effects on the top-right small frame, together with traits (for unknown reason). But doesn't show removed ones. It is a bug no matter how you look at it, because it works for equipping but not for unequipping. Either it should work for both, or for none.
Want to support our h-games? You can do it at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #691 on: March 18, 2017, 01:13:09 PM »
On the contrary, the screen shows applied effects on the top-right small frame, together with traits (for unknown reason). But doesn't show removed ones. It is a bug no matter how you look at it, because it works for equipping but not for unequipping. Either it should work for both, or for none.

Ok... I must be going blind :D

Gonna check again.


Edit:
Yeap, you're right! This is definitely worth fixing.
« Last Edit: March 18, 2017, 01:16:54 PM by Xela »
Like what we're doing? Support us at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #692 on: March 18, 2017, 01:30:40 PM »
It's fixed. I've added Traits|Effects: to label as well. Gonna improve minor sh!t in code and push :)
Like what we're doing? Support us at:

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4706
Re: Reporting Errors:
« Reply #693 on: March 18, 2017, 03:51:59 PM »
Huh.
Any misc items with statmax field don't work. Even if stats are less than statmax field.

Like Simple Training Dummy, it should give 1 constitution every 3 days, but it does only if I remove the statmax field, while character has 20 constitution.
Want to support our h-games? You can do it at:

Offline Lurker

  • Hero Member
  • *****
  • Posts: 688
Re: Reporting Errors:
« Reply #694 on: March 18, 2017, 08:24:07 PM »
Don't know if its a bug but girls in the slave market get random traits and not the ones set in the json?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #695 on: March 19, 2017, 02:08:06 AM »
Don't know if its a bug but girls in the slave market get random traits and not the ones set in the json?

It prolly is if that's true but we will soon update character creation as a concept by introducing tiers and get them to be more oriented towards specific jobs. It's really difficult to work with chars this complex otherwise.

Huh.
Any misc items with statmax field don't work. Even if stats are less than statmax field.

Like Simple Training Dummy, it should give 1 constitution every 3 days, but it does only if I remove the statmax field, while character has 20 constitution.

I'll take a look... where does all of this come? I thought we wrapped up item logic for beta long time ago.
Like what we're doing? Support us at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #696 on: March 19, 2017, 03:01:43 AM »
Huh.
Any misc items with statmax field don't work. Even if stats are less than statmax field.

Like Simple Training Dummy, it should give 1 constitution every 3 days, but it does only if I remove the statmax field, while character has 20 constitution.

Gonna update that code a tiny bit as well.

Code: [Select]
            if "Royal Assassin" in self.traits and item.slot in ["smallweapon", "weapon", "body", "cape", "feet", "wrist", "head"]:
                self.stats.max["attack"] += int(item.price*0.01)
                self.mod_stat("attack", int(item.price*0.01))
            elif "Armor Expert" in self.traits and item.slot in ["smallweapon", "weapon", "body", "cape", "feet", "wrist", "head"]:
                self.stats.max["defence"] += int(item.price*0.01)
                self.mod_stat("defence", int(item.price*0.01))
            elif "Arcane Archer" in self.traits and item.type in ["bow", "crossbow", "throwing"]:
                self.stats.max["magic"] += int(item.max["attack"]*0.5)
                self.stats.imod["magic"] += int(item.mod["attack"]*0.5)

Is this intentional? I mean how it's on the first indent of that function and not on max indent? Looks like this can go both ways.
Like what we're doing? Support us at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #697 on: March 19, 2017, 03:24:55 AM »
I am going to push a possible interim fix with better code clarity as well. I believe that it may have been this line:
Code: [Select]
if not item.statmax or getattr(self, stat) >= item.statmax:
for some reason, it would seem, that we only apply statmax is stat is larger than statmax or is equal to it...? I want to take a look at items counter as well just in case but this will prolly fix it.
Like what we're doing? Support us at:

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4706
Re: Reporting Errors:
« Reply #698 on: March 19, 2017, 03:37:16 AM »
I'll take a look... where does all of this come? I thought we wrapped up item logic for beta long time ago.
I suppose we didn't tested it well enough after the rewrite made together with Gismo.

Is this intentional? I mean how it's on the first indent of that function and not on max indent? Looks like this can go both ways.
Max indent works via elif, meaning only one special trait can be active.
Code: [Select]
                if "Left-Handed" in self.traits and item.slot == "smallweapon":
                    self.stats.max[key] += item.max[key]*2
                elif "Left-Handed" in self.traits and item.slot == "weapon":
                    self.stats.max[key] += int(item.max[key]*0.5)
                elif "Knightly Stance" in self.traits and key == "defence" and item.type == "armor":
                    self.stats.max[key] += int(item.max[key]*1.3)
                elif "Berserk" in self.traits and key == "defence":
                    self.stats.max[key] += int(item.max[key]*.5)
                elif "Berserk" in self.traits and key == "attack":
                    self.stats.max[key] += int(item.max[key]*2)
By moving part of the code outside I removed it from the elifs chain, thus more than one trait can be active when needed.
Want to support our h-games? You can do it at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #699 on: March 19, 2017, 03:41:49 AM »
I suppose we didn't tested it well enough after the rewrite made together with Gismo.

Yeah... we still use strings to for counters. I want to see if we can flip that to object, we did that everywhere else, crew is working here atm so I can't do time consuming things like jobs atm.

Max indent works via elif, meaning only one special trait can be active.

So it was intended. You sort of put extra modifiers between max and min stats, without an empty line so I thought you maybe misindented it.


And I need to check removal of items as well.


I am also wondering if it may be worth the effort to combine equip and unequip methods into one method and reverse just the operators/value. It'll be a tiny bit messier but may be worth the effort cause we would not have to double all that traits conditioning. Maybe even less prone to errors.
« Last Edit: March 19, 2017, 03:52:01 AM by Xela »
Like what we're doing? Support us at:

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4706
Re: Reporting Errors:
« Reply #700 on: March 19, 2017, 04:08:15 AM »
I am also wondering if it may be worth the effort to combine equip and unequip methods into one method and reverse just the operators/value. It'll be a tiny bit messier but may be worth the effort cause we would not have to double all that traits conditioning. Maybe even less prone to errors.
Yeah, it would also make adding traits which change items effects easier.
Want to support our h-games? You can do it at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #701 on: March 19, 2017, 04:15:46 AM »
Yeah, it would also make adding traits which change items effects easier.

Agreed, definitely worth the effort. When writing original items code, stuff like objects and operators and etc. confused the sh!t out of me, which is no longer the case. Best thing is that it'll prolly make the code way better manageable.
Like what we're doing? Support us at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #702 on: March 19, 2017, 05:13:57 AM »
Looks line min stats were applied twice...
Like what we're doing? Support us at:

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4706
Re: Reporting Errors:
« Reply #703 on: March 19, 2017, 08:22:15 AM »
Well, misc items are totally screwed now.
Code: [Select]
While running game code:
  File "game/library/screens/next_day.rpy", line 120, in script call
    call next_day_controls
  File "game/library/screens/next_day.rpy", line 120, in script call
    call next_day_controls
  File "game/library/items/chars_equipment.rpy", line 194, in script
    python:
  File "game/library/items/chars_equipment.rpy", line 235, in <module>
    dummy.unequip(focusitem, unequip_slot)
  File "game/library/characters/classes - characters.rpy", line 1983, in unequip
    del(self.miscitems[item])
KeyError: <store.Item object at 0x0E8F8330>
After equipping Simple Training Dummy on MC, waiting for 3 days and then unequipping it.
Want to support our h-games? You can do it at:

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6835
  • "It's like hunting cows"
Re: Reporting Errors:
« Reply #704 on: March 19, 2017, 08:51:26 AM »
Fixed, I need to come up with better way to create dummies... prolly post beta.
Like what we're doing? Support us at: