I'm having trouble finding where to put my stats


#1

The tutorial tells me to go back to the mygame.js file, but that just brings up the scenes. Can anyone help me? I’m a noob when it comes to computers and programming [-O<


#2

Which tutorial are you following?

If you’re using the new version of choicescript you don’t need to mess with mygame.js you can create everything in startup. If you want them to show up in the stats screen then you edit the choicescript stats file.


#3

http://countersongscloset.webs.com/tutorial-2
This is the tutorial that I’m using. Is there a new tutorial that fits with the new version of CS?


#4

Oh that one’s out of date now, which is a pity since I learned choicescript with help from it.

I think the one at http://www.choiceofgames.com/make-your-own-games/choicescript-intro/ is the most up to date. Scroll down to “Setting and Checking Variables (aka “Stats”)” and then read http://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/


#5

Thanks for your help! I’ll check it out.


#6

I’m really sorry about the confusing out-datedness of the tutorial. :frowning:

I’ll have it fixed once I figure out all of the ins and outs and limitations of how the new CS functions work.

If you still want to use mygame.js for your stats, you’ll want it to look something like:

nav = new SceneNavigator([

    "startup"
    ,"scene1"
    ,"scene2"

]);

stats = {

    stat1: 50
    ,stat2: false
    ,stat3: ""

};


debugStats = stats

Otherwise, you can leave mygame.js alone and put something like this at the top of Startup.txt:

*title My Game
*scene_list
  startup
  scene1
  scene2
*create stat1 50
*create stat2 false
*create stat3 ""

#7

CS_Closet
I deleted Startup.txt because the old tutorial said I didn’t need it…do I just create a new folder labeled startup.txt ? I’d prefer not to use mygame.js :stuck_out_tongue:


#8

Yep. As long as the new file is called Startup.txt (I think it needs to be capitalized) it should work like the old one.


#9

@CS_Closet
And, again, I’m the biggest noob on the planet…but for some reason my game just loads but never starts when I click on the mygame/indexhtml

and since I can put my stats into the Startup.txt file, does this mean that I no longer need the choicescript_stats.txt file?


#10

Urg. It’s probably not you. I think my tutorial screwed something up. Sorry about that again.

You still need your choicescript_stats.txt in order to display your stats whenever someone pushes the stat button at the top of your game. Nothing needs to be created or set in that file; just put whatever information you want players to see in there.

If you made any changes to mygame.js, revert it back to:

nav = new SceneNavigator(["startup"]);
stats = {};

Apparently I was wrong and startup.txt shouldn’t be capitalized in the latest CS version. (I don’t know why my test file was)

After you put your scenes and stats in startup.txt, it should load the first scene. If that doen’t fix it, make sure you’re using the up-to-date version of CS and that you’re not using Chrome to test (unless your game is uploaded online). If it still doesn’t work after that, let me know.

Edit: Further prodding has shown that capitalization in naming scene .txt files makes no difference whatsoever anymore. These are exactly the kinds of things I need to poke at a bit more before I try to remake the tutorial. :frowning:


#11

Would this work?

*title Trial of the Demon Hunter
*scene_list
startup

*create Name ??
*create Gender ??

*create Morality 50
*create Courage 50
*create Intelligence 50
*create Relationship with Beckham 50
*create Stealth 50

*create Transformations ??
*create Health 15
*create Beckham’s health 10
*create Beckham’s Manna 8

Trial of the Demon Hunter by Samuel Harrison Young

You are a

*choice
#Demon Hunter
(essentially a benevolent bounty hunter) set out to destroy the vile evil that has ravaged your town. Contrary to popular opinion, you lack magical abilities. Instead, you utilize your cunning, physical powers and various tools and weapons to defeat your enemies or otherwise accomplish your endeavors. Your arsenal, concealed by a dark cloak, is extensive.Tied to your belt sits a bag of salt which distracts vampires as they have extreme Obsessive Compulsive Disorder regarding salt and are compelled to count each grain; the individuals of lesser caliber are mesmerized completely, albeit momentarily. In deep pockets resting on each thigh, sealed by zippers, lays a pound of shaved iron, which burns the flesh of most beings belonging to the dark. Attached to your belt are a dozen blue candles with wicks that are infused with incense, which calm your nerves and aid your vision while simultaneously discomforting weaker evils. Around your neck hangs a necklace, and tethered to its end, a very conspicuous brass master key. The key is specially crafted and is able to open all non-magical portals: even of the most intricate variety. In an inner pocket of your robes, buttoned off in several places for safe measure, resides a book; quite certainly the most important in your vocation. The book is a bestiary: a bestiary of demons. It contains a list of all the demons known to mankind and a picture and graph, depicting it’s primary form and abilities and its rank among it’s possess kind. Through the knowledge of a demons name, you are able to control it in a manner and therefore banish it from whence it came, after defeating it so that its physical form is too weak to fight back. Though it is written in Latin, that is no barrier to you for you are a man of great knowledge and have an affinity for a plethora of languages. At your side, strapped across your chest by a thick strand of leather, hangs a bag. The contents, separated by sections, include copious rations of cheese, ham and bread, a pouch of water and a case of healing ointment. Though not quite fast acting, the ointment multiplies the regeneration, or otherwise well being, of the afflicted area twofold over night. Wrapped around your waist and linked by a small clip at its end is a slender silver chain, utilizeful particularly for binding witches, who are paralyzed on contact. Your last and most prized weapon weapon is your staff. Carved by your own adroit hands of a powerful and age old oak tree, the staff is sturdy and resolute. Additionally, instilled with chemicals of your own creation, it is able to transfer these chemicals and therefore contort the muscles on contact (though you have become immune through constant and slowly waxing exposure). Constructed on to your staff, hidden by the many odd bumps and grooves, is a small button which releases razor sharp blades on polar ends: the apex and the base. Though you possess this vast array of utilities, all of your forms of attack are accompanied with detriments and advantageous elements unique to the individual. Attacking with your staff often times deals the most damage, though, conversely, it also leaves you most prone to counterattack. Though your silver chain is extremely swift and its coils span a large surface area, it is only highly effective against witches. Your iron is akin to acid to the vast majority of evil beings, therefore incinerating their skin, flesh, and bones, though it is generally slow and somewhat random in its sporadic descent. Your salt is highly affective against against vampires, albeit no one else, but is only efficacious once; vampires are able to disregard its compelling element for a short period of time after the premier attack. Though your candles do counter minor adverse spells and contain a discomforting element in regards to evil beings, they are not to be utilized in the heat of battle as their sway is minimal. Aside from this extensive set of tools, provisions and weapons, among other utilities, you had room for one last set. You took
*set gender “Male”
*choice
#One destruction grenade
You took one destruction bomb and deposited it neatly into your bag. You prefer the abrasive art of destruction and its directness.

			\*finish
		#Three flash grenades
			You took three flash grenades and deposited them neatly into your bag. You prefer the concussive aspects of the flash grenade combined with its blinding effects, mixing the art of subtlety and destruction into a perfect amalgamation.
			\*finish
		#Five smoke grenades
			You took 5 smoke grenades and deposited them neatly into your bag. You appreciate the subtle art of stealth and dis-array tactics, using the smoke screens to make quick escapes or distractions.
			\*finish

#12

aaaaand it didn’t pay attention to the indents -.-


#13

For your character variables, put them in quotes. For example:
*create Name “??”

Also your first choice has only one option (#Demon Hunter). I recommend just cutting that choice and using the intro text which leads to your first choice of grenade type.

Otherwise, your code looks fine.


#14

@DJ_CUTY
For future reference, if you want to show code with indents on the forums you can use the `

 

` tags.


#15

If you want it to pay attention to indents put < pre> before and < /pre> after. (without the space between the < and p)

So

< pre>
Codey stuff
< /pre>

will show


Codey stuff


#16

@JimD
It had a “Demon Huntress” option as well, but I didn’t display it because it wouldn’t let me type that many characters.
and thanks @CS_Closet and @FairyGodfeather

I’m glad to hear that it works, but I can’t actually test it out myself because the index html page doesn’t display the game T.T