Please help me with this stat system I want to make

Anthony the tiger
24 Aug 2017, 23:55

Alright so here's what I want to do with my game

I want to make a stat system
currently, I have 3 stats
strength- allows you to pick up and use specific items
intelligence- determines how things are named and how they are described
luck- determines random chance encounters

what I want to do with them
I want the points to go from 0-10
and in the intro the player is limited to 14 points to spread out
I want this system to be able to change any object in game simply by using the command if player's intelligence = 0 give them this result, and so on for the rest of stats and points
any suggestions on how to do this, last time I encountered a lot of errors using someone else's template.


jmnevil54
25 Aug 2017, 00:51

Just who's template are you using? You might have to try a lot of codes and such before finding one that works.

The Pixie is usually good at things like this.

You may have to make a command or a function for "if intelligence = 0, do this."
But not necessarily. This is in my game start script. (In the online editor. Otherwise, edit the game's attributes. Or player. I don't know.)

player.changedhitpoints => {
  if (player.hitpoints > 0) {
    msg ("Hits points now " + player.hitpoints)
  }
  else {
    msg ("You are dead!")
    finish
  }
}

DarkLizerd
25 Aug 2017, 03:21

"if" would be your friend here...
(AAAHHH!!!!... Better!!!)
It would take a bit to program it, but try this...
For each of your objects, set-up a Split variable.
IE: for a gun... (I've added the [#] to keep track of the slots, don't use it when you program this.)
This is the description of the gun passed on intelligence (0 to 10)
gun.I.desc= Split("[0] It looks like an 'L', [1] It looks like an 'L', [2] It looks like an 'L', [3] It looks like an 'L' shaped hatchet but it is very dull, [4] It looks like a pistol, [5] (better description), [6] It is a 6 shot revolver, [7] (more), [8] (better), [9] It is a Smith & Wesson model 1938 6 shot revolver, [10] It's a gun!...", ",")


hegemonkhan
25 Aug 2017, 08:30

here's some links which cover everything that you want to do:

http://docs.textadventures.co.uk/quest/guides/character_creation.html
https://textadventures.co.uk/forum/samples/topic/4057/letting-the-player-set-attributes
https://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk
https://textadventures.co.uk/forum/samples/topic/5137/list-and-dictionary-extensive-guide-by-hk