# Camo Tech:tm: Guide Camo Tech:tm: is a way for a developer to quickly and easily add fully customisable colouring to their items, exclusive to RMC14. Following these steps you'll be able to setup the component to work, configure your items and have sprites ready to go in-game. **If you get stuck, feel free to ping me ==@ramiris== on Discord.** ## Preparing your sprites. *This is the part you'll do in your choice of Image Manipulation Software, such as Photoshop or [Aesprite](https://github.com/aseprite/aseprite/releases). [RSIEdit](https://github.com/space-wizards/RSIEdit/releases) is also useful but not required.* ### 1. Any sprite that needs colours applied must be split into two separate images. - One for any part that is coloured in the game (referred to as "Camo Sprite") - Another for anything that isnt ("Base Sprite" going forth). > For example, take the M13, the main body part of the gun is split off into the Camo Sprite, with the grip, barrel, lights etc remaining on the Base Sprite. > Original Sprite: ![m13](https://hackmd.io/_uploads/SkeGgWxgxe.png =128x128) > Base: ![base](https://hackmd.io/_uploads/BydXybegee.png =128x128) > Camo: ![camo](https://hackmd.io/_uploads/S1sQkbgllg.png =128x128) > **Hint: You can use the ``Multiply`` Blend Mode in most image manipulation software (i.e. Photoshop) to simulate the result of adding colour to a sprite.** > ![image](https://hackmd.io/_uploads/B1B4GWglle.png) ### 2. The Camo Sprite must remain greyscale* so that colouring can be consistently applied to it. > While its not actually required, sprites will look obviously wrong if you do not take great care of colouring on the Camo Sprites used. I would recommend if possible adding the tiniest amount of blue hue to your "greyscale" as when used in miniscule amounts it can give a slightly better result. ### 3. The same process should be repeated for inhands, clothing, icons etc. > The main sprite/icon should generally use the terms "base" and "camo", meanwhile any other sprite should simply append "-color" to the end of the name of the base. > ```yml! > base.png > camo.png # <- These first two's names arnt fixed and can be changed > inhand-right.png > inhand-right-color.png # <- The rest cannot and must match the formatting (for now)! > inhand-left.png > inhand-left-color.png > etc.. > ``` ### 4. Create a single .rsi file with all your new shiny sprites. They can be any size and shape as long as its consistent, even on animations. > m13.rsi > ![image](https://hackmd.io/_uploads/SJdDPbggxg.png) ## Configuring your YML. *This is the part you'll be doing in [Rider](https://www.jetbrains.com/rider/download/) or your chosen IDE.* ### 1. In your item's main sprite layers, you need to add your Base and Camo sprites. ```yml! - type: Sprite sprite: _RMC14/Objects/Weapons/Guns/Pistols/m13.rsi layers: - state: base # <- This should be added just as is. - state: camo map: [ "enum.ItemCamouflageLayers.Layer" ] # <- The Camo sprite should be mapped to the enum shown here. - state: mag-0 map: [ "enum.GunVisualLayers.Mag" ] ``` > If you need more than one Layer to have colours applied, you can specify additional layers 2 to 5 ``...geLayers.Layer3``. ### 2. Add the ItemCamouflage component to your item. Specify what colour you would like it to be for each biome/environment. ```yml! - type: ItemCamouflage colors: Jungle: "#ccd08d" Desert: "#ffd2a6" Snow: "#ddcbc9" Classic: "#c7e7d9" Urban: "#acb8c7" ``` > Here are some useful defaults, but you by no means *need* to stick to this: > - Jungle ==LV, Varadero== `#ccd08d` > - Desert ==Solaris, Kutjevo, Trijent== `#ffd2a6` > - Snow ==Shivas== `#ddcbc9` > - Classic ==Chance's, Fiorina== `#c7e7d9` > - Urban ==Hybrisa== `#acb8c7` ### 3. Inhands, Clothing etc will be automatically added based on naming. > Ensure you have added the ``-color.png`` suffix correctly. > CURRENTLY only Inhands work, this is being looked into. - Rami ## Testing Ingame *This is the part where you'll be compliling a copy of the Server and Client before running it locally. [Read the Guide](https://docs.spacestation14.com/en/general-development/setup/setting-up-a-development-environment.html)* There isnt really a lot for me to say here other than spawning the item in and visually inspecting it to see if it works. If not, return to the previous steps and re-check things. ### Spawning Items > Press ==B== to open the DevMode menu, if you are in DevMode. > Select "Spawn Entities" > Search for your item and place it on the ground. ### Change Camo Command > Press ==`== to open the Console if you are in DevMode. > Paste the following: ``vvwrite /system/ItemCamouflageSystem/CurrentMapCamouflage Classic`` > Replace "Classic" with whichever biome/evironment you would like to test: ``Jungle, Desert, Classic, Snow, Urban`` > Spawn the item again and it'll change to the respecive colour of your chosen Camo.