Author Topic: How do I get a custom footprint?  (Read 168 times)

0 Members and 1 Guest are viewing this topic.

Offline angainor88

  • Laborer
  • **
  • Posts: 32
How do I get a custom footprint?
« on: September 04, 2017, 12:07:16 PM »
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:

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

XhosaHouseFootprintTexture.rsc:

Code: [Select]
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.

Offline RedKetchup

  • Champion
  • Banished Expert
  • *****
  • Posts: 7384
Re: How do I get a custom footprint?
« Reply #1 on: September 04, 2017, 04:56:18 PM »
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.
« Last Edit: September 05, 2017, 02:02:33 PM by RedKetchup »
> > > Support Mods Creation developments with Paypal Donations < < <
Click here to PayPal Donate.

Offline angainor88

  • Laborer
  • **
  • Posts: 32
Re: How do I get a custom footprint?
« Reply #2 on: September 05, 2017, 01:50:51 PM »
Ah, thanks!

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