Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Zarax on March 21, 2002, 07:16:01 am

Title: Interesting problem about flags
Post by: Zarax on March 21, 2002, 07:16:01 am
Hello everybody...
I discovered a strange problem when i changed ship flags in ships.tbl.
I changed Aten and Mentu flags to "fighter", theorically switching their AI to fighter type...
Well, it works  pretty fine, expecially if they uses the shielding MOD...
There is a problem, though:
When they take defensive fire from a turret, the game crashes, while it works pretty fine with every other weapon, even beams...
If anyone knows how to fix this, i will be really grateful...
Thanks,
              Zarax
Title: Re: Interesting problem about flags
Post by: Pera on March 21, 2002, 07:50:47 am
Quote
Originally posted by Zarax
Hello everybody...
I discovered a strange problem when i changed ship flags in ships.tbl.
I changed Aten and Mentu flags to "fighter", theorically switching their AI to fighter type...
Well, it works  pretty fine, expecially if they uses the shielding MOD...
There is a problem, though:
When they take defensive fire from a turret, the game crashes, while it works pretty fine with every other weapon, even beams...
If anyone knows how to fix this, i will be really grateful...
Thanks,
              Zarax


Ah, you mean when they get hit by enemy blob turrets? If you are talking about their own turrets, they only work when the flag is "bomber".
Title: Interesting problem about flags
Post by: Zarax on March 21, 2002, 09:32:38 am
I'm sorry, but the method you suggested me doesn't work...
I'm looking for a way to make aten and mentu cruisers behave like fighters for a mod of mine, and flag changing allows it only when there are no other ships than fighters...
If you know a way to fix it please tell me...
Title: Interesting problem about flags
Post by: Tar-Palantir on March 21, 2002, 01:34:35 pm
After you flying the cruisers? If so, that is your problem. Basically their too many subsystems (this includes the turrets) to fit in the box that appears a little above the centre of your HUD. The result is the game crashed. There is no way around this.

If you're not flying the cruiser, I idea why what the game crashes.
Title: Interesting problem about flags
Post by: Zarax on March 21, 2002, 04:49:36 pm
No, i'm not talking about piloting them...
I'm talking about changing AI parameters...
If you edit "$flag" for aten and mentu in ship.tbl, changing it from "cruiser" to "fighter", you will understand what i mean...
These are changes i'm doing for a MOD i'm making...
Thank you
Title: Interesting problem about flags
Post by: vadar_1 on March 21, 2002, 09:16:01 pm
Fighters do not have turrets, so the game cant interpret the table entry being flagged as a fighter and having turret subsystems. You have to make it a bomber.
Title: Interesting problem about flags
Post by: Zarax on March 22, 2002, 05:47:49 am
Making it a bomber doesn't solve the problem...
Title: Interesting problem about flags
Post by: Fury on March 22, 2002, 11:09:26 am
It's an limitation of FS2 engine most likely, fighters and bombers seems to have a limitation for their size...

This is now confirmed... I'm not aware of any way around the problem... :sigh:
Title: Interesting problem about flags
Post by: Tachnyrus on March 22, 2002, 02:31:26 pm
I made a 50km long fighter and it didn't crash the game. Then again, it didn't fire either.....
Title: Interesting problem about flags
Post by: Zarax on March 23, 2002, 12:53:31 am
Try to make this in your ships.tbl:

____________________________________________________


$Name:                          GVC Aten
$Short name:               VCruise2
$Species:                       Vasudan
+Tech Description:
XSTR(
"The GVC Aten is among the smallest of the GTVA's cruiser classes, now refitted as a fighter support ship, with thin armor and only a few, relatively weak turrets. Terran fighters and bombers exploited these weaknesses during the early years of the Great War, when the Terrans and Vasudans were still enemies. The Aten is most often seen in the current conflict as a rear-guard defense for convoys or installations, backing up wings of fighters and bombers.", -1)
$end_multi_text
$POF file:                      cruiser02.pof
$Detail distance:            (0, 800, 1600, 6000)
$Show damage:               YES
$Density:                       1
$Damp:                          0.2
$Rotdamp:                       1.0
$Max Velocity:               0.0, 0.0, 35.0
$Rotation time:               80.0, 80.0, 70.0
$Rear Velocity:               0.0
$Forward accel:               10.0
$Forward decel:               5.0
$Slide accel:               0.0
$Slide decel:               0.0
$Expl inner rad:            150.0
$Expl outer rad:            650.0
$Expl damage:               200.0
$Expl blast:               10000.0
$Expl Propagates:            YES                                                     ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed:            500.0                                           ;; speed shockwave expands at, 0 means no shockwave
$Shockwave Count:            2
$Default PBanks:            ()
$Default SBanks:            ()
$SBank Capacity:            ()
$Shields:                      3000
$Shield Color:      100 200 100
$Power Output:               90.0
$Max Oclk Speed:            55.0
$Max Weapon Eng:            100.0
$Hitpoints:                     18000
$Flags:                         ( "fighter" "in tech database")
$AI Class:                      Captain
$Afterburner:               NO
$Countermeasures:            0
$Scan time:                     2000
$EngineSnd:                  137                   ;; Engine sound of ship
$Closeup_pos:               0.0, 0.0, -317
$Closeup_zoom:               0.5
$Score:                     90
$Subsystem:                     turret01a,0.833,1.0
   $Default PBanks:            ( "UD-8 Kayser" )
$Subsystem:                     turret02a,0.833,1.0
   $Default PBanks:            ( "UD-8 Kayser" )
$Subsystem:                     turret03,0.833,1.0
   $Default PBanks:            ( "AAAf" )
$Subsystem:                     turret04,0.833,1.0
   $Default PBanks:            ( "AAAf" )
$Subsystem:                     turret05,0.833,1.0
   $Default PBanks:            ( "Terran Turret" )
$Subsystem:                     turret06,0.833,1.0
   $Default PBanks:            ( "Terran Turret" )
$Subsystem:                     engine,                 15,0.0
   $Engine Wash:   Default100
$Subsystem:                     communications,  5,0.0
$Subsystem:                     sensors,                                 5,0.0
$Subsystem:                     navigation,                      5,0.0
$Subsystem:                     weapons,                                 5,0.0


$Name:                          GVC Mentu
$Short name:               VCruise21
$Species:                       Vasudan
+Tech Description:
XSTR(
"The GVC Mentu cruiser is the lightest of the new Vasudan warships, now refitted as a fighter support ship. Following the Great War, allied scientists developed the beam cannons that now serve as the primary armaments of today's GTVA warships. Rather than modify existing ships, the Vasudans developed new designs to mount these weapons. The Mentu's 16 turrets include heavy beam cannons for duking it out with other warships, as well as AAA and flak turrets to fend off smaller craft. The GVC Somtus and the GVC Mycerinus recently demonstrated the strength of the Mentu against NTF forces in Epsilon Pegasi.", -1)
$end_multi_text
$POF file:                      cruiser2V-01.pof
$Detail distance:            (0, 1000, 1600, 11000)
$Show damage:               YES
$Density:                       1
$Damp:                          0.2
$Rotdamp:                       1.0
$Max Velocity:               0.0, 0.0, 45.0
$Rotation time:               75.0, 75.0, 60.0
$Rear Velocity:               0.0
$Forward accel:               8.0
$Forward decel:               4.0
$Slide accel:               0.0
$Slide decel:               0.0
$Expl inner rad:            150.0
$Expl outer rad:            650.0
$Expl damage:               200.0
$Expl blast:               10000.0
$Expl Propagates:            YES                                                     ;; If set to Yes, then when the ship dies, the explosion propagates through it.
$Shockwave Speed:            500.0                                           ;; speed shockwave expands at, 0 means no shockwave
$Shockwave Count:   2
$Default PBanks:            ()
$Default SBanks:            ()
$SBank Capacity:            ()
$Shields:                      3500
$Shield Color:      100 200 100
$Power Output:               100.0
$Max Oclk Speed:            60.0
$Max Weapon Eng:            100.0
$Hitpoints:                     60000
$Flags:                         ( "fighter" "in tech database")
$AI Class:                      Captain
$Afterburner:               NO
$Countermeasures:            0
$Scan time:                     2000
$EngineSnd:                  137                   ;; Engine sound of ship
$Closeup_pos:               0.0, 0.0, -317
$Closeup_zoom:               0.75
$Score:                     100
$Subsystem:                     turret01,0.833,1.0
   $Default PBanks:         ( "Terran Huge Turret" )
$Subsystem:                     turret02,0.833,1.0
   $Default PBanks:         ( "Terran Huge Turret" )
$Subsystem:                     turret03,0.833,1.0
   $Default PBanks:         ( "AAAf" )
$Subsystem:                     turret04,0.833,1.0
   $Default PBanks:         ( "AAAf" )
$Subsystem:                     turret05,0.833,1.0
   $Default PBanks:         ( "AAAf" )
$Subsystem:                     turret06,0.833,1.0
   $Default PBanks:         ( "Standard Flak" )
$Subsystem:                     turret07,0.833,1.0
   $Default PBanks:         ( "Standard Flak" )
$Subsystem:                     turret08,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret09,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret10,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret11,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret12,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret13,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret14,0.833,1.0
   $Default PBanks:         ( "Standard Flak" )
$Subsystem:                     turret15,0.833,1.0
   $Default PBanks:         ( "Terran Turret" )
$Subsystem:                     turret16,0.833,1.0
   $Default PBanks:         ( "UD-8 Kayser" )
$Subsystem:                     engine,    15, 0.0
   $Engine Wash:   Default150
$Subsystem:                     communications,  5,0.0
$Subsystem:                     sensors,                                 5,0.0
$Subsystem:                     navigation,                      5,0.0
$Subsystem:                     weapons,                                 5,0.0


________________________________________________

For full results use Inferno shields MOD package
Title: Interesting problem about flags
Post by: Bobboau on March 23, 2002, 01:12:49 am
well that may just be the inferno sheilds are made crapily
are the sheilds inside the bounding box of the model
Title: Interesting problem about flags
Post by: Zarax on March 23, 2002, 01:17:01 am
I don't think that this is the problem...
If you use it only against fighters and bombers it's all OK, but when it faces a turret (even from a freighter) the game crashes...
Title: Interesting problem about flags
Post by: Bobboau on March 23, 2002, 01:48:38 am
well, BWO has a very very large (73, 23, 95) bomber, and we did extensive testing with a gunship (111, 111, 217 (nearly as large as a leviathan)) that we are probly gona cut, I have had no crashing problems, now there was some crashing problems while testing a new sentry, the problem was that I had made a large sheild mesh, well larger than the sentry's bounding box, two maybe three times the size of it in fact, that one I had quite a time with, eventualy I realised that the large sheild was causeing the crashing, a few days (of tearing my hair out) later I figured out it was becase the sheild was out of the bounding box, if you look at most\all the V meshes have rather tight fitting sheilds, were as many of the newer user made ships are mostly shereical (ether lazy or Segletouch), if this is what you did then most likely the sheilds need to be redone slightly or you need to make the bounding box bigger (what I had to do was make a cube with the invisable texture that was bigger than the sheild and add the no colide invisable flag)
Title: Interesting problem about flags
Post by: Zarax on March 23, 2002, 07:15:32 am
Well...
It seems that the problem hasn't been understood...
I'll make a small package to show what i mean...
Just a couple of fightings, nothing near to a mission...
By the way, how can explain the fact that the same weapon used by a fighter works, but when fired by a turret crashes the game?
Title: Interesting problem about flags
Post by: Zarax on March 25, 2002, 11:00:01 am
So, no one is able to help me?
Title: Interesting problem about flags
Post by: EdrickV on April 09, 2002, 11:17:23 pm
I think the problem with your mod isn't that it's crashing when the ship gets hit, but when it's trying to fire back. Made a test thing and it tooks some missile and beam hits from another ship and it didn't crash. Told the Aten to attack that ship and then it crashed with the following in the error log:

Read from location ffffffff caused an access violation.

Think you'd need a custom Aten model with normal fighter systems. Also, the turrets are a bit screwed up since fighters aren't allowed the same kinds of weapons as the bigger ships. Still don't see why you even want to make an Aten a fighter, it seems like wouldn't be a very good one.
Title: Interesting problem about flags
Post by: Zarax on April 10, 2002, 01:10:54 am
It would be not a fighter, but a fire support ship ot gunship.
If you make it a fighter it easiliy defeats several wings with miniman support.
Title: Interesting problem about flags
Post by: EdrickV on April 10, 2002, 03:16:45 am
As far as FS2 is concerned, if it has the "Fighter" flag, it's a fighter. If you want something else, don't use the fighter flag. You can make any ship behave however you want using SEXPS.
Title: Interesting problem about flags
Post by: Pera on April 10, 2002, 08:52:45 am
Quote
Originally posted by Zarax
It would be not a fighter, but a fire support ship ot gunship.
If you make it a fighter it easiliy defeats several wings with miniman support.


Not sure about the problem yet, but you really can't do that. A ship that has "fighter"-flag simply _can not_ have working turret weapons, period. So you just have to make it a bomber.

Never heard about that crashing though, I once tried to make a babylon 5 Whitestar(over 300 meters) a fighter/bomber, and it worked perfectly without crashing.
Title: Interesting problem about flags
Post by: Nico on April 10, 2002, 09:11:51 am
ok, to make things clear: there's NO limit of size for anything, coz it's just a few coordinates in a 3D engine, it makes no difference for the engine if it's big or small. pb can occur because of the crappy Zbuffering of the FS2 engine tho.
an exemple? replace the pof entry of your favourite missile, and put the sathanas pof instead :p
Title: Interesting problem about flags
Post by: Zarax on April 10, 2002, 11:28:13 am
Putting the "bomber" flag instead of fighter doesn't solve the problem.
If you wanna see it mail me and i'll send all files i have.
I remark what i already said:
THE PROBLEM IS WHEN THEY ARE SHOOTED AND HIT BY A ENEMY TURRET, AGAINST FIGHTERS THEY WORKS FINE.
Title: Interesting problem about flags
Post by: Pera on April 10, 2002, 02:25:23 pm
Quote
Originally posted by Zarax
Putting the "bomber" flag instead of fighter doesn't solve the problem.
If you wanna see it mail me and i'll send all files i have.
I remark what i already said:
THE PROBLEM IS WHEN THEY ARE SHOOTED AND HIT BY A ENEMY TURRET, AGAINST FIGHTERS THEY WORKS FINE.


Heh, I said that I don't know the answer to your problem. I just said, that if you were planning to actually have those ships fire their own turrets, then they should have the "bomber"-flag.
Title: Interesting problem about flags
Post by: EdrickV on April 10, 2002, 04:48:16 pm
The problem is not that the game is crashing when a turret hits the Aten/Mentu. The problem is the game crashes when the Aten/Mentu tries to fire it's regular primary/secondary weapons (the kind fighters, bombers, etc. use) and discovers it does not have any. The normal Aten/Mentu models do not have gun points and missile points. Only turrets. If you want to use it with a fighter/bomber flag you have to edit the model and give it at least one gun point and one missile point. Then edit the table file, adding in regular primary & secondary weapon data from another fighter. The ship seems to use it's turrets with both the fighter and bomber flags, but as it's not a cap ship what turrets it can equip is limited. (Unless you edit your weapons table.)