ID:2062462
 
Code:
obj
Scenery
icon='theworld.dmi'
Ore_Vein
icon_state = "vein"
New()
..()
var/O = rand(1,13)
var/obj/T = new/obj
T.icon='theworld.dmi'
T.icon_state="veinore"
src.contents+=new/obj/Items/Resource/Ore/Stone
src.contents+=new/obj/Items/Resource/Ore/Flint
if(O==1)
ore="Gold"
src.name = "Rich Gold Vein"
T.icon+= rgb(152,96,0)
src.contents+=new/obj/Items/Resource/Ore/Gold_Ore
//(this goes on for each ore type I coded)
src.overlays+=T

mob
NPC
Animal
Exceed
icon='Exceed.dmi'
New()
..()
var/R=rand(0,220)
var/G=rand(0,220)
var/B=rand(0,220)
var/ER=rand(0,255)
var/EG=rand(0,255)
var/EB=rand(0,255)
var/obj/O = new/obj
O.icon='Exceed.dmi'
O.icon_state="ol"
var/obj/E=new/obj
E.icon='Exceed.dmi'
E.icon_state="eyes"
E.icon+= rgb(ER,EG,EB)
src.icon+= rgb(R,G,B)
src.overlays+=O
src.overlays+=E


Problem description: Hey, yeah....its me.....again...

this time is different, I swear I probably have an easy code issue. So, this issue seems to only pop up when using the 'hostable' version of the files, but seems to basically crash all the icons, bringing up 'bad icon operation' it doesn't Seem to do this with any other part of the code, I cant figure out why right here these icons seem to be an issue, theres no reason they should be, but for whatever reason, I think it has something to do with the icon+= rgb() code, due to the debug calling those lines in particular.

is there any hope? .-.


There's really no reason that should cause a bad icon operation unless the icon is null or something.

However, I would strongly recommend against using icon math; you can use atom.color instead. This is an equivalent additive color matrix:

color = list(1,0,0, 0,1,0, 0,0,1, R/255,G/255,B/255)

If you want overlays to have a different color, just use the RESET_COLOR appearance_flag for them.
hmm, well, the color matrix would probably be great, lemme test some stuff out....

Well, Good news and bad News, The color matrix works very well, I might us this for some of my other code as well, however, there still seems to be a tad issue with the game loading in text, and not showing anything up, but only the hostable file, slight irritation.


Loading in text? You mean it's jumping into text mode?

That would suggest the reason for your bad icon errors was that the icons you were using don't actually exist properly in the .rsc file. Try a clean compile. You may have to turn on AUTO_FILE_DIR if your icons are in a sub-path.
tried Clean Compile, where do I turn on AUTO_FILE_DIR?
actually, I think I found it, looks like it is already on...maybe
geh, nope, all the files are in the directory, and it just loads up text(although not in 'text only', and if you select text and then turn it off, it goes blank).

@.@ imam check if any of my other projects are like this...

EDIT: two for two. the packager seems to hate me
wow...ok...I just tried it with two projects that are completely based in one folder, this may be beyond development help at this point
Maybe send me your project in a .zip. If I see the same thing as you I might be able to figure out what's going on.
you want me to send them through an email of some sorts, or a download link supplied to you?
Either is fine.
I compiled your project fresh when I got your source, and it came up just fine for me.
try the zip file I included with the main project folder? I compiled that one on my computer. just to see if it was just mine.
I didn't try the zip, no. But as a rule with bug tests I always recompile anyway.
true, I just wanted to be absolutely sure it was just my computer, and if I loaded up the files for other people, they didn't wind up with just text