Creating an in-game Codex


So I’m trying to develop an in-game Codex for a WIP I have in the works, but I’m hitting a consistent brick wall. My idea is for it to update as you go through the game, depending on the kind of information you acquire, similar to the way many RPG’s handle a codex system. I have a very rough model in place, but it doesn’t quite work the way I’d like it to and I can see it becoming even more broken as I move forward and add more information and deal with the variables that determine whether or not you have access to said information.

Any and all help is greatly appreciated!


If I were going to do this, I would simply model it off of the achievement system. You’d have to do some javascript coding. But the syntax for visible/invisible is already there. Just make everything in the codex invisible until the player unlocks it then set the info to visible. Bonus here would be if you used this model, there’d be a button for Codex along the storymenu like there is one for Achievements,

You could also make a special passage with a ton of if/else statements and have the player pushed to that passage whenever they discovered something new. Not sure how you’d make that fully accessible to the player at any time they wanted to reference it, though.

I’d go with the first suggestion, if I were doing it for something I wrote.

Have fun!


P.S. I haven’t had my coffee yet so am not fully awake and could just be dreaming this post.


I like the sound of your first suggestion, however my knowledge of javascript is basically non-existent. Is there syntax for visible/invisible in ChoiceScript independent of the Achievement system, because that was my initial plan but I’ve been unable to find anything like it?

Haha! I hope you get your coffee soon before this dream becomes a nightmare, I’ve felt the horrors of caffeine deprivation.

You could also try using booleans (true or false) or strings (text) to modify a codex in the stats screen. 

With booleans:

*create event false (in the startup)

With strings:

*create event "" (in the startup)

And now in the stats screen

   *label codex
   This is the Codex.
    #Topic 1
      [b]Topic 1[/b]
      (For booleans) 👇🏻
      *if (event = true)
       Information linked to the event
      (For strings) 👇🏻
      *page_break back
      *goto codex
    #Topic 2
      *page_break back
      *goto codex
    #Topic 3
      *page_break back
      *goto codex

Sorry if it is too confusing, I’m using an iPad to browse the forums :confused:

When you want to add information to the codex, you can use:

*set event true (for booleans)


*set event “information, something, blah blah blah” (for strings)


I’d suggest looking at a game with a codex you like, and then seeing how they implement it via code.

Can you explain how you do want to implement it?

Invisible/visible is done using *if statements.


Well I’d handle it using a Boolean system, no need to make things more complicated than they already are.