ID:165361
 
Once again, i'm sure its a really noobish question that everyone on the site can tell me, but i've just searched everywhere i can think of, where else can i turn? well, i'd like to know how to make bigger icons (icons that take up more than one space) for things like trees and buildings. i've ben getting along fine creating more than one file for each thing, but it's really tedious, and it doesn't work with chopping down trees. lol.
Simply create more 32x32 blocks. For example, a tree in one tile you do not have to have the whole tree just a part of the tree.
In response to Xereo
wha..? no, no, that's what i've been doing, but i've found out that method makes chopping down trees-that is, turning a 2-block tree into a 1-block tree stump then back again after sleep(rand(300,600))-a nightmare. I'm asking is there by any chance a better way to do it? there has to be, right?
In response to Adam753
So your talking about having the whole try in one file instead of lots of states? a .PNG file perhaps?
In response to Xereo
png file? sounds interesting... explain...
In response to Adam753
adam i know what your talking about, ive tried that too but had little success, i hope you find something to help you, then i hope you will be nice enough to tell everyone else.
In response to VolksBlade
...lol? It's good to know i'm not the only one. but if you really want an answer, then just keep checking this topic until someone experienced enough spots his chance.
In response to Adam753
Well a PNG file is sort of like a BMP file but takes less space, I think haha I ain't that amazing at files and there pros and cons, the only program I know that can produce these because I have this is Photoshop. So I reccomend just using pain or something of the sort


Get the image and just put it in the source file then just put for example when defining the icon

turf
house
icon = 'House.bmp'

BMPs don't have a size range as far as I know like BYOND their tiles being 32x32 max so I am sure you can make as big objects as you like.
In response to Xereo
aha, awesome! how do i put it in the source code though? is it an #include statement, maybe, or do i just but in the file name as .png?
EDIT: never mind, i got it, just have to copy & paste into the game file.
EDIT again: it doesn't work, when i put a tree on the map it has no background and squeezes the whole image into one square.
In response to Adam753
24 hour bump- please help! someone must know!
In response to Adam753
You could make the top an overlay of the bottom and push it up using pixel_y. Which would be as easy as adding an overlay in New() and removing it when the bottom is chop_down()ed.
or
You could make a top /obj, have the bottom make the top in New(), associate itself with the top via a variable, and then when you chop down the bottom do whatever you want with the referenced top.

So first the overlay version.

turf
tree
bottom
density = 1 //So we can't walk through the tree trunk
icon = 'blank.dmi' //replace this with your .dmi
icon_state = "bottom" //the icon_state of the bottom
var/top //holds the top image in reference
New()
var/obj/x = image('blank.dmi',"top") //create a new image of the top
x.pixel_y += 32 //move x up 32 pixels
x.layer = MOB_LAYER+1 //So we can walk under x
src.overlays += x //add x to the bottom's overlays
top = x //reference the bottom's top variable to x
verb
chop_down()
set src in view(1)
usr<<"You chopped down the tree!"
src.icon_state = "chopped" //change the bottom's state to show it chopped down
src.overlays -= top //remove the top image via the top variable referenced to x


Fairly simple. Not much to say about the overlay method besides the fact that the top is merely an image stored as an overlay on the bottom.

Now for the /obj method.

turf
tree
bottom
density = 1 //So we can't walk through the tree trunk
icon = 'blank.dmi' //replace this with your .dmi
icon_state = "bottom" //the icon_state for the bottom
var/obj/tree/top/top //holds the top in reference
New()
src.top = new(locate(src.x,src.y+1,src.z)) //instantiate the top and locate it to the map tile above the bottom
verb
chop_down()
set src in view(1)
usr<<"You chopped down the tree!"
src.icon_state = "chopped" //change the bottom's state to show it chopped down
src.top.icon_state = "" //this way we don't have to delete it and people won't see it
obj
tree
top
density = 0
icon = 'blank.dmi' //replace this with your .dmi
icon_state = "top" //the icon state for the top
layer = MOB_LAYER+1 //So we can walk under the tree top


Making the top an /obj makes it so that you don't have to worry about it deleting the turf that is already at the location above the bottom of the tree. Just be careful to not let people pick it up or something. If you've made /obj/verb/get() people will be able to get() it. So you might need to make a new category and push your get() down to the next branch. Like so, /obj/pickupables/verb/get(). It's slightly more complicated than the overlay method but you can flesh things out and such.

Not sure which would be better in your case. It's really up to you, your game and what kind of functionality you need.