Requesting help from someone who knows what they are doing on here. For a Newbie


#1

Hey I’m just messing around with the program and I don’t have any previous coding background. I’ve read most of the wikis and the interactive tutorials but I just can’t grasp some things like that. If anyone would be willing to PM me or something so we can talk about even just basics would be amazing.


Zombie Exodus: Safe Haven -- set for release 10/28/16
#2

Probably your best bet is to post specific questions on the board or the code itself when your having trouble. Choice script in general is a very wide topic.


#3

Are you trying to get started?

I’m trying to get a feel for what you need here, but if you’re brand new to the code, just copy-pasting what’s available on the introduction page should get you started. Then change things as needed.

The basics are pretty straight-forward, so I might be able to help, I think?

What, in particular, are you stuck on?


#4

Thanks, I have been there and I did do the copy pasting sort of stuff there, I guess I do understand some of that stuff and I’m picking it up a little bit more. I need a little bit of help understanding variables and how to hook things up with those in the story. I’ve also been trying to understand how to put in a name variable and then be able to make a scene where you can choose your name and stuff like that.


#5

Welcome and as @Jacic has stated question on a problem will usually get a quick response. We’re a friendly bunch. :smile:

Other recommendations I would make is

https://dashingdon.com/

https://dl.dropboxusercontent.com/u/7840892/CJW/choicescript/tools/IDE/main.html


#6

This might help some


#7

To create variables, you have to *create them

EG, a snippet from my WIP

*scene_list
 prologue
*create Name "J."
*create Magic 0
*create Underworld 5
*create Fighting 0
*create Leadership 0
*create Gender "unknown"
*create Hairstyle "unknown"
*create Haircolor "unknown"
*create his "unknown"
*create hiss "unknown"
*create him "unknown"
*create he "unknown"`

As you can see, it comes after the scene list, but before any actual text in the game. You can have an infinite number of variables. I tried to include up to the basic ones. For descriptors, you’d put “unknown” so that, later, in a *choice, it can be set to something like “red,” which will be set. To reference it later in the story, you’ll use ${variable}.

For the numerical variables, these are stats that are like charisma, or hunting, or what have you. Things that can be necessary to unlock specific options or pass certain challenges later.

I also included a way to put in gender pronouns. I personally used male, just because it’s easiest for me to remember. Hiss would translate to his/hers/theirs, etc.

True/false statements need to be set as a baseline true or false.

Later, in the choice, it can look something like this:

"After all, you're the youngest member of the King's Dragon Keepers...

*choice
 #Miss...
  *set Gender "female"
  *set Title "Miss"
  *set his "her"
  *set hiss "hers"
  *set him "her"
  *set he "she"
  *set himself "herself"
  *goto femalenames
  *label femalenames
  Miss...what was your name again?
 
  *choice
    #Dana
      *set Name "Dana"
      *goto wonderfulname
    #Melissa
      *set Name "Melissa"
      *goto wonderfulname
    #These are all wrong!
      I'm sorry! What was your name, again?
      *input_text Name
      *goto wonderfulname
      *label wonderfulname"

edit: i realized you might have been asking how to allow people to input their own name, so I added an example of that, as well.

Did I make it clearer or just overwhelm you with info? D:


#8

For this I would study Choice of the Dragon good starting point.
https://www.choiceofgames.com/dragon/scenes/startup.txt
https://www.choiceofgames.com/dragon/scenes/queenpolitics.txt


#9

I kind of understand this, so if you put “unknown” then that’s like a place holder for when you go further in the story and choose to use the ${variable} to set the name?


#10

Exactly! I’m glad I could be of some help. ^^; I’d be happy to answer any more questions of yours, even though I’m still sorta new-ish to it.

Actually, that’s a lie. I just don’t like using the more convoluted code, because I don’t need to. Not yet.


#11

“” or “nothing” or “Unknown” or common place holders

*set var_name “xxneontreesxx”

${var_name} would print xxneontreesxx

My name is ${var_name} and you are?


#12

Ohhhh so if you have two characters who you get to pick a name for like yourself and a pet then would you do like a
*set name2 “unknown” or somthing like that?


#13
*choice Name
 #Doc
  *set name "Doc"
  *goto pet

*label pet
*choice Pet
 #Fred
  *set pat_name "Fred"
  *goto con_1

*label con_1
High my name is ${name} and this my dog ${pet_name}.
*finish

You can even chose your pet

*choice Name
 #Doc
  *set name "Doc"
  *goto pet

*label pet
I have a
*choice
 #Dog
  *set dog true
  *comment or
  *set pet_type "dog"
  *goto pet_2
*choice
 #Cat
  *set cat true
  *comment or
  *set pet_type "cat"
  *goto pet_2
  
*label pet_2
Which I call
*choice 
 #Fred
  *set pat_name "Fred"
  *goto con_1

*comment if Dog or Cat true
*label con_1
*if (dog)
 High my name is ${name} and this my dog ${pet_name}.
 *finish
*if (cat)
 High my name is ${name} and this my cat ${pet_name}.
 *finish
 
*comment or if you set var pet_type
*label con_1
High my name is ${name} and this my ${pet_type} ${pet_name}.
*finish

#14

Learn something new every day. I’d not realized that

*choice Name

will display “Select a Name:” before your choice block. :slight_smile: Thanks, Old Guard…


#15

I may not be very good at the higher functions of CS but I like to share what I know, and coming from you for me is high praise. :smile: Thank you.