Sprite Shader Integration for Naninovel

Share custom commands, script functions, actor implementations and other Naninovel plug-ins you've created.
Post Reply
Restush
Posts: 10
Joined: 31 Aug 2020 08:26

Sprite Shader Integration for Naninovel

Post by Restush »

I have bunch of cool sprite shader that have really good effect like fire, hologram, rainbow, so on.
But controlling the shader required advanced knowledge coding both C# and Naninovel.
Creating Custom Command for 300++ property of shader would really make your hand in pain.
So, I'm sharing SSI - Sprite Shader Integration for Naninovel.

This is an extension of Naninovel to help easily integrate with most popular sprite shader in AssetStore.

Image

Support save & load.

Image

Support rollback.

Image

Property float

Code: Select all

@charEffect Kohaku effectFloat:_HologramFade.0.5

Mutiple effects of float

Code: Select all

@charEffect Kohaku effectFloat:_HologramFade.0.5,_Shadow.0.25,_Fade.1.0

Property color

The color is insensitive case.
Can type uppercase or lowercase. Must write # in prefix. (Todo: next update, can type both without # or with #)

Code: Select all

@charEffect Kohaku effectColor:_HologramTint.#43bf15

Mutiple effects of color

Code: Select all

@charEffect Kohaku effectColor:_HologramTint.#43BF15,_ShadowColor.#2d2f36,_Tint.#02114f

Property int (only 2021.1 and newer)

Most shader, use float property rather than int.
But now int is available in Unity 2021.1 and newer.

Code: Select all

@charEffect Kohaku effectInt:_HologramFade.0

Mutiple effects of int

Code: Select all

@charEffect Kohaku effectInt:_HologramFade.0,_Shadow.1,_Fade.2

You can assignee multiple property with different type at same time

This will be execute effectFloat, effectColor, and effectInt at same time.

Code: Select all

@charEffect Kohaku effectFloat:_HologramFade.0.5,_Shadow.0.25,_Fade.1.0 effectColor:_HologramTint.#43BF15,_ShadowColor.#2d2f36,_Tint.#02114f effectInt:_HologramFade.0,_Shadow.1,_Fade.2

Control animate duration

The default transition/duration of effect is based on Default Duration on Character Configuration.
Below _HologramFade will transiting with default duration.

Code: Select all

@charEffect Kohaku effectFloat:_HologramFade.0.5

Below _Shadow will transiting with 3 second of duration.

Code: Select all

@charEffect Kohaku effectFloat:_Shadow.0.5 time:3

Tested Shader

  • All In 1 Sprite Shader
  • Sprite Shaders Ultimate

Technical detail

  • Supported version Naninovel 1.19 and 1.20.
  • If you are using Naninovel 1.20, please add NANINOVEL_1_20 in scripting define symbols
    Image

How to download

You can download Unity Package on github release page

How to install/setup

You can read more documentation included in Unity Package or download here

Notes

  • Using this extension could cause larger save data than normal especially enabled rollback feature and/or having many characters.
Post Reply