Currently this thread only covers the Gold plating EUK, but if they are accepted and liked, I will consider making more variants! The EUK are R&D upgrade items used to apply new attributes to an item. They have a level of modularity in the code to allow for use on a wide variety of things, any item, and even mobs.
My first attempt at such an item is the Anti-Acid EUK. It has a simple purpose, to allow players to upgrade certain items to resist acid. Although the whole point of the EUK is just to flag items as unacidable, I ended up spending far too much time working out the icon Blend()ing aspect of it so that I am not just giving upgraded items a puke-yellow color. Instead, I managed, by pure coincidence, to find a way to make items to look properly golden, as seen in my PR. It is not perfect, and I have a long road ahead in getting some other icon related things to work.
Without further ado, I give you the PR for the first EUK item here: https://github.com/tgstation/-tg-station/pull/8380
I need the community's help and support to make this a reality. I need sprites for the EUK item itself, and suggestions on how to improve the icon sprites. Coders reading this are invited to give me tips on how to apply a color change to on-mob sprites, and improvements to the underlying code itself.
Let me know what you think!
Equipment Upgrade Kits (EUK)
-
- Joined: Sat Apr 19, 2014 5:19 am
- Byond Username: Gun Hog
- imblyings
- Joined: Fri Apr 18, 2014 5:42 pm
- Byond Username: Ausops
- Location: >using suit sensors
Re: Equipment Upgrade Kits (EUK)
try for a white sheen effect and a slightly warmer yellow
I'm wondering if this had anything to do with trying to balance against pacid blobs? I've got no opinion either way, just interested if this was a response to that.
I'm wondering if this had anything to do with trying to balance against pacid blobs? I've got no opinion either way, just interested if this was a response to that.
The patched, dusty, trimmed, feathered mantle of evil +13.
- Uristqwerty
- Github User
- Joined: Tue Mar 17, 2015 12:44 am
- Byond Username: Uristqwerty
- Github Username: Uristqwerty
Re: Equipment Upgrade Kits (EUK)
There's the more powerful MapColors, if just multiplying the original icon by something isn't enough to produce the desired gold colour.
I have no idea how well known it is these days, so pointing it out in case it's useful.
I have no idea how well known it is these days, so pointing it out in case it's useful.
An Urist from early baystation. Has submitted a few small additions to /tg/station over the years, but is far from the most notable Urist on this codebase.
- Loonikus
- Joined: Mon Dec 15, 2014 2:20 am
- Byond Username: Loonicus
Re: Equipment Upgrade Kits (EUK)
No offense, but that eye blinding yellow is hideous. Change it to something a little more subtle.
Aside from that, 10/10 commit he.
Aside from that, 10/10 commit he.
-
- Joined: Sat Apr 19, 2014 5:19 am
- Byond Username: Gun Hog
Re: Equipment Upgrade Kits (EUK)
The shine effect takes on the color of whatever the color var of whatever the item itself happens to be. I will attempt another way of changing the color, such as ANDing the icon with a solid yellow sheet or something. I will also try out MaxColors() to see what that does to things. As for color suggestions, please supply me a Hex (or RGB) code for the color you feel is a superior alternative. I am not an artist or a spriter, and as such I do not know how to properly make something look warmer or more subtle.
And yes, this is for fighting polyacid blobs! In my opinion, the problem is not that they are overpowered, but that they, unlike the other blobs types, did not have a suitable counter.
And yes, this is for fighting polyacid blobs! In my opinion, the problem is not that they are overpowered, but that they, unlike the other blobs types, did not have a suitable counter.
-
- Joined: Sat Apr 19, 2014 5:19 am
- Byond Username: Gun Hog
Re: Equipment Upgrade Kits (EUK)
This is my code for the item I use to figure out the best way to Blend() icons for more bling bling and such. Give it a try if you like.
Code: Select all
//Equipment Upgrade Kits, for giving items new attributes or properties.
/obj/item/weapon/upgradekit
name = "equipment upgrade kit"
desc = "Apply to an item to bestow upon it new properties."
var/euk_uses = 1 //How many times an EUK can be used before depletion.
icon = 'icons/obj/device.dmi'
icon_state = "euk"
flags = NOBLUDGEON
var/icon/euk_overlay
var/newcolor = ""
var/list/upgrade_types = list()
/obj/item/weapon/upgradekit/attack()
return
/obj/item/weapon/upgradekit/afterattack(var/atom/target, mob/user, proximity)
if(!proximity)
return
apply_euk(target, user)
/obj/item/weapon/upgradekit/proc/apply_euk(var/atom/target, mob/user)
if(!is_type_in_list(target, upgrade_types))
return
if(!euk_uses)
user << "[src] is depleted!"
return
return 1
/obj/item/weapon/upgradekit/proc/set_graphic(var/atom/target, var/overlay_name)
var/icon/I
var/icon/P = new /icon
for(var/iconstate in icon_states(target.icon))
var/icon/O = new(euk_overlay, overlay_name) //Oooh, shiny!
I = new(target.icon, iconstate)
O.Blend(I, ICON_OR) //Combine the two icons.
O.Blend(I, ICON_ADD) //Trim the shine to the item only and add some vibrance to the item.
P.Insert(O, iconstate) //Build a new icon set to use with the item itself.
target.icon = P //Apply the new icon.
target.color = newcolor //Change the color.
/obj/item/weapon/upgradekit/blender
#define CUSTOM_BLEND 1
#define OVERLAY_BLEND 2
var/icon/icon1
var/icon/icon2
var/inverted = 0
var/geticon2 = 0
var/applymode = 0
var/icon/base
var/icon/dest
var/choice = ""
var/list/blendchoices = list("reset","ADD" = ICON_ADD,"AND" = ICON_AND,"SUBTRACT" = ICON_SUBTRACT, \
"MULTIPLY" = ICON_MULTIPLY,"OVERLAY" = ICON_OVERLAY,"UNDERLAY" = ICON_UNDERLAY,"OR" = ICON_OR,"MAXCOLOR","MINCOLOR")
/obj/item/weapon/upgradekit/blender/apply_euk(var/obj/item/target, var/mob/user)
if(applymode == CUSTOM_BLEND)
choice = input(user, "Blend Proc choice") as anything in blendchoices
if(isnum(blendchoices[choice]))
var/icon/T = new (target.icon) //target icon.
var/icon/B //blender
B = new(target.icon, target.icon_state)
B.Blend(icon, blendchoices[choice]) //Blend current icon with target's
T.Insert(B, target.icon_state) //Replace old icon with new one hopefully
target.icon = T
else
user << "You need to choose one of the BYOND procs to use here."
else if(applymode == OVERLAY_BLEND)
var/chosen_overlay = input(user, "Which EUK overlay?") as anything in icon_states('icons/effects/euk_overlays.dmi')
set_graphic(target, chosen_overlay)
else if(!geticon2)
icon1 = new(target.icon, target.icon_state)
user << "\icon[icon1] Icon 1 set to [target]."
else
icon2 = new(target.icon,target.icon_state)
user << "\icon[icon1] Icon 2 set to [target]."
/obj/item/weapon/upgradekit/blender/verb/invert()
set name = "Invert Icon Base"
set category = "Blender"
inverted = !inverted
usr << "Invert mode set to [inverted]."
/obj/item/weapon/upgradekit/blender/verb/setapplymode(mob/user)
set name = "Activate Apply Mode"
set category = "Blender"
switch(applymode)
if(CUSTOM_BLEND)
applymode = OVERLAY_BLEND
user << "Blender will now apply a chosen overlay."
if(OVERLAY_BLEND)
applymode = 0
user << "Blender will now download a clicked icon."
else
applymode = CUSTOM_BLEND
user << "Custom blending mode set."
/obj/item/weapon/upgradekit/blender/verb/setcustomicon(mob/user)
set name = "Insert Custom Icon"
set category = "Blender"
if(alert("Icon 1 or Icon 2?",,"Icon 1","Icon 2")=="Icon 1")
user << browse_rsc(icon1, "blender_custom.png")
else
user << browse_rsc(icon2, "blender_custom.png")
/obj/item/weapon/upgradekit/blender/verb/oneortwo()
set name = "Set Icon 1 or 2"
set category = "Blender"
geticon2 = !geticon2
usr << "Geticon2 is set to [geticon2]"
/obj/item/weapon/upgradekit/blender/verb/setshine(mob/user)
set name = "Set Shine"
set category = "Blender"
var/icon2_state = input(user, "Which icon state?") as anything in icon_states('icons/effects/euk_overlays.dmi')
icon2 = new ('icons/effects/euk_overlays.dmi', icon2_state)
user << "icon2 set to \icon[icon2] [icon2_state]"
/obj/item/weapon/upgradekit/blender/verb/setcolor(mob/user)
set name = "Set Color"
set category = "Blender"
color = input(user, "Set color now!") as null|color
user << "color set to [color]"
/obj/item/weapon/upgradekit/blender/examine(mob/user)
user << "Base: [inverted ? "\icon[icon2]" : "\icon[icon1]"]"
user << "Dest: [inverted ? "\icon[icon1]" : "\icon[icon2]"]"
/obj/item/weapon/upgradekit/blender/attack_self(mob/user)
if(!base || ! dest)
base = new(icon1)
dest = new(icon2)
if(inverted)
base = new(icon2)
dest = new(icon1)
choice = input(user, "Blend Proc choice") as anything in blendchoices
switch(choice)
if("MAXCOLOR")
base.MaxColors(dest)
if("MINCOLOR")
base.MinColors(dest)
if("reset")
icon = initial(icon)
base = new(icon1)
dest = new(icon2)
if(inverted)
base = new(icon2)
dest = new(icon1)
user << "Reset complete. I1:\icon[icon1] I2:\icon[icon2]"
return
else
base.Blend(dest, blendchoices[choice])
icon = base
user << "[choice] operation completed! I1:\icon[icon1] I2:\icon[icon2]"
Who is online
Users browsing this forum: No registered users