Medbot Color auto-reskin and applications to other bots

How, what and why to code in BYOND.
Post Reply
User avatar
cedarbridge
Joined: Fri May 23, 2014 12:24 am
Byond Username: Cedarbridge

Medbot Color auto-reskin and applications to other bots

Post by cedarbridge » #254655

I'm looking over the code for the medbots to see how they go about checking what color box was used to construct them so they can apply that to the final medbot. For the life of me I can't wrap my head around it. Might just be a product of trying to read code at 4am.

If whoever coded that is around could help me understand the process it uses and maybe help work out how to do the same with toolboxes, that would be swell. :tile:
User avatar
Alipheese
Joined: Sun May 01, 2016 12:56 pm
Byond Username: Daturix
Github Username: Daturix

Re: Medbot Color auto-reskin and applications to other bots

Post by Alipheese » #254657

cedarbridge wrote:I'm looking over the code for the medbots to see how they go about checking what color box was used to construct them so they can apply that to the final medbot. For the life of me I can't wrap my head around it. Might just be a product of trying to read code at 4am.

If whoever coded that is around could help me understand the process it uses and maybe help work out how to do the same with toolboxes, that would be swell. :tile:
isnt it the color of the medkit used in making it?

Screenshots.
Spoiler:
Image
Image
Image
Image
Image
Image
Quotes.
Spoiler:
PKPenguin321 wrote:holy shit that engineering setup
that man deserves a medal
Anonmare wrote:Gee Engie, why does your mom let you have TWO singulos?
The Legend of Scrubs, MD
You are a traitor!
Your current objectives:
Objective #1: They mocked you in life, a lesser janiborg they said. Now they shall know terror.
Objective #2: Hijack the shuttle to ensure no loyalist Nanotrasen crew escape alive and out of custody.
Cuboos wrote: > That god damn engineer who let the singularity loose was a traitor and the only reasonable person on that whole entire station.
lzimann
Joined: Sun Oct 26, 2014 5:13 am
Byond Username: Lzimann
Github Username: lzimann

Re: Medbot Color auto-reskin and applications to other bots

Post by lzimann » #254673

cedarbridge wrote:I'm looking over the code for the medbots to see how they go about checking what color box was used to construct them so they can apply that to the final medbot. For the life of me I can't wrap my head around it. Might just be a product of trying to read code at 4am.

If whoever coded that is around could help me understand the process it uses and maybe help work out how to do the same with toolboxes, that would be swell. :tile:
I didn't code, but this is how they are done:
When you click a medical kit with an arm, it saves the medkit type(here) in the assembly's var called skin.
When the assembly is created, it creates an overlay of that medkit, which is done here
Gun Hog
Joined: Sat Apr 19, 2014 5:19 am
Byond Username: Gun Hog

Re: Medbot Color auto-reskin and applications to other bots

Post by Gun Hog » #254699

What if you made all toolboxes greyscale, and simply applied the "color" var to the toolboxes accordingly? Would that make them look to weird? You could then read the color var of the toolbox used to build the floorbot, then apply it to the newly constructed bot.
User avatar
cedarbridge
Joined: Fri May 23, 2014 12:24 am
Byond Username: Cedarbridge

Re: Medbot Color auto-reskin and applications to other bots

Post by cedarbridge » #255091

Gun Hog wrote:What if you made all toolboxes greyscale, and simply applied the "color" var to the toolboxes accordingly? Would that make them look to weird? You could then read the color var of the toolbox used to build the floorbot, then apply it to the newly constructed bot.
I don't think that plays nicely with shading, different colored latches, etc. That's why the medbots use the "Skin" setup instead.
Doctor Pork
Joined: Thu Sep 22, 2016 7:31 pm
Byond Username: Doctor_Pork
Location: Pennsylvania

Re: Medbot Color auto-reskin and applications to other bots

Post by Doctor Pork » #255306

i would love different color floorbots one day
oranges wrote:pork, the nondescript, commoner king, literally so stealth you could just your normal name in OOC and nobody would know, long may he reign as the secret commander
Image
Deitus wrote:If your signature is scrollable it's too long and fucking obnoxious and you should feel bad
Image
Link to my feedback thread. Go there.
PKPenguin321 wrote:I've been had by yet another tg boondoggle
User avatar
cedarbridge
Joined: Fri May 23, 2014 12:24 am
Byond Username: Cedarbridge

Re: Medbot Color auto-reskin and applications to other bots

Post by cedarbridge » #255348

Doctor Pork wrote:i would love different color floorbots one day
Its probably possible to just mirror the medkit code over with modifications to match the different boxes but I'm code retarded and even worse at sprite work. :honk:
User avatar
MisterPerson
Board Moderator
Joined: Tue Apr 15, 2014 4:26 pm
Byond Username: MisterPerson

Re: Medbot Color auto-reskin and applications to other bots

Post by MisterPerson » #255395

cedarbridge wrote:
Gun Hog wrote:What if you made all toolboxes greyscale, and simply applied the "color" var to the toolboxes accordingly? Would that make them look to weird? You could then read the color var of the toolbox used to build the floorbot, then apply it to the newly constructed bot.
I don't think that plays nicely with shading, different colored latches, etc. That's why the medbots use the "Skin" setup instead.
Both of those are solvable problems. You can have a colored texture and a noncolored one, and you can have a gradient that includes both blacks and whites.
I code for the code project and moderate the code sections of the forums.

Feedback is dumb and it doesn't matter
Post Reply

Who is online

Users browsing this forum: No registered users