New ChoiceScript: *create has changed, mygame.js is optional

@trollhunterthethird
Good question, I’ll talk to the wiki-admins about it.

On the subject of the Create command, I’m brand new to ChoiceScript and I’m a little confused by the Introduction to ChoiceScript page, specifically where it comes to stats. What does each of the following lines do?

*create leadership 20
*set leadership 30

(Note that these are direct copy-and-pastes from the Intro section of the site.)

I’m guessing Create gives life to a stat named (in this case) Leadership, and that Set gives it a value of 30…but then what is the 20 for?

1 Like

20 is the initial value of leadership.

So why does it then get set to 30 in this example? Or are the 2 lines not meant to be read as one right after the other?

1 Like

*create leadership 20

means it creates the variable “Leadership” with a value of 20

you use

*set leadership 30

would be used later to increase it from 20 to 30.

May I suggest that this thread either be added as a sticky at the beginning of the forum, or added as a link to the “I need help with ChoiceScript! What do I do?” thread, because someone starting in CS would still think they need to use mygame.js

I updated all of the documentation on choiceofgames.com to not mention mygame.js a while ago. Is there still some misinformation floating around on the wiki or something?

Oops, my bad. Sorry about that.

Yeah, the wiki’s in severe need of an update, especially in regards to mygame.js It looks to be a rather indepth task though.

@FairyGodfeather I think that’s how I confused myself, since that’s my primary source of information. What if we got a team together and divided the work? I’d be more than willing to help with the simple stuff.

I hate wikia so I’m not volunteering. I’d rather rebuild the whole thing from ground up, creating tutorials similar to what CS_Closet did with images to show how everything is done.

However I’m also flaky as anything so quite likely I’d start and then lose interest. So I’m not volunteering to do that either.

I to dislike the wikia myself and do plan on adding some stuff up on a webpage, hopefully soon. Just been in writing mode so trying to make the most of it. :slight_smile:

To clarify it is specifically wikia I hate. Well, okay, all of the free wikis that I’ve tried. I’ve a strong dislike of all of the adverts that come with them and find them ugly. I’d rather something cleaner and fresher. I’m also in favour of a light background, and easy navigation.

I have built my own wiki’s for various projects using mediawiki. Ha! Which apparently is what wikia uses as well, so I’ve no excuse there. It’s just, it’d be a lot of work. I’d feel like I was stepping on toes. Did I mention, a lot of work? Which I definitely wouldn’t get finished. I do hate to criticise though when it is a useful source, and I’m not actually doing anything to fix things. The one thing I would like to see is more open memberships. It doesn’t really seem like a wiki if there’s very restricted privileges on who can edit what. There are ways to avoid vandalism.

That’s great that you’re working on stuff, LordIrishDas. Heh, I don’t suppose you’d be willing to host a mediawiki would you? Although I bet that what you’re doing will actually remove the need for one.

@FairyGodfeather I agree with you on why I dislike the wikia.

I am alway willing to host anything for CoG that would help writers. Like you I do not want to step on any toes as I know a lot of work went into it.

I am just planning some simple video tutorials, but if you or others would like to build something more comprehensive I would be willing to help. Of course I know nothing about mediawiki.

I can’t speak for all the other Wiki admins, but I’ve had intent to update it for a while now, the thing is I’d also quite like to rewrite pretty much every article.

At the moment because it’s a combination of five or six people’s ideas, methods and writing styles the thing as a ‘whole’ can prove quite hard to follow or find information in.

We really need a template for each page (e.g. command pages) and then to rewrite each page based on that template with the identical headings, layout and information.

Suffice to say I’ve not really found the time, I’m not actually sure when I will, though I’d like to think it’ll be in the first half of this year.

We did also discuss and (if I recall correctly) agree to unlock the wiki to edits by any registered wiki user but can’t find a way to unlock pages except page-by-page, which sounds painful, so no one has volunteered to do that yet. Again, it’s on my TODO list :confused:

On that note if someone can make a list of the most important pages that need updating, I (or another admin) can unlock those to begin with, and we can get the ball rolling?

@CJW I’d say the pages for

create
Index.html
Mygame.js

Would be my first choices

I think the wiki is a good resource, however it’s also currently a bit muddled and tricky to navigate.

Yeah, it’s a fair amount of work setting up a new wiki. I’d agree with you CJW in creating it from the ground up in order to better organise things. I’m a bit clueless as to how wikia does things since I’ve only used mediawiki hosted on personal server space.

Templates are wonderful things. It’d be a lot easier to add games, for instance, if we made a form for it that generated stuff into a template.

I know in mediawiki you can assign different permissions to members. Can’t you do that with mediawiki? Or are things locked in such a way it means unlocking everything individually.

We could continue the discussion on the wiki thread. http://www.choiceofgames.com/forum/discussion/comment/87858