Non-threaded

Forums » Newbie Central » Read Thread

Introduce yourself and get to know the community.

Help With Redirect Links (New Site User)

5 months ago
Hi, I'm trying to do something in the story I am writing but I cannot figure out how to make it happen or if it's even a possibility.

Basically, if the player character has earned a certain threshold of points, then they will be given a certain item as a reward. In order to collect the item, the PC will need to navigate to a particular area and pick it up. It doesn't make sense storywise for the PC to have the item magically appear next to them or in their inventory. It only makes sense for them to be aware that they have an opportunity to claim their reward and will be given the option to go and pick it up. I hope what I said made sense.

So I added the reward item in my "items" tab and I created a page describing the PC going to the specific location to pick up this item. Then I added the variable, so when the PC gains a certain threshold of points, they will be taken to the page telling them they can get the item. Now the PC needs to be able to get back into the main story after collecting the item. The issue I am having is I don't know how to put the PC back on the "track" so they can progress to the story. I can give them the link to go back to the previous page, but when you click "continue" it just goes in a circle of them being on the page where they collected the item and then only having the option to go to the previous page.

Since it's not at a certain page the player may have earned the threshold of points I can't just send them to the very next page in the plot. For example, if on page 10 of the game the PC had earned the necessary points, then the PC would be redirected to page 20 describing them collecting their item. Now I need a way for them to go to page 11 to continue the story. But if the PC doesn't earn enough points until page 40, then once they are redirected to page 20 for the reward, I need a way for them to get to page 41 to continue. I can't put a ton of links on page 20 because there are so many opportunities for the player to gain the necessary points, plus how will the player know which option to pick that will put them back on "track" for their story? I hope I am making sense here. Is there a way for me to redirect them back to the proper page automatically? If possible, I don't mind page 20 taking them back to the page they were on, but from there I just need them to continue without getting stuck in that loop. As I have it right now, if the PC goes to collect their reward on page 20, I am not able to put them back on track and the game is essentially broken.

I hope I explained what I am trying to do well enough for someone to be able to help me.

Help With Redirect Links (New Site User)

5 months ago
Someone else could probably explain this better, but first off you're going to need to make sure that when they go to pick up the item, it changes the variables so that the game recognizes they've done this.

Then you want to do something like create a global script that toggles a variable on when they have the correct number of points.

IF %POINTS > 40 THEN
%SAVEDPAGE := $PAGEID

$PAGEID is a system variable that will always know the exact page they're on, and as long as you put in something to stop that script when they go off the path, it'll be set to the ID of the part of the plot they just left. Then you use another system variable, $DEST.

$DEST := "@P" + %SAVEDPAGE

In a link script that will override the actual linked page and take them directly to whatever page number is indicated.


I can't test this out right now but hopefully if it doesn't work exactly it's enough to put you on the right track. Sounds like a pretty complex game you're working on.

Help With Redirect Links (New Site User)

5 months ago
Yup, that's the simplest way to explain this, I think.

However, you'll also need another check so this only happens once. In other words, on the special page, you'd probably have to set a variable to indicate that they've been to this page, and then in the global script, you'd have to check for that to ensure that they don't continuously go to the special page once they've reached the point threshold.

Help With Redirect Links (New Site User)

5 months ago
Thank you!

Help With Redirect Links (New Site User)

5 months ago
Since I notice you're also including gender choices, I'll just mention that most people do not do this. Readers are used to set characters, like in a novel, and don't really consider gender choices a required thing here like in some other places. Since the editor isn't really designed with that in mind, unless it significantly changes the plot somehow it can represent a lot of tedium for you as an the author that might be better spent fleshing the character out in other ways.

That said, if you want to do it anyways, On Page Scripting will let you swap pronouns around in the text according to variables, and might save you a lot of copy and pasting and from being perceived as padding out the length of the story that way. (https://chooseyourstory.com/help/articles/article.aspx?ArticleId=3850)

Help With Redirect Links (New Site User)

5 months ago
Thank you so much for the info. The genders don't actually affect the story, it is just flavor and another choice for the reader if they want to pick one or the other. Outside of the first chapter, the gender of the player isn't referenced because I write it from 2nd personal perspective, so I don't have to write a whole path for a male protagonist and a female protagonist. So I'm not writing a whole story from one side and then changing it for the other gender, just one complete story with a few endings depending on the choices made.

I didn't intend for this story to be technically complex. I'm honestly a bit surprised at how ambitious this has become and it's only my first one on the site. I hope I can make it turn out well and hopefully, I get some good feedback once it's complete.