I'm having trouble implementing a magical power system with *if codes


#1

Hello! I’m relatively new to choicescript, and I came here with an idea for a story and game already in mind. One of the main mechanics of the story is the ability of the MC to use magic through enchanted tattoos on their body. I want the choices you have for spells to differ based on your country of origin, (each nation is based on an element, sorta like in ATLA). The problem is, I’m having trouble implementing that system. Your character can get have three tattoos, one on each arm, and then a special one somewhere else. I started with the right arm, and since i can’t figure that out, that’s all the code I have. I’m trying to make it so once you pick your nation, you have a choice of different places on your arm, each with their own option for a tattoo.

The latest error code i got was “Invalid Expression at Char 28 expected OPERATOR, was: STRING[Animal Tribes]”

Here’s my code, sorry it’s so convoluted.

 You follow the woman through a narrow hallway into a small, well lit room. In the middle of the room is a single desk, an ornate wooden chair on either side. The clerk takes a seat in her desk chair, motioning for you to take a seat in the chair opposite her. 
    "Alright, let's get started shall we?" The woman says briskly. "Let's see here, first question, what country are you from? (Note: this will have a direct impact on what magic powers are available for you to choose from later)    
    *choice
     #"The Stone Kingdom" I say, remembering my honorable homeland, and it's patron [i] Dive [/i], Segoroth, the stone knight, the god of Stone, discipline, and honor.
      *set home_country "Stone Kingdom"
      *goto tattoos
     #"The Water Republic" I say, remembering my beautiful homeland, and the [i] Dive [/i], Votum, the mistress of the sea, goddess of Water, calm, and hidden treasures, who protects your nation from harm.
      *set home_country "Water Republic"
      *goto tattoos  
     #"The Fire Empire" I say, remembering my powerful homeland, and it's patron [i] Dive [/i], Agne, the flaming gladiator goddess of Fire, force, and passion.
      *set home_country "Fire Empire"
      *goto tattoos
     #"The Storm Union" I say, remembering my free and autonomous homeland, and it's patron [i] Dive [/i], Vintaccio, the storm centurion Diety of Wind, Lightning, freedom, and focus. 
      *set home_country "Storm Union"
      *goto tattoos  
     #"The Plant Plains" I say, remembering my humble, yet inviting homeland, and it's patron [i] Dive [/i] Bera, goddess of plantlife, hospitality, agriculture, and patience. 
      *set home_country "Plant Plains"
      *goto tattoos
     #"The Animal Tribal Grounds" I say  remembering my disorganized, but peaceful, homeland, and it's guardian [i] Dive [/i], Relspura, the mother of wildlife, goddess of animals, companionship, and communication.
      *set home_country "Animal Tribes"
      *goto tattoos
     #"The Shadow Badlands" I say, remembering my lawless and nightmarish homeland.
      *set home_country "Shadow Badlands"
      *label tattoos
      "Right then, and your tattoos?" You smile, flashing back to your 14th birthday. Your remember you parents bringing you to the local Ink Witch's studio. You remember the witch's kind, toothy smile as she explains that the tattoos you choose will serve as the spells you'll use for the rest of your life.
      You remember her scratchty amused voice. "Right then kiddo, you get 3 tattoos. One on each arm or hand, and one on your back or chest" She says, twirling her wand in her fingers "Just tell me where you want a spell and I'll tell you what I can put there."
      *label right_arm_tattoos
      *choice
       #I point to my right palm "What ones can I put here?" 
        "Excellent location!" The witch exclaims.
        *if home_country "Animal Tribes" or "Stone Kingdom" "I'm sorry, there are no spells I can put there. Try another location" 
         *goto right_arm_tattoos
        *if home country "Shadow Badlands" "I can put a spiral tattoo there, allowing you to create and throw orbs of pure darkness from your hand"
         *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Storm Union" "I can put a bolt tattoo there, giving you the ability to prpject small bolts of lightning from your fingers"
         *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Water Republic" "I can put an orb tattoo there, allowing you to shoot a stream of water from your hand." 
         *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Fire Empire" "I can put an orb tattoo there, allowing you to shoot fireballs from your hand."
         *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos      
        *if home_country "Plant Plains" "I can put a seed tattoo there, allowing you to plant a magical, quick-growing tree, that will obey your every command" 
         *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
       #I point to the back of my right hand "What ones can I put here?"
        *if home-country "Storm Union" or "Shadow Badlands" "I'm sorry" I dont have any tattoos I can put there. Try somewhere else on your arm."
        *goto right_arm_tattoo
        *if home_country "Stone Kingdom" "I can put a fist tattoo there, allowing you to turn your fist to solid stone, three times as big as your normal fist."
        *choice
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos
        *if home_country "Fire Empire" "I can put a fist tattoo there, allowing you to engulf your fist in flame, burning your enemies and leaving yourself unharmed."
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Animal Tribes" "I can put a claw tattoo there, allowing you to turn your hand into a ferocious claw to slash at your enemies." 
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Plant Plains" "I can put spike tattoos there, turning your fist into a bramble of large, tough, thorny vines that damages anyone who touches it"    
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Water Republic" I can put a droplet tattoo there, turning your hand entirely into water, alowing it to pass straight through solid objects and bring things to you.
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
       #I point to my right forearm "What ones can I put here?"
        *if home_country "Storm Union" "I can put a spiral tattoo there. It would wrap around your whole forearm, allowing you to project powerful swirling gusts of wind outward"
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Plant Plains" "I can put a swirling vine tattoo there, allowing you to shoot strong vines out of your hand"
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Fire Empire" "I can put a flame tattoo there, allowing you to shoot short ranged bursts of fire from your arm."
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home country "Shadow Badlands" I can put a dagger tattoo there, allowing you to summon a blade of pure darkness at any time"
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Animal Tribes" I can put a beehive tattooo there, allowing you to summon a swarm of bees 
        *comment bees? to do your bidding."
        *choice 
          #"That sounds awesome! I want that!" You say.
           "Very well" The Witch replies, smiling. And your left arm?
           *goto left_arm_tattoos
          #"Hmmm, maybe something else then?" 
           "Okay then, pick a different place on your right arm."
           *goto right_arm_tattoos    
        *if home_country "Stone Kingdom" or "Water Republic" "I'm sorry" I dont have any tattoos I can put there. Try somewhere else on your right arm."
        *goto right_arm_tattoos

There are probably multiple things I’m doing wrong here, and if what I’m trying to do won’t work with ChoiceScript, then please tell me, better to let me know now than for me to keep searching for a solution that does’t exist. Thanks in advance for any help you can give me!


#2

Looks like the error might be with your *ifs:

Should probably be formatted like:

*if home_country = "Shadow Badlands"
    "I can put a spiral tattoo there, allowing you to create and throw orbs of pure darkness from your hand"

And similarly for the others.

I’d also suggest resetting the indent every time you *goto a *label.


#3

Sounds similar to what I was doing in Tokyo Wizard. Each time a character selects a tattoo then set a variable to true or one. Fit example:

*Set tattoos_dragon 1

Which per will you use?

*Choice

*if (tattoos_dragon = 1) #Use the dragon magic!

Not sure if it makes sense? (Typing on my phone so I can elaborate later…)