Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Custom Events Tutorial Sticky

A topic by TolbiNox created Apr 11, 2023 Views: 78
Viewing posts 1 to 2
(2 edits)

I just wanted to post a quick tutorial for writing custom events and where to place them. I want to start out by saying, always check what you're downloading and who you are downloading them from, don't trust it? Better safe than sorry

Events in the demo version are more limited than I plan for them to be in the main release, but I wanted to add the ability to create custom events to the demo version.

To start, in the directory with the game executable create a folder named "Custom Events" 

All custom events need to be placed in this folder

Example of Event:

 



The file type for the event files has to be JSON. 

Below is an example of the actual file:



"type" refers to the type of planet the event can be fired on

A list of applicable planet types:

  • 0 - Desert Planet
  • 1 - Earth like Planet
  • 2 - Ocean Planet
  • 4 - All Planet Types

So in the case of this screenshot, this event only fires on Earth like planets


"text" refers to the outlined portion in the following screenshot.  It's the introduction to the event


"Button Text" is pretty self explanatory, it refers to the text referring to buttons at bottom of the above image

"Story" refers to the text that fills the red outlined section after a choice has been made, it's the outcome story for whatever you wanted to happen after a button is pressed

There *should* be no limit on the amount of outcomes per choice, I kept it to a maximum of 2 for the ones I have included so far, but if you wanted more possible outcomes that should not be a problem, and if it is, let me know. That is something I would gladly patch in the demo

"Effect" is the effect code to let the game know what you want to change. Below is a list of effect codes and their corresponding stat

  • mHL - Reduce Hull
  • mH - Reduce Habitability
  • pS - Increase Science
  • mS - Decrease Science
  • pH - Increase Habitability

You can include multiple codes, but due to an oversight on my part, you cannot adjust them by different amounts. So if you wanted to reduce hull and increase habitability, you have to do so by the same amount.

"effectNum" is how much you want to change the stat specified by the effect code. There is only one effectNum per outcome, as stated above


That should be everything, I'm more than happy to update this post to make it clearer or answer any questions about custom events

moved this topic to Custom Events