Page 1 of 1

Building Random Units

Posted: 18 Jul 2006, 23:13
by FizWizz
How units are built now:

Code: Select all

[CANBUILD]
	{
	[barracks]
		{
		canbuild1=scout;
		canbuild2=rifleman;
		canbuild3=atinfantry;
		canbuild4=smgsupport;
		canbuild5=sniper;
		canbuild6=seal;
.....
How units could be built:

Code: Select all

[CANBUILD]
	{
	[barracks]
		{
		canbuild1=scout1,scout2;
		canbuild2=rifleman1,rifleman2,rifleman3;
		canbuild3=atinfantry1,atinfantry2;
		canbuild4=smgsupport;
		canbuild5=sniper;
		canbuild6=seal1,seal2,seal3,seal4;
.....
If you haven't gotten the idea already, what I'm saying is this: How feasible would it be to add support for queueing units randomly, mix-bag style? Modders could use a feature like this to make it possible to build hordes of units (let's take something generic, like infantry) without them all being clones of each other. If someone wanted to make a unit look scarred or battle-worn already, but without all the units of that tye coming out the exact same way, they can make 5-6 different variants on that unit that all differ slightly cosmetically. Or they can make a series of units with the same theme (let's take generic infantry again), but with different weapons and such, making it so that armies come out naturally in varied types and numbers of units.
About exactly how it is implemented, I don't care about the syntax used (the above example is just a suggestion), and maybe Spring will use the buildpic and unit statistics (metal, energy, buildtime) of the first unit in the entry (again, just a suggestion).

Posted: 18 Jul 2006, 23:16
by knorke
With seal1, seal2, seal3 etc. doubleclicking to select all units wouldn't work.

isn't it easier to hide/show random pieces of the units, so that there is ie one head randomly selected out of 5 possibiliets?

Posted: 18 Jul 2006, 23:18
by Hunter0000
If a metamorph script was created this would be easy to do, it IS possible to do with atm but you need to have all 3 models 'overlap' as the same model and randomly choose one and hide all other wiselst disabliling their weapons.

+.5 if this is difficult to impliment (not TOTALY important)

+5 if this isn't that hard to impliment

E;
knorke wrote:With seal1, seal2, seal3 etc. doubleclicking to select all units wouldn't work.
hmm, didnt think of that. maybe this ought to be implimented as a random model for the unit TDF instead?

Posted: 18 Jul 2006, 23:24
by smoth
It would also need to be implemented for those of us who use the download tdfs.

Posted: 18 Jul 2006, 23:35
by AF
AI's would end up building only one of the set

Posted: 18 Jul 2006, 23:43
by Crampman
If the differences between the mix-bag are only graphical (same speed/heath/weapons...etc...), then you can use a 'metamorph' system, like Hunter000 suggests.
But if their caracteristics should be different, then you mus have a random-choice coded...

Posted: 18 Jul 2006, 23:49
by Gnomre
On a similar note, how about a canbuildx=BLANK; operator so we can pad the menus manually to seperate the order and build menu? Then again, I guess then we'd need a way to easily toggle between orders and buildmenus like TA had with the buttons... and then that's getting deep into new GUI territory.

Perhaps instead of doing this via the buildmenu, it should be done via the FBI. Have a tag parsed the same way as the Category tag:

Altunits=rifleman2 rifleman3;

Which the engine randomly selects from. Then again, I think the engine only does the stuff once, so maybe that wouldn't be the best route...

I think scripts are probably the most efficient way, unless you're really wanting to go wild with the changes. As a simple example, it'd be easy to randomly hide/show hands and heads to choose the skin color of a troop each time one is built, or even just the head so they each have different faces.

Posted: 19 Jul 2006, 00:35
by Snipawolf
Ahh, just randomize a texture for soldiers :P

I wouldn't want it to be too different, anyways who the hell is gunna zoom to see a soldier 1/4 the size of a tree?

Edit: New textures /w skin colors :mrgreen:

Posted: 19 Jul 2006, 07:53
by KDR_11k
Changing textures isn't possible, hiding parts of the mesh however is. In fact it's trivially easy and I was planning to do that.