Jump to content
  • catty-cb
    catty-cb

    Making a Custom Footprint in Banished by Jinxiewinxie

    image.png

    Open your mesh in blender and change your view to be straight down. You'll see the grid lines and the top of your mesh. Align things so that the grid looks nice and straight and you can see how many grid squares you've got. Take a screenshot.

    Paste the screenshot into Paint.Net or Gimp or your favorite image editor and crop out the extra space around your mesh so that you have nice straight edges that follow along the original grid's lines:

    image.png

    This image won't have square dimensions and the game likes squares, so you'll need to make it square while maintaining its original view in the center. Easiest way is to make a new image that's got square dimensions and then copy & paste down your cropped screenshot onto it so that your top view stuff is still in the center of it all:

    image.png

    Next, crop out the extra space and grid lines that are near your mesh's outline so that you just have your outline and everything else around it is transparent:

    image.png

    Lastly, recolor your mesh's outline and innards to look like dirt or whatever you like and have it be a little transparent. Blur the edges so it looks more like a game footprint. Tada!

    image.png

    Make sure to resize the image so that it matches whatever you said the size was in your template file (128x128, 256x256, 2048x2048, whatevs). You can have multiple footprints in the same image if you're making F-Key variants, as long as you keep it square and spread them out in regular dimensions (128, 256, whatever). You can change the float values in your template file to specify which section of the image you want to use for the footprint of your variant.

    I ended up doing two variants in the same image and its 256x256 in size with each little footprint area being 128x128:

    image.png

    My code for the bit relating to this in my template file looks like this:

    //lines 121 through 148 of BanishedKit\MyMods\DemoHouse\Template\DemoHouse.rsc
    
    DecalDescription decal
    {
    	MaterialInstance _materials
    	[
    		"Models/MaterialInstance/DemoHouseFootprintMaterial.rsc"
    		"Models/MaterialInstance/DemoHouseFootprintDamageMaterial.rsc"
    	]
    	bool _tiled = false;
    	float _initialAlpha = 0.5;
    	float _mapWidth = 256.0;
    	
    	DecalLocation _decalLocations
    	[
                    //First variant's stuff
    		{
    			float _x0 = 0.0;
    			float _y0 = 0.0;
    			float _x1 = 128.0;
    			float _y1 = 128.0;	
    		}
                    //Second variant's stuff (only need this if you have a variant, can delete the below section otherwise)
    		{
    			float _x0 = 128.0;
    			float _y0 = 0.0;
    			float _x1 = 256.0;
    			float _y1 = 128.0;	
    		}
    	]
    }

    You also need to make the files that this bit references, they go in your BanishedKit\MyMods\YourModsName\Models\MaterialInstance folder. You want your footprint image, a FootprintTexture.rsc, a FootprintMaterial.rsc and a FootprintDamageMaterial.rsc that you've edited to fix names and locations to match your actual mod:

    image.png

    Don't be intimidated, these are small files and they're quick & easy to edit =) Here's what the entire innards of each of mine look like:

    //This is what's inside BanishedKit\MyMods\DemoHouse\Models\MaterialInstance\DemoHouseFootprintTexture.rsc
    
    ImageBuffer resource : "Texture/DecalTexture.rsc" 
    {
    	String _imageName = "Models\MaterialInstance\DemoHouseFootprint.png";
    }
    //This is what's inside BanishedKit\MyMods\DemoHouse\Models\MaterialInstance\DemoHouseFootprintMaterial.rsc
    
    MaterialInstance resource
    {
    	Material _material = "Material\TerrainDecal\TerrainDecalMaterial.rsc";
    	Texture _textures
    	[
    		{
    			String _name = "diffuse";
    			ImageBuffer _texture = "Models\MaterialInstance\DemoHouseFootprintTexture.rsc";
    		}
    	]
    }
    //This is what's inside BanishedKit\MyMods\DemoHouse\Models\MaterialInstance\DemoHouseFootprintDamageMaterial.rsc
    
    MaterialInstance resource
    {
    	Material _material = "Material\TerrainDecal\TerrainDamageDecalMaterial.rsc";
    	Texture _textures
    	[
    		{
    			String _name = "diffuse";
    			ImageBuffer _texture = "Models\MaterialInstance\DemoHouseFootprintTexture.rsc";
    		}
    		{
    			String _name = "damage";
    			ImageBuffer _texture = "Terrain\TiledDecals\DamageTexture.rsc";
    		}
    	]
    }

    Aaaaand, breathe! Its done! =)

    Here's what my two house's footprints look like in game when they're being built:

    image.png

    If you're unhappy with the transparency or the color, you can keep editing your original image and saving over the one you've got in your MaterialInstance folder while the game is running. As you save, the game will update your image changes so you can fiddle with it until it looks how you'd like it =)

    • Like 2


    User Feedback


    There are no comments to display.



    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Thank You for the Continued Support!

Simtropolis depends on donations to fund site maintenance costs.
Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Exchange.
Make a Donation and get one or all three discs today!

STEX Collections

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections