devolution

Author Topic: General Discussion  (Read 3821654 times)

0 Members and 44 Guests are viewing this topic.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5655 on: August 29, 2015, 12:04:03 PM »

Code: [Select]
if not char.alive:
    # Character is dead...

Should. If you need to and that to string conditions: "char.alive" will make sure that the event/button will only appear if character is alive.

*I'll look into a possibility of preventing dead chars from interacting with the open world, there should already be some of these checks in place.

Actually, don't use that... I'll add a new property:

Code: [Select]
char.is_available
with my next push. We'll condition that properly as we develop the game, alive character, may still be exploring some cave miles away for examples.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5656 on: August 29, 2015, 12:21:02 PM »
Doesn't making interface require a fair bit of coding? I've seen Gismo's pushes, it's 10 times more complex than anything related to pure content.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5657 on: August 29, 2015, 12:25:11 PM »
Doesn't making interface require a fair bit of coding? I've seen Gismo's pushes, it's 10 times more complex than anything related to pure content.

Well, I had to fix 90% of his code at first but he got good at it eventually. I need graphical elements at the very least... Ren'Pys gui code is not hard to write.

*Can you drop into the chatroom? I need to know what you want from the Interaction module.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5658 on: August 30, 2015, 08:42:51 AM »
I hoped to not use dozens new global flags, so I made quest like
    if _return == "House_5":
        if pytfall.world_quests.get("Sixth Sense").stage < 1:
            $ renpy.hide_screen("pyt_hiddenVillage_entrance")
            $ pytfall.world_quests.get("Sixth Sense").stage = 1
ie when you do it in matrix for the first time, you set quest stage to 1.

And then I made
register_event("karin_first_meeting", quest="Sixth Sense", dice=None, run_conditions=["pytfall.world_quests.get('Sixth Sense').stage = 1"], max_runs=1)
ie that event should run when quest stage is 1.

Of course that doesn't work.
I know that $ pytfall.world_quests.get("Sixth Sense").stage = 1 works, because I have else line after it that leads to normal GMs. And after you click the second time, you run GMs indeed.
Meaning quest cannot see its own stage. Wtf? It was supposed to work with any conditions, not only with those that I don't want to use  :D
« Last Edit: August 30, 2015, 08:50:14 AM by DarkTl »

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5659 on: August 30, 2015, 10:49:18 AM »
That is perfectly reasonable:

for c in chars:
    if c.origin = "From Outer Space":
        c.set_flag("Doesnt_like_to_mingle_with_mere_earthlings")
That doesn't work btw.

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5660 on: August 30, 2015, 10:50:41 AM »
That doesn't work btw.

Should be == instead of =.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5661 on: August 30, 2015, 10:54:48 AM »
I know. It doesn't work either way.

without python:

File "game/library/events/StoryI/forest_meeting.rpy", line 20: expected statement.
    for c in chars:

with python:

While running game code:
  File "game/library/events/StoryI/forest_meeting.rpy", line 20, in script
    python:
  File "game/library/events/StoryI/forest_meeting.rpy", line 22, in <module>
    if c.origin == "Naruto":
AttributeError: 'unicode' object has no attribute 'origin'
« Last Edit: August 30, 2015, 11:07:22 AM by DarkTl »

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5662 on: August 30, 2015, 12:58:15 PM »
in char.values ()

I am on Android.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5663 on: August 30, 2015, 01:20:12 PM »
'NoneType' object has no attribute 'values'...
This is stupid. Just try it yourself when you will have time.

Also, I need to run events after the next day. I can do it via $ register_event_in_label("reflection_quest_part_two", quest="Settling in the city", locations=["mainscreen"], run_conditions=["hero.gold >= 3000"], dice=100, max_runs=1)
but during it brothel interface prevents me from seeing anything that is going on in the event. So I need to know how to hide it.

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5664 on: August 30, 2015, 01:39:45 PM »
I think I'll make what I can with existing tools, and then will push a text file with description of how events should work in reality. Then you will add all needed options at once.

Of course I still will need a working option for giving flags to chars with the same origin in the near future   :D

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5665 on: August 30, 2015, 02:31:23 PM »
'NoneType' object has no attribute 'values'...
This is stupid. Just try it yourself when you will have time.

It's not that complicated:

Code: [Select]
for i in chars.values():
    if i.origin == "Some Origin":
        i.set_glag("Some Flag")

Also, I need to run events after the next day. I can do it via $ register_event_in_label("reflection_quest_part_two", quest="Settling in the city", locations=["mainscreen"], run_conditions=["hero.gold >= 3000"], dice=100, max_runs=1)
but during it brothel interface prevents me from seeing anything that is going on in the event. So I need to know how to hide it.

Find out what the brothel screen is called and hide it. Maybe hs() funciton will work as well. "mainscreen" is not brothel interface btw.
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5666 on: August 30, 2015, 03:17:02 PM »
The game doesn't show where it jumps when you go to brothel screen, unlike any other jumps we have...
I don't know why, but mainscreen works right after next day for me as well.

So far conditions system for quests is vague as hell. Some simply don't work at all ("pytfall.world_quests.get('Sixth Sense').stage = 1"). I have to use trigger_type="auto" and jump to needed events directly using checks outside of quests checks.

I wonder how well Thewlis tested this stuff...

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5667 on: August 30, 2015, 04:01:22 PM »
The game doesn't show where it jumps when you go to brothel screen, unlike any other jumps we have...
I don't know why, but mainscreen works right after next day for me as well.

So far conditions system for quests is vague as hell. Some simply don't work at all ("pytfall.world_quests.get('Sixth Sense').stage = 1"). I have to use trigger_type="auto" and jump to needed events directly using checks outside of quests checks.

I wonder how well Thewlis tested this stuff...

I'll need to see the code and you'll have to tell me exactly what you're trying to do. I am not even sure we check for events and quests before/after next day... I recall that we check for them in the mainscreen.

Edit: I fixed some minor issues with Karins quest.
« Last Edit: August 30, 2015, 07:02:21 PM by Xela »
Like what we're doing?

Offline DarkTl

  • Hero Member
  • *****
  • Posts: 4737
Re: General Discussion
« Reply #5668 on: August 31, 2015, 10:30:18 AM »
Thanks to the new quest buttons system chars can have unique options if you will never delete the button label. That's pretty cool.

I don't know, maybe I do it wrong... You can change quest stage manually like  $ pytfall.world_quests.get("Sixth Sense").stage = 1, I know this for sure. Stages change indeed.
Why stuff like register_event("karin_first_meeting", quest="Sixth Sense", dice=None, run_conditions=["pytfall.world_quests.get('Sixth Sense').stage = 1"], max_runs=1) doesn't work? Maybe something is wrong with triggers, or I must specify location?
Using quest stages like that will allow us to not use global flags in quests most of the time!

Offline Xela

  • Global Moderator
  • *****
  • Posts: 6893
  • "It's like hunting cows"
Re: General Discussion
« Reply #5669 on: August 31, 2015, 10:36:56 AM »
.stage = 1

Maybe == instead of =?

And make sure event is destroyed after it executed, if your quest is canceled/finished and event remains with this condition, game will crash. I'll add a failsafe option if I don't forget tonight.
Like what we're doing?