A problem with redirect_scene inside stat-screen

Consider,

(Ignore indentation, I have it correct in the CSIDE)

#Relationship Events
                        *label I_e 
                        *fake_choice
                            *selectable_if (I_events_unlocked >= 1) #Event 1: Sword of Pain
                                *if I_events_done >= 1
                                    *fake_choice
                                        #Replay Event
                                            *redirect_scene relation sword_of_pain
                                        #Return
                                            *goto I_e
                                *else
                                    *fake_choice
                                        #Play Event
                                            *redirect_scene relation sword_of_pain
                                        #Return
                                            *goto I_e

This redirects the flow to the required scene, but if you enter the stat-screen while in the relationship event, exiting takes you out of the relationship event and back to where you first entered the screen from, which is an issue since I want the player to be able to access the stat-screen while in the relationship event.

Is there any fix to this?

1 Like

I think you may want *gosub_scene here instead. *redirect_scene is only intended for use inside the stat screen.

This is actually all inside the stat_screen. This is the relationship tabs inside the stat_screen.

Ah right, I understand!

I will say I don’t have experience using *redirect_scene but my impression from the below guide is that it’s more intended for changing variables instantly rather than playing through something substantial via the stats screen.

So
 there’s no way to run a narrative by *redirect_scene?

Well, there is. What you are doing should work!

I just copied down your code into my stats screen, made a relation scene, made a label called sword_of_pain, and tried it out. It worked! Like, it..just works? I’m not having the issue of going back to where I was before entering the event.

So let me break it down,

Stats
*choice
 #Relationship Events
  *label I_e 
  *choice
   *selectable_if (I_events_unlocked >= 1) #Event 1: Sword of Pain
    *if (I_events_done >= 1)
     *choice
      #Replay Event
       *redirect_scene relation sword_of_pain
      #Return
       *goto I_e
    *else
     *choice
      #Play Event
       *redirect_scene relation sword_of_pain
      #Return
       *goto I_e

This is what I have in my stats_screen.

And my startup looks like this.

startup
*scene_list
       startup
       relation

*create i_events_unlocked 2
*create i_events_done 0

Just testing some stuff.
*page_break
*comment There is nothing past this page break, I just need it so the game can load without ending.

And the relation scene looks like,

relation
*label blah
Blah Blah Blah Blah

Blah Blah

Blah Blah

Blah Blah




*label sword_of_pain

This is a label. Yay!

Let's see if stats screen brings me away.


*page_break
*label Idk

Blah Blah

Blah Blah

Blah Blah.

*page_break
*label faker

Great e-sports player!

However this is a test.
*page_break end
*set i_events_done 2
*goto_scene startup

And it all works fine. If I enter a event on startup, go into my stats screen while in said event, and exit the stats screen, I stay right where I am in the event. I don’t go back to startup.

So, like I said, it should work. It does work for me. So, could we get a bit more detail?

Like a step by step of what you want to happen, and then a step by step of what does happen for you.

Edit: (By the way, I am so here for what you are trying to do. I want more people to use *redirect_scene so much, it just is a great command.)

2 Likes

Basically, what I want is to goto the event, also have the stat_screen available in said event, and then go back with *return to the reltionships tabs where everything originally started.

Let me break it down:

18

This is telling the player that the relationship event is unlocked. So, now they can head to the stat_screen and play it


They have accessed the stat_screen. All well and good. Which takes them here:
16

Now in the middle of the event:

They decide to check the stat_screen

They see the Emulation is changed, which is a very story and lore relevant thing (Which is why I want the stat_screen to be accessible during the event)

So now they back:

18

Poof
 everything’s gone for some reason.

What was supposed to happen was, they continue the event, play through it. and reach the end:

17

And come back here:

Edit: LMAO return doesn’t work with the *redirect_scene I am literally crying

1 Like

Sorry, late reply.

But you know what’s funny? I was gonna say you could use *gosub instead of redirect.

My reasoning was that redirect reloads the game into a new page at the scene and/or label you set it to. While *gosub_scene relation sword_of_pain and a *return when the event is over would do exactly what you want.

But yea, I was late and you already figured that out. So instead I’m going to gush about the snippets of game you’ve shown.

1st: I really love getting notifications in game so “The relationships tab has been updated” pop-up makes me happy.
2nd: “After a month or so of pleading(, . -)which made you lose more self-respect” Has both a humorous and serious tone at the same time. It seems like you will straddle the line between funny and heart wrenching. I deeply like stories that do this.
3rd: The use of the word “Emulation” has me very intrigued. The further use of the title “The Dreamer” (In crazy font) and “I think I had a dream.” like it’s a omen, gives me surrealist feelings.

All in all, I think you know how to solve your problem, I also think I will very much so play and enjoy your game. It has somehow hooked me from almost nothing. Well done!

(P.S If you decide to keep using redirect, you will have to make one of these for every event end.)

  *if scenevar = "startup"
   *if (scenevar = "startup") and (labelvar = "00")
    *redirect_scene startup 00
   *elseif (scenevar = "startup") and (labelvar = "01")
    *redirect_scene startup 01
   *elseif (scenevar = "startup") and (labelvar = "02")
    *redirect_scene startup 02
   *elseif (scenevar = "startup") and (labelvar = "03")
    *redirect_scene startup 03
   *elseif (scenevar = "startup") and (labelvar = "04")
    *redirect_scene startup 04
   *elseif (scenevar = "startup") and (labelvar = "05")
    *redirect_scene startup 05
   *elseif (scenevar = "startup") and (labelvar = "06")
    *redirect_scene startup 06
   *elseif (scenevar = "startup") and (labelvar = "07")
    *redirect_scene startup 07
   *elseif (scenevar = "startup") and (labelvar = "08")
    *redirect_scene startup 08
  *elseif scenevar = "startup2"
   *if (scenevar = "startup2") and (labelvar = "00")
    *redirect_scene startup2 00
   *elseif (scenevar = "startup2") and (labelvar = "01")
    *redirect_scene startup2 01
   *elseif (scenevar = "startup2") and (labelvar = "02")
    *redirect_scene startup2 02
   *elseif (scenevar = "startup2") and (labelvar = "03")
    *redirect_scene startup2 03
   *elseif (scenevar = "startup2") and (labelvar = "04")
    *redirect_scene startup2 04
   *elseif (scenevar = "startup2") and (labelvar = "05")
    *redirect_scene startup2 05
   *elseif (scenevar = "startup2") and (labelvar = "06")
    *redirect_scene startup2 06
   *elseif (scenevar = "startup2") and (labelvar = "07")
    *redirect_scene startup2 07
   *elseif (scenevar = "startup2") and (labelvar = "08")
    *redirect_scene startup2 08
   *else
    How did you get here?
    *ending
  *else
   How did you get here?
   *ending
2 Likes

I don’t know wht this is, and at this point, I am too afraid to ask.

Somewhat. I had to drop the stat_screen easter eggs entirely (I am still mourning that) because if a *gosub is taking place inside the stat_screen, it isn’t possible for the player to open the stat_screen cause it’s already open. That block of code you mentioned, does it enable the user to view stat_screen and also work as *return for *redirect?

LMAO free marketing from errors thread?

alright, bear with me here as I’m going to do a long post.

This makes me very sad, I don’t want you to give up on the stats_screen. I myself have a quick joke in my stats that made me go on a whole forum quest to find out how to do it.

Yes. This block of code is the result of my quest, and it should work for what you want.

So heres why this post is about to be long: I’m going to show the full code, explain why it exist, and how to do it. Here we go!

Test 1
*title Tester McTesting The First of Her Name!
*author Anonymous
*scene_list
       startup
       startup2
*comment This test makes a unbeatable loop, and you teleport

*create fakemoney 0
*create labelvar ""

*label 00
*set labelvar "00"

I really want this to work..

So I'm gonna stick it out for a bit tonight and test stuff!
*page_break
*label 01
*set labelvar "01"

1st page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 02
*set labelvar "02"

2nd page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 03
*set labelvar "03"

3rd page

Fakeline1

Fakeline2

*choice
 #Choice 1
  *label 04
  *set labelvar "04"
  This is label 4 and page 4
  *choice
   #Choice 1
    *label 07
    *set labelvar "07"
    This is label 7 and page 5
    *choice
     *selectable_if (fakemoney > 2) #Need 3
      You had money! Yea!
      *set fakemoney -3
      *goto_scene startup2
     #you don't have money.
      *ending
 #Choice 2
  *label 05
  *set labelvar "05"
  This is label 5 and page 4
  *page_break This will end the game.
  *ending
 #Choice 3
  *label 06
  *set labelvar "06"
  This is label 6 and page 4
  *choice
   #This choice ends the game.
    *ending
   #This choice doesn't.
    *label 08
    *set labelvar "08"
    This is label 8 and page 5
    *page_break this will.
    *ending
    

So what is this^ here above me? Well this is the startup scene for my test. What is the test? To reach startup2. The only way to reach startup2 is by having enough money. But if you noticed, there’s no way to get money in the scene. However, in the stats_screen


You.

Just you.
*stat_chart
 text fakemoney
*choice
 #add money
  *set fakemoney +1
  *redirect_scene startup 07
 #lose money
  *set fakemoney -1
  *redirect_scene startup 07

There is a way to make money! One problem though
it will only put you on the scene “startup”, and the label “07” This is bad. Really bad. Because it means no matter where you are in the game, you will always be put back to the scene “startup” and the label “07”.

The good new is, it does let you reach the scene startup2.

*label 00
*set labelvar "00"
*comment this is startup2
Another test!

Fakeline1

Fakeline2
*page_break
*label 01
*set labelvar "01"

1st page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 02
*set labelvar "02"

2nd page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 03
*set labelvar "03"

3rd page

Fakeline1

Fakeline2

*choice
 #Choice 1
  *label 04
  *set labelvar "04"
  This is label 4 and page 4
  *choice
   #Choice 1
    *label 07
    *set labelvar "07"
    This is label 7 and page 5
    *choice
     *selectable_if (fakemoney > 2) #Need 3
      You had money!
      *ending
     #you don't have money.
      *ending
 #Choice 2
  *label 05
  *set labelvar "05"
  This is label 5 and page 4
  *page_break This will end the game.
  *ending
 #Choice 3
  *label 06
  *set labelvar "06"
  This is label 6 and page 4
  *choice
   #This choice ends the game.
    *ending
   #This choice doesn't.
    *label 08
    *set labelvar "08"
    This is label 8 and page 5
    *page_break this will.
    *ending

The bad news is, you still need money on startup2, so you go and add some money, right? Right. But now you’re back on startup and you have to buy your way into startup2 again.

So yea, we can get to the next scene, but we can only only beat the game if you add 6 money before you reach startup2. So let’s fix this in Test 2.

Test 2

So the fix for at least being in the right scene, is very easy. Make a *create called scenevar ""
Like I did here. (ignore labelvar, I’ll get to it in Test 3.)

*title Tester McTesting The 2nd!
*author Anonymous
*scene_list
       startup
       startup2
*comment This test is winnable, but you still teleport

*create fakemoney 0
*create scenevar ""
*create labelvar ""

*label 00
*set scenevar "startup"
*set labelvar "00"

I really want this to work..

So I'm gonna stick it out for a bit tonight and test stuff!
*page_break
*label 01
*set labelvar "01"

1st page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 02
*set labelvar "02"

2nd page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 03
*set labelvar "03"

3rd page

Fakeline1

Fakeline2

*choice
 #Choice 1
  *label 04
  *set labelvar "04"
  This is label 4 and page 4
  *choice
   #Choice 1
    *label 07
    *set labelvar "07"
    This is label 7 and page 5
    *choice
     *selectable_if (fakemoney > 2) #Need 3
      You had money! Yea!
      *set fakemoney -3
      *goto_scene startup2
     #you don't have money.
      *ending
 #Choice 2
  *label 05
  *set labelvar "05"
  This is label 5 and page 4
  *page_break This will end the game.
  *ending
 #Choice 3
  *label 06
  *set labelvar "06"
  This is label 6 and page 4
  *choice
   #This choice ends the game.
    *ending
   #This choice doesn't.
    *label 08
    *set labelvar "08"
    This is label 8 and page 5
    *page_break this will.
    *ending
    

And we also need to put a *set in startup2, like so.

*label 00
*set scenevar "startup2"
*set labelvar "00"

Another test!

Fakeline1

Fakeline2
*page_break
*label 01
*set labelvar "01"

1st page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 02
*set labelvar "02"

2nd page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 03
*set labelvar "03"

3rd page

Fakeline1

Fakeline2

*choice
 #Choice 1
  *label 04
  *set labelvar "04"
  This is label 4 and page 4
  *choice
   #Choice 1
    *label 07
    *set labelvar "07"
    This is label 7 and page 5
    *choice
     *selectable_if (fakemoney > 2) #Need 3
      You had money!
      *ending
     #you don't have money.
      *ending
 #Choice 2
  *label 05
  *set labelvar "05"
  This is label 5 and page 4
  *page_break This will end the game.
  *ending
 #Choice 3
  *label 06
  *set labelvar "06"
  This is label 6 and page 4
  *choice
   #This choice ends the game.
    *ending
   #This choice doesn't.
    *label 08
    *set labelvar "08"
    This is label 8 and page 5
    *page_break this will.
    *ending

And lastly we need to change the stats_screen to reflect this new variable so..

You.

Just you.
*stat_chart
 text fakemoney
*choice
 #add money
  *set fakemoney +1
  *if scenevar = "startup"
   *redirect_scene startup 07
  *elseif scenevar = "startup2"
   *redirect_scene startup2 07
  *else
   How did you get here?
   *ending
 #lose money
  *set fakemoney -1
  *if scenevar = "startup"
   *redirect_scene startup 07
  *elseif scenevar = "startup2"
   *redirect_scene startup2 07
  *else
   How did you get here?
   *ending

So what did all of that just do? Well, now if you add money while in startup, you stay in startup.
If you add money while in startup2, you stay in startup2. But the catch is, you still teleport around. And that’s just not what we want. So time for Test 3.

Test 3

So in Test 3, we are not going to change a thing about startup and startup2. Instead, we’re going to change the stats_screen to incorporate labelvar "" (You can skip to the bottom.)

*title Tester McTesting The Savior!
*author Anonymous
*scene_list
       startup
       startup2
*comment This one works flawlessly, but too many ifs

*create fakemoney 0
*create scenevar ""
*create labelvar ""

*label 00
*set scenevar "startup"
*set labelvar "00"

I really want this to work..

So I'm gonna stick it out for a bit tonight and test stuff!
*page_break
*label 01
*set labelvar "01"

1st page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 02
*set labelvar "02"

2nd page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 03
*set labelvar "03"

3rd page

Fakeline1

Fakeline2

*choice
 #Choice 1
  *label 04
  *set labelvar "04"
  This is label 4 and page 4
  *choice
   #Choice 1
    *label 07
    *set labelvar "07"
    This is label 7 and page 5
    *choice
     *selectable_if (fakemoney > 2) #Need 3
      You had money! Yea!
      *set fakemoney -3
      *goto_scene startup2
     #you don't have money.
      *ending
 #Choice 2
  *label 05
  *set labelvar "05"
  This is label 5 and page 4
  *page_break This will end the game.
  *ending
 #Choice 3
  *label 06
  *set labelvar "06"
  This is label 6 and page 4
  *choice
   #This choice ends the game.
    *ending
   #This choice doesn't.
    *label 08
    *set labelvar "08"
    This is label 8 and page 5
    *page_break this will.
    *ending
    
*label 00
*set scenevar "startup2"
*set labelvar "00"

Another test!

Fakeline1

Fakeline2
*page_break
*label 01
*set labelvar "01"

1st page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 02
*set labelvar "02"

2nd page

Fakeline1

Fakeline2

Fakeline3

Fakeline4

*page_break
*label 03
*set labelvar "03"

3rd page

Fakeline1

Fakeline2

*choice
 #Choice 1
  *label 04
  *set labelvar "04"
  This is label 4 and page 4
  *choice
   #Choice 1
    *label 07
    *set labelvar "07"
    This is label 7 and page 5
    *choice
     *selectable_if (fakemoney > 2) #Need 3
      You had money!
      *ending
     #you don't have money.
      *ending
 #Choice 2
  *label 05
  *set labelvar "05"
  This is label 5 and page 4
  *page_break This will end the game.
  *ending
 #Choice 3
  *label 06
  *set labelvar "06"
  This is label 6 and page 4
  *choice
   #This choice ends the game.
    *ending
   #This choice doesn't.
    *label 08
    *set labelvar "08"
    This is label 8 and page 5
    *page_break this will.
    *ending
You.

Just you.
*stat_chart
 text fakemoney
*choice
 #add money
  *set fakemoney +1
  *if scenevar = "startup"
   *if (scenevar = "startup") and (labelvar = "00")
    *redirect_scene startup 00
   *elseif (scenevar = "startup") and (labelvar = "01")
    *redirect_scene startup 01
   *elseif (scenevar = "startup") and (labelvar = "02")
    *redirect_scene startup 02
   *elseif (scenevar = "startup") and (labelvar = "03")
    *redirect_scene startup 03
   *elseif (scenevar = "startup") and (labelvar = "04")
    *redirect_scene startup 04
   *elseif (scenevar = "startup") and (labelvar = "05")
    *redirect_scene startup 05
   *elseif (scenevar = "startup") and (labelvar = "06")
    *redirect_scene startup 06
   *elseif (scenevar = "startup") and (labelvar = "07")
    *redirect_scene startup 07
   *elseif (scenevar = "startup") and (labelvar = "08")
    *redirect_scene startup 08
  *elseif scenevar = "startup2"
   *if (scenevar = "startup2") and (labelvar = "00")
    *redirect_scene startup2 00
   *elseif (scenevar = "startup2") and (labelvar = "01")
    *redirect_scene startup2 01
   *elseif (scenevar = "startup2") and (labelvar = "02")
    *redirect_scene startup2 02
   *elseif (scenevar = "startup2") and (labelvar = "03")
    *redirect_scene startup2 03
   *elseif (scenevar = "startup2") and (labelvar = "04")
    *redirect_scene startup2 04
   *elseif (scenevar = "startup2") and (labelvar = "05")
    *redirect_scene startup2 05
   *elseif (scenevar = "startup2") and (labelvar = "06")
    *redirect_scene startup2 06
   *elseif (scenevar = "startup2") and (labelvar = "07")
    *redirect_scene startup2 07
   *elseif (scenevar = "startup2") and (labelvar = "08")
    *redirect_scene startup2 08
   *else
    How did you get here?
    *ending
  *else
   How did you get here?
   *ending
 #lose money
  *set fakemoney -1
  *if scenevar = "startup"
   *if (scenevar = "startup") and (labelvar = "00")
    *redirect_scene startup 00
   *elseif (scenevar = "startup") and (labelvar = "01")
    *redirect_scene startup 01
   *elseif (scenevar = "startup") and (labelvar = "02")
    *redirect_scene startup 02
   *elseif (scenevar = "startup") and (labelvar = "03")
    *redirect_scene startup 03
   *elseif (scenevar = "startup") and (labelvar = "04")
    *redirect_scene startup 04
   *elseif (scenevar = "startup") and (labelvar = "05")
    *redirect_scene startup 05
   *elseif (scenevar = "startup") and (labelvar = "06")
    *redirect_scene startup 06
   *elseif (scenevar = "startup") and (labelvar = "07")
    *redirect_scene startup 07
   *elseif (scenevar = "startup") and (labelvar = "08")
    *redirect_scene startup 08
  *elseif scenevar = "startup2"
   *if (scenevar = "startup2") and (labelvar = "00")
    *redirect_scene startup2 00
   *elseif (scenevar = "startup2") and (labelvar = "01")
    *redirect_scene startup2 01
   *elseif (scenevar = "startup2") and (labelvar = "02")
    *redirect_scene startup2 02
   *elseif (scenevar = "startup2") and (labelvar = "03")
    *redirect_scene startup2 03
   *elseif (scenevar = "startup2") and (labelvar = "04")
    *redirect_scene startup2 04
   *elseif (scenevar = "startup2") and (labelvar = "05")
    *redirect_scene startup2 05
   *elseif (scenevar = "startup2") and (labelvar = "06")
    *redirect_scene startup2 06
   *elseif (scenevar = "startup2") and (labelvar = "07")
    *redirect_scene startup2 07
   *elseif (scenevar = "startup2") and (labelvar = "08")
    *redirect_scene startup2 08
   *else
    How did you get here?
    *ending
  *else
   How did you get here?
   *ending

Here^ that right there is where the magic happens. It’s a block of *ifs that say, “If you are at A, go to B. If you are at C, go to D.” etc.

So what the hell is all of this? Why have I thrown text block after text block at you? Well, it’s so you can make your events work. What this whole thing does, is add a simple tracker to your game that is hidden from the player, that works as a rollback to where the player not should be, but actually is.

In Test 1, we can only beat the game if we add 6 money before we buy our way into startup2.
In Test 2, we can beat the game in either scene, but we teleport where we shouldn’t be.
In Test 3, no matter where we are in the game, when we open and close the stats screen, we stay where we are supposed to be. This solves the problem.

If you want to see what I mean, here’s the link to all 3 test.

Test 1: CoGDemos
Test 2: CoGDemos
Test 3: CoGDemos

1 Like
TLDR

I really like your idea, and don’t want you to give up on it.

So I dove through your code to fix it for you.

*scene_list
    prologue
    to_mais
    inauguration
    orientation
    Timeskip
    relation

*finish

Add *create scenevar "" and *create labelvar ""

*scene_list
    prologue
    to_mais
    inauguration
    orientation
    Timeskip
    relation

*create scenevar ""
*create labelvar ""

*finish

I put them below scene_list so they don’t get mixed up with all your character variables.

Now that you have a scene and label variable, just ignore them. Yes, really. You don’t have to do anything with them until you unlock a event..like this.

*fake_choice
    *disable_reuse #Inaya
        [i]*The relationships tab has been updated*[/i]
        
        *set I_affection +20
        *set I_events_unlocked +1

Since it seems that events only start being unlocked at the Timeskip scene and onwards, we can start using scenevar and labelvar like this.

*set scenevar "Timeskip"
*if I_affection >= 60
    *set I_relationship +5
*if A_affection >= 30
    *set A_relationship +5
*if (L_affection >= 1) or (L_respect >= 1)
    *set L_relationship +1
*set A_affection 0
*set I_affection 0
*set L_affection 0
*image chapter4.png center
It has been approximately 5 months since your first day at the academy. You run through the same iteration of activities each day: wake up, attend the academy, return home, put up with Aldrich, and sleep. While the topic of the Academy is breached, you often find yourself spending more time with a particular person than the others:
*fake_choice
    *disable_reuse #Inaya
        *label 00
        *set labelvar "00"
        [i]*The relationships tab has been updated*[/i]
        
        *set I_affection +20
        *set I_events_unlocked +1
        After a month or so of pleading—which made you lose more self-respect than you'd like to admit—you were successful in persuading her to teach you swordsmanship. Thus, you both enjoyed energetic morning duels in your swordplay class
        *if sweettooth = "true"
            , spent tireless evenings sparring amidst the fields of tulips, and tender dusks sharing pastries. 
        *else
            , and spent tireless evenings sparring amidst the fields of tulips. 
    *disable_reuse #Link        
        *if gender = "female"
            *set L_affection +2
        *else
            *set L_respect +2
        You are a constant subject of controversy among the students because of rumours that have somehow attached themselves to you. People don't socialise with you much, and you seldom see the other Hero Candidates in any personal capacity. 

        Link occasionally hangs out with you, unbothered by the controversies. Rather, he seems to be the only one willing to indulge you in any capacity. 
    *disable_reuse #Aiza
        *set A_affection +15
        [i]*The relationships tab has been updated*[/i]
        
        After securing intelligence that Aiza is fond of debates, you promptly raided the market for books on the art of articulation. Practical experience you gained by losing around 170 debates.
        
        In an unsuspecting recess, there was a time when Aiza came upon a brilliant idea to perform a taboo experiment which may or may not have endangered your lives, but that's a story for another time

    *disable_reuse #I have been exchanging letters with ${Firuz}
        *set F_affection +10
        *set F_relationship +5
        *set F_hope +5
        Finding ${Firuz}'s fairmail address was a memorable venture. One lead led to another, before finally you arrived at the door of Pure Purple, an inn allied with some organisation known as the 'Coup'. You would've made an enemy out of Maison's most influential underworld organisation if not for Link's timely rescue.
        
        ${Firuz} redeemed the hardships you faced by replying in positive, inquiring about your health, and sending the fingers of the underworld boss who troubled you as an apology.
*set r +1
        
*page_break
*label 01
*set labelvar "01"
Ah, academic progress... 

*if (I_events_done >= 1)
    Your sword arts class proceeds flawlessly. You had some trouble in the beginning, but training with Inaya made a huge difference. A week into the training, others ostracised you to the same category as her: never duel. Inaya and Aiza remain the only ones willing to take you on.
*else
    Your sword arts class proceeds greatly. Your minimal experience is catching up quickly, apparent in Aiza's growing victories and Inaya's clean sweeps, but with a bit of effort, you manage to stay in the upper echelons.
    
Your demolition class, presided over by the same professor, also follows progress. You understand the fundamentals quite clearly now, able to perform a few lower order spells. 
*page_break Orders?
*label 02
*set labelvar "02
*set statscreen_unlock 2
Oh yeah! You learned about that once Principle Mary finally got over the basic 6 types of Channelling, but not before digressing straight into the 'Higher Orders'. To summarise, after Order-6, classes evolve into their Higher Orders. Demolition, Harmony, Preservation, Enhancement, Encumberment, and Variance evolve into Annihilation, Equilibrium, Sustenance, Rectification, Impedance, and Entropy respectively. Things become sophisticated and a lot more nuanced in the Higher Orders as they represent the fundamental laws of the world. The complexities become apparent by the fact that Harmony, a healing class, becomes the deadliest offensive class of Channelling in existence, Equilibrium.

Orders are just the standard unit for spell measurement. Order1-Order6 deal with basic types with Order7-Order10 pertaining to the Higher Orders. Queerly, outside of them all lies a 12th Order, reserved for two miscellaneous classes of Channelling, or more accurately, concepts. 

Order-12 harbours anything pertaining to the 'Divine Order' and 'Anomaly'. The Divine-Order is a concept which defines the nature of this world. There's no tangible proof due to which the 'Divine Order' is still only a concept. 'Anomalies' refers to unexplained phenomenons like the Void.
*page_break
*label 03
*set labelvar "03"
*if harmony
    Despite her incessant discouragement, Professor Dareen Al-Maktoum is an able teacher—you learned her name after she was forced to introduce herself by Mary. She has done relatively little in terms of practical work but theory is significantly important in harmony, or so she says. After 2 consecutive months of teaching, she finally demonstrated the first spell. It’s a transparency spel—"No, you can't see through just the clothes," she had specified. ”Inspect” is what it's generally called. 

    It's a fairly simple spell. It allows the caster to perceive defective energy circulation, after which one may inspect the oddity in hopes of finding the cause. It's as difficult to master as easy it sounds, and an only oddly specific advice Professor Dareen gave you while sounding embarrassed was:

    "Never use Harmony spells on your admired unless they're on the verge of death because you [i]will[/i] face an embarrassing time." 
*page_break
*label 04
*set labelvar "04"
*if enhancement
    Enhancement isn't as difficult as it's frustrating. Distracted for a second? Do the spell again. Concentration wavered slightly? Again. Messed up the scribbling? Again! You have to rush to the Professor every time so the room doesn't explode from failed enhancements. The cherry on top, the only form of permanent enhancements, which are the coveted ones, restrict themselves to the Higher Order of Rectification; nonetheless you survive and grasp the fundamentals. 

*if preservation
    TK

*if encumberment
    Encumberment was a disaster.
    
    Your professor underestimated how shiny of a thing Encumberment is, especially for the young. The day after she thought a spell for slowing a person's body by hampering all their energy momentarily, reports piled up in Principle Mary's office of students suddenly feeling sluggish, one-sided massacres in foodfights, unfair use of encumberment in 'tag' games, and many such incidents. Despite multiple scoldings and warnings, the chaos continued. A discipline committee was temporarily established, and all the trouble-makers were taken care of in just 3 days. 
    
    Professor Reine vowed to not teach you all another encumberment spell until you could recite John Mais' "175 moral principles of Channeling" by heart. 
*page_break
*label 05
*set labelvar "05"
*if variance
    Variance proves to be a difficult endeavour. Things like psychological cues, behavioural analysis, and their relation to energy is hard to grasp. Emotions affect the regulation of energy in different ways, and you can take advantage of that by introducing alterations in its flow to help conduce certain reactions. 
    
    A week into the class, it became apparent, much to your professor's dismay, that half the students are here to learn the infamous and mythical 'Love Spell'. The perpetual gloom that haunted the classroom for days after the revelation that no such spell exists hampered the learning process, but the students recovered soon enough, having realised the other, and more useful thrice emphasised, applications of Variance.
    

In addition to academic endeavours, your time home is spent in,
*comment I won't add any more labels since it seems this next bit is not done.
*fake_choice
    #Playing Tacticia (Chess) with Aliya
        *set hobby2 "tacticia"
        You once found Aliya stooping over a wooden board, moving some pieces and talking with herself. In response to your inquiry she explained this sport known as tacticia. That was the foundation of your score of 2-155, later one being Aliya. You don't blame yourself because remembering not to take the Little Lady’s gambit or how to counter the Maison Defence is harder than half of your academic work.
    #Practising Archery
        *if hobby1 != "archery"
            *set hobby2 "archery"
        *set archery +10
        It was a peaceful morning. Dawn had just broken, and you laid slumbering. Yesterday night's exhaustion, assimilated from the dozen extra classes imposed upon you for the week, was gradually wearing off. 
        
        [i]*Chirp* *Chirp*[/i]
        
        A sparrow had seen it fit to sing a passionate monodrama right outside the window of your room. For half an hour you suffered, before getting up and throwing the first object that your hands grasped. Your shoe went flying, missing the bird considerably and smacking Mr. Jorden, who was out on a walk, on the head. The bird showed its tiny tongue and flew away.
        
        That was enough.
        
        A training field was promptly set up at your insistence. There, on the centre of that target, you daily imagined that sparrow's mocking expression. Day by day, you got closer to wiping that smirk off its face, until one day its smirking apparition lay impaled upon your arrow. Alas, you couldn't hunt the actual bird down, but you continue practising in preparation of the fateful day you will encounter that beast again. 
    #Learning to play different instruments from Aliya
        *set hobby2 "music"
        Gentle weekends spent in listening to the fine resonance of the violin pervading through the great hall, as you dined on steaming 
        *if sweettooth = "true"
            croissants 
        *else
            sausages 
        , inspired in you a passion to acquaint yourself with those tender melodies. In this trance you asked Aliya for a turn, and consequently had to sleep hungry as all the chefs were rushed to harmonists. Aliya herself was so traumatised she didn't leave her room for the following two days. 
        
        The third day, she took it upon herself to rectify your lack of musicianship, so the World my be spared of another 'Disaster of tones'. She didn't relent at just the violin, you were too big of a 'musical terror' for that. The flute, the cello; she even imposed upon you the piano. 
        
        Your debut—the real debut, not the Disaster of Tones, brought forth tears of happiness, though she denies that vehemently to this day.
    #Gobbling up historical records and the World's history
        *set hobby2 "history"
        Dissatisfied with your lack of knowledge and Aliya's occasional teasing that you can't even name the last 5 Heroes, you sought refuge with Aldrich in the library. Through words enclosed within that room, you vicariously explored the political rivalry between Lakehold and Servalis—as the largest port and silk traders respectively, the caves of Amartia to north and the Endless Mist to the east, and various cities and nations each with its own place in the World; some a haven for tourists for their mountain ranges and valleys, some economical hubs for their gifted geography, and some renowned like Maison for their advanced Channeling research and channellers. 
        
        These bountiful nations, to quell anti-state plots and maintain order, are allowed to keep armies adhering strictly to the protocols set by the Court of Dakistrio. However, sometimes when rebellions fester too deeply or Vasils raise their heads in defiance, the Court faces no choice but to mobilise the Veritas, condemning entire nations to desolation.
        
        Some days you spend exploring the Divine Sea, voyaging through the Hallway of Burning Waters in hopes of finding the Lost Fleet of the Pyre. Other days you spend navigating The Great Game between Amartia, Malios, and the Traders of Ferlancea. After months of strenuous reading, you succeed in naming the last 6 Heroes.
    #I have been learning to cook
        [Cool description TK]

Greetings! You have reached the end of the current demo. Let me know of your thought in the COG forums.

[i]And also please pray for my exams—[/i]

*ending
    

Contrary to your routine, today you find yourself in the middle of the shopping district; a bunch of stalls, megamarts, and shops packed together under a glass dome. Aldrich and Aliya browse through the stores alongside you. The purpose of this visit is to get you some more clothes. Aldrich has donned a shady disguise for undisclosed reasons while Aliya draws all the attention with her too-colourful robes.

She stops for a moment, looking at a distant store. Its shelf displays the new best-selling product in Maison—the dress-up ragdoll. It's a peculiar thing: a rag doll constructed in such a way that you can change its clothes and do some light make-up on it, yet it proved to be a fantastic business idea as it soon became the newest obsession of Mais children and girls.

She shakes her head, accidentally catching your eye. You raise a teasing brow.

“Aldrich, Aliya wants–”

“No!” She quickly rounds up on you. “I don't want a dress-up doll. I am a grown woman.”

“We could get it if you want,” Aldrich says, observing the shop. 

“I don't want such childish stuff!” She snaps her gaze away, eyes landing on the variety of ‘dress-up dolls’ waiting to be hers. Their soft and fluffy constitution melts her. “I
 could try it I suppose. You go and bring it to me here, ${firstname}!”

“Ah, I see. You don't want to be recognised.” Aldrich nods, taking you to the doll shop.

*fake_choice
    #Hi, Aliya Al-Nofeh wants a dress-up doll. Aliya Al-Nofeh
        Aldrich facepalms, and you can both feel the hostile glare coming from right outside the shop. 
        
        "Okay
 which one do you want?" 
        
        "Hey! Aliya Al-Nofeh, which dress-up doll do you want?" You shout, gesturing towards her lingering outside the store.
        
        She quickly dives inside the store, looking around to make sure no one saw her. She glares at you. "No dinner for you today!"
        
        
    #Can I have that dress-up doll?   
        “Of course. Take your pick!” The shopkeeper says, pointing to the racks behind. There are a variety of ‘dress-up dolls’ here–

        Wait, is that Link? And Aiza? And Inaya too???

        At the top of the shelves, in various sizes and get-ups, are a few Link, Aiza, and Inaya ‘dress-up dolls’. The massive space allocated to each set despite the fewer numbers suggests that most have already sold out.
        *fake_choice
            #Why isn't there a doll of me there?
                “Oh apologies. They sold out.”

                “Am I um
 that famous?” You tilt your head in confusion. Sure you are a Hero Candidate, but Aiza and Link are immensely popular public figures. 

                “${firstname}?” Aldrich waves a hand in-front of you.

                You snap out of your reverie. “What were you saying?” 

        “I was saying it depends because all of your dolls were bought by a single person.”

        Uh

 
    #Who was it?
        “Well they told me not to disclose their identity so I request your understanding,” the shopkeeper says, lightly bowing his head in apology.
    #It
 wasn't Inaya was it?
        He seems astonished. “How
 did you know?”

        “A guess.” 

        “Please don’t let her find out that you know. Her glare was really scary when telling me not to disclose anything about her.”

        “I will not.” You nod. 
    #It seems I may have a fan

        Although you feel rather uncomfortable at the fact that someone may be playing with a literal doll–dozens–of you, it's perhaps an unavoidable part of being a Hero Candidate.
    #No
 like no one finds this creepy?
*fake_choice
    #I want an Aiza doll
    #I want a Link doll
    #I want an Inaya doll
    #I want all Aiza dolls
    #I want all Link dolls
    #I want all Inaya dolls
    #So no doll for Firuz huh?

You return to Aliya

Next in your stats code.

                *choice
                    #Relationship Events
                        *label I_e 
                        *fake_choice
                            *selectable_if (I_events_unlocked >= 1) #Event 1: Sword of Pain
                                *if I_events_done >= 1
                                    *fake_choice
                                        #Replay Event
                                            *gosub_scene relation sword_of_pain
                                            *goto I_e
                                        #Return
                                            *goto I_e
                                *else
                                    *fake_choice
                                        #Play Event
                                            *gosub_scene relation sword_of_pain
                                            *goto I_e
                                        #Return
                                            *goto I_e

Change the *gosubs to *redirects and drop the *gotos under them since you can never reach them now.

                *choice
                    #Relationship Events
                        *label I_e 
                        *fake_choice
                            *selectable_if (I_events_unlocked >= 1) #Event 1: Sword of Pain
                                *if I_events_done >= 1
                                    *fake_choice
                                        #Replay Event
                                            *redirect_scene relation sword_of_pain
                                        #Return
                                            *goto I_e
                                *else
                                    *fake_choice
                                        #Play Event
                                            *redirect_scene relation sword_of_pain
                                        #Return
                                            *goto I_e

And last but not least, instead of this,

*page_break End
*return

Have this guy.

*page_break End
*if scenevar = "Timeskip"
   *if (labelvar = "00")
    *goto_scene Timeskip 00
   *elseif (labelvar = "01")
    *goto_scene Timeskip 01
   *elseif (labelvar = "02")
    *goto_scene Timeskip 02
   *elseif (labelvar = "03")
    *goto_scene Timeskip 03
   *elseif (labelvar = "04")
    *goto_scene Timeskip 04
   *elseif (labelvar = "05")
    *goto_scene Timeskip 05

So uh. Yea. There you go, it works.

Here’s the example: CoGDemos

The real question is, how important are the events to you?

And if the answer is, very important, you’re going to need a lot of *labels.

And before I forget,

Ahem, you can find Altaiir’s game post here: (Updated 19/4/25) Project Calamity: A Prelude in the Divine—A Choice-Based Epic Fantasy (WIP) (~64k words)

Their game demo here: CoGDemos

And his social of choice here: @altaiirif on Tumblr

I highly recommend Project Calamity. I have spent the better part of 10-ish hours playing through it and code diving it today. And I can really say is..Play it. Yea, just play it. It’s really good. I got me hooked from the start and now I can’t wait for more.

(How’s that for free marketing!?)

2 Likes

For Divine! I would give you half my inheritence, but half of 0 is still 0
 so yeah.

Very very very very very very very very very very important


Okay, let me just confirm that I understand that this works:

Basically, onwards from when the relationship event is unlocked, I need labels for all change of screens, since the event can be played anytime, or I could just also add a bit of a note saying that the player should only play relationship events when they are outside of choice branches (In a general text scene) to reduce the amount of labels by quite a bit. I will try to implement this and return in a bit.

( :ok_hand:)

For some reason, I am still having this all the way back error:




This one where opening the stat_screen beings takes the player out of the event. I have done the rest of the stuff you mentioned, but this still stands for some reason. Could this be CSIDE specific error?

Yeah, it was a CSIDE error. I tried it on COG demos and it works. Thanks a lot for the help!

1 Like

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.