Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

Need a little advice on player XP & class creation

8 years ago

Hello CYS community!

I'm a first time CYS storygame writer and yes I AM using the advanced editor. Im finding it is becoming increasingly easier to use after understanding some of the basics.

But this is not what I need advice with.

I already have implemented different races into my game in which the player (you) can choose from

I would like to have a couple of different classes. Problem is, I would like each class to have a few special abilities, and possibly more abilities as they progress through the story and level up.

Which leads me to my second question. How do I go about tracking XP? And allowing the player the level up?

Any links to other forums involving this same stuff would suffice. I know its probably allot to explain. 

THANKS GUYS!

Need a little advice on player XP & class creation

8 years ago

Also, can I move the variables around the screen instead of them being in ABC order on the bottom left?

Would be nice to place the characters current HP at the top left

Need a little advice on player XP & class creation

8 years ago
You'd have to do it manually using scripting and html.

Need a little advice on player XP & class creation

8 years ago

%%HEALTH%% (or whatever your variable is called) can be inserted anywhere on the page itself to display the number.

So you can start each page off with Health: %%HEALTH%% which would display Health: 100 (or whatever is currently is). You'd untick 'display on page' for these, since by default those are always listed at the bottom. There are even ways to display things like 'You feel fine!' or 'You've got some scuffs and bruises!' when it's within a certain range instead of the number itself. 

http://chooseyourstory.com/help/articles/article.aspx?ArticleId=3850

Need a little advice on player XP & class creation

8 years ago

XP is simple. Like most things to do with the editor, you can use variables. Just make a variable called XP and every time they do something to raise it you tell the game to increase that variable. LEVEL could be another variable that goes up whenever XP reaches a certain amount. You can just use a global script that 's something like:

IF %XP > 100 THEN %LEVEL := 2

IF %XP > 1000 THEN %LEVEL := 3

The := basically means 'set to'.  You could also do something like IF %XP > 100 THEN %LEVEL := %LEVEL + 1 and then %XP := 0 on the next line to reset XP every time you gain a level, but that would mean using a flat amount for each level instead of needing more and more the higher you go like most games do.  

 

Need a little advice on player XP & class creation

8 years ago

If you don't want a flat amount, you can simply do

 IF %XP > 100+%LEVEL*20 THEN %LEVEL := %LEVEL + 1 and then %XP := 0

Need a little advice on player XP & class creation

8 years ago

Uh that looks like math so how bout not.

Need a little advice on player XP & class creation

8 years ago

Yes, because scripting is actually possible without math.

Need a little advice on player XP & class creation

8 years ago

Here is an article I wrote on the subject of leveling systems a while back.

Need a little advice on player XP & class creation

8 years ago

Yeah, it really helps.

Need a little advice on player XP & class creation

8 years ago

Mason, you're cool and all but you have to stop making these unnecessary posts. It helps no one and is very annoying to the other members. This isn't a youtube comment section where you write three words and you're done. This is a discussion, so most posts should add to it.

Need a little advice on player XP & class creation

8 years ago

Yeah, it really doesn't help.

Need a little advice on player XP & class creation

8 years ago

XD

Need a little advice on player XP & class creation

8 years ago
I agree. It really doesn't help.