Counters?

PhilMakesGames
23 Oct 2016, 20:22

Hello! So I have a pretty complex idea for my game book, and wanted to know if it was possible.

So certain choices are either good (Samaritan), or bad (Vile).

Similar to Mass Effect's system of good choices adding to a Paragon value, and bad to a Renegade.

How can I make the player's going to a certain page (their decision) result in adding points to the Samaritan or Vile values?

For example:

You see a wounded man.

Help him.
Ignore.

If one clicks the link "Help him," they will then go to the corresponding page, and be given a Samaritan point.


thetruespin
23 Oct 2016, 21:28

If you're making a game book I'd use Squiffy. Doing this is extremely easy - just look at the documentation for attributes.

You can also embed the attribute modification into the link itself, meaning two different links can go to the same section, but change different attributes - useful when the players response didn't have any impact on direction, but said something about their nature.


PhilMakesGames
23 Oct 2016, 22:37

Thanks! I've already started it in Quest, however... is there any way to transfer over, or would I have to restart? Also, I;ve never used Squiffy.


hegemonkhan
23 Oct 2016, 23:16

if you just want to increase the stats/attributes for (whenever --- assuming this doesn't matter for you) going to a page:

on that desired: 'whatever' Page Ob ject -> 'Page' Tab -> Page Type: [script] or [script+text] -> (see below)

add new script -> 'variables' section/category -> 'set a variable or attribute' Script -> (see below)

set variable NAME_OF_OBJECT.NAME_OF_ATTRIBUTE = [EXPRESSION] NAME_OF_OBJECT.NAME_OF_ATTRIBUTE + VALUE_OR_EXPRESSION

the Game Book only has two Objects for you to add custom Attributes to: the 'player' Player Object and the 'game' Game Object, so:

set variable player.NAME_OF_ATTRIBUTE = [EXPRESSION] player.NAME_OF_ATTRIBUTE + VALUE_OR_EXPRESSION
~OR~
set variable game.NAME_OF_ATTRIBUTE = [EXPRESSION] game.NAME_OF_ATTRIBUTE + VALUE_OR_EXPRESSION

for examples:

set variable player.strength = [EXPRESSION] player.strength + 5
~OR~
set variable game.strength = [EXPRESSION] game.strength + 5


see this thread for more details:

http://textadventures.co.uk/forum/quest/topic/nzcpgpnicuq6j8bzthbp8a/newbie-question-how-to-make-player-stats-that-increase-and-decrease-gameboo

and if you want mass details:

http://textadventures.co.uk/forum/samples/topic/5559/attributes-and-if-script-guide-by-hk

ask if you got any questions or need any explanations of anything


if you want/need to specify if/when 'whatever' Page Object increases/decreases Attributes, then some possible options:

  1. using the 'firsttime/otherwise' Script/Function --- if the Game Book has it... and if you want an action/event to only happen once (the "first time", lol)

  2. creating your own flag/indicator (String, Boolean, or Integer) Attribute, which you check for, to determine whether to alter (increase/decrease) Attributes or not

example (using a custom 'state' Integer Attribute contained-within/of the 'game' Game Object):

// initial setting:
game.state = 0

// player of game does various stuff during his/her game playing's progression, which you have changing the game state:
// game.state = 1
// game.state = 99
// game.state = 4
// etc etc etc

// for whatever/where-ever/whenever in your game, which you have resulting in doing various actions/events dependant upon that flag/indicator Attribute:

if (game.state = 0) {
  msg ("0")
} else if (game.state = 1) {
  msg ("1")
} else if (game.state = 99) {
  msg ("99")
}
// etc etc etc