Alchemy Poison & Item Crafting Engine

version 1 by Philip Black

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter: Combining Objects
    Section: Simple Combining
    Two objects are used create a third object. In this version both items used vanish off-screen and a third 'finished' item appears in its place. We can create all three objects with nothing more than this:
        Wolfsbane is a kind of thing. There is a Wolfsbane in the Witch Hut. Every Wolfsbane becomes the Werewolf Tincture.
        Pure Alcohol is a kind of thing. There is a Pure Alcohol in the Witch Hut. Every Pure Alcohol becomes the Werewolf Tincture.
        Test me with "use Wolfsbane on Alcohol".
        
        When play begins: [---------- ingredient list]
            Now Every Wolfsbane becomes Every Werewolf Tincture; [Try to pair these by what they become]
            Now Every Pure Alcohol becomes Every Werewolf Tincture;
        
        When play begins: [---------- RESULT list]
            Now Every Werewolf Tincture is the same as every Werewolf Tincture;
        
    To break all this down and make it easier - if we want to use and object on another object, all you have to do is say this:
        [object] is a kind of thing. [This creates it in-game]
        
    And then specify that:
        Every [object] becomes [another thing].
        
    For example:
        
        Every sausage slice becomes the sausage sandwich.
        
        
    Because Inform is slightly finicky, to make the script work properly, we also need to say:
        
        When play begins: [---------- ingredient list]
            Now EVERY X becomes EVERY Z; [Filling in ingredients as X and Y and the result as Z]
            Now EVERY Y becomes EVERY Z;
            
    And ALSO:
        When play begins: [---------- RESULT list]
            Now Every Z is the same as Every Z; [Meaning, EVERY result is the same as EVERY result]
    You can merge the two lists together if you like, however you need to make sure you add everything, otherwise the game will only allow us to use a combo ONCE before bugs start to happen. This isn't as hard as it sounds and if you forget to do it properly Inform will soon let you know! If you get stuck with this, there is a Troubleshooting section at the bottom of this documentation.