Scrap Mechanic

Scrap Mechanic

HexInk Color Ammo (Hex Paint Tool)
38 Comments
The Red Builder  [author] 2 Jul @ 11:22am 
no problem!
Time_pug 2 Jul @ 10:59am 
Tried it and it works! Thanks a lot for the help! Had fun editing some of the other lua files I found.
The Red Builder  [author] 2 Jul @ 10:49am 
as long as the value is not nil (that is null in Lua) or false, the if will pass.
Time_pug 2 Jul @ 10:33am 
So as long as the value isn't null then it should work right? I've never done anything with lua before so this is all new to me. I've only ever done stuff in the source engine and java.
The Red Builder  [author] 2 Jul @ 10:23am 
local addCheats = g_survivalDev to local addCheats = true, in lua if you do like "if variable then" that is basically checking for a truthy variable, so anything but nil (null) or false.
Time_pug 2 Jul @ 10:20am 
Edit, forgot to add a C to a word:

I'm looking for a true/false statement for the addCheats but I cant find one, or atleast not figure out witch one it is. Any idea on what I should change in this?

function SurvivalGame.bindChatCommands( self )
local addCheats = g_survivalDev

if addCheats then
The Red Builder  [author] 2 Jul @ 9:51am 
the problem there is that none of the sm.game.bindChatComand functions run, as addCheats is false, set it to true and it will work
Time_pug 2 Jul @ 9:17am 
what chat bind is it exactly that's needed for your mod to work? The Reduced grinding custom game does have a huge list of chat binds in the SurvivalGame lua file but I have no idea which bind it's missing from the lua in the Modded recipes custom game.
Time_pug 2 Jul @ 9:06am 
I managed to find all the chat binds from the modded recipes custom game, I'll try to copy it over to the SurvivalGame,lua file and see if that gets the paint mod working.
Time_pug 2 Jul @ 8:46am 
After seeing what you said about animations, I thought maybe Fawx garments is what broke it so I removed that mod and still doesn't work. My only hope now is somehow porting the commands from a different custom game over to the one I'm playing.
Time_pug 2 Jul @ 8:40am 
Ooooh. But are commands and their functions stored in a text file? If so then theoretically I could just copy the commands file from the modded recipes custom game and paste it into the folder for the reduced grinding custom game to fix the issue.
The Red Builder  [author] 2 Jul @ 8:38am 
reason is that i need to hook the player character and bind stuff to each and any animation that plays, as the paint tool is entirely cpp and isnt exposed to Lua at all
The Red Builder  [author] 2 Jul @ 8:35am 
yea, the custom game doesnt bind any custom commands, as such my hook doesnt work, so the mod doesnt actually work as a result.
Time_pug 2 Jul @ 8:30am 
Removing the HD models/texures mod made no difference. I'll check if removing the fant tools mod fixes it since that mod adds a paint bucket tool.
Time_pug 2 Jul @ 8:26am 
The only thing I could think of that would modify the paint tool is a mod that replaces many textures and models with higher quality versions without actually replacing the item.
But a simple model change shouldn't be able to break your code, right?
Time_pug 2 Jul @ 8:24am 
I just checked and there's only 3 commands that show up after using /help.
/help, /time, /frameratecap. None of these affect the paint tool as far as I'm aware so I really don't know what the issue is here.
Time_pug 2 Jul @ 8:22am 
Oh, I thought the free painting was a feature haha. I'll check if there's any commands
The Red Builder  [author] 2 Jul @ 7:35am 
hm, does that custom game have any commands if you do /help? Could you list them? (as if it doesnt have any custom ones, the mod will not work as it wont hook)

Also, the paint tool not consuming ink is a standard problem with custom games, the devs just didnt add it.
Time_pug 2 Jul @ 7:23am 
Ran into an issue, mod doesn't seem to work in custom survival games, or atleast the reduced grinding one.

Reloading doesn't bring up the UI for some reason. The only paint tool change in the custom game is painting not costing any ink so I'm confused by why the mod isn't working.

Is there something I'm missing here?
Time_pug 30 Jun @ 9:55am 
Okay thanks a lot, just wanted to be sure so I don't screw up any of my creations
The Red Builder  [author] 30 Jun @ 9:28am 
yes. You just give it a hex code and it paints it with that (most of the time, kinda glitchy but this is a proof-of-concept more than anything) And yes, it will work on anything no matter what it is, bots, creations (static, dynamic) or even if i made other stuff paintable like tress and stuff.
Time_pug 30 Jun @ 7:56am 
I know colors existed before but what I'm trying say is: Is this just the paint tool but without the color presets of vanilla.

I tried my best to make my question as clear as possible, hopefully it actually makes sense this time. SM is one of the few games where I don't know all the technical stuff, most of my knowledge of modding is just from editing config files, fixing ID conflicts, backporting mods, source engine etc
The Red Builder  [author] 30 Jun @ 6:29am 
why would they have multiple ways of storing colors??? Colors were never a mod thing, they existed since 0.1.11...
Time_pug 30 Jun @ 5:09am 
Oh okay but is the hex value stored in lose and static creations too? Or does it only work if its saved as a blueprint?
The Red Builder  [author] 30 Jun @ 5:05am 
literally scroll down in this comment section; "is color now a mod only thing?" - it isn't, it is stored as hex in the blueprint itself.
Time_pug 30 Jun @ 4:38am 
Wait so if I use this mod to put a custom color on for example a driver's seat, will it keep that exact color even if I turn off the mod?
Bulbbusinessgaming 26 Jun @ 4:24am 
Aight
The Red Builder  [author] 18 Jun @ 9:20pm 
Can't do anything about that, this was mostly an experimental mod proving that yes, this is possible. If you want a better one, use the dll mod
Bulbbusinessgaming 18 Jun @ 3:38pm 
it is glitchy for me, when i paint with the custom color it has a random chance to be either to color picked with the tools original menu or the custom color making me have to repaint the same area multiple times to get the right color.
The Red Builder  [author] 24 Jul, 2024 @ 8:24am 
I have just majorly improved the consistency in Singleplayer, Multiplayer will still be wonky as i cant really think of a fix, Axolot just broke something in the paint tool code when dealing with the paint animation, so it plays for 1 tick rn.
The Red Builder  [author] 21 Jul, 2024 @ 10:26am 
sure
VENGER7 21 Jul, 2024 @ 10:21am 
new side quest unlocked: make an adjustable sledgehammer that you can change the damage vaule, and force/knockback value, so it can destroy metal 3 like cardbored, 1 shot bots, or it can send big creations flying.
The Red Builder  [author] 20 Jul, 2024 @ 9:27am 
currently improving the mod btw, want to make it better than it is now.
unknown81311 20 Jul, 2024 @ 12:29am 
🤣🤣🤣
The Red Builder  [author] 20 Jul, 2024 @ 12:13am 
Yeah, no need to have this mod to spawn in a blieprint. It just saves the color inside the blueprint itself, from which it gets loaded from later
unknown81311 19 Jul, 2024 @ 10:44pm 
is color now a mod only thing?
Gruizux 19 Jul, 2024 @ 6:48pm 
When you save a creation with a custom paint color, can you still load it in vanilla? Like the way the glitchwelder works, where as long as you're using vanilla parts, you can load glitchwelded creations in vanilla.
Illumina♥ 19 Jul, 2024 @ 2:55pm 
Bro they're gonna lay off Tri Ink workers cuz of you thats messed up man.