Modding Help I'm kinda rusty, could use some answers

Discussion in 'Starbound Modding' started by GeekyRaptor, Oct 29, 2019.

Tags:
  1. GeekyRaptor

    GeekyRaptor Subatomic Cosmonaut

    Hey so I'm literally relearning everything from scratch, does anyone know a bit about codex files? I remember there being a requirement to make a codex more than one page long but I can't remember how. Also I was wondering if anyone knew how long a single page of codex could be before the text would bleed off the page. Mainly so I can make sure the text is continued on the next page before it does that.
     
  2. Zaakari

    Zaakari Pangalactic Porcupine

    In a ".codex" file there should be a "contentPages" array.
    This array contains one--or multiple--strings. Each string is one page.
    For example, here is the "contentPages" array from the vanilla codex "hylotlhistory1.codex":
    Code:
    "contentPages" : [
        "When discussing beauty one must first understand how closely Hylotl biology is bound to our culture of creativity. We are three-eyed beings of acute perception. Our trinocular vision imbues us with superior sensitivity to light and shadow, as a species we are capable of perceiving artistry beyond the grasp of other sentient beings. From our very genesis we were blessed to perceive beauty other races lack the capacity to envisage, and to share this sight is our gift unto them.",
    
        "Sadly, these creations: our glorious art, our intricate architecture, our hauntingly beautiful poetry, fall upon deaf ears and blind eyes. Only we, the Hylotl, possess the innate ability to understand true beauty, and so that which we sire is born into a barren cosmos."
    
      ]
    As you can see there are two pages in this codex.
    The strings that represent these pages are enclosed in double quotes (") and separated by a comma (,).

    As for the length of each page, my guess is around 552 characters. However, it seems the pages use word-wrap, so that will vary based on how the words line up with the edges of the display. That is to say, you will likely need to check each page in-game to make sure it is okay.
     
    GeekyRaptor likes this.

Share This Page