Author Topic: General Discussion  (Read 3821654 times)

0 Members and 43 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8955 on: November 18, 2016, 10:52:58 AM »
and it will disappear sooner than ctemp ends, I need to be sure it won't cause ctd.

I went over the code, best I can tell is: Yes.

This will happen when the counter reaches 0:

Code: [Select]
            if hasattr(self, "effects"):
                for entry in item.addeffects:
                    if self.effects[entry]['active']:
                        self.disable_effect(entry)
                       
                for entry in item.removeeffects:
                    if not self.effects[entry]['active']:
                        self.enable_effect(entry)

So it will call disable_effect method of the effect specified in the item json. As I have said before, we do not have special layer or class to keep track of effects so it will be disabled even if it was activated by something else after the item was applied.
Like what we're doing?

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8956 on: November 18, 2016, 05:57:16 PM »
Speaking of consumables, don't forget that  ideally cblock field should work in SE too.

I believe I fixed most issues, but not sure if the above was meant for me, if so please elaborate, I don't understand.

Beside the group changes there was a bug in the items transfer fixed: Items were sent the wrong way sometimes due plotting of buttons on top of one another in a loop.

The pytgroup seems to work for the transfer purpose, not sure if it can be extended to fighting. For instance, how you want to consider traits for a group depends on the situation. If we ever want to extend this, then I think we'll have to write methods that provide resolutions dependent on the situation.

The groups enable micromanagement, which should be nice later on in the game. Maybe we could let the availability of group management depend on the number and turns management jobs were fulfilled.
« Last Edit: November 18, 2016, 06:15:31 PM by picobyte »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8957 on: November 18, 2016, 07:37:37 PM »
No, he aimed that at me :)

I believe I fixed most issues

There is still at least one issue with transfer, it doesn't seem to go through the respective func. If you mass transfer an item to a free char, they never seem to want to give it back. It works normally when old way with just the one char is used.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8958 on: November 19, 2016, 07:06:36 AM »
There is a major issue with mass equipment. Special consumables with scripted effects (they have jump_to_label field in json) are either don't work as they should or give CTD. Because they always expect a single valid target.
Such items should be unavailable for mass equipment.

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8959 on: November 19, 2016, 01:18:38 PM »
There is still at least one issue with transfer, it doesn't seem to go through the respective func. If you mass transfer an item to a free char, they never seem to want to give it back. It works normally when old way with just the one char is used.

This seems fixed now, free characters seem more selective. Or is there still odd behaviour?

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8960 on: November 19, 2016, 01:27:02 PM »
Special consumables with scripted effects (they have jump_to_label field in json) are either don't work as they should or give CTD. Because they always expect a single valid target.
Such items should be unavailable for mass equipment.

I've disabled their equipment or transfer for groups. Is that sufficient?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8961 on: November 19, 2016, 02:09:56 PM »
This seems fixed now, free characters seem more selective. Or is there still odd behaviour?

Yes, but I am not sure where :( I still managed to break it through mass transfer somehow, gonna test it some more right now.

I'd also like to thank you for your persistence, most coders give up quickly after finding out how much logic there is behind the game and leave the mess to us:

Dus: Van haarte bedankt :)
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8962 on: November 19, 2016, 02:33:33 PM »
I've disabled their equipment or transfer for groups. Is that sufficient?
Yeah, I don't see any more problems there.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8963 on: November 19, 2016, 02:40:59 PM »
Yes, but I am not sure where :( I still managed to break it through mass transfer somehow, gonna test it some more right now.

I think this was a testing fluke. I transferred an item using the transfer screen without realizing that it was a consumable and free chars don't seem to ever give those back per design. There do not seem to be any more issues I can find atm.
Like what we're doing?

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8964 on: November 19, 2016, 02:57:39 PM »
Yes, but I am not sure where :( I still managed to break it through mass transfer somehow, gonna test it some more right now.

I'd also like to thank you for your persistence, most coders give up quickly after finding out how much logic there is behind the game and leave the mess to us:

Dus: Van haarte bedankt :)

Ha, graag gedaan hoor! [happy to help you.] But it would have probably been merely a halfway decent hack without the scrutiny of you two :-)

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8965 on: November 19, 2016, 07:38:08 PM »
I notice some issues still though. If you try to group equip something that gives refinement.

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8966 on: November 19, 2016, 08:19:12 PM »
I get an error when I focus on running boots which has -20 refinement as stats. In the PytChar class it seems refinement is not defined as a stat, but rather a skill? is the items_feet json entry wrong?
Code: [Select]
{
    "id": "Running Boots",
    "desc": "Boots made of firm but light leather. Just wearing them arouses a desire to run.",
    "icon": "content/items/feet/rb.png",
    "price": 125,
    "sex": "unisex",
    "chance": 70,
    "badness": 75,
    "eqchance": 25,
    "hidden": false,
    "infinite": false,
    "slot": "feet",
    "type": "dress",
    "evasion_bonus": 1,
    "max": {"vitality": 15},
    "mod": {"agility": 10, "refinement": -20},
------------------------------^^^^^^
    "mod_skills": {"refinement": [0, 0, -0.08, 0, 0]},
    "locations": ["Tailor Store", "Ninja Shop"],
    "goodtraits": ["Athletic"]
    },

Edit: If the json is incorrect, there are more items with the same issue elsewhere.
« Last Edit: November 19, 2016, 08:50:12 PM by picobyte »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8967 on: November 20, 2016, 04:59:46 AM »
Edit: If the json is incorrect, there are more items with the same issue elsewhere.

It's Dark's department but stat field is prolly old code that hasn't been adapted to skills system yet.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8968 on: November 20, 2016, 05:32:28 AM »
Yeah, refinement used to be a stat 2 years ago because we didn't have skills system, now it's a skill. It's hard to catch all such cases manually.

Offline picobyte

  • Jr. Member
  • **
  • Posts: 75
Re: General Discussion
« Reply #8969 on: November 20, 2016, 06:27:50 AM »
Yeah, refinement used to be a stat 2 years ago because we didn't have skills system, now it's a skill. It's hard to catch all such cases manually.

No problem, can list the ones, they are listed in the backtrace after "strict" schema validation. For the items in git I have removed the refinement stat entries. Or is that too simple? Also some characters have it, they are not in git.

Code: [Select]
content/rchars/random_classes/data_Dark_Elf.json
content/rchars/random_classes/data_Noble_Elf.json
content/rchars/random_classes/data_Ranger_Elf.json

If there's more out of date, take a look at the schema/data_types.json. I can fix entries in json semi-automated, but I'll have to tackle each one at a time.