Non-threaded

Forums » Advanced Editor Forum » Read Thread

Get help from the experts on variables, scripts, items, and other scary things.

Coding

2 years ago
It seems i have no idea how to code on this website, has anyone got any idea how to do it?

Coding

2 years ago

Yes, there are people who have used 'coding' extensively. So people do have an idea on how to do it (but it isn't necessary for making storygames, so not everyone knows).

I see you have another thread, so I'm assuming this is about that.

What part are you up to? Did you figure out how to create a variable?

I suggest creating a 'test bla bla' storygame, and using it as a place to mess around. Just click the buttons and see what they do. This way there is no risk you mess up the story you're working on (by deleting a page or something).

Coding

2 years ago
That's a good idea actually, thanks for that tip. I am basically trying to create a healing potion so that you can heal when you get damaged or injured. I am unsure how to code as the option i am given when setting up a variable is :-

Variable Name (which i believe is as it says, the name of the variable)

The values
Min Value (which would be 0 if using the variable for health), Max Value (like 10 healh for instance for max health), Starting Value (which is guess is what you start with like the 10 health for instance)

Events - this goes to a page if variable reaches certian number so for instance below 0 health would be death. Above 10 health would be a page thats fully healed.

the additonal option - just shows the health on every page not just neccessary pages.

i dont know what other things I can do to make the variable useful when making the health potion

Coding

2 years ago

I just learned how to use the editor this week, so here's how I recommend doing it:  Here's the links to the most important articles for learning how to code items and variables, though really, all of the articles on the Help & Info page should be useful.  I recommend that after you read an article, you spend some time in the test-game that Zake suggested messing around and getting comfortable with the new systems.

How to use variables

How to use items

How to use link and variable restrictions

How to use the advanced editor

After you're comfortable using the advanced editor, you can check out some of scripting articles on the help & info page, as scripting will offer you a lot more options and flexibility when coding.

 

Specifically about your health potion question, here's how I would do it.  (I think I said something like in the thread that got deleted, though I can't remember for sure.  Apologies if I'm repeating anything.)

0) Make sure you're using the advanced editor. (You can activate the editor by clicking "Change editor features" on the "Story properties" page.)

1) Make a variable called "Health".

2) Make an item called "Health potion".

3) Set the "Default effect" for the health potion to take you to a page called "Use health potion".

4) On the "Use health potion" page, write a quick description about how drinking the potion makes you feel better.

5) Put one link on the "Use health potion" page, and have it be a "Previous page" link that says something like "Back to the game."

6) Click the icon with the cross on the "Back to the game" link to cause changes to variables from clicking this link.  Make clicking this link cause the health variable to increase by however many points you want.

7) Click on the bag icon on the "Back to the game" link to cause clicking this link to make you drop items.  Make clicking this link cause you to drop the health potion.

Coding

2 years ago
Thank you, that was actually a massive help. does the same effect apply when you are adding something to fight? (or something that would cause you to lose health?)

as in making the creature an item?

Coding

2 years ago
Items are best thought of as "actions" the player can take at any given time, or to represent something they're holding. They don't really work as enemies.

Coding

2 years ago
Do the potions stack? so you can have more then 1 potion in your inventory at a time or would it be 2 seperate potions?

what would be the method for adding enemies?

Coding

2 years ago

Not to flex too hard here but I made a storygame where items and enemies appear, so it may be worth while to check it out:
Koi Koi

The short answer to your question is create an "encounter" page which handles the logic that you would typically goes through in a fight. You then simply "load" in an enemy when the encounter begins, by setting the different values of the enemy (health/attack), based on the encounter. Variables are all global, meaning you can access them anywhere. So if you want to apply extra damage, or subtract armour from an attack, you just do it by referencing the variable in the attack script.

Coding

2 years ago

Replying to all your questions at once;

1) Killa_Robot put that really well, items are actions the player can take.  The only reason you'd have a creature as an item is if it's a creature allied to the player, and even then you'd have to plan it out really carefully.

I haven't read this article yet, but here is the article on constructing combat using the CYS editor:  Combat article.  It has a lot of information on using player stats, hit points, and adding effects from weapons and items.  You'll have to read several other articles to understand it (including several on scripting), but you should probably be doing that any ways given the complexity required for making an RPG.

2) Potions can stack.  If you want, you can have "Health potion 1" and "Health potion 2" which do the same thing, but are separate items.  Alternatively, you can cause "Health potion" to have a limited number of uses which each heal a certain amount of hit points.  With the "ITEMUSED" commands, you could allow a player to purchase more doses of the potion at a later time.

3) Having multiple enemies would probably work like this:  You give the player a choice of which enemy to attack, and then the damage they deal affects only that one enemy during that round.  Meanwhile, each enemy has the opportunity to attack the player on their turn.  Alternatively, you could choose to just treat multiple enemies as a single creature to make the math easier on yourself (and the combat easier on the player).

Coding

2 years ago
i never knew this was that intense haha. but thank you so much for the help so far.

as you havent read the article im assuming you couldnt lay out instructions like you did with the health potion.

i know i am asking alot but what you have done so far has helped me massively.

so thank you

Coding

2 years ago

I haven't read the article, but after skimming it, I doubt I could lay out instructions that were any more clear that what's written in the article already.  It seems to give a very clear way of setting up each variable and modifier you could need for a fight.

No problem, happy to help!

Coding

2 years ago
ok that makes sense, what about if you were using armour/weapons to increase stats, us there an article that you can suggest for me to read to apply those

Coding

2 years ago

The combat article covers using weapons to deal damage (or additional damage), and using armor to deflect damage should work the same way.  

I'm not sure how to tell you how to add armor/weapon bonuses to stats without knowing how your combat system works.

There aren't any articles that cover situations that specific, but your system seems complex enough that you're probably going to have to read and understand nearly all of the articles to make this work.  In particular, I suggest paying attention to the section on random variables and adding variables together, because that's what you'd need for a system where you can add bonuses from armor and weapons.

Coding

2 years ago
yeah that makes sense. i will look into it more thank you very much.

Coding

2 years ago
I guess I'm just not following why he couldn't look at the articles he was pointed to before. But good luck and all now that you've taken this upon yourself, because I'm certainly not planning to respond to any more of these posts.

In my experience it's important a person (at the bare minimum) figure out what a variable even is before they get taken by the hand and dragged through the more advanced stuff.

Since they didn't do that, not surprised at all they came back to ask how to use a sword to attack after you already explained a potion. Literally the exact same thing, which he can't understand because refusing to look the articles means he still doesn't grasp the basic concept. None of this is helping him at all.

Coding

2 years ago

Lol, I suspect they just needed to be pointed to the right articles in order to get started.  The organization can be kinda confusing when you're coming at it for the first time.  Once they read all the articles and experiment around they should be fine.

Coding

2 years ago
@Mizal a couple of the articles i couldnt find so being told the name of them really helped. also, i never noticed the editor features option allows you to change stuff. i am really new to this and just liked a little bit of help. im sorry i dont know as much as you do but to get the help i was given really did help me. i am sorry my knowledge of this doesnt impress you but i think its a bit harsh for you to come at me like that. you could of just kept your mouth shut rather than making that unneccessary comment, or offer something of help.

@gryphon thank you for helping as you did, it was a big help and has allowed me to understand more

Coding

2 years ago
Right right I realize now I should have mentioned that the editor lets you change things, what an oversight, silly me!

So how's it going, have you figured out what a variable is yet, or how to make one?

Or are we getting too far ahead of ourselves? Have you figured out where the Shift key is yet? Maybe Gryphon could take a video of themselves pressing theirs and upload it for you.

This game is a fantasy adventure RPG game where you can control the direction of the story. This will involve a main character and as you progress through you will meet addtional characters to take part on the adventure with you. You will gain experience to level up, collect inventory and upgrade your weapons and armour, you will also collect summons and pets on your way through the game, you will have to craft different items and level up your skills to progress. The idea of the game is to complete the campaign and defeat Graeldor to save the land of Zeah from complete destruction. If you choose the wrong path you could lose valuable items or characters that may cause the game to become alot harder. Every decision you make will have an impact on your adevnture wether it be a good or bad one.


Anyway, good luck with this. I'm sure I've been far too negative, you'll be able to use your thinking powers to figure out a variable some day, and then move on to the rest. It'll be so much better than that rubbish Tower of Riddles game you played.

Coding

2 years ago
why are being so cocky? I asked for help, if you dont want to help why are you even commenting?

is it because Gryphon was alot better help than you and actually made an effort to help?

Coding

2 years ago

Oh jeez, please don't drag me into this

Coding

2 years ago

Lol, don't worry you're safe.

Coding

2 years ago
lol sorry, i just dont see what mizals problem is.. have i done something wrong? i get im asking alot of questions however id rather get all the information to read through at once rather than keep asking quesitons at different times, he obviously didnt like the fact his help was whack and yours was very useful.. must just be jealous.

Coding

2 years ago
By all means, ask all the quesitons you like, no one is stopping you.

Coding

2 years ago
so whats your problem?

Coding

2 years ago
Since when do I have a problem? I'm not sure what your last few posts even have to do with the topic.

Maybe come back when you've gotten it a little more together. Drunkposting is only ever funny for a short time and yours are barely readable.

Coding

2 years ago
Ah, I understand the issue now. You're just retarded.

Coding

2 years ago
Commended by mizal on 8/3/2021 11:23:37 AM

Coding

2 years ago
I really prefer not to ban lolcows. The entertainment they provide is too valuable.

It's just a shame I don't think she'll ever actually finish her elaborate RPG.

Coding

2 years ago
ok cool

Coding

2 years ago
I went to the articles page just now and hit Ctrl F, how intense was that?

Is there some kind of medical reason you can't do simple things to help yourself?

Coding

2 years ago
I was going to answer your second question there, but I see you figured it out in your other post.

Coding

2 years ago
wow, really useful

Coding

2 years ago
Go away, troll.

Coding

2 years ago
sounds like you should take advice from your own words lol

Coding

2 years ago

This was once again all good advice from everyone wasted on a fucktard who didn't know how to keep his mouth shut.

Oh well, guess we can point this thread to other noobs as an example of how to code and how not to act.

Coding

2 years ago
In particular, don't do this: https://chooseyourstory.com/forums/newbie-central/message/28525

Coding

2 years ago
Oh well that OP actually became much gayer since I saw it last. So I mean, don't be a degenerate, but also don't make a thread randomly insulting the community where people are bending over backwards to help your helpless slug-like self even when each post you make is more retarded than the last.

Coding

2 years ago


Some infidel nuked the thread these were in, but I have saved them, praise Allah.