# Inventory for scars?

**URL:** <https://forum.choiceofgames.com/t/inventory-for-scars/45465>\
**Category:** ChoiceScript Help\
**Created:** [October 27, 2018, 5:17am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465 "2018-10-27T05:17:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hexfur](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hexfur/32/51894_2.png) [@hexfur](https://forum.choiceofgames.com/u/hexfur)\
**Post date:** [October 27, 2018, 5:17am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/1 "2018-10-27T05:17:59Z")

</div>

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](https://forum.choiceofgames.com/t/basic-store-inventory/13586) & 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.

---

<div class="post-metadata">

**Author:** ![EclecticEccentric](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eclecticeccentric/32/112816_2.png) [@EclecticEccentric](https://forum.choiceofgames.com/u/EclecticEccentric)\
**Post date:** [October 27, 2018, 5:24am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/2 "2018-10-27T05:24:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hexfur](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hexfur/32/51894_2.png) [@hexfur](https://forum.choiceofgames.com/u/hexfur)\
**Post date:** [October 27, 2018, 5:54am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/3 "2018-10-27T05:54:24Z")

</div>

I cant figure out which variable names to change exactly though

---

<div class="post-metadata">

**Author:** ![EclecticEccentric](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eclecticeccentric/32/112816_2.png) [@EclecticEccentric](https://forum.choiceofgames.com/u/EclecticEccentric)\
**Post date:** [October 27, 2018, 5:57am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/4 "2018-10-27T05:57:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Cheion](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/cheion/32/68558_2.png) [@Cheion](https://forum.choiceofgames.com/u/Cheion)\
**Post date:** [October 27, 2018, 9:39am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/5 "2018-10-27T09:39:01Z")

</div>

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

```

---

<div class="post-metadata">

**Author:** ![hexfur](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hexfur/32/51894_2.png) [@hexfur](https://forum.choiceofgames.com/u/hexfur)\
**Post date:** [October 27, 2018, 2:24pm UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/6 "2018-10-27T14:24:32Z")

</div>

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}"

```

---

<div class="post-metadata">

**Author:** ![hexfur](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hexfur/32/51894_2.png) [@hexfur](https://forum.choiceofgames.com/u/hexfur)\
**Post date:** [October 28, 2018, 2:28am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/7 "2018-10-28T02:28:59Z")

</div>

bumping

---

<div class="post-metadata">

**Author:** ![EclecticEccentric](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/eclecticeccentric/32/112816_2.png) [@EclecticEccentric](https://forum.choiceofgames.com/u/EclecticEccentric)\
**Post date:** [October 28, 2018, 2:40am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/8 "2018-10-28T02:40:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hexfur](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/hexfur/32/51894_2.png) [@hexfur](https://forum.choiceofgames.com/u/hexfur)\
**Post date:** [October 28, 2018, 8:03pm UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/9 "2018-10-28T20:03:01Z")

</div>

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"

```

---

<div class="post-metadata">

**Author:** ![will](https://sea3.discourse-cdn.com/choiceofgames/user_avatar/forum.choiceofgames.com/will/32/132033_2.png) [@will](https://forum.choiceofgames.com/u/will)\
**Post date:** [October 29, 2018, 5:14am UTC](https://forum.choiceofgames.com/t/inventory-for-scars/45465/10 "2018-10-29T05:14:26Z")

</div>

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.
