Random missiles and fighters, please help!

More
18 years 7 months ago #15113 by gwzero
Let me ask you guys something. when you were having these problems, did you have any nps systems or preset systems on the ship? I ask because as soon as I removed all of nps systems and preset systems the problem fixed itself. I took you're advice GrandpaTrout and I decided to work my way back down to the more simple setups, removing each type of weapon one at a time until I found the problem. And this time I'm 100% sure on that I got it (after 2 hours of testing it better be right!) so thanks for the great tips, thay helped out alot. Oh, and how do you get the avatar into lightwave like that. I only managed to get the collision hull to show up, is there a place that I can dl the .lwo avatars or a converter that converts the .pso files to .lwo?

<hr noshade size="1">Smith - "12 assault cannon turrets, 15 quadpack launchers, 6 antimatter pbc's, and 30+ fighters in 6 bays, all mounted on a megafreighter."

Cal - "Ya think that'll be enough? I mean we're just going to the store."

Smith - "You know you're right, I better add on some more antimatter pbc's."

<hr noshade size="1">Smith - "12 docking turrets, 15 quadpack launchers, 6 antimatter pbc's, and 2 turret fighters, all mounted on a megafreighter."

Cal - "Ya think that'll be enough? I mean we're just going to the store."

Smith - "You know you're right, I'd better mount on some antimatter streams."

Please Log in or Create an account to join the conversation.

More
18 years 7 months ago #15115 by Shane

Please Log in or Create an account to join the conversation.

More
18 years 7 months ago #15127 by MajorTom
I think you gentlemen may be confusing two different things. The following is based on my observations and definatly not an absolute fact. I would however like to share my views.

Theory 1) Random Firing has nothing to do with the weapons orientation. It is a flux anomoly caused by the combination of the function "iShip.LockDownWeapons( hship ship );" (to stop a ship from firing) and the function "iShip.WeaponTargetFromContactList( hship ship );" which is used to reinstate the firing capability.

My Assumption: The two above functions are an integral part of the Flux routines "iShip.InstallPlayerPilot( hship ship );"
for installing a player pilot or iShip.InstallAIPilot(....) to install an AI pilot (you would want to insure that the ship is not firing as the pilot is switched and the fight and flee ratios are set.)


Fact to support assumption 1): (As we know from Stevens comments flux was designed to allow for the multiplayer server functions of the game.)
During coding for MP I discovered, that you can lock down and release the weapons on a player ship in the client instance of of the game. Upon releasing the ships weapons there is no random fireing. If however, you lock down the weapons in the Server instance of the same ship it will fire randomly as soon as the weapons are released with "iShip.WeaponTargetFromContactList".
This indicates a problem with the weapon release syntax. As we know you cannot "unlock" The weapons by setting the bool iShip.LockDownWeapons( hship ship ); to false

Theory 2) Flux problems with weapons not orientated on the Z+

This is presumably due to the way flux creates a bolt (or missile).

Contrary to a real gun, a bolt in Flux is not sitting in a chamber waiting for an explosion to drive it down the barrel.
Flux creates the bolt (or missile) in proximity to the weapon just as it creates any other sim while giving it the speed, mass and manouverability as specified in the bolt's (or missiles's).ini file. There are a number of commands to set the heading of a sim upon creation like SimPointAt, SimPointAway (as well as the possibility to derive and assign specific coordinates which is however much, much slower).
I assume that flux just creates the missile or bolt in proximaty to the gun (referencing fire position translation) but using something equivelent to Sim.PointAway from the ship (following the Z+ axis) to insure that the bolt or missile does not hit its own ship (perhaps due to the fact that the weapons can be mounted differently on different ships). That is presumably why you can fire a turrent in a wide arc but can't have a weapon that will fire backwards. (contrary to I-War1 ). (That may also explain why turrents don't always "work right" visually)

Anyhow these are assumptions and definately open to questioning.

Like GT said you need a clean test. Unfortunatly you can't install a Player pilot without going through the pog routine or fire a weapon without the trigger dll so it will probably remain unclear until we someday get the source.
My objective is just to offer food for thought to keep you guys from possibly chasing a wild goose by looking at the issue from 2 sides instead of fixing the orentation idea in your minds as the "reason"

Cheers ;)


Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
18 years 6 months ago #15128 by Shane

Originally posted by Major Tom
Theory 1) Random Firing has nothing to do with the weapons orientation. It is a flux anomoly caused by the combination of the function "iShip.LockDownWeapons( hship ship );" (to stop a ship from firing) and the function "iShip.WeaponTargetFromContactList( hship ship );" which is used to reinstate the firing capability.


I can add two more examples which back this theory up:

1.) In the free-form SP game, occasionally five cutter corvettes (of either Marauder or Independent faction-type) will exit an L-point in rapid succession and head straight for a distant destination (their destination always seems to be very close to their exit vector from the L-point). Immediately after they exit, they each fire a missile. Since the AI craft are obviously under orders to proceed to a destination, the missiles simply move ahead of them until the AI craft enter LDS.

The weapon orientations on these 'vettes do not differ in any way from the other cutters seen throughout the game (the Oman cutters). The missiles they launch do not act as if the null was rotated.

2.) I have never had a misfire in a player ship. By that I mean, if I've fooled Flux into thinking I'm in the Comsec, Storm Petrel, Player Tug, Fast-Attack Ship, or Heavy Corvette, and only replaced the guts of the ini file and avatar, then I will experience no misfires. No matter how the weapon orientation nulls are rotated.

Originally posted by Major Tom
Contrary to a real gun, a bolt in Flux is not sitting in a chamber waiting for an explosion to drive it down the barrel.
Flux creates the bolt (or missile) in proximity to the weapon just as it creates any other sim while giving it the speed, mass and manouverability as specified in the bolt's (or missiles's).ini file.


Agreed. But I believe these details are relevant to tracking down the problem. (I cannot back that assumption up... it's pure 'gut-feeling' on my part :D).

What I find interesting is that you (working with the MP game) seem to have problems with bolts/cannons firing. While in the SP game (IIRC) all we've dealt with are missile launchers.

(SIDE NOTE: Not sure if this helps at all, but in SP, if you are firing weapons as a capsule jump occurs, when you appear at the destination your ship is auto-firing and will not stop until you depress the trigger again. I can't remember if we've mentioned this before.)

I have never had a misfire from anything other than a missile launcher. In addition, I've never had a misfire of anything other than a dog-fighting missile. These craft I've experienced the misfiring problem with carried multiple magazines, and were loaded with pseudo-REM missiles (which the engine used with deadly accuracy), hunter-seeker mines, proximity mines, fighter-bay magazines, and LDSi missiles. So why dog-fighting missiles? The weapon did not have the highest threat rating in the loadout. And I find it curious that this single system is selected by the engine to activate.

(Note that this differs from Gwzero's experiences: he mentions he's had fighter-bays misfire. Of course, very similar to standard dog-fighting missile setup... only the projectile changes.)

My Assumption: The dog-fighting missiles fire because the AI functions command them to fire. Consider; if you enter an area with hostiles, the first thing they'll fire is missiles (and/or fighter craft if equipped with a fighter-bay).

So, while it's not a 'real gun', and there is no "missile-sitting-in-the-tube", the Flux AI director, which calls for a 'fire condition' is being triggered. Otherwise, I believe we would see misfires occuring at any time (and not just when autopiloting).

My Big Assumption: (Oh boy, here we go...:D):

Since I have never had a misfire which occured while my ship was not actively under the control of the autopilot... and since the misfires do not occur when the engine has been fooled into thinking the player pilot is installed in a player ship, I believe:

Autopilots are identical to the standard path-finding routines the AI pilots use. When an AI ship is given orders to proceed to to a destination, the same routines are called as when the player selects a destination and presses F6. (It is even probable the AI attack orders rely upon the autopilot to move the ordered craft into weapon-range of their target.)

In essence, when the player activates any autopilot, we're asking the engine to treat the player craft as if it were an AI ship.

However, if the player is not in the Comsec, Petrel, Player Tug, Fast-Attack, or Heavy Corvette, the engine becomes confused by the autopilot routines, and the misfire incident occurs.

Therefore (if I'm not talking out my arse), some 'tag' must exist which allows the engine to determine if the player ship is indeed, a real 'player ship'.

I have never found this 'tag' in the ini files. There is no icPlayerShip class. Therefore, I can only assume the base loadout code applies this phantom 'tag' to the craft upon launch from Lucretia's Base.

IIRC, Stephen Robertson once mentioned that only the default player ships can be utilized... that there are only 5 'slots' for player ships in the loadout code. And that loadout is hardcoded. This might back up my 'player-ship tag hidden in loadout code' theory.

In addition, if this tag were applied by the base loadout code, then it is only temporary. It is applied when Entering Space. Which might be a good reason why the player can only save at their base.

But, again, just theory. I cannot see a method of bypassing this without removing all player autopilots from the game.

I'd welcome any holes anyone can knock in my theory. :D

Please Log in or Create an account to join the conversation.

More
18 years 6 months ago #15129 by MajorTom
Shane your theory on the AI functions may well be in the right direction. Some of the AI functions and not neccessarily all of them may have the commands iShip.LockDownWeapons followed by iShip.WeaponTargetFromContactList. If the syntax does have something to do with it I just thought of a way to test that:
a) set up a simple script to run after launch and use a key bind to give the command iShip.LockDownWeapons and a seperate key bind to give the command iShip.WeaponTargetFromContactList

b) Launch a standard player ship.

c)Press the key bind to lock the weapons down and test that they don't fire (niether Guns nor missiles).

d) press the key bind for WeaponTargetFromContactList and then check to see if the weapons fire.

e) Also fly around at different ranges to targets and see if random misfires occur

If you repeat steps c) through e) using a non standard Player ship you may be able to shed some light on your 'tag' theory too.

BTW: In MP we are using 9 different types of ships from T_Utility through T_Destroyer. There is no difference in the misfire behavior I described above regardless of T-type. All MP ships are however "prefitted" (the Instant Action ships) So your 'tag' theory probably doesn't apply to the prefitted ships either?

Can one launch a prefitted ship in the standard SP game too? If so, you could test your tag theory on that by repeating steps c) through e) with a prefitted ship too.


EDIT

SIDE NOTE: Not sure if this helps at all, but in SP, if you are firing weapons as a capsule jump occurs, when you appear at the destination your ship is auto-firing and will not stop until you depress the trigger again. I can't remember if we've mentioned this before.)

This happens in MP too if the player was firing when he dies and then respawns. Thats because the MP game uses the capsule jump code to respawn the player after he dies. Maybe they intentionally didn't lock down the weapons in capsule jump for the same reason we are discussing here? /EDIT

EDIT2: Why only dogfighter missiles? (and not guns or other missiles) Maybe the range of the weapon? Normally AI won't fire guns or in general other weapons until you are within range of the target. The dogfighter missiles you had loaded may have an anomoly in reference to thier range? Or aquire the anomoly after capsule jump or for some other reason? /EDIT2

Iwar2 Multiplayer Fan Site

Please Log in or Create an account to join the conversation.

More
18 years 6 months ago #15131 by Shane

Originally posted by Major Tom
In MP we are using 9 different types of ships from T_Utility through T_Destroyer.

Well that might knock a good dent in my theory... ;)

In the unmodded multiplayer game, can the player select ships other than the prefitted comsec, storm petrel, tug, fast-attack, or heavy corvette?



Please Log in or Create an account to join the conversation.