Inventory for scars?

I’ve looked at the other inventory tutorials & their making my head spin terribly.

I want to make a sort of inventory where instead of items, it describes Scars you’ve collected over time (there are a set number of scars overall, I’ve only got one in the game possibly that I want to test this system with)

Last tutorial I read was Basic Store/Inventory & I’ve been kind of following that, while trying to edit it myself to see if it works. So far it’s not breaking the game at least.

1 Like

I think the normal inventory code would work for what you’re looking for, only with the names of the variables changed. Is there anything else that you want to accomplish besides an inventory but for scars?

I cant figure out which variable names to change exactly though

I think first you have to have boolean true/false variables for each scar you have, like:

*create face_scar false

and set it to true when a character receives the scar.

1 Like

Alternatively, if you want slightly more unique scars in the same location, I think you can do something like:

*create face_scar ""
*create chest_scar ""

and just an example of how it can play out:

*choice
   #Dodge to the left.
      *set face_scar "cut across right cheek"
      You dodge to the left, but are unable to avoid a thin cut on your cheek.
      *goto next
   #Dodge to the right.
      *set face_scar "cut across left cheek"
      You dodge to the left, but are unable to avoid a thin cut on your cheek.
      *goto next
   #Freeze.
      *set chest_scar "long cut across ribs"
      You freeze in place as he comes to you. Moments later, you feel a searing pain in your chest as the knife bites deep into flesh.
   #Fight for the knife.
      *set chest_scar "small cut across left chest"
      You leap forward and grapple for the knife. In your struggle with your opponent, the sharp blade nicks your chest.
      *goto next
1 Like

So this is what I have for the startup (top code) & choicestats screen (3nd code). When on the stats screen, it just says “Scars: true” instead of “You have no scars” (final wording for a few things will be different when its finished)

*create no_scars true
*create scar1 false
*create scar1_name "Spinal Scar"
*create scar2 false
*create scar2_name "Facial Scar"
*create scar3 false 
*create scar3_name "Belly Scar"
*create scar4 false 
*create scar4_name "Torn Wing"
*create scar5 false
*create scar5_name "Broken Claws"
*create scar6 false
*create scar6_name "Broken Horns"
*create scar7 false 
*create scar7_name "Missing Scale"
*stat_chart
  text no_scars Scars
*temp comma false
*if (no_scars)
  *set comma true
  *set no_scars &"You have no scars"
*if (scar1)
  *set comma true
  *set no_scars &"You have ${scar1}"
*if (scar2)
  *set comma true
  *set no_scars &"You have ${scar2}"
*if (scar3)
  *set comma true
  *set no_scars &"You have ${scar3}"
*if (scar4)
  *set comma true
  *set no_scars &"You have ${scar4}"
*if (scar5)
  *set comma true
  *set no_scars &"You have ${scar5}"
*if (scar6)
  *set comma true
  *set no_scars &"You have ${scar6}"
*if (scar7)
  *set comma true
  *set no_scars &"You have ${scar7}"

bumping

The variable no_scars should be a string, not a boolean.

So I set it like this & when I tested it, it said:
Scars: NoneYou have true

Stat Screen

*stat_chart
  text no_scars Scars
*temp comma false
*if (no_scars = true)
  *set comma true
  *set no_scars &"None"
*if (scar1)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar1}"
*if (scar2)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar2}"
*if (scar3)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar3}"
*if (scar4)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar4}"
*if (scar5)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar5}"
*if (scar6)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar6}"
*if (scar7)
  *if comma
    *set &", "
  *set comma true
  *set no_scars &"You have ${scar7}"

Startup

*create no_scars "None"
*create scar1 false
*create scar1_name "Spinal Scar"
*create scar2 false
*create scar2_name "Facial Scar"
*create scar3 false 
*create scar3_name "Belly Scar"
*create scar4 false 
*create scar4_name "Torn Wing"
*create scar5 false
*create scar5_name "Broken Claws"
*create scar6 false
*create scar6_name "Broken Horns"
*create scar7 false 
*create scar7_name "Missing Scale"

Here’s what I do:

*create scars false
*create birthscars ""
*create demonscars ""
*create combatscars ""
*create ritualscars ""

...

*if (scars = true)
  [b]Scars:[/b] ${birthscars} ${demonscars} ${combatscars} ${ritualscars}
  [n/]

...

*set scars true
*set birthscars "A thick red smear from your forehead to the edge of your mouth."

It just inserts a quick sentence for each of the scars you have. That was the most streamlined way I could think of to do it.

1 Like