ID:2174302
 
Code:
                        usr.overlays=null
usr.icon_state=null
if(D=="Sunmon")
usr.Digimon="[D]"
usr.icon='Digimons/Sunmon.dmi'
usr.rank="In-Training"

if(D=="Coronamon")
usr.Digimon="[D]"
usr.icon='Digimons/Coronamon.dmi'
usr.rank="Rookie"

if(D=="Firamon")
usr.Digimon="[D]"
usr.icon='Digimons/Firamon.dmi'
usr.rank="Champion"

if(D=="Flaremon")
usr.Digimon="[D]"
usr.icon='Digimons/Flaremon.dmi'
usr.rank="Ultimate"
usr.icon_state="1"
var/obj/A=new /obj/Flaremon
usr.overlays+=A


Problem description:
So, how do I explain this. Players can be digimon, which start as 1 tiled icons. Later in the game, you can evolve to a two tiled digimon. But there's a gem that can return you to a single tiled digimon. The problem is that the single tiled digimon becomes two tiles, of the same digimon. But that only happens when you use the item to revert, FROM a two tiled digimon. I've put usr.icon_state=null and same for overlays. But that isn't working x.x. If that made any sense lol, any ideas? This isn't the full code, if you need that or anything else let me know. Thank you!! And I've already posted this and thought it was fixed, but when I hosted publicly, the problem came up again.
Yeah I remember this.

The least code intensive way to fix this would be to just make your Digimon that require overlays use larger icon files.

BYOND doesn't require your icon files to be set as 32x32. You'll save time with importing sprites in the long run this way and can completely forget about overlays.
I guess I could do that, and I agree it would be easier in the long run. But currently, there's over 100 dmi files I'd have to change...
Can you provide the code associated with the problem item?
sure, but I don't think that's the reason, that's just a way to tell if you beat the boss or not. it doesn't change your icon in anyway.
UmbraGem
icon='Gems.dmi'
icon_state="Umbra Gem"
name="Umbra Gem"
verb
PickUp()
set src in oview(1)
if(usr.UmbraGem)
usr<<output("<b><font color=lime>You already posses the [src.name]...","Battle:add")
return
else
usr<<output("<b><font color=lime>You picked up the [src.name]...","Battle:add")
usr.UmbraGem=1
usr.GenerationGemCase += new src.type
usr.loc=locate(51,133,5)
usr.health=usr.Mhealth
usr.magic=usr.Mmagic
usr.NonPK=1
usr.inQuest=0
for(var/mob/Shops/QuestGeneration/X in world)
X.can_offer_quest = TRUE
usr.cansave=1
del(src)
This is the NPC you talk to, inorder to change your icon.
mob
Shop/GemUser
name="Calumon, the Gem User{NPC}"
Digimon="Calumon"
icon='Digimons/Calumon.dmi'
rank="Mega Lv-3"
dir=NORTH
health=1.#INF
Mhealth=1.#INF
verb/UseGem()
set name="Use Gem"
set category= "Gem User"
set src in oview(1)
switch(alert("Which Gem do you want to use?",,"Unique Gem","Generation Gem","Cancel"))
if("Cancel")
usr<<output("<b><font color=yellow>[src.name]: Thanks for coming, Calu! ^-^","Battle:add")
return
if("Unique Gem")
var/list/varGem=list()
if(usr.EasternGem) varGem+="Eastern Gem"
if(usr.WesternGem) varGem+="Western Gem"
if(usr.SlothGem) varGem+="Sloth Gem"
if(usr.CraniumGem) varGem+="Cranium Gem"
if(usr.WyvernGem) varGem+="Wyvern Gem"
if(usr.NorthernGem) varGem+="Northern Gem"
if(usr.CentricGem) varGem+="Centric Gem"
if(usr.WisdomGem) varGem+="Wisdom Gem"
if(usr.SouthernGem) varGem+="Southern Gem"
if(usr.CalumonGem) varGem+="Calumon Gem"
if(usr.GreedGem) varGem+="Greed Gem"
var/G=input("Which Gem do you wish to use?") in varGem+list("Cancel")
if(G=="Cancel")
usr<<output("<b><font color=yellow>[src.name]: Thanks for coming, Calu! ^-^","Battle:add")
return
usr.icon_state=null
usr.overlays=null
if(G=="Southern Gem")
usr.Digimon="Zhuqiaomon"
usr.icon='Digimons/Zhuqiaomon.dmi'
usr.icon_state="1"
var/obj/A1=new /obj/Zhuqiaomon
usr.overlays+=A1
usr.rank="Mega Lv-3"

if(G=="Eastern Gem")
usr.Digimon="Azulongmon"
usr.icon='Digimons/Azulongmon.dmi'
usr.icon_state="1"
var/obj/A1=new /obj/Azulongmon
usr.overlays+=A1
usr.rank="Mega Lv-3"

if(G=="Western Gem")
usr.Digimon="Baihumon"
usr.icon='Digimons/Baihumon.dmi'
usr.icon_state=""
var/obj/A1=new /obj/Baihumon
usr.overlays+=A1
usr.rank="Mega Lv-3"

if(G=="Sloth Gem")
usr.Digimon="Belphemon"
usr.icon='Digimons/Belphemon.dmi'
usr.icon_state="1,0"
var/obj/A1=new /obj/Belphemon00
usr.overlays+=A1
var/obj/A2=new /obj/Belphemon20
usr.overlays+=A2
var/obj/A3=new /obj/Belphemon01
usr.overlays+=A3
var/obj/A4=new /obj/Belphemon11
usr.overlays+=A4
var/obj/A5=new /obj/Belphemon21
usr.overlays+=A5
usr.rank="Mega Lv-3"
world/map_format=TILED_ICON_MAP

that's what my map_format is in if that helps any. But even so idk why resetting the icon_state to null isn't working. It should save the icon state when they relog shouldn't it? and the overlays aswell. I looked via edit in-game too. icon_state was still 1 after relogging.