News:

Welcome to World of Banished!

Main Menu

How do I get a custom footprint?

Started by angainor88, September 04, 2017, 12:07:16 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

angainor88

In the previous house I made, I used the building footprint given by the modkit, but my current house is circular, so the square footprint looks a little silly. I made a new footprint.png, but I am not sure how to get it to show up in the game itself. Any ideas?

The current code is this:

XhosaHouseFootprintMaterial.rsc:

MaterialInstance resource
{
Material _material = "Material\TerrainDecal\TerrainDecalMaterial.rsc";
Texture _textures
[
{
String _name = "diffuse";
ImageBuffer _texture = "Models\MaterialInstance\XhosaHouseFootprintTexture.rsc";
}
]
}


XhosaHouseFootprintTexture.rsc:

ImageBuffer resource : "Texture/DecalTexture.rsc"
{
String _imageName = "Models\MaterialInstance\XhosaHouseFootprint.png";
}


I am sure I need to fix some of that referencing, but I am not sure how to do it without screwing up the rest of it.

RedKetchup

#1
the footprint is a semi transparent png. everything drawn on that invisible background png will show up on the ground
what do you use as 2D graphic software ? photoshop ? paint.net or gimp2.0  (which is free) ?

create a new 256x256 png with invisible background and draw in the center a circle and paint that circle with a graphic brush imitating a crude brown dirt surface.

if you use gimp2.0 i can give you my brush.


and about the code in your template , the numbers  define the size of your footprint png (256 for example)
      {
         float _x0 = 0.0;
         float _y0 = 0.0;
         float _x1 = 256.0;
         float _y1 = 256.0;
      }

are where x start, y start, x end, y end. if you only have 1 draw on a png... should start and end from 0 to the size of your .png

attachments : an example of a footprint with a circle drawn in center ....
and my Gimp.2.0 brush i use to draw it.
> > > Support Mods Creation developments with Donations by Paypal  < < <
Click here to Donate by PayPal .

angainor88

Ah, thanks!

I didn't know what those float values were. All fixed now :D