New and need assistance

Actually, I have to disagree (quite a novelty for me where your remarks are concerned, to be honest) as I would always recommend that new users treat startup as purely an “initializing” file, but allow me to expand on my reasons for doing so.

In addition to the basic necessities not permissible in any other CS file (scene list, declaring permanent variables, achievements), if the actual story scripting is properly confined to actual Scene files then the “bottom” of the startup file is the ideal place to easily use for practical purposes. This could range from a whole, bespoke ‘Alpha Testing’ system using both extra / duplicate variables and specific code for this purpose (e.g. http://choicescriptdev.wikia.com/wiki/Practical_Scripting_Techniques) to just being an easy place to experiment with and test new code, because when testing locally it will then always run before it launches into the story proper (i.e. before the first Scene file is loaded).

That considerable practical benefit aside, however, the biggest problem for a new author is getting to grips with CS as a whole. The original mygame.js file had one big plus for ease of newcomer understanding (its sole purpose was to initialize the game), and one big negative (it used a completely different format - JavaScript). The startup file has thankfully gotten rid of the latter problem, but instead now somewhat confuses the issue for some people where the former is concerned - not helped (IMO) by the example game’s startup itself immediately launching into story scripting.

What we often fail to consider / remember, is that a non-programmer newcomer to CS is still struggling to come to terms with all these files at the same time as trying to learn coding and elements of basic game design suitable for a Choice Game. The light bulb first clicks on with their understanding that only the \scenes folder is initially of any concern. It helps to then understand that within that folder there are three distinct file types - startup for initializing your game, choicescript_stats for the Stats screen, and multiple Scene files for your actual story scripting. That is certainly the easiest way to explain it, and that is often the easiest and quickest way to actually understand it.

We really should not be confusing the issue. The sooner it clicks for a newcomer, the better, and the more clearly it’s defined and explained in this way, the sooner it will all click into place for more of them.

4 Likes

@dfabulich: what do you think about revising the example game to encourage the use of startup.txt solely for variable creation etc rather than the initial scene? @Vendetta makes a good point about the benefit of clarity for many ChoiceScript learners; and I can’t see how it would inconvenience anyone who nonetheless decides to start the story in their startup file.

@Havenstone

you know how when you go to the stats screen and you see a relationship bar but it says unknown then when you get far enough into the story that same relationship bar changes from unknown into a persons name.

what is the code to do that

In startup.txt

*create know_name false

Then in your choicescript_stats.txt, above the stat bar:

*if know_name = false
  Unknown
*if know_name = true
  John

or the same thing, but shorter:

*if not(know_name)
  Unknown
*if know_name
  John

And in the game where you meet John:

*set know_name true
1 Like

@Havenstone

I did what you said

*create name_girl false

*if not(name_girl)
Unknown
*if name_girl
Lorna

but when I go to stats screen this keep happening

the title says false when I want it to show unknown until I make it true that its lorna and the percent bar is the same but it shows false as a percentage and title name_girl when it should be unknown until proven true its lorna

Ah, I didn’t realize you also wanted it to show up as the title inside the bar. (Should have been obvious, but I haven’t used this myself.)

Can you post the relevant scenes or a link to your scenes folder?

@Havenstone

choicescript

startup

is this good

Cool. I think the quickest fix is to dump “name_girl.” Instead, have a “name_lorna” or “lorna” stat, which is a string, not a Boolean.

*create lorna "Unknown"

*label chart2
[b]$!{lorna}[/b]
*stat_chart
  text bond_text Bond
  percent lorna

and then

*set lorna "Lorna"

@Havenstone
@ballmot

the main problem im having with that approach is the percent cause when I test in the percent bar it says lorna:Unknown% other than that part everything else is going good

is there another code I should put in to fix that

trying to get it to say Unknown: 50%
then when the situation calls for it reveal the unknown(both out and inside the percent bar) as lorna

@Hazard
I am not 100% sure, but I don’t think you can change the name of the percent bar in the middle of the game…

You can probably change the bold title, but the percent bar would need to have a generic name such as Relationship or Trust.

To change the name of the title you could simply use this:

*set lorna "Lorna"

And to “disguise” the percent bar:

*stat_chart
  text bond_text Bond
  percent lorna Trust

(In the stats screen)

*create lorna "Unknown"
*create lorna_trust 50

*stat_chart
    percent lorna_trust ${lorna}

That should give you what you’re after.

1 Like

@Havenstone
@ballmot
@Nocturnal_Stillness
@Vendetta

thinking about doing the stats and choices like this, choices effect stats but I want whoever to play this game to really develop there character to what they think he should be aka Inner Struggles

and what other people might see them as instead kinda similar to some real life situations aka Outer Image

do you think it would be too confusing, any opinions is accepted.

It all depends on how you write it, but the idea itself does not sound too confusing.

I wonder how you are going to write about it :open_mouth:

One of my goals for ChoiceScript was that it should be possible to write a whole game in just one file, in startup.txt.

I figure starting users should really just work in startup.txt, and not think about other files at all until they’ve got their sea legs.

@ballmot

a lot of hidden texts… I was playing around with *if stat x% and managed to know how to hide and show texts based on what your stats are. only 2 things were really bothering me about it though

the story and making it make since. the idea was inspired on the scape goat bit- an idea stating if people have a common enemy then the group as a whole flourish so even though you have a good heart people see you as a bad person based on the kind of choice you make (meaning there may be times when you run into an ambush or 2) :smirk:

but the survival group chances of surviving goes up because of less in fighting or you can be its leader

1 Like

Fair enough - my own main point is also that keeping it as simple and clearly-defined as possible is the real key to ease and speed of newcomer comprehension, however that is achieved.

Might I therefore suggest that the example game also sticks to just the startup file, that it does away with unnecessary scene files entirely, and that related commands like *finish and *scene_list be confined to the Advanced ChoiceScript help page instead - in keeping with the stated intent.

@ballmot

how do you do a death scene when the player’s health drops to zero.

@Hazard
If you have a variable called health, you could create a death scene named “death”, and then send the player there if their health drops to zero.

*if health = 0
   You are dead!
   *goto_scene death
*else
   Something else

There are other ways of doing this tho.

@ballmot

yea I created the death scene but I’m having trouble trying to get it to work. like no matter where they are in the story when they health drops to zero it should automatically go to the death scene but in what scene do I put that in so it can work properly

Okay, the gosub command would work better here.

Be sure to have this at the end of every scene.

*label deathcheck 
*if health = 0
    You are dead!
    *goto_scene death
*return

And then, after every choice that may get the player killed, you place a gosub.

Ex:

*choice
 #Attack
  you attacked, but the enemy was faster.
  *set health - 10 (If "health" was 10, the player will be dead.)
  *gosub deathcheck

The gosub command will check if the player should be dead every time you use it.

1 Like