This is the coding for items
item
icon = 'items.dmi'
overlay_icon = 'overlays.dmi'
map_icon = 'items.dmi'
iron_bar
name = "Iron Bar"
icon_state = "iron-bar"
map_state = "iron-bar-map"
stack_size = 20
count = 5
description = "Used for crafting\nThis\nis\na long\ndescription"
sword
name = "Sword"
icon_state = "sword"
description = "+5 Power"
overlay_state = "sword"
overlay_layer = 2
map_state = "sword-map"
slot = MAIN_HAND
equipped(mob/m)
m.overlay(src)
m.power += 5
unequipped(mob/m)
m.remove(src)
m.power -= 5
This where the overlay_icon is defined
item
parent_type = /obj
pwidth = 16
pheight = 16
pixel_x = -8
pixel_y = -8
var
slot = ""
in_slot = ""
stack_size = 0
count = 1
description = ""
cost = 0
overlay_icon = null
overlay_state = ""
overlay_layer = 1
And this is what I am trying to have
item/Armors
icon = 'items.dmi'
map_icon = 'items.dmi'
blackchestlvlone
--> overlay_icon = 'blackchest.dmi'
name = "Black Armor"
icon_state = "blackchest"
description = "+200 Defense"
overlay_state = "blackchest"
map_state = "blackchest-map"
slot = BODY
cost = 8
// make the armor actually give you +4 defense
equipped(mob/m)
m.overlay(src)
m.defense += 200
unequipped(mob/m)
m.remove(src)
m.defense -= 200
blackblackchestlvltwo
--> overlay_icon = 'blackchest2.dmi'
name = "Helmet"
icon_state = "blackhelmet"
description = "+110 Defense<br>-150 Rin"
overlay_state = "blackhelmet"
map_state = "blackhelmet-map"
slot = HEAD
cost = 5
equipped(mob/m)
m.overlay(src)
unequipped(mob/m)
m.remove(src)
blackchestlvlthree
overlay_icon = 'blackchest3.dmi'
name = "Black Armor"
icon_state = "blackchest"
description = "+320 Strength<br>+100 Defense"
overlay_state = "blackchest"
map_state = "blackchest-map"
slot = BODY
cost = 8
equipped(mob/m)
m.overlay(src)
unequipped(mob/m)
m.remove(src)
The main issue is that when I try switching between items, its like only one overlay_icon dmi file is being read.
Any help will be great. This is essential to continuing of the game.