Non-threaded

Forums » Advanced Editor Forum » Read Thread

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

How to create a stat item?

8 years ago

I know the answers will be complicated, but how would one make it so that the player has an item, and when they click on it, it brings them to a page where they can edit stats such as strength, speed, etc?

How to create a stat item?

8 years ago
Be as specific as you can as to what you want this to look like. Even then though, I'd advise you to reconsider this and make something more simple as your first storygame. What you want isn't too hard to make once you know what you're doing, but I feel like you're being overly ambitions right now.

How to create a stat item?

8 years ago

Here is an article I wrote a while back. If you need me to elaborate on anything, let me know.

Or, rather, are you wanting something similar to the power system in Homo Perfectus 4?

How to create a stat item?

8 years ago

Perfect example: Similar to Dugeon Stompage- Stat Item

How to create a stat item?

8 years ago

Good. Try my system out. If it needs tweaking that's above your abilities, let me know, and I'll do my best to help you out.

How to create a stat item?

8 years ago

But how do I make it?

How to create a stat item?

8 years ago

The article goes into pretty good detail, or at least, that's about as detailed as I can get. Where are you getting confused, exactly?

How to create a stat item?

8 years ago

If you're talking about your article, I mean not so much leveling up, but increasing stats. How do you code it so you have have an item that you can click on where you can increase stats and return to the game?

How to create a stat item?

8 years ago

But, that's leveling up, is it not? You gain a certain number of EXP points, then you get a chance to increase your attributes.

How to create a stat item?

8 years ago

I can see why you don't get it. I won't have any EXP systems, only the chance to increase stats if they come to a specific link. For example(should've done this earlier): You trained. Use *item* below to increase your stats.

How to create a stat item?

8 years ago

That seems needlessly complicated. Why not just give the player the ability to increase the stats on the page where the training was done?

That said, using an item, you would still create the STAT variable, the "Level Up" item, and the "Level Up" page. You would go to the global page script and input:

IF %STAT = 0 THEN $ITEMSTATE01 := 0
IF %STAT > 0 THEN $ITEMSTATE01 := 1

This assumes that the ID of your "level up" item is 01. If it's 02, you will use $ITEMSTATE02, for instance.

On the "Level Up" page, you will use on-page variable code to display the user's stats (the article explains how) and create a link for each attribute the character can increase, as well as a "go back" link. The attribute links should only appear if the STAT variable is greater than 0 and, when clicked, they should decrease STAT by one and increase their respective attribute by one.

How to create a stat item?

8 years ago
As James mentioned, simpler might work better:

On the page where you can train your stats, just include links to train your stats, no need for the item.

How to create a stat item?

8 years ago

That's way easier. I'll do that instead.