A downloadable asset pack

Download NowName your own price

Material Color changer script

Changelog:
(Player color changer) v0.4.1 Initial release
(Event color changer) v0.3.0 Initial release
(11/02/2023) v0.5.1 event - v0.6.2 player
- Now you can use HSV color (Hue, Saturation, Brightness) 
  and convert it to RGB variables.

Description

With this script you can change the "Albedo color" of a material in real time using bakin's switches and variables!

Requirements

the materials to be changed must have the Albedo_Color property for the script to work correctly

How to use?

  • Place the "MaterialColorChangere.cs" and "PlayerColorChanger.cs"  script in "ProjectFolder/script".
  • Create a common event and attach "PlayerColorChanger" script to it and.
  • You need to attach the "MaterialColorChanger" script for each event you want to change.
  • Set the necessary variables for each event or player
  • that's it!

Variables

Local event vars


Player global vars

Settings

Inside the script you can change the following parameters:

Event Settings


  • materialIDvar: Local Variable name where the target material ID will be stored.
  • keepAlbedoChanges: local switch name - if ON: Leaving the current map or enter a battle will preserve changes.
  • changeAlbedoColorSwitch: Activate this switch to execute the change. (No need to disable it when using it).
  • RedBakinVar:  Local variable for Red color value in RGB
  • GreenBakinVar:  Local variable for Green color value in RGB
  • BlueBakinVar: Local variable for Blue color value in RGB


Player Settings

  • materialIDvar: Global Variable name where the target material ID will be stored.
  • changeAlbedoColorSwitch: Activate this global switch to execute the change. (No need to disable it when using it).
  • playerRgbArray:  Name of the array that stores the RGB color values (0 - 255)
  • coloDataBase:  Name of the STRING variable that stores the coloData when save the game.


Using HSV Colors

Player color changer: you must use an array called by default: "playerHSV" to store the hsv values (index: 0 Hue, 1 Saturation, 2 Brightness), then turn on a GLOBAL switch default name: "convertHSV"  to convert HSV directly to the RGB array.  



Event color changer: You must set three new local variables "H" , "S" , "V" and then convert the HSV to "R" "G" "B" local variables automatically with a local switch "convertHSV".


After that you can turn on the color changer switch as usual.


Important: 

-If you don't understand something you can always watch the short video that shows how the script works  or you can write me on discord or here and as soon as I can, I will answer!


Known issues:

  • Player changes will be stored even between saves if you go to the title menu and start a new game, to avoid this you can run a color change to "default" when the game starts.

Notes

* If you find any bug, do not hesitate to let me know!

* This script is not paid, although I will appreciate any kind of support! (If I start getting more support I'll be able to continue scripting!)

* This script only requires giving credits to me! (Jagonz) in your game. (Can be anywhere even in the final credits).

* Any questions I am always active on official Bakin Discord.

Download

Download NowName your own price

Click download now to get access to the following files:

Jagonz ColorChanger.zip 6.5 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.