Naming the protagonist (and other noob questions)

Hello there!
I’ve been reading CoG games for a long time, and always wanted to make them, but I have been hindered by my lack of coding talent and computer (I read on my iPad/phone). However, fairly recently, I acquired a PC. I forgot about CoG for a while but recently remembered due to a friend of mine asking me to write “one of those pick your path computer text game books” for a half-joking idea on a game forum. I agreed because it would be a nice start to my CS ‘career’ and it would be fun, but I came against a problem.
How do you name your character? I read the wiki but I can’t seem to understand how to input a *temp variable, let alone make it permanent. If anyone could please paste a template in this thread it would be greatly appreciated. I learn quickly by example, but very slowly without context so I didn’t think of a better way.
Also, how do I run and share the game? I don’t want it monetized at all (my aim is an absolutely free text-based game for anyone who wants to try this weird abomination) so I don’t need to try and get sponsored or anything. I attempted to run the game and search video tutorials on it, but nothing worked for me. I’m on windows 10 and don’t have WinZip if that helps.
Thanks in advance!

P.S. Sorry if this is already a topic, but I couldn’t find it. Please link me to it if it exists.

2 Likes

*label Naming

Words
*input_text Name

Words(Probably confirming the player said it right.) !{Name}? *choice tab # Yes *set Name "!{Name}"
tab #No
*goto Naming

That’s the way I did it.but a lot of people like having options of default names which I don’t personally like doing. But the important notes are being careful about indenting and $!{Name} must be spelt like that every time. Make sure *set and *goto are lined up exactly with the #choice.

1 Like

You can find the basics of coding a choicescript game on the “Make Your Own Games” section, over here.

But if you want an example, the code would look something like this:

What is your name?

*choice
  #Bob
    *set Name "Bob"
  #Brian
    *set Name "Brian"
  #Barry
    *set Name "Barry"
  #Something else
    Then what is your name?
    *input_text Name
3 Likes

Ah, that’s a lot easier to follow than my example.

The wiki is also here, although some topics might be outdated.

Thanks a lot everyone! Wow, I feel like I understand it a lot better :wink:

Just wondering though, is it recommended to put preset name options?

You could. However, COG actually remembers and saves player names to autofill for them and I don’t know if I speak for everyone but a lot of the time I prefer giving my character their own name instead of just taking “Bob” or “Smith.”

I think it’s generally recommended. Sometimes, write-in options for the names turn people off.

@Hex does CoG remember player name choices? I don’t recall that feature.

It can when you attempt to fill in the same name if you’re doing it on a laptop. Then again…that might just be a general part of the mostly crappy Windows system.

Edit question: Are people repelled by naming their own character? What people? What situations does this apply too?

1 Like

Sometimes, picking a character name that doesn’t match the story can be a little…off. For example, naming someone John in a world of Gadgets and Pythons.

Also, sometimes people get ‘stuck’ at the naming option and can’t think of a name that will suit their character. I’ve known people who spend more than an hour agonizing over a name choice.

Edit: I don’t see the auto-fill on mobile, but I’ve definitely seen something of the sort on desktop. Maybe it’s a feature of the browser?

Except that’s my point. A preset name like John is the author’s option to have their character named that as such where as, it’s at least an option of the player if they are the ones who write it in themselves.

It’s part of the browser’s cookie stuff.

2 Likes

Ah, that makes more sense.

Also, how do I actually play the game?


(from this page)

The mygame folder will have an index file that you can click on and launch in your browser. It doesn’t work with all… It’s ideal to use firefox.

1 Like

Thanks so much! I can finally test it :slight_smile:

Supposedly you can also use quick test but those don’t work for me and just stop at random places say “error” even if the game runs perfectly and there’s no flaws in the code that I can see. Someone smarter probably knows what I’m doing wrong that I can’t use them right.

Eh, that’s okay. I probably won’t use it anyways. Thanks again, though.

Also, when using the name, what command is used?

$!{Name}

It has to be exactly like that. Note the special looking brackets. Keep it a secret, but I generally keep it copied so I can paste it in later as needed instead of writing it out every single time.

Edit: Crap! No. Looking at the code I have open(I do actually work on things while talking here) there’s the dollar sign part too.

1 Like