British infantry going after planes

I’ve specifically noticed british rifle infantry, assault infantry and commandos following and attempting to shoot at planes. It only happens if they’re on maneuver, though. I haven’t checked if this happens with all infantry from all the factions.

TBH I think a category rework might be a good idea; it is possible to specify multiple noChase/onlyTarget/badTarget categories; i.e., you’re not limited to one. This might be difficult without luadefs though.

I agree, though I don’t see why it would be difficult with FBI (though I do think we should move over to lua defs myself anyway)

AFAIK there is no current system for automatically parsing all TDFs, computing some function from the tags and modifying the tags accordingly, and dumping them back to TDF, whereas such a system does exist for Lua (i.e. SpringModEdit). Then again I suppose I could attempt writing one in Python or something.

Spring’s TDF parser is in LUA, I bet it wouldn’t be hard to take that and modify it to run standalone, and then add some code to write the resulting LUA tables back to TDF.

Of course this would get rid of comments / special formatting in the TDF files, I’m not sure whether that would be desired…

Or maybe SpringModEdit source is available and you could plug in Spring’s TDF parser and write a TDF exporter?

I actually have a python script that can do some of it, but it’s rather nasty :stuck_out_tongue:

At any rate, the first thing to do is to think out the new set of categories carefully.

Or I’ll just do it by hand.

What are the benefits to reworking the system, besides cleaner onlytarget/badtarget/ect relationships?

Well, the entire purpose of the category system is targeting. (Technically speaking, you can also map selection keys to them, but IMO this is not a good reason to do things–it’s generally a bad idea to conflate two purposes within the same tag. Plus I think there are other ways of mapping selection keys.)

We could probably get by with something like


Instead of NFLAGNAIR, for example, you’d put INF LIGHTVEH TANK BUILDING.

Yeah. I’m just thinking - I don’t think we’re going to be adding a load more units, and the existing tags are functional (if not terribly intuitive), seems like a bunch of work for little result.

That said, I really don’t mind doing this once my finals are past. It’s been a while since I’ve brought out the text monkey in me.

Well, it’s true that the current system isn’t terribly bad (mostly because unlike *As it didn’t inherit BA’s horrible category system). I probably wouldn’t bother doing it by hand if I were you. With a script I think it would be worth the effort, since once you’ve written the script you only need to run it, and tweak a few lines in the script if you want to do something different later.

BTW, out of curiosity, do you all prefer separate weapon files or having each unit have its own weapondefs? The former makes it easier to use the same weapon on multiple units, but the latter makes it easier to find the weapons belonging to a particular unit.

Keep them separate, I think. MGs are shared by a lot of units, and there aren’t so many cannons that its super tricky to figure out. But I’m also pretty familiar with our files - for me, a greater number of shorter length files is easier to deal with.

what would really be nice lua wise would be to keep a monolithic buildoptions like sidedata.tdf

So nice i got off my arse and did it.