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.
FBI vs. TDF
Moderator: Moderators
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...
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.
If you want to see what I mean, pop open E&E and look at the weapon files for it. It's very handy.
- FoeOfTheBee
- Posts: 557
- Joined: 12 May 2005, 18:26
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.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.
This is not a big deal, though.
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.
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.
- PauloMorfeo
- Posts: 2004
- Joined: 15 Dec 2004, 20:53
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!
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!
-
- MC: Legacy & Spring 1944 Developer
- Posts: 1948
- Joined: 21 Sep 2004, 08:25