Separate weapon entities
-
- Bounty Hunter
- Posts: 132
- Joined: Sun Nov 01, 2009 2:43 am
- Location: Alaska
Separate weapon entities
During Starbright's work on the Franklin, we decided we wanted weapons to be separate entities from the ship-installed onto the outside rather then built onto the ship by modelers. Instead, modelers would create flat surfaces, which coders could designate hardpoints-places the new weapons could be installed. I've heard that the code already exists in the PU project. I'd like to see this code imported into VS-it would simplify things for modelers, and create some more visible diversity among ships.
-
- Hunter
- Posts: 93
- Joined: Sun May 06, 2007 6:43 pm
Re: Separate weapon entities
I always wondered why they didn't do this originally.
I do support this idea, but it does mean that the small dev team would have to rework (pretty considerably) the existing models for each ship.
And then model each type of gun.
So I'm not sure how feasible it really is, given the circumstances.
I do support this idea, but it does mean that the small dev team would have to rework (pretty considerably) the existing models for each ship.
And then model each type of gun.
So I'm not sure how feasible it really is, given the circumstances.
The Twitching Pattern - http://www.last.fm/music/The+Twitching+Pattern
Have a listen.
Have a listen.
-
- Confed Special Operative
- Posts: 334
- Joined: Thu Jan 11, 2007 4:10 am
Re: Separate weapon entities
considering just about every ship entity /needs/ to be redone.. thats not so terrible a feat and you /can/ simply overlap guns with hardmounted guns. would look weird until fixed, but it wouldnt break the game.
-
- Elite
- Posts: 1363
- Joined: Sat Aug 04, 2007 3:42 pm
Re: Separate weapon entities
I think it wouldn't make a significant enough visual difference to be worth doing, on its own.
If it was to make a more impactful feature work, only then would it make sense, imo. So if you wanted to make weapons separate units so that they could also track targets like turrets when they were mounted on autotrackers, that might be cool. Or if all major components of a ship are separate, destructible subunits as well as weapons, that too would be worth it.
But otherwise, all guns are basically cylindrical housings around EM accelerators or LASER's and all missile launchers are cylindrical tubes housing missiles. You won't see enough visual distinctions switching from one weapon system to the next.
And last but not least, you'll only see anything when most of the weapon is visible from the outside (and therefor unnecessarily very vulnerable to damage). That counts out all Aera ships, probably all Rlaan ships and any Human ships that mount their forward weapons in gun pods and missile pods.
If it was to make a more impactful feature work, only then would it make sense, imo. So if you wanted to make weapons separate units so that they could also track targets like turrets when they were mounted on autotrackers, that might be cool. Or if all major components of a ship are separate, destructible subunits as well as weapons, that too would be worth it.
But otherwise, all guns are basically cylindrical housings around EM accelerators or LASER's and all missile launchers are cylindrical tubes housing missiles. You won't see enough visual distinctions switching from one weapon system to the next.
And last but not least, you'll only see anything when most of the weapon is visible from the outside (and therefor unnecessarily very vulnerable to damage). That counts out all Aera ships, probably all Rlaan ships and any Human ships that mount their forward weapons in gun pods and missile pods.
-
- Confed Special Operative
- Posts: 334
- Joined: Thu Jan 11, 2007 4:10 am
Re: Separate weapon entities
they would be destructible subunits :p the code is already there, really.. just create turrets with 0 arc or 5 degree arc.. or whatever.. call them something else, sure.. but if i was writing the code, i would have them inherit from the same class with very minimal changes.. mostly cosmetic.
the hard part is likely going to be converting ships.. so you are going to have an overlap.. either ships without guns for a while.. or ships with mesh guns and sub-unit guns..
the hard part is likely going to be converting ships.. so you are going to have an overlap.. either ships without guns for a while.. or ships with mesh guns and sub-unit guns..
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Separate weapon entities
Ehm... this already is like that.
There are weapon mounts and there are weapon meshes.
I think VS doesn't show that because there aren't any meshes for weapons (ie: the weapons xml has a name, meshes/mounts must hold a similarly-named bfxm).
There are weapon mounts and there are weapon meshes.
I think VS doesn't show that because there aren't any meshes for weapons (ie: the weapons xml has a name, meshes/mounts must hold a similarly-named bfxm).
-
- Confed Special Operative
- Posts: 334
- Joined: Thu Jan 11, 2007 4:10 am
Re: Separate weapon entities
er.. so in other words, all the work is already done? just need the meshes?
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Separate weapon entities
Pretty much.
It could also be disabled by config. I didn't check.
It could also be disabled by config. I didn't check.
-
- Elite Venturer
- Posts: 753
- Joined: Sat Apr 15, 2006 2:40 am
- Location: chthonic safety
Re: Separate weapon entities
I'm for turning mount points into subunits completely. This would give more sensible autotracking via functions already working in turrets. Of course, to do this properly subunits would need 1) radar integration with their owner and 2) change in weapon control.
The next step could be placing those pulse caps and coolers close to the load, where they belong.
When subunits will properly work, that is. Right now they are the worst bugs' nests in VS.
The next step could be placing those pulse caps and coolers close to the load, where they belong.
When subunits will properly work, that is. Right now they are the worst bugs' nests in VS.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Separate weapon entities
I'm against that for technical reasons.
A subunit involves its own AI, it's a notorious drain on system resources. If every ship has 4+ AIs (its own + 3 mountpoints on average, not to mention capships), things could get out of hand really easy.
A subunit involves its own AI, it's a notorious drain on system resources. If every ship has 4+ AIs (its own + 3 mountpoints on average, not to mention capships), things could get out of hand really easy.
-
- Elite Venturer
- Posts: 753
- Joined: Sat Apr 15, 2006 2:40 am
- Location: chthonic safety
Re: Separate weapon entities
Hmmm, you're right.klauss wrote:I'm against that for technical reasons.
A subunit involves its own AI, it's a notorious drain on system resources. If every ship has 4+ AIs (its own + 3 mountpoints on average, not to mention capships), things could get out of hand really easy.
BTW, can AI be made more configurable and given some efficient stubs? I mean, even proper turrets aren't supposed to do many things a normal unit does... It may be a "fighter", but does it need to know how to do "afterburn turn away"? Or anything other than separate scripts without maneuvers would be too much of a mess to do now?
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Separate weapon entities
Few people understand how AI "scripts" work atm, so very few people can actually do what you propose.
Last time I checked, the AI was some kind of limited but flexible state machine. Understanding that much, however, didn't help into making me able to mod it. I just don't grasp the concept behind the scripts.
I've been meaning to write a whole new AI model I can understand (and hopefully others too), because right now VS AI could use a lot of improvement, it probably could support a lot of functionality, yet it doesn't because noone knows exactly how to get it done.
Last time I checked, the AI was some kind of limited but flexible state machine. Understanding that much, however, didn't help into making me able to mod it. I just don't grasp the concept behind the scripts.
I've been meaning to write a whole new AI model I can understand (and hopefully others too), because right now VS AI could use a lot of improvement, it probably could support a lot of functionality, yet it doesn't because noone knows exactly how to get it done.
-
- Elite
- Posts: 1363
- Joined: Sat Aug 04, 2007 3:42 pm
Re: Separate weapon entities
Is there any chance of contacting the original creator of the AI?
Also is it written mostly in C++ or Python?
Also is it written mostly in C++ or Python?
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Separate weapon entities
I'm not sure who it is. Assuming it's Hellcatv (the original author of the entire engine), I doubt he's got enough free time to do what we'd have to ask of him: to thoroughly document the AI system.
Documentation, if not done slowly over time (as you write the code), takes a lot of time.
Documentation, if not done slowly over time (as you write the code), takes a lot of time.
-
- Confed Special Operative
- Posts: 334
- Joined: Thu Jan 11, 2007 4:10 am
Re: Separate weapon entities
it should still be a subunit for design reasons.. but can you strip out the ai from it? so it just fires on its fixed trajectory?
-
- Elite
- Posts: 7243
- Joined: Mon Apr 18, 2005 2:40 pm
- Location: LS87, Buenos Aires, República Argentina
Re: Separate weapon entities
@Neskiairti: that's what mount points really are. Just a separate mesh that is aimed toward your target.
-
- Elite Venturer
- Posts: 753
- Joined: Sat Apr 15, 2006 2:40 am
- Location: chthonic safety
Re: Separate weapon entities
But how to make it transparent?klauss wrote:I've been meaning to write a whole new AI model I can understand (and hopefully others too), because right now VS AI could use a lot of improvement, it probably could support a lot of functionality, yet it doesn't because noone knows exactly how to get it done.
A straightforward set of event handlers (install/uninstall/damaged/owner is hit/owner performs an action (fire/steer/special)/tick), maybe even on Python? That would be not only more flexible, but i suspect not noticiably slower (at least unless they'd have nested loops and all on python)... Of course, this way they'll mostly just use the functions from engine.
C++, AI scripts themselves in some sort of XML. With a little Python on top (is it really used?). Or in between. A bit of everything.Deus Siddis wrote:Is there any chance of contacting the original creator of the AI?
Also is it written mostly in C++ or Python?
That's more or less what i wanted, but seems to be mostly hardcoded and how the unit's fields control it isn't quite clear.Neskiairti wrote:it should still be a subunit for design reasons.. but can you strip out the ai from it? so it just fires on its fixed trajectory?
But if units are divorced from AI, they may as well be split between functionality and "physical" object (just a mesh with hitpoints and attachment points) and we won't have those endless units.csv lines that are used only in proper units anyway?..
Edit: i forgot about Python.
Last edited by TBeholder on Sat Aug 14, 2010 8:45 am, edited 2 times in total.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter
-
- Confed Special Operative
- Posts: 334
- Joined: Thu Jan 11, 2007 4:10 am
Re: Separate weapon entities
ah, i was thinking as in opposed to weapons modeled in to the ship model. That always bugged the crap out of me :p
-
- Elite Venturer
- Posts: 753
- Joined: Sat Apr 15, 2006 2:40 am
- Location: chthonic safety
Re: Separate weapon entities
And if we're at it, a weapon is three things:
And big radar dishes... this would require AI understanding where not to go, but maybe can be solved via the same collision avoiding algorithm.
- ship device: it's an upgrade and the way it expends energy or ammo isn't necessarily unique
- physical object: visible, damageable mount
- effect emitter: can be unified with thrusters, shields, and probably some other things like damage indication - then the stellar radiation can be implemented as a literally "very long fusion blast".
And big radar dishes... this would require AI understanding where not to go, but maybe can be solved via the same collision avoiding algorithm.
"Two Eyes Good, Eleven Eyes Better." -Michele Carter