Skip to content

Instantly share code, notes, and snippets.

View EtiTheSpirit's full-sized avatar

Eti // Xan EtiTheSpirit

View GitHub Profile
@EtiTheSpirit
EtiTheSpirit / Rain World Resources.md
Last active January 16, 2024 17:34
Rain World Resources
@EtiTheSpirit
EtiTheSpirit / Instancing.md
Last active December 30, 2023 12:36
Setting up instanced shaders

Upgrading Unlit Shaders to SPSI Rendering

Step 1: Under CGPROGRAM, place these compiler directives:

#pragma multi_compile_instancing

// IFF the scale of the model is the same for all axes (x, y, and z are ALWAYS the same number), put this next line.
// If not, do NOT use this next line. This is an optimization for the instancer, but it requires a uniform scale.
#pragma instancing_options assumeuniformscaling
@EtiTheSpirit
EtiTheSpirit / RW Level Editor Tile Format.md
Last active September 10, 2023 12:59
RW Level Editor Tile Format.md

Rain World Level Editor Tile Format

Making custom tiles in Rain World requires some knowledge about how tiles actually work in the first place.

Foreword

If you are reading this line of text right here right now, this document is still in the "my personal notes from observation" stage.

That is, it is primarily written by me for me and may contain strange phrasing, be oddly condescending, or otherwise be a bit rough around the edges.

If this is a public document, it means I think it's good enough to release for now, but it may still have inaccuracies or misleading/misinterpreted information (this is based on both what I read in documents + the lingo code for the level editor).

@EtiTheSpirit
EtiTheSpirit / RWLevelKey.md
Last active December 18, 2023 19:56
Rain World Level File Color Key

Rain World Level File Color Key

Level image files contain highly specific data that has a range of meanings both to the game during runtime (on the CPU thread) and to the level shader itself. The colors seen in levels can be slightly confusing, so this document relays them all.

Preliminary Information / Tips Before Reading

  1. All colors are represented in 8 bit format (that is, I will use the range 0 to 255 like most people are used to, not 0.0 to 1.0 as seen in shaders). This way it's easier for everyone to understand.
  2. Any mention of a color (especially red, green, and blue) should be considered on a per-channel basis. In Layman's terms, think of it like the color wheel in your favorite image editor, how it shows you three sliders for R, G, and B. I'm talking about those sliders individually, basically.
  3. Since this term is used throughout the document, "iff" is a shortening of the phrase "if and only if". Thought I'd mention it. It's not a typo!
  4. A "palette row" is one of the
@EtiTheSpirit
EtiTheSpirit / Rain World Sound Tutorial.md
Last active May 4, 2024 13:20
Rain World New Sound Tutorial

Adding Custom SFX to Rain World

This is NOT for modifying existing sounds! To see how to modify existing sounds, visit Rain World Modding Wiki: Modification Files.

Sounds exist in-game abstractly, that is, rather than you the modder dealing with AudioClip/AudioSource instances (belonging to Unity), you will instead use sounds via their abstract SoundID class, which, like all other ExtEnum<T> types, contains a unique string ID of your choosing.

Part 1: Declaring code

Consider creating a new class in your mod, like so:

public static class Sounds {
@EtiTheSpirit
EtiTheSpirit / Rain World Shader Info.md
Last active February 16, 2024 06:29
Rain World Shader Documentation

This addresses quirks with the lighting engine and how it interacts with custom shaders.

Futile is a bit of a frankenstein's monster when it comes to iteroperability with base Unity systems; while Unity shaders work, the behavior is overshadowed by Futile's layer system. This caused me to spend more hours than I care to admit trying to figure out why an unlit holographic/additive shader I wrote was casting shadows, and I want to prevent that pain for anyone else who may be reading.

Custom Shaders and Futile's Render Queue

This section covers shader information. It is directed towards those that already understand fundamental shader concepts.

Quirks and Limitations

  • The ZWrite and ZTest commands (among less common others) are ignored. Futile does not have a depth buffer.1
  • Vanilla uses certain declarations that are useless as well (their inclusion is erroneous). These are:
@EtiTheSpirit
EtiTheSpirit / keymap.c
Created January 27, 2023 12:02
A macro I made for the ZSA Moonlander. This macro allows declaring colors in the same order as one declares the keymaps.
// Just throw this macro into keymap.c
// This macro allows declaring colors just like one would declare their keymap. It is ordered identically and allows a 1:1
// mimic of the keymap macro when declaring your colors.
//
// Here is the default layout (I use this as a frame of reference): https://configure.zsa.io/moonlander/layouts/default/latest/0
// Button indices start from the top left of the left keyboard half (= on the default layout), going down. Once it hits the bottom, it goes right one space and continues that way.
//
// When it reaches the thumb buttons, it starts at the top most long thumb button (space on the default layout) then continues along the long buttons
// (on the default layout, it is space => backspace => left windows). After these three, it does the red button.
@EtiTheSpirit
EtiTheSpirit / Instructions.md
Last active April 21, 2024 21:06
For the Wisp shader.

Within this folder is a prefab for the wisp. It comes with default settings.

There are a couple details to note!

  1. This shader was designed SPECIFICALLY for the built in wisp mesh! It will break if you try to put it on any other mesh or model.
  2. This comes with only its default motion animation. If you want anything extra, you need to do it yourself.

Setting Up

It's easy! The object comes as a prefab. Literally just drag n drop into your avatar and that's it. Set it up with a physbone if you wanna, or leave it hanging there.

LOCALIZATION CORE DUMP :: INIT CYCLE COMPLETE, DUMP FOLLOWS
findKuName.txt
Fallen Friend
findKuKuFallsUpdateDescription.txt
Ku has fallen. Find her and make your way home.
findKuObjective.txt
Find Ku