Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

I know I am stupid, and this should be obvious....

9 years ago

...but I've read the help&info pages on scripting, but this still isn't clicking. I am trying to have an image/wording put up on the page depending on the variable value. It's a character status page, and so when the player gains a new companion, their picture and info come up on the page. When the companion dies, their picture stays but the wording changes to 'deceased' instead of the regular stats for that character.

I know I am stupid, and this should be obvious....

9 years ago

Anyone?

I know I am stupid, and this should be obvious....

9 years ago
Hmm...I know how to alter page text, but not images. Sorry.

I know I am stupid, and this should be obvious....

9 years ago

How do I do that? The altering of the page text.

I know I am stupid, and this should be obvious....

9 years ago

Simple. The following text would be entered into the page of your story.

%%DUCKS%=%0%You have no ducks%%%%DUCKS%=%1%You have a duck%%%%DUCKS%>%1%Where did all these fucking ducks come from%%

You can read about it here.

I know I am stupid, and this should be obvious....

9 years ago

I thought it was something like that. I just missed a few of the % thingies. This is the general thing I had up.

%DUCKS%=%0%You have no ducks%DUCKS%=%1%You have a duck%DUCKS%>%1%Where did all these ***** ducks come from?%

 

 

Is it possible to have a code inside a code? Something like this? Not what I'm actually putting in, just an example of what I would put in.

%%CITRIOR%=%1%{%%LIKECIT%=%5%Citrior is a jackass%%....%%LIKECIT%=%10%Citrior is a nice companion to have around, though still a bit arrogant at times and dimwit. It's a wonder how he survived this long.%%}%%CITRIOR%=%2%Deceased.{%%LIKECIT%=%5%It was nice knowin' ya!%%....%%LIKECIT%=%10%(insert some touching words that say just how much Kell misses him)%%}

I know I am stupid, and this should be obvious....

9 years ago
No. You can't do that, unless I'm horribly mistaken (there is a possibility I am). You might need to use the $PAGETEXT variable in a script.

I know I am stupid, and this should be obvious....

9 years ago

$PAGETEXT? 

I know I am stupid, and this should be obvious....

9 years ago

This should help you. I sadly haven't used the variable much, but I imagine it would work something like this:

IF %CITRIOR = 1 AND %LIKECIT <= 5 THEN $PAGETEXT := $PAGETEXT + "Citrior is really a jackass."

IF %CITRIOR = 1 AND %LIKECIT >5 THEN $PAGETEXT := $PAGETEXT +"Citrior is an alright guy, but he can be pretty arrogant sometimes."

I know I am stupid, and this should be obvious....

9 years ago

This is confusing. 

I know I am stupid, and this should be obvious....

9 years ago
Oh, that would go in the page script, by the way.

I know I am stupid, and this should be obvious....

9 years ago

Dang it. I was editing the post to explain what exactly was confusing. What is page script? I'll I know are some on-page variable/scripting(?) tricks and things like link restriction.

Help and info doesn't really help much for inexperienced script users. It doesn't explain what each part is or does in an understandable way for people who only read English instead of the complex and confusing language experienced scripters use.

I know I am stupid, and this should be obvious....

9 years ago
If you can use variables, you are using the advanced editor. Go to storygame options and enable scripts.

I know I am stupid, and this should be obvious....

9 years ago

Done. 

I know I am stupid, and this should be obvious....

9 years ago
Okay, go to the page you are wanting to put the script on. By the title there should be a blue button that looks like :=

I know I am stupid, and this should be obvious....

9 years ago

Okay. 

I know I am stupid, and this should be obvious....

9 years ago
Clicking on that should open the script for that particular page. I assume what you are creating is a sort of party management page. Am I right?

I know I am stupid, and this should be obvious....

9 years ago

I think so? The way I have it set up is so that there are three settings for each main character besides Kell.

Unknown; 

A description and current opinions of that character along with a picture;

Deceased, along with the same picture.

 

The part where I am trying to get the current opinions of the character is where I'm having troubles, because it has a variable depending on a variable. I have 0 for unknown, 1 for alive, 2 for dead, and then a different set of variables for that character that has how much Kell likes that person which will change what is written on the opinions of the character, and the opinions should only come up if that person is alive.

I've found out how to include pictures in the text alterations. I looked up a previous forum where that was asked about. I had to look back about 2-3 years ago to find it though.

I know I am stupid, and this should be obvious....

9 years ago
That's why I think $PAGETEXT will work best.

I know I am stupid, and this should be obvious....

9 years ago

What does pagetext do? How does it work? Can it be used with on-page variable tricks, or is it entirely independent and cannot work with on-page variable tricks? I don't know what I'm doing, or how to do it on my own in the future. 

I know I am stupid, and this should be obvious....

9 years ago
$PAGETEXT := "(Words)"

The above changes all of the text on the page to whatever is between the quotes.

$PAGETEXT := $PAGETEXT + "(words)"

The above adds whatever is between the quotes after the text that is already on the page.

$PAGETEXT := "(words)" + $PAGETEXT

The above adds whatever is in the quotes before the text that is already on the page.

I know I am stupid, and this should be obvious....

9 years ago

Okay. Does it effect on-page variables though? Besides the first part you posted. I already have a almost everything set up with on-page variables besides this section. I'd rather keep those intact if I could.

I know I am stupid, and this should be obvious....

9 years ago
From what I know, it shouldn't affect on page variables.

I know I am stupid, and this should be obvious....

9 years ago

Okay. That's good.

Also, is there also a way to get rid of all the spaces the on-page text alteration thingies create when a certain line of text isn't used?

I know I am stupid, and this should be obvious....

9 years ago
No. That's literally one of the only reasons aside from the "variable requirement inside a variable requirement" thing that people use $PAGETEXT.

I know I am stupid, and this should be obvious....

9 years ago

Dang it. I'm really going to have to learn how to use this page text thing then. How do I do what I would normally done with on page variables on page text?

I know I am stupid, and this should be obvious....

9 years ago
show me what you want to do and I will do my best.

I know I am stupid, and this should be obvious....

9 years ago

I have most of my coding still visible on the item page of my story. Hell Storm. And then this, which shows up as the unknown right now. After I'm done putting little passages into each section, I'm going to delete the extra spaces/lines and it was hopefully just going to be one paragraph with the stats of Kell and his opinions of the discovered companions. I didn't want to post all that I have here because it would be extremely long. Kells current stat is incorrect on the depression, and I need to change the starting value.

%%PARTYCIT%=%0%Unknown%%%%PARTYCIT%=%1%Citrior:...%%%%PARTYCIT%=%2%Citrior: Deceased.%%
%%PARTYCRE%=%0%Unknown%%%%PARTYCRE%=%1%Crenjir:...%%%%PARTYCRE%=%2%Crenjir: Deceased.%%
%%PARTYNAT%=%0%Unknown%%%%PARTYNAT%=%1%Natir:%%%%PARTYNAT%=%2%Natir: Deceased.%%
%%PARTYSOT%=%0%Unknown%%%%PARTYSOT%=%1%Sotir:%%%%PARTYSOT%=%2%Sotir: Deceased.%%
%%PARTYSRE%=%0%Unknown%%%%PARTYSRE%=%1%Srenl:<img src=http://chooseyourstory.com/resources/images/user/32305?32305 align='left' padding='300px'>%%%%PARTYSRE%=%2%Srenl: Deceased.%%

I know I am stupid, and this should be obvious....

9 years ago
Try this out in the script:

IF %PARTYCIT = 0 THEN $PAGETEXT := $PAGETEXT + "Unknown"
IF %PARTYCIT = 1 THEN $PAGETEXT := $PAGETEXT + "Citrior:..."
IF %PARTYCIT = 2 THEN $PAGETEXT := $PAGETEXT + "Citrior: Deceased"

IF %PARTYCRE = 0 THEN $PAGETEXT := $PAGETEXT + "Unknown"
IF %PARTYCRE = 1 THEN $PAGETEXT := $PAGETEXT + "Crenjir:..."
IF %PARTYCRE = 2 THEN $PAGETEXT := $PAGETEXT + "Crenjir: Deceased"

So on. It should all stack on top of each other. Note this does not account for line breaks; I'll have to do a little more research on those myself. I do know, however, that they can be done in the scripts.

I know I am stupid, and this should be obvious....

9 years ago

Will this still work in there?

<img src=http://chooseyourstory.com/resources/images/user/32305?32305 align='left' padding='300px'>

I know I am stupid, and this should be obvious....

9 years ago
I don't know about that, sorry. Try what I showed you first, to make sure it all works like it should.

I know I am stupid, and this should be obvious....

9 years ago

It works. It comes up on the very bottom of the page with no spacing.

I know I am stupid, and this should be obvious....

9 years ago
Haha, great. Now, do you have anything after the character statuses, like you were talking about before. Like, something stating the MC's opinions on the character?

I know I am stupid, and this should be obvious....

9 years ago

LIKECIT, is depending on weather or now PARTYCIT is at 1.

I know I am stupid, and this should be obvious....

9 years ago
IF %PARTYCIT = 0 THEN $PAGETEXT := $PAGETEXT + "Unknown
" IF %PARTYCIT = 1 THEN $PAGETEXT := $PAGETEXT + "Citrior: " IF %PARTYCIT = 2 THEN $PAGETEXT := $PAGETEXT + "Citrior: Deceased
" IF %PARTYCIT = 1 AND LIKECIT = 1 THEN $PAGETEXT := $PAGETEXT +"..." IF %PARTYCIT = 1 AND LIKECIT = 2 THEN $PAGETEXT := $PAGETEXT +"..." IF %PARTYCIT = 1 AND LIKECIT = 3 THEN $PAGETEXT := $PAGETEXT +"..." So on. I'm not sure those are how the
tags worked, but last time I checked it worked fine. Note I didn't put a bread tag after the %PARTYCIT = 1 line. That is so the text that comes with the LIKECIT variable will appear on the same line.

I know I am stupid, and this should be obvious....

9 years ago

A bread tag?

I know I am stupid, and this should be obvious....

9 years ago
Sorry, I have RTE turned off, so it took my <br> tags to be part of the code. Allow me to fix that all really quickly.

I know I am stupid, and this should be obvious....

9 years ago

IF %PARTYCIT = 0 THEN $PAGETEXT := $PAGETEXT + "Unknown<br>"

IF %PARTYCIT = 1 THEN $PAGETEXT := $PAGETEXT + "Citrior: "

IF %PARTYCIT = 2 THEN $PAGETEXT := $PAGETEXT + "Citrior: Deceased<br>"

IF %PARTYCIT = 1 AND LIKECIT = 1 THEN $PAGETEXT := $PAGETEXT +"...<br>"

IF %PARTYCIT = 1 AND LIKECIT = 2 THEN $PAGETEXT := $PAGETEXT +"...<br>"

IF %PARTYCIT = 1 AND LIKECIT = 3 THEN $PAGETEXT := $PAGETEXT +"...<br>"

So on. I'm not sure those are how the break tags worked, but last time I checked it worked fine. Note I didn't put a break tag after the %PARTYCIT = 1 line. That is so the text that comes with the LIKECIT variable will appear on the same line.

I know I am stupid, and this should be obvious....

9 years ago
Here you go. It isn't pretty, but I finally made it read-able. @TacocaT

I know I am stupid, and this should be obvious....

9 years ago

It was readable before. I was just replying with 'Interesting...' before I saw the tag thing at the top of the page. It's like shouting across the site you know. 

I seem to remember someone saying that before.... with ninja edits... and me annoying the heck out of you. I think...And now I'm doing it again...

I know I am stupid, and this should be obvious....

9 years ago
Sorry, your delayed response lead me to believe that you were just being polite and giving me enough time to make sure my post was presentable. I didn't mean to be obnoxious.

Edit: Ger-dangit. You're doing it again.

I know I am stupid, and this should be obvious....

9 years ago

Awww.... I was in the middle of ninja editing for the fifth time. XD 

I was late in replying because I had to move laundry from the washer to the dryer. 

I know I am stupid, and this should be obvious....

9 years ago
Oh, okay. Let me know if the code works for you.

I know I am stupid, and this should be obvious....

9 years ago

I got this:

Did not recognize 'L'. Line=7 Col=22 

I couldn't see anything unusual about that line compared to all the rest besides the fact that it was the first line with the 

...AND LIKECIT... part in it.

I know I am stupid, and this should be obvious....

9 years ago
Damn it, I forgot to put %LIKECIT, instead of just LIKECIT. Sorry, I'm tired. The % is vital. Just put the % in front of the variable name and all should be well.

I know I am stupid, and this should be obvious....

9 years ago

11:30-ish I believe. You're up late tonight.

I know I am stupid, and this should be obvious....

9 years ago
10:30.

I know I am stupid, and this should be obvious....

9 years ago

An hour off. Still rather late though.

I know I am stupid, and this should be obvious....

9 years ago
Tomorrow's black Friday. It won't hurt to sleep in.

I know I am stupid, and this should be obvious....

9 years ago

Ah ha. Here it is.

'I'm here, I'm here. Easy with that shit. It's like you're shouting across the site.XD' - you 

Deija vou (How do I spell it?)

I know I am stupid, and this should be obvious....

9 years ago
It's "Deja Vu".

I know I am stupid, and this should be obvious....

9 years ago

Aww. This time you replied fast enough that my ninja edit didn't count. *cries* XD

I know I am stupid, and this should be obvious....

9 years ago
Fuck, kid. You are pretty fast. You even managed to ninja edit that last post.

I know I am stupid, and this should be obvious....

9 years ago

I know. About 39 words per minute when I try. 

And please refrain from cussing in front of children.

I know I am stupid, and this should be obvious....

9 years ago
Aaaaggghhh, you did it again.

I know I am stupid, and this should be obvious....

9 years ago

Yep. And again. And again. And again. And again. Are you not going to reply? That would take all the fun out of it.

I know I am stupid, and this should be obvious....

9 years ago

Stop it. Shit, fuck, fuck, shitty, shitty, fuck, fuck, cunt, fuck, shit.

I know I am stupid, and this should be obvious....

9 years ago

Okay.

I know I am stupid, and this should be obvious....

9 years ago

Thank you. It's a good thing you don't know how to highlight the text of my posts.

I know I am stupid, and this should be obvious....

9 years ago

You're welcome. I figured you were being serious. Also, the code is working out quite well with the extra % behind LIKECIT. Thank you.

I know I am stupid, and this should be obvious....

9 years ago
Don't you mean in front of LIKECIT?

I know I am stupid, and this should be obvious....

9 years ago

Right, sorry. I get that messed up at times.

I know I am stupid, and this should be obvious....

9 years ago
As long as it's working for you...

Sorry for any inconveniences I might have caused.

I know I am stupid, and this should be obvious....

9 years ago

Inconveniences? You helped me quite a bit with understanding the $PAGETEXT thing and realizing what I had planned to do with on page variable thing wouldn't have worked out well. Thank you.

I know I am stupid, and this should be obvious....

9 years ago
I felt I made it a lot more complicated than it was meant to be. I should be thanking you, though. I finally got enough inspiration to build my party management page and continue on my story.

I know I am stupid, and this should be obvious....

9 years ago

You didn't make it more complicated: I just had to drag out what you were trying to say and what was supposed to happen when I did this or that. Though that probably also made it easier to understand.

Also, how'd I do that?

I know I am stupid, and this should be obvious....

9 years ago
It's hard to explain.

I know I am stupid, and this should be obvious....

9 years ago

Hmm.... Let me try now that I understand what I'm doing.

 

"What are you trying to do?"

"I'm trying to create an item page in which certain things show in which one variable depends on another. Can I use some sort of on page variable for that? That's how everything else I have so far is set up with."

"Okay. No, on page variables don't work for that type of thing. I believe $PAGETEXT does though. You know what $PAGETEXT is, right?"

"No. Will it affect the on page variables though?"

"I don't think so. Okay, I assume it's already an advanced game since you're working with variables? Enable the scripting on story properties."

"Done. What does $PAGETEXT do though? How does it work? I'm a bit hesitant about messing with it if I don't know how it works."

"Right, sorry. After you enable the scripting, a blue symbol like this ':=' should come up by the title of an open page. Click it and it'll open the $PAGETEXT thing. Okay so an example of what you would put into $PAGETEXT would be this:

IF %PARTYCIT = 0 THEN $PAGETEXT := $PAGETEXT + "Unknown<br>"

IF %PARTYCIT = 1 THEN $PAGETEXT := $PAGETEXT + "Citrior: "

IF %PARTYCIT = 2 THEN $PAGETEXT := $PAGETEXT + "Citrior: Deceased<br>"

The IF %_____ =  _ THEN $PAGETEXT := $PAGETEXT + "___"  is the general format you will use. There are variations such as IF %_____ = _ AND %_____ = _ THEN $PAGETEXT := $PAGETEXT +"____<br>" which you will be using for a variable depending on another. The first %___ is where the independent variable variable goes. The smaller _ blanks are the variable values in which must be in order for the text to appear to the reader. The second long ___ after AND % is where the variable that depends on the first one goes. The third long blank blank is the text which shows when both variable requirements are met. There are a few other formats you can use, but these are the ones I use most often and know the most about. Any questions?"

"Okay, great. Thank you."

 

Does this cover everything?

I know I am stupid, and this should be obvious....

9 years ago

Use the html way of adding images.

<img src="https://pbs.twimg.com/profile_images/2586664217/o78k5fogx5g3hdy6peai.jpeg">

Gives you:

https://pbs.twimg.com/profile_images/2586664217/o78k5fogx5g3hdy6peai.jpeg