I need a way to break/split objects. I think I have it down, but when I try the command “>break Kyoketsu-shogei”
Violence isn’t the answer to this one.
Understand "break [something]" as breaking. breaking is an action applying to one thing. Breaking is allowed.
Before breaking the Kyoketsu-shogei:
say "you break it back into its original parts, a chain and your shiv.";
move the Kyoketsu-shogei to Davy Jones' Locker;
move the chain to player;
move the shiv to player.
The problem is that there is a default command break that’s a synonym for attack, and Inform thinks that your breaking command is the same as attacking, which gives the default response (“violence isn’t the answer”). A simple solution is to define break as something new.
Cage is a room.
Kyoketsu-shogei is a thing in Cage.
chain is a thing.
shiv is a thing.
Understand the command "break" as something new.
breaking is an action applying to one thing.
Understand "break [something]" as breaking.
After breaking the Kyoketsu-shogei:
say "you break it back into its original parts, a chain and your shiv.";
remove the Kyoketsu-shogei from play;
move the chain to player;
move the shiv to player.
test me with "break kyoketsu-shogei / i "
Also, I’m guessing you just want to remove the weapon from play, and an after routine made more sense to me than a before. Your ‘is allowed’ wasn’t doing what I guess you thought it was doing – it was just creating a property called ‘allowed’ that didn’t affect the game.
When you compile a game with just one room you can go to the Index / Actions tab in the IDE and see all the commands available in the game. If you do that you’ll see the break synonym I’m talking about. Also when you see a response you want to get rid of (like the ‘violence isn’t’) you can do the rules and actions commands, and get a better picture of what’s going on. For example with this code,
[code]
Cage is a room.
Kyoketsu-shogei is a thing in Cage.
test me with “break kyoketsu-shogei / actions / break kyoketsu-shogei / rules / break kyoketsu-shogei”[/code]
I suggest moving the chain and shive to the part of the Kyoketsu-shogei, then remove the K-s from play. That gives correct results if the player isn’t holding the K-s.