That worked for the read, drink, and eat. I had a different system for my equipment... It will line up the equip and unequip next to the name and description. But it only want to equip and unequip the last item stats and remove links from those before it. I need the if statements... I could not figure out a way to use switch and case for the equipment, since I want to check first to see if something it equipped it and if that item is currently equipped. If the item is equipped then have a unequiped option. I have tried many versions to attempt to get it to work. Below under Equipment Passage is one attempt and is the most recent.
StoryInit (only parts that pertain to equipment)
<<set $equipment = []>>
<<set $head = {
"Wearing" : false,
"Type" : "head",
}>>
<<set $neck = {
"Wearing" : false,
"Type": "neck",
}>>
<<set $back = {
"Wearing" : false,
"Type": "back",
}>>
<<set $backpack = {
"Wearing" : false,
"Type": "backpack",
}>>
<<set $mainHand = {
"Wearing" : false,
"Type": "mainhand",
}>>
<<set $offHand = {
"Wearing" : false,
"Type": "offhand",
}>>
<<set $armor = {
"Wearing" : false,
"Type": "armor",
}>>
<<set $belt = {
"Wearing" : false,
"Type": "belt",
}>>
<<set $gloves = {
"Wearing" : false,
"Type": "gloves",
}>>
<<set $legs = {
"Wearing" : false,
"Type": "legs",
}>>
<<set $feet = {
"Wearing" : false,
"Type": "feet",
}>>
<<set $ring = {
"Wearing" : false,
"Type": "finger",
}>>
<<set $necklace1 = {
"Name" : "Amulet of Lineage",
"Type" : "necklace",
"idName": "necklace1",
"Place" : "neck",
"hasItem" : false,
"hasEquip" : false,
"Strength" : 0,
"Intelligence": 0,
"Constitution" : 0,
"Dexterity" : 0,
"Defense" : 2,
"Charisma" : 0,
"Description" : "Any decendant has a necklace that is a claim to their bloodline. This one has a symbol of a falcon's head."
}>>
<<set $necklace2 = {
"Name" : "Quartz Crystal Necklace",
"Type" : "necklace",
"idName": "necklace2",
"Place" : "neck",
"hasItem" : false,
"hasEquip" : false,
"Strength" : 0,
"Intelligence": 2,
"Constitution" : 0,
"Dexterity" : 0,
"Defense" : 0,
"Charisma" : 0,
"Description" : "For clarity of mind."
}>>
<<set $necklace3 = {
"Name" : "Lucky Rabbit Foot Necklace",
"Type" : "necklace",
"Place" : "neck",
"hasItem" : false,
"hasEquip" : false,
"Strength" : 0,
"Intelligence": 0,
"Constitution" : 0,
"Dexterity" : 2,
"Defense" : 0,
"Charisma" : 0,
"Description" : "Most humans believe that a rabbit's foot brings good luck."
}>>
<<set $necklace4 = {
"Name" : "Amulet of Carnage",
"Type" : "necklace",
"Place" : "neck",
"hasItem" : false,
"hasEquip" : false,
"Strength" : 2,
"Intelligence": 0,
"Constitution" : 0,
"Dexterity" : 0,
"Defense" : 0,
"Charisma" : 0,
"Description" : "Only through battle can an Orc earn this trophy."
}>>
<<set $ring1 = {
"Name" : "Grounding Stone Ring",
"Type" : "ring",
"Place" : "finger",
"hasItem" : false,
"hasEquip" : false,
"Strength" : 0,
"Intelligence": 1,
"Constitution" : 0,
"Dexterity" : 0,
"Defense" : 1,
"Charisma" : 0,
"Description" : "A stone that helps it's user to keep calm"
}>>
Equipment Passage
[[return|$return]]
<<for $e = 0; $e < $equipment.length; $e++>>
<<set $gear = $equipment[$e]>>
<<print $gear.Name>>
<<print $gear.Description>>
<<capture $e>><<nobr>>
<<if ($neck.Wearing eq false) and ($gear.Place eq $neck.Type)>> <<link [[Equip][$gearIdx to $e]]>><<set $str += $gear.Strength>> <<set $int += $gear.Intelligence>> <<set $con += $gear.Constitution>> <<set $dex += $gear.Dexterity>> <<set $def += $gear.Defense>> <<set $char += $gear.Charisma>> <<set $gear.hasEquip = true>> <<set $neck.Wearing = true>> <</link>>
<<elseif ($ring.Wearing eq false) and ($gear.Place eq $ring.Type)>> <<link [[Equip][$gearIdx to $e]]>><<set $str += $gear.Strength>> <<set $int += $gear.Intelligence>> <<set $con += $gear.Constitution>> <<set $dex += $gear.Dexterity>> <<set $def += $gear.Defense>> <<set $char += $gear.Charisma>> <<set $gear.hasEquip = true>> <<set $ring.Wearing = true>> <</link>>
<<elseif ($gear.hasEquip == true)>>Equipped <<link [[UnEquip][$gearIdx to $e]]>> <<set $str -= $gear.Strength>> <<set $int -= $gear.Intelligence>> <<set $con -= $gear.Constitution>> <<set $dex -= $gear.Dexterity>> <<set $def -= $gear.Defense>> <<set $char -= $gear.Charisma>> <<set $gear.hasEquip = false>><<set $neck.Wearing = false>> <</link>>
<<elseif ($gear.hasEquip == true)>>Equipped <<link [[UnEquip][$gearIdx to $e]]>> <<set $str -= $gear.Strength>> <<set $int -= $gear.Intelligence>> <<set $con -= $gear.Constitution>> <<set $dex -= $gear.Dexterity>> <<set $def -= $gear.Defense>> <<set $char -= $gear.Charisma>> <<set $gear.hasEquip = false>><<set $ring.Wearing = false>> <</link>>
<</if>>
<</nobr>><</capture>>
<</for>>