Random missiles and fighters, please help!

More
18 years 3 months ago #15083 by gwzero
I did some trouble-shooting and managed to track down the problem to the IFleetmod. I noiticed that only after I have jumped to another ship and back will the missiles fire on their own. Everything work fine when I disabled the mod, so could someone take a look at IFleetmod to see if there is anyway to fix this?


<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 3 months ago #15084 by Shane
Sorry... I've been so very busy lately. Didn't get a chance to look over the mod this weekend.

I noiticed that only after I have jumped to another ship and back will the missiles fire on their own.

Hmmmm... that theory conforms to what I'd discovered. I spent weeks working on this problem while building the reblance for Epic, but never utilized iFleet at all (nor to my knowledge, even had it installed. But it might be possible the Epic build I was working with at the time incorporated some iFleet code. I was Entering Space in an AI ship every single time the bug occured.

My last theory held that it had something to do with placing the player in an AI ship; possibly a conflict between the AI pilot and the player. It also would occasionally occur when I was remote linking with some AI ships (particularly with the carrier.

@GrandpaTrout: By any chance, do you remember if the Epic build of that time had portions of iFleet code? It would have been just as the cluster was being set up.

EDIT: Oh, and this thread might assist: i-war2.com/forum/topic.asp?TOPIC_ID=1582
I can't seem to locate my original one which described the problem. Too many threads. :D


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

More
18 years 3 months ago #15085 by GrandpaTrout
The code is the same, because there is no other pog function to do it. iShip.InstallPlayerPilot(hship ship). That is it. All of it. If it is broken, it is broken inside the PS side somewhere.

I would guess Shane is right. There is a conflict between the player pilot and the AI subsystems. Those systems are meant to operate on thier own. While the player systems are meant to be fired by the player IO.

Unless this also happens with player weapons. In which case, who knows? The Source I suppose.

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

More
18 years 3 months ago #15086 by Shane
Thanks. That's kinda what I thought. [:(]

Man, this black-box stuff... Modular Program Design be damned! I want to know what's going on in there!! :D:p

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

More
18 years 3 months ago #15087 by gwzero
Whew! It took me 3+ hours to do it but I found a way past the IFleet glitch. I think it might have been the fact that I had serveral nps systems on the ship and no Y+ and Z+ orientations, so IFleet might not have been able to tell the difference between my ship and the nps ships. I'm not much of a programmer, so I don't know for sure.

Anyway, I had to put in about 36 Z+OrientationArrows and 36 Y+OrientationArrows to be able to bypass it, but It Was worth it! This thing is a heck of a beast. I altered it's flight characteristics for testing so that it moves like a Heavy Corvette, but it's designed for camping near L-points or station assaults. So give it a try and tell me what you think.

newarzone.low-ping.com/user/30391/files/MegaFreightmod3.zip

I still need some help with figuring out the shield placements and preset loadouts (cause its takes just about half an hour to set up 12 mountpoint with internal magazines and 3 without).

Thanks for the help guys.

<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 3 months ago #15088 by gwzero
oops, it seems I spoke to soon. I did fix the unprovoked randomness but not the IFleet related randomness. However, I did manage to isolate the code that controls the jumping into another ship, and here it is.

*********************************************************************************

JumpToShip()
{
hship player_ship = iShip.FindPlayerShip();
hship ship = iShip.Cast( Global.Handle( "g_ifgui_ship_handle" ) );
hship original_ship;
hsubsim cpu = Subsim.Create( "ini:/subsims/systems/player/cpu1" );
hsubsim heatsink = Subsim.Create( "ini:/subsims/systems/player/heatsink3" );

if ( Global.Exists( "g_ifgui_original_player_ship" ) == false )
Global.CreateHandle( "g_ifgui_original_player_ship", GA_Read | GA_NoSave, player_ship );

original_ship = iShip.Cast( Global.Handle( "g_ifgui_original_player_ship" ) );

if ( player_ship == original_ship )
{
iShip.RemovePilot( ship );

iShip.InstallPlayerPilot( ship );
Object.SetStringProperty ( ship, "death_script", "iFleetGUI.NpsShipDeathScript" );

if ( Sim.FindSubsimByName( ship, "CPU Grade 1" ) == false )
Sim.AddSubsim( ship, cpu );

if ( Sim.FindSubsimByName( ship, "Gamma Heat-Sink" ) == false )
Sim.AddSubsim( ship, heatsink );

}
else
{
if ( ship == original_ship )
{
iShip.InstallPlayerPilot( ship );
iPilotSetup.MilitaryAggressive( player_ship );

Object.SetStringProperty ( player_ship, "death_script", "" );
}
else
{
iShip.RemovePilot( ship );

iShip.InstallPlayerPilot( ship );
iPilotSetup.MilitaryAggressive( player_ship );

Object.SetStringProperty ( ship, "death_script", "iFleetGUI.NpsShipDeathScript" );
Object.SetStringProperty ( player_ship, "death_script", "" );

if ( Sim.FindSubsimByName( ship, "CPU Grade 1" ) == false )
Sim.AddSubsim( ship, cpu );

if ( Sim.FindSubsimByName( ship, "Gamma Heat-Sink" ) == false )
Sim.AddSubsim( ship, heatsink );
}
}
}

task NpsShipDeathScript( hsim sim )
{
hship original_ship = iShip.Cast( Global.Handle( "g_ifgui_original_player_ship" ) );

iShip.InstallPlayerPilot( original_ship );

iSim.Kill ( iSim.Cast( sim ) );
}

***********************************************************************************

Let me know if you need some help debugging this. I might not know C++ that well but I do have a friend that does.

<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.