This page lists the steps for adding a new colored lore pearl into the game, that can be given to Moon for her to read, containing your own custom text. Once the pearl is added, it can be spawned in the game using Dev Tools like the rest of the colored pearls.
Adding the Lore Text for the Pearl Edit
Navigate to the "Rain World/Assets/Text/Text_Eng" folder. Choose a number that's not being used already and create your text file with that number. Then write the contents of the pearl in the text file. Sample:
0-46 First line of the first text box.<LINE>Second line of the first text box. This line will be shown in a second text box!The first line of the text file should be 0-##, where ## matches the number of the text file.
Copy and paste this file into the other language folders (Text_Fre, Text_Ger, etc). This will prevent the game from crashing if the player is playing in another language other than English. (If you could actually translate the text for these languages that'd be even better, but you probably don't have a localization budget for your mod...)
Adding the Code for the Pearl Edit
- Add your pearl as a new entry in the DataPearlType enum.
- Add your pearl as an additional case in the ApplyPalette function, alongside the rest of the lore pearls.
- Add your pearl to the switch statement in the UniquePearlMainColor function, and choose a color for your pearl.
- Optionally, add your pearl to the UniquePearlHighLightColor function if you want your pearl to have a secondary highlight color.
- Add a new entry to the ID enum. This will correspond with the unique conversation that will take place when you give the pearl to Moon.
- Add your pearl to the switch statement in the GrabObject function alongside the rest of the pearls. Use this to associate the pearl you defined in DataPearl with the conversation you defined in Conversation.
- Add your pearl to the switch statement in the AddEvents function. The number passed to LoadEventsFromFile should match the number of the text file that contains your pearl's lore text.