Welcome to Black Liquid Software

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • 0
Sign in to follow this  
Followers 0
Necora

The nitty gritty... putting together a template and polishing off a mod

Hello everyone.

I have gotten to the stage on a few mods now where I am polishing them off. They are in game, they work, the buildings look good. But there are a few nagging little bits that are annoying me, and I was wondering if anyone has put together a run through of a template file to explain what different parts mean?

For example, how do building footprint textures work? There are no images in the mod kit, so I'm just guessing at what ones to use. I've seen others make their own footprint textures, but is there any specific size or shape of them? How will a square texture fill a rectangle footprint? How do you have no footprint, for docks etc? The barns I made are only 2x4 tiles, with a third road tile, but the footprint always hangs over the roads and it looks ugly. Is it just poor choice of footprint texture, or am I doing something wrong? There are a few other things in this area too, like the decal locations, what do they mean? Do they have to be different for F-variants? 

I am also having trouble getting the UI boxes to display at the appropriate size, my dock piece UI are so small they are only large enough to show the delete button and don't say the name of the piece etc.

 

If there is a guide knocking about to the finer details of the template file I'd love to see it.

 

Cheers

 

 

 

 

Share this post


Link to post
Share on other sites

1 answer to this question

  • 0

The only guide I have is in my head.

 

Here, download this zip file. It has the 4 files you need to make a footprint. We put all of ours in the Models/MaterialInstance folder but you can put it wherever you want, as long as you edit the paths in the files accordingly.

Footprint.zip

 

Make you decal look like this:

DecalDescription decal
{
	MaterialInstance _materials 
	[ 
		"Models/MaterialInstance/GenericFootprintMaterial.rsc" 
		"Models/MaterialInstance/GenericFootprintDamageMaterial.rsc" 
	]
	bool _tiled = false;
	float _initialAlpha = 0.5;
	
	float _mapWidth = 512.0;

	DecalLocation _decalLocations
	[
		{
			float _x0 = 0.0;
			float _y0 = 0.0;
			float _x1 = 512.0;
			float _y1 = 512.0;	
		}
	]
}

But obviously, change the footprint files to whatever you named yours.

 

You can use a square texture on a rectangle building, it will just stretch it to fit.

I think the hidden footprint file the vanilla buildings use actually has several different footprints in one big file, and the _decalLocations tells it which coordinates to grab from. But if you just do a 0,0,512,512 like above, it will just grab the whole thing. (Make sure the _mapWidth is also 512)

 

If your dock pieces don't say their name on the box, then something is wrong with your stringtable. The game doesn't check for typos in your string names, so it won't tell you if something is wrong. Check your templates toolbar _stringName against your stringtable names.

To make decorative items (non production buildings) box bigger, take a look at the Template/Well.rsc file. Down at the bottom there's a groupEmpty thing, along with  groupEmpty element in the UI code. Copy that.

2 people like this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0