Author Topic: General Discussion  (Read 3821917 times)

0 Members and 19 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7245 on: April 30, 2016, 02:09:19 AM »
And I need to know how to fail quests via lines.

At least the frog quests are evened like this, I guess that you could simply write that it was failed:

Code: [Select]
            $ pytfall.world_quests.get("Frog Princess!").finish_in_label("You've rejected the Frog Princess Quest! It's further fate is unknown.")
            $ pytfall.world_events.kill_event("show_frog")

Also this:

Code: [Select]
        def fail_quest(self, quest):
            """
            Fails a quest.
            """

so prolly:
Quote
$ pytfall.world_quests.fail_quest("Frog Princess!")

did you look at the code? Do this ways work or not? I think fail might also throw a pop-up...
« Last Edit: April 30, 2016, 02:16:57 AM by Xela »
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7246 on: April 30, 2016, 02:28:35 AM »
Thewlis also seems to add new events to quests after he does the next in label thing, you do that the other way around. I don't know man... take a look at his example and comments, quests also worked for me when I tried them. If not, I'll take a look at the quests/code that is working poorly tonight.

===>>
Looks like I got another hour to burn, gonna take a looksie at your quests...
« Last Edit: April 30, 2016, 03:17:07 AM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7247 on: April 30, 2016, 04:35:47 AM »
I had this issue since I tried to make my first events for the village a few months ago. Back then I solved it by adding manual=True to quests, it prevents autodeleting in any case. But it's not really a solution, it's a workaround. We have to figure out how to use the garbage clearing system properly, or rewrite it if it cannot work properly.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7248 on: April 30, 2016, 04:43:46 AM »
I had this issue since I tried to make my first events for the village a few months ago. Back then I solved it by adding manual=True to quests, it prevents autodeleting in any case. But it's not really a solution, it's a workaround. We have to figure out how to use the garbage clearing system properly, or rewrite it if it cannot work properly.

manual True is the solution, not a workaround. Quest system has it's own progression mechanism which Thewlis explained on the forum somewhere I believe. If you want to do the manual thing, us that.

Otherwise, your quests had some other issues:

1) No conditions and you've defaulted dice to 0... meaning that the event may never run.
2) You've registered them in a label using a function that only worked in labels. That means they were never added to the event manager at all.
3) You misnamed the one of the event labels.

=====>>
This is it for now, I got to go soon and I don't like posting from Android much :D
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7249 on: April 30, 2016, 04:48:35 AM »
Hm?
Quote
locations=["all"], start_day=day + 2, trigger_type="auto"
But it should start it in any location at the day+2 day. What kind of condition it might need? Condition="True"?
« Last Edit: April 30, 2016, 04:52:23 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7250 on: April 30, 2016, 04:54:21 AM »
Hm?But it should start it in any location at the day+2 day. What kind of condition might need?

No... only dice=100 will ensure that the event is ran or run condition with ["True"] in it. High priority may also be a good idea.

http://www.pinkpetal.org/index.php?topic=1291.msg31080#msg31080

What Thewlis wrote on quests...

===>>
We also don't auto run more than one event per interaction I think... that might be worth looking into at some point. Maybe adding some new special argument to ensure that at least some event can run until the main loop ends.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7251 on: April 30, 2016, 06:07:29 AM »
manual True is the solution, not a workaround. Quest system has it's own progression mechanism which Thewlis explained on the forum somewhere I believe.
Yeah, and I have to figure out how to use the quest system without manual True. It's reserved for cases when it's impossible to make things work via normal ways, I doubt our quests are that complex.

1) No conditions and you've defaulted dice to 0... meaning that the event may never run.
Better than 50 though, now I immediately see issues with missing dice and can fix it, before I had only 50% chance to do it  :D

2) You've registered them in a label using a function that only worked in labels. That means they were never added to the event manager at all.
I don't get this one. How could it possibly matter where I register an event as long as I do it before quitting the scene, and why such a major limitation even exists?

Created a new issue about quests popups.
« Last Edit: April 30, 2016, 03:57:04 PM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7252 on: April 30, 2016, 03:31:01 PM »
Oh, wait.
Any quest that doesn't have any events that belong to them waiting in the event manager will be automatically failed.
I didn't know that... it's odd that frog thing doesn't fail half way then, I'll take a look at it later.
Really? I'm sure you're the one that asked me to put that in...
So you created the concept of failing out of nowhere quests that haunts me all this time. Thanks, Xela -_-

Come to think of it... Why events use separated dice which also has a priority over conditions thus making them useless, if you can include dice into conditions, and they even will work together?
« Last Edit: April 30, 2016, 04:16:05 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7253 on: April 30, 2016, 04:50:43 PM »
Yeah, and I have to figure out how to use the quest system without manual True. It's reserved for cases when it's impossible to make things work via normal ways, I doubt our quests are that complex.

If you "have" to, than by all means. I've asked for a system that could log events progression, that is what I got out of quests system and that is what I understand about it. If you want to know more, read the code/comments and act. As far as I am concerned, I didn't have to do a damn thing and shit got done and it does exactly what I asked for, so ima happy :D

Better than 50 though, now I immediately see issues with missing dice and can fix it, before I had only 50% chance to do it  :D

Matter of opinion I suppose, for me 50 would be more likely to get people to condition their events properly but it's not like giving a shit either way is my thing. We could debate if 0/50/100/None/False/True was the best value there till the end of times.

I don't get this one. How could it possibly matter where I register an event as long as I do it before quitting the scene, and why such a major limitation even exists?

Ren'Py internal structure, you've used "in label" function before (I've seen you do it in code)... in any case, there is a good chance that it'll just work now after my last push.

Created a new issue about quests popups.

Ok, I doubt that it's worth messing with atm, especially since Thewlis made it optional (button in quests log).

Oh, wait.So you created the concept of failing out of nowhere quests that haunts me all this time. Thanks, Xela -_-

No idea, I asked Thewlis to create a system that could log event progression (and call it quests), as far as I am concerned, he did that. I didn't ask for anything else, so everything else is a bonus. I don't know why he coded that bonus in and I keep forgetting how exactly it is working, but I know that he did what I asked him to and how to use that system, everything else I don't really give a sh!t about.

Come to think of it... Why events use separated dice which also has a priority over conditions thus making them useless, if you can include dice into conditions, and they even will work together?

Simplification and speed. Dice outside of a condition string is a lot faster. I've already wrote about a lot of people having concerns about speed of string evaluations in Python. I thought that it was a legitimate concern, back when I wrote the event system, now I know that it really wasn't (because it is lightning fast either way), not mentioning that I know how to create bytecode now which removes most of these concerns instantly. I did that in DisplayableSwitcher UDD.


It's all BS and moot points at the end of the day, you don't like dice and want to put it into conditions, just do that. Noone is forcing you to use them. You cannot figure out how quests work? Just set the quest to manual True and use it as a log as I do. I figured out what Thewlis meant to do with the (bonus to the) quest system on soon after he wrote it but it's not what I've asked from it and not how I am going to use it any time soon.
Like what we're doing?

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7254 on: April 30, 2016, 04:57:22 PM »
Just for the record, Thewlis seemed to think along the same lines, than insane evaluation class he wrote for ST/Schools pretty much allows to add conditions without compiling the strings to code and that took effort and a lot of time. I believe that we both were wrong and that precompiled code would have worked perfectly, but it's not my way to complain when usable sh!t gets done without me having to lift a finger :D
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7255 on: April 30, 2016, 05:11:28 PM »
Quote
        def __init__(self, name, label=None, priority=100, restore_priority=5, dice=0, start_day=1, end_day=9999999, jump=False, screen=False,
                           times_per_days=(), locations=list(), trigger_type="look_around", custom_condition=False, simple_conditions=None, run_conditions=None, stop_music=False, max_runs=0,
                           quest=None)
10 000 000 is a huge number, but wouldn't be easier to make it None by default and don't check at all in the default case? (also making events work forever if someone is willing to play so many turns)
« Last Edit: April 30, 2016, 05:15:34 PM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7256 on: April 30, 2016, 05:20:24 PM »
10 000 000 is a huge number, but wouldn't be easier to make it None by default and don't check at all in the default case?

Yeap, or use the infinity... lets dare them to play for that many turns  ::)

I knew very little about coding when we started and I am steadily learning by watching videos/reviewing soft/tools and etc. and not just for Python. I would have went for float("inf") without thinking if I were to code the same thing today, but I didn't code that system today, it was over an year ago :D
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7257 on: April 30, 2016, 05:36:17 PM »
Since packs, characters or pictures can be removed from the game, events related to them may also be broken...

Either we check everywhere if characters and pictures exist, or do not support removing stuff.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #7258 on: April 30, 2016, 05:38:51 PM »
Since packs, characters or pictures can be removed from the game, events related to them may also be broken...

Either we check everywhere if characters and pictures exist, or do not support removing stuff.

It's prolly a decent idea to move these events to packs somehow, it's definitely worth looking into.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #7259 on: April 30, 2016, 05:46:52 PM »
We can say a few packs are mandatory, but not everything.

There should be a way to add events and locations together with packs. Like, well, mods for bethesda games.