devolution

Author Topic: General Discussion  (Read 3821663 times)

0 Members and 22 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8625 on: October 18, 2016, 01:05:55 PM »
I can't see why not... We would have to generate names and tasks for these quests anew every time but it should work just fine.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8626 on: October 18, 2016, 01:12:39 PM »
Quests should have unique names, no? Ie register_quest("Strange Idol", manual=None).

While all quests to kill enemies inside SE would be called Extermination for example.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8627 on: October 18, 2016, 01:25:10 PM »
Quests should have unique names, no? Ie register_quest("Strange Idol", manual=None).

While all quests to kill enemies inside SE would be called Extermination for example.

System might break but that's not how it should be done. We can assign more unique names when these quests are randomly generated and keep track of what we're doing. Alternatively, we can create unique ids for every such quest since we're going to handle them in code always and modders don't require direct access.

New funcs for prettier code:

Code: [Select]
    # Unility funcs to alias otherwise long command lines:
    # TO BE USED IN LABELS (during gameplay aka not in init)!
    def create_quest(*args, **kwargs):
        return register_quest(*args, **kwargs)
   
    def advance_quest(name, *args, **kwargs):
        quest = pytfall.world_quests.get(name)
        quest.next_in_label(*args, **kwargs)
       
    def finish_quest(name, *args, **kwargs):
        quest = pytfall.world_quests.get(name)
        quest.finish_in_label(*args, **kwargs)
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8628 on: October 18, 2016, 01:38:34 PM »
Smart thing would be to simply register all events and quests after game start... might be worth looking into. It's most likely the reason why Thewlis passes around strings during events instead of the objects.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8629 on: October 18, 2016, 02:28:20 PM »
It could also be an internal SE-only system which has nothing to do with usual quest system, I suppose. You won't meet many enemies and find many loot outside of it.


Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8630 on: October 18, 2016, 02:45:05 PM »
They have some good ideas for traits in the aevojoey's WM. We cannot take game breaking stuff like blind or deaf, it would require rewriting most interactions to make these traits work as they should.
But traits like Bad Eyesight or Open Minded will be fun and simple to add.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8631 on: October 19, 2016, 03:25:39 AM »
Xela, I need a function which will return the total amount of X item in inventory of provided character or list of characters, and false if they have none.
« Last Edit: October 19, 2016, 04:33:37 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8632 on: October 19, 2016, 12:49:40 PM »
Xela, I need a function which will return the total amount of X item in inventory of provided character or list of characters, and false if they have none.

Code: [Select]
    def has_items(item, chars):
        amount = 0
        for c in chars:
            amount += c.inventory[item]
        return amount

Just pushed. I woke up at 6 am and just got back home so I cannot do more than this tonight :(

False is an alias for 0 in python so unless you do something crazy like:

Code: [Select]
if has_item("name") is False:
    ...

and stick with normal syntax, like:

Code: [Select]
if not has_item("name"):
    ...

or

Code: [Select]
if has_item("name") > 0:
    ...

It should be fine. This is untested but it should just work. I just pushed the func. It expects an iterable like list or teams as chars argument, just one char will not work unless it's a list or team with one char in it.
« Last Edit: October 19, 2016, 12:51:13 PM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8633 on: October 19, 2016, 12:59:40 PM »
Yeah, it's sufficient for my goals, ie counting consumables. But it's not all-purpose, it doesn't see equipped items.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8634 on: October 19, 2016, 02:55:22 PM »
doesn't see equipped items.

Those are removed from inventory but it can be arranged.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8635 on: October 20, 2016, 01:19:59 PM »
Those are removed from inventory but it can be arranged.
It'll add there comment that it should be done after the beta.

Done with the village, finally. There are a few places that could be improved or fixed (not by me) before the release though.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8636 on: October 21, 2016, 05:59:47 AM »
The game ignores all traits effects atm. I need them working to add a few new ones.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8637 on: October 21, 2016, 08:23:58 AM »
The game ignores all traits effects atm. I need them working to add a few new ones.

What does this mean? Effects field is not applied (I thought we tested it)?
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #8638 on: October 21, 2016, 08:47:14 AM »
I am going to clean-up/refactor Inventory code. Gonna port generic parts of it to BR tonight and we need better filters, not mentioning that parts of it seem fucked due to being ancient and modified by three or four people...
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #8639 on: October 21, 2016, 09:35:52 AM »
I dunno why exactly they don't work if that's what you ask  :)
They worked at some point, but not anymore. If you give character Pessimist trait, her joy is not going to decrease every day like it should. For testing I even changed the Pessimist code from -1 to -50 joy per day to make sure, still 100 joy every day. Same for other traits effects.