Adventuron Objects Won’t Create

Hey everyone —

I’ve been dealing with this issue for a couple of days now and was wondering if anyone else has ever run into this. (So sorry if there’s already a thread about this.)

The game I’m working on has eighteen inventory objects to pick up and use for different puzzles. Creating and using the first fifteen objects works perfectly. However, my program refuses to create the last three.

Part of this could be because I’m a non-coder who relies on duct tape and bubblegum, but the thing that’s odd is that I have a create/target inventory command (that occurs in the same room as the last three items) right above the broken code that works perfectly fine.

The player’s inventory limit is fifty (might as well, am I right?), so it shouldn’t be a weight problem or an over-crowded inventory problem. I’ve tried placing the three objects in the room at the start, I’ve tried creating and then pocketing the objects, and I’ve tried creating the three objects at the same time as the create/target inventory code that works. Nothing.

I don’t remember there being an object limit in the user guide or the cookbook, but if anyone has faced a similar problem with creating objects or has any ideas on why that might be the case, I’d love to hear about it. Thanks~

1 Like

If you have the relevant code, you could post it here (using the ‘code’ option at the top of the message box on the same row as the bold and italics buttons).

You can also get live help at the Adventuron discord (I think this is the link: Discord)

And you’re right, it shouldn’t be a built in thing; there are adventuron games with way more than 18 objects, so something’s not right!

Thanks Brian for letting me know how to post code :smiley:

Again, I’m a non-coder so it’s real messy and long, but I’m working on a list to hopefully consolidate things.

: match "look supplies; examine supplies; observe supplies; search supplies; see supplies; rummage supplies; ransack supplies"  {
      : if (tied_up ==false) {
         : if (is_exists "fire_extinguisher" && is_exists "rope" && is_exists "cooking_spray") {
         
               : if (is_carried "fire_extinguisher" && is_carried "rope" && is_carried "cooking_spray") {
                     : print "There's nothing else from the camping supplies that you need." ;
               }
      
               : else_if (is_carried "fire_extinguisher" && !is_carried "rope" && !is_carried "cooking_spray") {
                     : print "Looking through the outdoors equipment, some <ROPE<#b45>> and cooking <SPRAY<#b45>> catch your attention." ;
               }
            
               : else_if (is_carried "fire_extinguisher" && is_carried "rope" && !is_carried "cooking_spray") {
                     : print "Looking through the outdoors equipment, a can of cooking <SPRAY<#b45>> catch your attention." ;
               }
            
               : else_if (!is_carried "fire_extinguisher" && is_carried "rope" && !is_carried "cooking_spray") {
                     : print "Looking through the outdoors equipment, a fire <EXTINGUISHER<#b45>> and some cooking <SPRAY<#b45>> catch your attention." ;
               }
            
               : else_if (!is_carried "fire_extinguisher" && is_carried "rope" && is_carried "cooking_spray") {
                     : print "Looking through the outdoors equipment, a fire <EXTINGUISHER<#b45>> catches your attention." ;
               }
            
               : else_if (!is_carried "fire_extinguisher" && !is_carried "rope" && is_carried "cooking_spray") {
                     : print "Looking through the outdoors equipment, a fire <EXTINGUISHER<#b45>> and some <ROPE<#b45>> catch your attention." ;
               }
            
               : else_if (is_carried "fire_extinguisher" && !is_carried "rope" && is_carried "cooking_spray") {
                     : print "Looking through the outdoors equipment, some <ROPE<#b45>> catches your attention." ;
               }
               : else_if (!is_carried "fire_extinguisher" && !is_carried "rope" && !is_carried "cooking_spray") {
                     : print "As you sort through all the outdoors equipment, looking for items that may be useful, three things catch your attention: a fire <EXTINGUISHER<#b45>>, <ROPE<#b45>>, and cooking <SPRAY<#b45>> (which, is arguably less useful than the other two)." ;
               }
         }
         : else_if (!is_exists "fire_extinguisher" && !is_exists "rope" && !is_exists "cooking_spray") {
                     : print "As you sort through all the outdoors equipment, looking for items that may be useful, three things catch your attention: a fire <EXTINGUISHER<#b45>>, <ROPE<#b45>>, and cooking <SPRAY<#b45>> (which, is arguably less useful than the other two)." ;
                     : create "fire_extinguisher" ;
                     : create "rope" ;
                     : create "cooking_spray" ;
         }
      }
      : else_if (tied_up == true) {
         : print "You have to free yourself of the ties before you can look at them." ;
      }
   }
1 Like

Replace the final else_if and replace with

: else {
   : if (has_not_created "fire_extinguisher") {
      : create "fire_extinguisher" ; }
   : if (has_not_created "rope") {
      : create "rope" ; }
   : if (has_not_created "cooking_spray") {
      : create "cooking_spray" ; }
}

Join the Adventuron Discord to get really fast replies to questions like this! Adventuron (link expires in 7 days)

Sorry idk how to get the line breaks, I’m on my phone lol

2 Likes

Hey Tristin! Thanks so much for the reply! (And don’t worry about the line breaks :wink: )

I tried it out and tested it but unfortunately

image

it still doesn’t register the create command, so it looks like it’s stuck in a loop :pensive:.

I probably should bring it to the discord tbh, but for some reason it intimidates me haha. But maybe I’ll just suck it up and ask :joy:

1 Like

It’s three backticks instead of one, or you can press the </> button in the editor toolbar.

```
if (x == 1) {
// example
}
```

if (x == 1) {
	// example
}
1 Like

Yes do! I can help out better / come up with a new strategy when I get home and get on my computer :blush: We are so nice in the Discord. Promise :heart:

4 Likes

For the inventory limit, make sure you have BOTH of these things in your code:

integers {
   inventory_limit : integer "50" ;
}

game_settings {
   inventory_items_limit_var = inventory_limit
}
1 Like

I recommend including this in vocabulary:

vocabulary {
   : verb / aliases = [examine,see,inspect,observe,search,examinetranslated]
}
1 Like

Okay… Try this!

objects {
// Make sure you don't have conspicuous="false" or listed="false," or else you won't be able to see the items in the item list OR in your inventory.
   fire_extinguisher : object "a fire extinguisher" msg="It puts out fires." get_message="You pick up the heavy fire extinguisher and toss it into your infinitely expansive imaginary backpack." ;
   rope : object "some rope" msg="It's made of twisted fibers." ;
   cooking_spray : object "cooking spray" msg="Spray this on your pan, and your pancakes will slide right off." ;
}

scenery {
   supplies : object "a pile of supplies" msg="Nothing else in the pile of supplies seems useful."
}

on_command {
   : if (is_present "supplies") {
      : match "examine supplies;rummage supplies;ransack supplies" {
         : if (tied_up == false) {
            : if (has_not_created "fire_extinguisher") {
               : create "fire_extinguisher" ;
               : create "rope" ;
               : create "cooking_spray" ;
               : print "As you sort through all the outdoors equipment, looking for items that may be useful, three things catch your attention: a fire <EXTINGUISHER<#b45>>, <ROPE<#b45>>, and cooking <SPRAY<#b45>> (which, is arguably less useful than the other two)." ;
               : done ;
            }
            : else_if (is_beside "fire_extinguisher" || is_beside "rope" || is_beside "cooking_spray") {
               // This is a useful way of adding text that only shows up in certain situations. In this case, if the object is beside the character. You can also use this with booleans!
               : print "Looking through the outdoors equipment, you see {fire_extinguisher? `a fire <EXTINGUISHER<#b45>>, `}{rope? `some <ROPE<#b45>>, `}{cooking_spray? `some <COOKING SPRAY<#b45>>, `} some old junk, and some other useless supplies." ;
            }
         }
         : else {
            : print "You have to free yourself of the ties before you can look at them." ;
         }
      }
      : match "examine junk" {
         : print "Some of that stuff is so old, you're not even sure what it's for. You don't need it." ;
      }
   }
}
1 Like

Got this! Thanks for checking~

This is such a good idea! Thanks so much for suggesting it! I’ll be sure to use it in my next game since this one’s pretty much done haha

Here’s the error I get when I put it in :pensive: Thanks so much for trying all these out, though! I’ll put this out in the discord and see if we can all figure it out :relaxed:

1 Like

Oh darn it… I guess the {fire_extinguisher ?} thing only works in the beta version. I think the regular version does allow you to do that with booleans though.

Anyway, I see that you’ve joined the Discord, so I’m sure you’ll get some more help there!

1 Like

I have! Turns out it was just a bricked save that I was using to check and that the original worked fine. Classic.

Seriously, though, thank you so much for your efforts to try and help me out! I really appreciate it~ :heart::heart::heart:

1 Like

Solved! Thanks to everyone who helped me out~

2 Likes

Assuming you set all the synonyms for EXAMINE in the vocabulary{} section, then in the interests of simpicity, you could try this.

: match "examine supplies; rummage supplies; ransack supplies" {
   : if (tied_up) {
      : print "You have to free yourself of the ties before you can look at them.";
      : done;
   }
   : if (has_not_created "fire_extinguisher") {
      : create "fire_extinguisher";
      : create "rope";
      : create "cooking_spray";
      : print "As you sort through all the outdoors equipment looking for items that may be useful, three things catch your eye: a fire <EXTINGUISHER<#b45>>, a <ROPE<#b45>> and some cooking <SPRAY<#b45>> (which is arguably less useful than the other two).";
      : done;
   }
   : print "There's nothing else that you need from the camping supplies.";
   : done;
}
4 Likes

Ooh, such neat and beautiful code, Garry, thank you so much! :relaxed: