Page 1 of 1
FBI vs. TDF
Posted: 25 Sep 2006, 04:20
by FoeOfTheBee
I'd like to see default damage and range as fbi tags rather than weapon.tdf tags.
This way you could have units with the same look to the weapon, yet different values, without haveing to have a separate weapon.tdf entry for each unit.
Posted: 25 Sep 2006, 07:16
by KDR_11k
I don't think that's a good idea. Blurs the line between the weapon def and the unit def.
Posted: 25 Sep 2006, 17:55
by Caydr
Hell no.
Posted: 25 Sep 2006, 18:12
by rattle
Instead of replacing the system add to it by enabling unit FBIs override weapon TDF tags, e.g. a sub catatgory of UNITINFO called [WeaponXOverride] may contain weapon data to override said WeaponX. This may be useful for several units to have the same weapon but one uses different ammo and therefore does different damage, SABOT and HE ammo for instance...
Posted: 25 Sep 2006, 18:55
by FizWizz
I'm afraid I don't see the point that FoeOfTheBee is trying to make. You know that you can stick multiple weapons in a single .tdf file right? Suppose you have a gun that you'll call a "Blazer," you make a blazer.tdf file and have entries for each individual weapon in that file, copy-pasted from each other and differing only in damage values.
If you want to see what I mean, pop open E&E and look at the weapon files for it. It's very handy.
Posted: 25 Sep 2006, 21:22
by FoeOfTheBee
FizWizz wrote:I'm afraid I don't see the point that FoeOfTheBee is trying to make. You know that you can stick multiple weapons in a single .tdf file right? Suppose you have a gun that you'll call a "Blazer," you make a blazer.tdf file and have entries for each individual weapon in that file, copy-pasted from each other and differing only in damage values.
If you want to see what I mean, pop open E&E and look at the weapon files for it. It's very handy.
Thinking it over again, I don't think my original idea is a good solution. But I think there must be a better way than the current method. Say I have to ballistic plasma weapons that look the same but have different ranges. Now I would need two separate weapon.tdf entries. I'd like a way te reuse the look and feel with different range and damage.
This is not a big deal, though.
Posted: 25 Sep 2006, 22:29
by Dragon45
A betetr but more difficult soilution (although this is not even close to being needed or wanted even) is a sort of weapon type/property abstraction system, where weapon types can "inherit" properties like C++ classes do, etc;
However, weapons are really quite simple so it realy isnt a big deal to simply copy+paste/edit; SPring has unlimited weapon IDs after all.
More needed is actual model/scripting change.
Posted: 25 Sep 2006, 23:32
by PauloMorfeo
I had thought about inheritance, too. Although that would be hard to implement and still keep things simple (or maybe not!?).
The problem is never how hard it is to copy and paste. The problem is how hard it is to maintain the code. After you made 2, 3, 10 copies, you have to change one value. What if you forget to change it in one of the copies? Not to mention it is extra work.
Maybe ..
For each code file there are a few (one?) distinguishing things that are always unique, like the internal name (actually only the internal name?).
Maybe ..
We could have a file for weapon templates which could contain any kind of fbi except internal name and damages. A file for unit templates, etc, etc, etc.
Actually, this could tidy things up enourmosly since many of the things are just repeated from wepon to weapon, from bot to bot, from unit to unit.
I will give it some more thought, for sure!
Posted: 26 Sep 2006, 00:19
by SpikedHelmet
Didn't TAK have the weapon defines in the unit .fbi's? That would be acceptable, no?