Page 1 of 1

Idea that might, or probably not be possible

Posted: 20 Nov 2006, 18:39
by Noruas
Make it where a unit is required to be built for another unit, that way we can have fake research hubs or sumthin. just another MTR

Posted: 20 Nov 2006, 21:27
by esteroth12
that can be done with scripting the GUI... ask AF

Posted: 22 Nov 2006, 03:19
by SpikedHelmet
Yeah but that's a pain-in-the-ass work-around at best. It'd be much better if prerequisites were supported fully.

Posted: 22 Nov 2006, 04:05
by MadRat
So do you mean some kind of Prerequisite tags in the SIDEDATA.TDF file? Perhaps a sample listing could look like:

Code: Select all

[CANBUILD]
{
	[ARMAAP]
	{
		prerequisite1=ARMAP;
		prerequisite2=ARM_ADV_AIR_TECH;
		canbuild1=ARMACA;
		canbuild2=ARMBRAWL;
		canbuild3=ARMPNIX;
		canbuild4=ARMLANCE;
		canbuild5=ARMHAWK;
		canbuild6=ARMSEAP;
		canbuild7=ARMAWAC;
		canbuild8=ARMSEHAK;
		canbuild9=ARMCSA;
	}
	[ARMHAWK]
	{
		prerequisite1=ARMAAP;
		prerequisite2=ARM_STEALTH_TECH;
	}
}
The bad thing is to get individual units to develop like that it gets overly long winded.

Posted: 22 Nov 2006, 16:29
by KDR_11k
Rat: Put it into the fbi.

Posted: 22 Nov 2006, 17:01
by Noruas
Are you cereal that will work?!?

Posted: 23 Nov 2006, 03:31
by MadRat
KDR_11k wrote:Rat: Put it into the fbi.
The SIDEDATA.TDF is one stop shopping for the buildtable. What advantage would you have to make it a requirement to touch every unit FBI?

Posted: 23 Nov 2006, 08:23
by KDR_11k
Less monolithic files.

Posted: 23 Nov 2006, 11:29
by Tobi
Putting it in sidedata has the advantage that you can have a building Z that has building Y as prerequisite on one side, and building X as prerequisite on another side.

e.g. one common targetting facility has Arm Advanced Radar prerequisite for Arm and Core Advanced Radar prerequisite for Core.

(If my understanding of how sidedata.tdf works is correct)

Posted: 23 Nov 2006, 12:57
by rattle
I like that a lot, though it will probably upset AF. Requires some work for the AIs to adapt this but I've been waiting for this a long time... though I had a better idea: groups like armor.

Code: Select all

[TECH1] // group name
{
	groupSize = 30; // -1 = no limit
	prerequisite = PowerPlant Radar; // applies to all units
	[FOOTANK]
	{
		prerequisite = Armory;
		maxBuild = 10;
	}
	[BLAHTANK]
	{
		Prerequisite = Armory Barracks;
		maxBuild = -1; // no limit
	}
}

[TECH2]
{
	groupSize = 5;
	...
	...
}
The maxBuild and groupSize stuff was just an idea to limit build amounts, i.e. you can have either 10 FOOTANKs and 20 BLAHTANKs or 30 BLAHTANKs. I know there are unitlimits already but why not make it some more advanced. Also the Prerequisite could be split up while getting an amount added.

Code: Select all

		Prerequisite1 = Armory 1;
		Prerequisite2 = Barracks 3;
Means there have to be three "Barracks" units alive for the condition to be true. Also that means the techtree should be split from either unitdata or sidedata IMO, though I don't care too much about it, I'd be happy with any kind of tech tree system.

Well it's just an idea I had... which I mentioned somewhere else I think. :-)

Posted: 23 Nov 2006, 22:59
by AF
This can eb doen via the lua GUI file, just tell it not to show the units build icon if the prerequisite doesnt exist already.

Posted: 23 Nov 2006, 23:17
by Tobi
With the minor disadvantage that someone using his own lua gui file can make as much as he wants of the unit..., without even knowing there is supposed to be a limit.

Posted: 24 Nov 2006, 00:43
by AF
Then the modder should be able to define the lua GUI file in the archive as 'end of' 'final say' 'wanna edit? tough luck!', like the tag in particles.df for team coloured nanospray.

Posted: 24 Nov 2006, 02:32
by rattle
I guess you'll be able to read out files using LUA so my suggestion still stands to keep it seperated from the GUI script.

Posted: 24 Nov 2006, 04:25
by AF
We need trepan to override the lua file handling functions or provide VFS variants.