Exoscript additions - Pandemonium14/ExoLoader GitHub Wiki

There are some additions to Exoscript added by the ExoLoader (used to be Exoscript Additions plugin )

Features:

  • Custom Relationship Status Display
  • Check for unlocked job and special endings
  • Check for unlocked achievements
  • Conditional Sprites for Expedition Events
  • Get Random Number
  • Get Random Item
  • Correct Choice Button Icons (Cards + Flirt)
  • Mod-compatibility Helpers

Custom Relationship Status Display

Custom memory flags that add on to what's shown in the Relationship field on character cards. Fully compatible with custom characters.

  ~set mem_custom_chara1_chara2_relationship = true
  ~set mem_custom_chara1_chara2_relationship = Friendo of {chara}
  ~set mem_custom_chara1_chara2_relationship = Fake friend of {chara}|Friend of {chara}

Supports:

  • Boolean values (true/false) for simple state control
  • Strings for custom labels, using {chara} as the other person’s name (or you can omit {chara} to make Sol guess)
  • Asymmetric relationships: If a pipe (|) is used, the string is split - first part shown on the first character, second on the other.

Important Notes:

  • cal_anemoneanemone_cal - because in Exoscript those are two separate memories
  • Values starting with true or false will be parsed as booleans by Exoscript, so custom text cannot start from those
  • Currently set to not display relationship information if another character was not met yet.
  • ⚠️Even non-dating labels (e.g. "Mortal Enemy") will trigger the game's "this character is dating someone" assumption in background logic, because that field internally flags romantic relationships. If you find this being a show stopper for some specific use case, leave feedback.

Example:

    ~set mem_custom_anemone_cal_relationship = true
    ~set mem_custom_anemone_dys_relationship = false
    ~set mem_date_anemone = true
    ~set mem_custom_cal_anemone_relationship = Friendo of {chara}
    ~set mem_custom_tang_anemone_relationship = Fake friend of {chara}|Friend of {chara}
    ~set mem_custom_congruence_tang_relationship = true

example-showcase

Check for unlocked job and special endings

A custom call_hasEnding story call lets you check whether player has unlocked specific job/special ending. Additional variant call_hasEndingHog that will work the same way as groundhogs: be disabled if groundhogs are disabled and also display an icon on the choice button.

For example:

[if call_hasEnding(farmer)]
   You remember being a farmer...
[end]

* And doing everything
   ~if call_hasEnding(hobbyist)

   ...literally.

* If only you could save everyone (this one will have wormhole icon)
   ~if call_hasEndingHog(special_colonydestroyed)

   ...no.

Check for unlocked achievements

A custom call_hasCheevo story call lets you check whether player has a specific in-game achievement. Additional variant call_hasCheevoHog that will work the same way as groundhogs: be disabled if groundhogs are disabled and also display an icon on the choice button.

[if call_hasCheevo(love_all)]
  [Name], you sentimental fool.
[end]

* Only visible if has love all cheevo + icon
  ~if call_hasCheevoHog(love_all)

  Yep!

Correct Choice Button Icons (Cards + Flirt)

In vanilla Exoscript, when you write conditionals like this:

~setif condition ? card = cardA : card = cardB
~setif condition ? mem_flirt_dys : mem_flirt_cal

The choice button always shows the tooltip for the first option - cardA or flirt_dys - even if that is not exactly what would happen when you click the button. The underlying logic still works, but the UI lies. With this plugin, the choice button icons now reflect the actual outcome based on current conditions. This includes:

  • Card previews
  • Flirt icons

Note: This isn't a bug in the base game - Exocolonist just never uses conditionals in these spots (and only has conditional cards under "..." buttons that do not have icons), so it never needed to handle these cases.

Conditional Sprites for Expedition Events

Same deal: if you do this on an expedition map event:

~setif condition ? sprite = dys : sprite = tang

The event will always show Dys's sprite, regardless of the condition. This plugin fixes that, enabling you to have different sprite attached to an event on expedition map depending on your condition. Again: The base game doesn't support this because it doesn't need to - none of its own events do this.

Get Random Number

A custom story call call_randomNumber(min, max) to get a random number between min (inclusive) and max (exclusive).

Example:

    ~set var_random_number = call_randomNumber(1, 100)
    ~set var_random_number2 = call_randomNumber(100, 1)

    Random number: [=var_random_number]
    Random number 2: [=var_random_number2]

    * Clickable if [=var_random_number] is less than 50
        ~ifd var_random_number < 50

        [=var_random_number] is less than 50!

    * Clickable if [=var_random_number2] is less than 50
        ~ifd var_random_number2 < 50

        [=var_random_number2] is less than 50!

    * Clickable if [=var_random_number] is greater than 50
        ~ifd var_random_number > 50

        [=var_random_number] is greater than 50!

    * Clickable if [=var_random_number2] is greater than 50
        ~ifd var_random_number2 > 50

        [=var_random_number2] is greater than 50!

Get Random Item

A new story call call_randomItem that will return a random item from the provided ;-separated list.

Example:

    ~set var_random_item = call_randomItem(apple; banana; cherry; date; elderberry)

    Random item: [=var_random_item]

    * Clickable if [=var_random_item] is apple
        ~ifd var_random_item == apple

        [=var_random_item] is apple!

    * Clickable if [=var_random_item] is banana
        ~ifd var_random_item == banana

        [=var_random_item] is banana!

    * Clickable if [=var_random_item] is cherry
        ~ifd var_random_item == cherry

        [=var_random_item] is cherry!

    * Clickable if [=var_random_item] is date
        ~ifd var_random_item == date

        [=var_random_item] is date!

    * Clickable if [=var_random_item] is elderberry
        ~ifd var_random_item == elderberry

        [=var_random_item] is elderberry!

Mod-compatibility Helpers

These are a series of custom story calls that lets you add compatibility between your new stories and things that are added by other mods. This includes content from any mod that uses ExoLoader as well as ExtraColonist content.

For example, in your story you may add a reference to another character that's added by another mod if that character exists in user's current mod setup, but skip the reference if the character does not exist.

Story calls:

  • call_charaExists(charaID) for checking characters
  • call_storyExists(storyID) for checking stories
  • call_bgExists(backgroundID) for backgrounds
  • call_spriteExists(spriteID) for sprites
  • call_cardExists(cardID) for cards
  • call_collectibleexists(collectibleID) for collectible cards
  • call_gearExists(cardID) for gear cards
  • call_thingsExist(assortment of different items) - for bulk checking at once, where each id should be prefixed with a type as chara_, story_, card_, bg_, sprite_, collectible_ or gear_ and items are separated by a ; symbol.

Example:

    Does Template exist? [=call_charaExists(template)]
    Does Genesis exist? [=call_charaExists(gene)]

    Does testPStory story exist? [=call_storyExists(testPStory)]
    Does geneRepeat story exist? [=call_storyExists(geneRepeat)]

    Does background glow exist? [=call_bgExists(glow)]
    Does background orange glow exist? [=call_bgExists(orange_glow)]
    Does background art classroom exist? [=call_bgExists(art_classroom)]

    Does sprite template sad exist? [=call_spriteExists(template_sad)]
    Does sprite template3 sad exist? [=call_spriteExists(template3_sad)]
    Does sprite cutebot exist? [=call_spriteExists(cutebot)]
    Does sprite gene surprised exist? [=call_spriteExists(gene_surprised)]
    Does sprite gene1 surprised exist? [=call_spriteExists(gene1_surprised)]

    Does card template1 exist? [=call_cardExists(template1)]
    Does card abacus exist? [=call_cardExists(abacus)]

    Does collectible templatecollectible exist? [=call_collectibleExists(templatecollectible)]
    Does collectible puffkin nuggets exist? [=call_collectibleExists(puffkin_nuggets)]

    Does gear spacemedallion exist? [=call_gearExists(spacemedallion)]
    Does gear stethoscope exist? [=call_gearExists(stethoscope)]

    Do base game things exist? [=call_thingsExist(chara_dys; story_dysRepeat; bg_glow; sprite_anne; card_social0; collectible_wood; gear_emojiproji)]
    Do ExoLoader things exist? [=call_thingsExist(chara_template; story_testPStory; bg_orange_glow; sprite_template_sad; card_template1; collectible_templatecollectible; gear_spacemedallion)]
    Do ExtraLoader things exist? [=call_thingsExist(chara_gene; story_geneRepeat; bg_art_classroom; sprite_gene_surprised; card_abacus; collectible_puffkin_nuggets; gear_stethoscope)]```