Adding a second button to the top menu

Greetings -

I am working on a project, something I’ve realized I need to develop is an inventory page. I could use the Stats page, but I’d really prefer to create an entirely different page for this. Unfortunately, I don’t have a lot of scripting experience, so I’m hoping I can get some assistance here.

What I’m looking for I don’t think should be too difficult - I just need to add a page that shows what the character has currently in their inventory via a bunch of *create objects (so, in essence I guess, it would be very similar to a Stat page). I need to add an Inventory button for the top, which would allow the player to click it, view their current inventory list, and then return to the game.

I’ve tried to copy the Stats page and replace “stats” with “inventory” and create a “choicescript_inventory.txt” file, but that’s not working (I’m getting a “Script error”). I’m sure I’m missing some things, but have not a clue where to look. I’ve attempted to browse through the forums searching for something similar to this, but what I’ve found wasn’t really what I was after (and didn’t include examples). Please note I’m a noob at scripting - not to web programming in general, but the .js files (I never got that far sadly), so I’d need detailed explanations or examples.

Any help would be greatly appreciated.

You could always put “Inventory” as a choice in the stats page.

Then the player just has to click the stats page, see all their stats, and at the bottom there’s the inventory choice. If they select that it takes them to the inventory page.

Don’t know how to make it its own button though, sorry.

The good news is, it is possible to do what you’re asking for. Bad news is, CoG does not support it as it is technically a “hack”. Thus it will more than likely not be accepted if you do choose to finish and send in your completed game.

More good news, a much simpler way and the most commonly means to this end is creating an inventory system in your stat page. The stats page can host more than just your stats. It can hold your glossary, codex, inventory, background information, and more.

Simply put…

*choice 
  #Inventory
     Inventory: This, this, and that. 
  #Optional Glossary 
  #Optional Junk section
*comment Note you'll still need to type the code for inventory.
*comment You can also *goto inventory after inventory choice and put the code there. 

Else if you really don’t mind having your inventory at the bottom of your stats page you can put it there. If you want some guides to direct you to how to make an inventory system we can assist. If you are persistent on the idea of a second stats page… we can also direct you to how to do it.

Hello, it was deemed un-advisable to do what you want. If that makes sense here is a link explaining why

Or if you just want to make an inventory onto the stats page you can do something like this on the stats page

*label main_menu
*choice
  #Skills
    *goto skills
  #Inventory
    *goto inventory

*label skills
*stat_chart
  text var
Blah blah etc. (add how many vars you want)
*goto main_menu

*label inventory
*stat_chart
  text var
Blah blah etc. (add how many vars you want)
*goto main_menu

If you want an example of an inventory system then here is a Container/Inventory - System Template

2 Likes