Name choice error

I already have that there, but thanks.

In the sense that the gam checks for what is put in to avoid swears and other inappropriate stuff?

Oh, that, i don’t have that. :slight_smile:

If you want to put it in, the code at *label name_input looks like this

*label name_input
*input_text nam
*gosub_scene sub_namecheck check_name
*goto is

Then you create a new file called sub_namecheck
(in the scenelist put it after the other scenes, like

*scene_list
   startup
   one
   two
   end
   sub_namecheck

The sub_namecheck looks like this:

*label check_name

*if ("$!!{name}" = "THING YOU DON'T WANT ALL IN CAPS")
   That's crude and I can't let you do that.
   *goto_scene scenewhereyouhavetheinput name_input
*elseif ("$!!{name}" = "OTHER THING YOU DON'T WANT ALL IN CAPS")
   That's crude and I can't let you do that.
   *goto_scene scenewhereyouhavetheinput name_input
*elseif ("$!!{name}" = "MAYBE SOMETHING YOU WANT TO JOKE ABOUT BUT LET THE PLAYER USE")
   Text acknowledging/commenting on it
   *return
*else
   *return

Use as many *elseifs as you need

1 Like

Ok! And can i ask, would you help me out with the game? (You know, just help me with commands when i need it, either like i send you the errors in the PM, or we’d just work together on daily/weekly basis so that i don’t f- up everything and spam the forums?)

Not in my best mind atm. Also, i reckon it’d be easier to ask the community here or on th discord server :slight_smile:

Discord, with the spam here i come!

One last thing, it’s with my stats.
choicescript_stats line 3: Non-existent variable ‘evil’

This is in my stat file:

My life..
*stat_chart
 opposed_pair evil
  good

every variable you want to use needs to be created in the startup

in this case
*create evil 50

50 as it is an opposed stat

And how do i add value to the stats? Like evil 1+?

And ooone more problem.

*choice
 #Angry!
  *goto angery
 #Sad..
  *goto sadr
 #Lost?
  *goto loss
 #Confused
  *goto konfusd

*label angery
Yes, and the killer will **pay.**

*label sadr
Tears are running down my face.

*label loss
What am i gonna do now?

*label konfusd
But why? Why would anybody want to kill her? Why did the killer go after your wife and not someone else? WHY YOUR WIFE?

In the game, instead of showing the text separately, it shows it in one place.

*choice
 #Angry!
  Yes, and the killer will [b]pay[/b].

  *goto next
 #Sad..
  Tears are running down your face.

  *goto next
 #Lost?
  What are you gonna do now?

  *goto next
 #Confused
  But why? Why would anybody want to kill her? Why did the killer go after your wife and not someone else? WHY YOUR WIFE?

  *goto next

That way the text will display above whatever text comes next (at the *label next, or what you chose to call it)

as for altering stats
it’s either of these

*set var +X (adds X to the amount)
*set var -X (substracts X)
*set var X (sets the amount to X)
*set var %-X (does some funky math with the amount, reducing it)
*set var %-X (same thing in the other direction)

with fairmath (the %±X commands) the amount can go below 0 or above 100 but it can be tricky.

1 Like

And do i put the command after the choice, before or…?

after.
like

*choice
 #thing
  *set var
  *goto 

also:

You are a god. You shall continue in being awesome.

1 Like

Do people actually do this? Put in checks for ‘bad’ words used as names, I mean. What’s the point? You’ll never cover everything and it’s not like anyone’s going to see what a player chooses to call their character anyway - we’re not making MMO’s here. Seems like extra work for no benefit at all to me.

  1. you can cover the worst stuff.
  2. you can also use it to limit the length of an input (because the standard length is… very long)
  3. more often it is used to check if a name is that of an NPC OR if the input is a reference (Tally Ho, for example, will comment if you name the boat (the list of potential names are all puns on CoG/HG titles) ‘Tally Row’ and I love gower for that XD
1 Like

Well, there’s a reason why ppl name their Pokémon “oh shit he.”

There’s people who had it that HR’s BlackMagic looks like THE ENTIRETY OF THE SCRIPT OF BEE MOVIE OR LES MIS

1 Like

Ooh, CS expands bracketed text inside quotes on the left side of a comparator? That’s actually a really useful thing (that I didn’t know was possible) for cases like this.

It can be a bit messy at times though.