Adding endings - Pandemonium14/ExoLoader GitHub Wiki
Adding Custom Game Endings
Like with other content, endings are added by creating a folder in your own content folder, folder should be called Endings
.
Creating the data file
Each ending is defined in a separte JSON file.
Mandatory Entries
- An
ID
entry. This will be used to identify your ending internally. It cannot contain special characters and should be unique. Note: IDs starting with "special_" are treated as special endings with different behavior, more on this later. - A
Name
entry. This is the display name of your ending that players will see. - A
Preamble
entry. This is the introductory text that appears when the ending triggers. For normal endings, this is typically "You reached your 20th birthday..." but can be customized for your ending.
Optional Entries
- A
Location
entry. Boosts the chances of the ending being triggered if player has "second in command" for that location, like "Second Engineer" for engineering. - A
Character
entry. If your ending is associated with a specific character, put their ID here. (Need more research on how this works, currently is used in "Governor" ending withmarz
value and "Astronaut" ending with!vace
value.) - A
RequiredJobs
entry. An array of primary job IDs that are used to calculate whether the player qualifies for this ending and to score compared with other job endings. - A
OtherJobs
entry. An array of additional job IDs that contribute to this ending. - A
RequiredMemories
entry. An array of memory IDs that the player must have to unlock this ending. You can use "!" prefix to require that a memory is NOT present. - A
Skills
entry. An array of skill IDs that are relevant to this ending (base game only has maximum of 1 skill per job ending).
Examples
Fully Custom Ending
Here's an example of a completely new ending:
{
"ID" : "templateEnding",
"Name" : "Template Job Ending",
"Preamble" : "Yay! Template! (In normal endings, this is 'You reached your 20th birthday...')",
"Location" : "quarters",
"RequiredJobs": ["visitTemplate"],
"OtherJobs": [],
"RequiredMemories":[],
"Skills": []
}
Special ending:
{
"ID" : "special_templateEnding",
"Name" : "Template's Ending",
"Preamble" : "Template!",
"Location" : "",
"RequiredJobs": [],
"OtherJobs": [],
"RequiredMemories":[],
"Skills": []
}
Modified Existing Ending
To modify an existing ending, your file needs only next fields:
ID
with an id of existing ending (likehunter
)Modifications
an object containing modifications, where all fields are optional, depending on what you want to change:Name
- updated namePreamble
- update introductory textLocation
Character
RequiredMemories
with keysAdd
and/orRemove
depending on what you want to changeRequiredJobs
-Add
and/orRemove
OtherJobs
-Add
and/orRemove
Skills
-Add
and/orRemove
Example
{
"ID": "hunter",
"Modifications": {
"Name": "Updated Xeno Hunter",
"RequiredJobs": {
"Remove": ["hunt"]
},
"OtherJobs": {
"Add": ["newjob", "hunt"],
"Remove": ["defensetraining"]
},
"RequiredMemories": {
"Add": ["qualify_hunter"]
}
}
}
Special Endings
Endings with IDs starting with "special_" are treated differently by the game engine and have special behavior. You can call those whenever you want like this ~call endGame(endingName)
, for the call you can omit the special_
prefix. Special endings will not show the endings for other characters.
Background Images
If your ending is a job ending, you need to add three background images to Backgrounds
folder - one for each in-game gender. The naming of pictures should be next:
ending_
+ endingID +_f.png
for feminine Sol/PC (for example,ending_templateEnding_f.png
)ending_
+ endingID +_m.png
for masculine Sol/PCending_
+ endingID +_nb.png
for androgynous Sol/PC
For special endings you need only one background image with the name "ending_
+ endingID + .png
". For example, for our special ending from above, the picture would be named ending_special_templateEnding.png
Story
When creating new endings, you'd need to add a story that is displayed during the ending. This is optional, but otherwise may be confusing, especially with special endings.
Story name should be ending_
+ ID
of your custom ending.
Example of a regular (job) ending:
=== ending_templateEnding ==============================================
~if location == none
This is regular template ending. You did it!
Character endings will be shown after this story!
Below will be the button "But what about..."
Example of a special ending:
=== ending_special_templateEnding =======================================
~if location == none
This is special template ending. You did it!
No character endings will be shown afterwards.
Note: It is important that your custom ending stories have ~if location == none
set in them, otherwise they will play out randomly during the game (like random stories)!