The Fantom Zone (Newbie Help Wanted)

@fantom A simple percentile bar would do the trick nicely, IMO. To use your own example, a starting ship would be 1% of the likely maximum, clearly indicating both just how weak it really is and the terrific damage potential of what it may one day be capable of.

To apply damage in the game you could simply multiply that stored stat value by 100 (and perhaps apply a random damage range using that value as the current average, say).

I’m getting rather annoyed with myself. It’s amazing how difficult it is for me to think for more than a few minutes before my mind starts to wander. I had the same issue when I was in school, much to the annoyance of my teachers.

Ideas of names of the game coming up!

The ship
Bio-fleet
Dark nebula
Galaxy of horizons
Herald of doom
The final frontier
Plasmic galaxy

I personally think that the ship should have an ‘official’ name, chosen by the game, and a ‘real’ name chosen by the player.

Choice of different character backgrounds and ship type would allow for great customisation and stats, as long as those stats were frequently used!

Ideas for the story (basic ones):

The ship could possibly rebel, or make it’s own decisions?
Alien species with a similar technology
Different ‘factions’
Prologue to help define your character background

I personally think a lot of inspiration can be taken from all the other space games, such as ‘The Fleet’ or ‘Choice of the Star Captain’, maybe try looking there?

Sounds like a great game idea, I’d love to test it :slight_smile:

Ok, here’s a choice script question: is there a way to have the game randomly choose a number between a set range? I want to recreate the slightly random lucky from rolling a die that you get from a tabletop RPG. Example use would be if your ship is attacking another ship, you would have a base minimum damage dealt depending on your stats and the modifier being whatever the “dice” rolled. And if that is possible, is there a way to influence that “randomness”, that is, your character tends to be luckier and tends to “roll” toward the higher end of the number range.

@Fantom use *rand (check out the wikia article http://choicescriptdev.wikia.com/wiki/Rand)
As for having it higher depending on skills, I think you have to specify the range, so I don’t think you could influence *rand. That said, you could add the stat to it, like:
*rand die 0 10
*set die +skill

1 Like

@fantom Depending how important this is to you / how big a part you want it to play in your game, you could also use extra scripting to allow you to weight / fine-tune the output of *rand accordingly (e.g. based on the protagonist’s skill levels) but wrap it all up in one or more subroutines to limit how much extra coding you will need within your actual story scripting.

For example, if you use percentile (0-100) values for your various main character Stats (we’ll use the example here of a skill called “Command”, for battle tactics) you would begin by defining two new numeric variables in mygame.js, e.g.


    ,rand_skill: 0
    ,dieroll: 0

You would then create a subroutine somewhere near the bottom of your scene .txt file, referenced by its own unique label, and also copy this to the bottom of any other scene .txt file in which you wish to make use of it. It might look something like this:


*label rand_sub1
*if rand_skill > 80
  *rand dieroll 6 10
  *return
*elseif rand_skill > 60
  *rand dieroll 5 10
  *return
*elseif rand_skill > 40
  *rand dieroll 4 10
  *return
*elseif rand_skill > 20
  *rand dieroll 3 10
  *return
*else
  *rand dieroll 2 10
  *return

This would allow you to weight / fine-tune the actual random number generation according to the current value of the variable “rand_skill”. The random value is stored as the new value of the variable “dieroll”.

Naming this subroutine “rand_sub1” allows you to also use additional subroutines (rand_sub2, rand_sub3, etc.), each weighted differently, so you can for instance have one heavily influenced by current skill level, one only moderately influenced, and one perhaps slightly influenced or only by a very high skill level, etc.

Wherever you wish to make use of this subroutine within your actual story scripting, you would then simply insert the following lines of code:


*set rand_skill command
*gosub rand_sub1
*if (or whatever - using the new value of "dieroll" as required)

With this, we are setting the value of “rand_skill” to equal the current value of the player’s “Command” stat. We could just as easily set it to equal the value of his Leadership skill, his Navigation ability, or his WC-cleaning prowess . . . or whatever other numeric character stat you wish to use in this particular case to influence the returned value of a random “dieroll”.

When ChoiceScipt hits that *gosub line, it will immediately ‘jump’ to the *label referenced there (“randsub1” in this case) and then run that code until it hits a *return command. At that point it will return to the originating *gosub line number (now having determined a new value for “dieroll”, but weighted by the appropriate current skill stat) and will then move on to the *if line immediately below, where you now make use of the new value of “dieroll” within your story scripting as required.

Note that you could also determine which subroutine to use based on something else specific to this particular character, e.g.


*set rand_skill command
*if (born_lucky)
  *gosub rand_sub1
*if not (born_lucky)
  *gosub rand_sub2
*if (or whatever - using the new value of "dieroll" as required)

Or perhaps use the “born_lucky” boolean as desired within the actual subroutine itself, after it *gosubs there, so you don’t have to add those extra lines each time you want to reference a subroutine in your story scripting.

I love how helpful everyone is, so thank you @Trywm and especially you @Vendetta you laid out what looks like an advanced bit of choice script but made it so that I perfectly understood it! Can I credit you?

@fantom You may if you like, although it would probably be more accurate just to credit the community here as a whole–I’m only passing on what I’ve picked up from others along the way. :wink:

Besides, it was a good opportunity to demonstrate for all relative newcomers the flexible *gosub / subroutine / *return system, as there’s a great deal you can do with that, with a little thought.

I did, however, neglect to include the obligatory Wiki link . . . I’ll remedy that now:

Next question of the day: I’m wanting to divide my game up into ten episodes, each of which will have their own story arc, with a greater arc throughout all of the episodes, and of course each episode will have chapters. My question is how do I divvy up the game into episodes? I’ve looked on the wiki but all I can find is the article on chapters.

I know nobody has had a chance to answer the above question, but here’s another one: I was going through the tutorials for the stat screen and noticed there’s a way to display a description under a stat label, so I was wondering if there’s a way to make this description a variable, like it displays a different description depending on what the current stat is.

You create a *temp variable in the stat screen like this:

*temp description_text

And then, you add these lines:

*if description = 1
    *set description_text "First Description"
*if description = 2
    *set description_text "Second Description"
.
.
.

and so on.
Then, in your stat chart, you do the following:

*stat_chart
    text Strength
        ${description_text}

So according to the “description” variable, the description of the “Strength” attribute changes accordingly.

Note: “description” must be declared in mygame.js.

How do I declare it?

By adding it along with the other variables in mygame.js:

    ,description: 0

My brain must not be working. I’ve done that, but I get an error and it won’t open the game.
Here’s what I have in my stat screen:

*temp name
*set Name “No name”
*temp rank
*set Rank “Ensign”
*temp Gender
*set gender “None”

*temp description_text1
*if Leadership < 20
*set description_text "People aren’t likely to follow you.
*if description_text1 >30
*set description_text "People will follow you.

label display
*stat_chart
text Name
text Rank
text Gender
Leadership
&(description_text1)
opposed_pair Strength
Strength
How strong you are.
opposed_pair Will
Will
How resistant you are to outside influence.

And here’s what I have in my mygame.js:

tats = {
leadership: 10
,description_text1
,strength: 10
,will: 10
};

*temp description_text 
*if leadership < 20 
    *set description_text "People aren't likely to follow you."
*if leadership > 30 
    *set description_text "People will follow you." 

label display 
*stat_chart 
    text Name 
    text Rank 
    text Gender 
    percent Leadership 
        ${description_text}
    percent Strength
            How strong you are. 
    percent Will
        How resistant you are to outside influence. 
stats = { 
    leadership: 10 
    ,description_text: "" 
    ,strength: 10 
    ,will: 10
    ,name: "No name"
    ,rank: "Ensign"
    ,gender: "None"
};

If you want to be able to change a variable during the game (not only in the stat screen) you must “declare” (create) it in mygame.js (as I did with name, rank and gender). Also, to declare a string (text) variable, you must add a quote (""), even if it’s empty, as a default value.

They should work in the way I did them now.

Also, to insert code into the forums with the indentation, use the
`

 

` tags (put the code between the tags).

Thank you so much! Although even after looking at what you put down and making corrections, it still wouldn’t work properly. Under “Leadership” it wouldn’t display what I wanted. After a few minutes it hit me: I was using the “&” symbol instead of the “$”. Doh! lol

Ok, here’s something I want your guy’s opinion on. As I mention above, the player’s character is given command of a super advanced and thus far one of a kind ship, and as @Vendetta says I should probably give a good reason why the player is given command of this ship and not someone more experienced. The thought I’m thinking of going with is the player is an ensign, and through a series of events the ship the player serves on encounters an aliens species from the dimension next door, they greet each other etc. and afterwords I’m thinking that because they’re from another, possibly higher dimension they somehow sense that humanity will soon face dire circumstances that will threaten to destroy all life in the galaxy. Humanity will need aide to face this, but the aliens cannot help directly because due to their other dimensional nature cannot linger in our dimension for very long. So instead, they give humanity a gift: an egg (although it looks more like a giant embryo) that will grow into a great ship. The catch (there always is one) is that the ship has to bond with person that is to command it, and as such cannot bond with just anyone. It must be a special kind of person. And at that moment it points it’s finger (or whatever) at the player and say “you”. This of course raises all sorts of objections in the others present, admirals, ambassadors, and such and how you’re too inexperience (“They’re just an ensign!” but the aliens insist that this is how it would have to be if they want their assistance.

That’s what I got. I apologize for holes in logic or whatever, it was literally coming to me as I was typing. What do you guys think?

On another note, how long does it usually take for these games to be made? I know to expect months, at least.

@fantom your idea is very interesting maybe the pc has to discover the mistery of what make him special, maybe the aliens not are so well intencioned like they seems or you. My character always try to gain the max profit for herself so i hope i can be a little bad at least

@MaraJade Oh don’t you worry about that! I’ll be adding in the option to become a pirate at some point.

Your game sounds interesting, looking forward to it. You have a great potential in the plot, so if you fully use it, you can make a very original game.