Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: Scooby_Doo on March 01, 2008, 12:39:01 am

Title: Ship type flags and warning questions...
Post by: Scooby_Doo on March 01, 2008, 12:39:01 am
What exactly is the difference between "cruiser", "destroyer",  "transport",  "super cap",  and "corvette" $flag types?

What does this mean "WARNING:  Animation trigger #0 on subsystem 'turret01a', for ship 'Ajax', has a negative reverse_start value!  Capping it at 0!"?  Anything to worry about?
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 01, 2008, 01:51:43 am
What exactly is the difference between "cruiser", "destroyer",  "transport",  "super cap",  and "corvette" $flag types?

What does this mean "WARNING:  Animation trigger #0 on subsystem 'turret01a', for ship 'Ajax', has a negative reverse_start value!  Capping it at 0!"?  Anything to worry about?

There are certain differences to the ship types. Some of these can be checked from the objecttypes.tbl while many other options are hardcoded.
Small piece of the (possibly a bit outdated) objecttypes.tbl http://www.hard-light.net/wiki/index.php/Objecttypes.tbl#Part_of_the_Default_FreeSpace_2_Table


As for second thing... Its just an warning message that is generated for not setting certain values in the animation code. Downside is that with initial type triggered animations you do not even have a possibility to make this error go away as you can't even set the required variable. So unless coders fix that ignore it as there is nothing a modder can do about it.
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 01, 2008, 02:59:20 am
Next question before I make a ton of changes that I'll come to regret......

In turrets subsystem:

Code: [Select]

$Subsystem:                     turret08,1.5625,1.0
$Armor Type: Everything
        $Default PBanks:        ( "Turret Tachyon Cannon" "Turret Tachyon Cannon")
$Flags: ("carry-no-damage")
$animation: triggered
$type: initial
+relative_angle: 90,180,0

This means the turret can have a choice of either a Turret Tachyon Cannon or a Turret Tachyon Cannon or is this for EACH turret fire point?
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 01, 2008, 03:10:16 am
That should make it to alternate between said weapons. As they are identical you wouldn't see a thing. With "use multiple guns" you would get the ship to fire them both at the same time (not alternating but rather 'co-firing'. As with standard ai_profiles setting turrets get random firing delays it wont appear as salvo fire. In additions weapon will alternate between firing points as well. For salvo type things best bet would probably be to make it a 'swarm' weapon.
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 02, 2008, 08:12:01 pm
Next question, about the descriptions (+Armor, +Tech Description).  What choices are available? I tried +Shields: and it complained. Wiki was kinda vague there.
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 03, 2008, 12:33:20 am
Code: [Select]
+Type:
+Maneuverability:
+Armor:
+Manufacturer:
+Description:
+Tech Description:
+Length:
+Gun Mounts:
+Missile Banks:
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 03, 2008, 02:06:37 am
Thats all? oh ok then....
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 04, 2008, 04:12:04 am
Another even more problematic error:

Code: [Select]
Assert: file_path && strlen(file_path)
File: cfile.cpp
Line: 998


Call stack:
------------------------------------------------------------------
    fs2_open_3_6_10_d.exe 008b2c5b()
    fs2_open_3_6_10_d.exe 008b86e8()
    fs2_open_3_6_10_d.exe 00a02558()
    fs2_open_3_6_10_d.exe 00a02610()
    fs2_open_3_6_10_d.exe 0095db11()
    fs2_open_3_6_10_d.exe 0095989b()
    fs2_open_3_6_10_d.exe 009597eb()
    fs2_open_3_6_10_d.exe 00957c3f()
    fs2_open_3_6_10_d.exe 00958775()
    fs2_open_3_6_10_d.exe 00a097f1()
    fs2_open_3_6_10_d.exe 007146fa()
    fs2_open_3_6_10_d.exe 008defd1()
    fs2_open_3_6_10_d.exe 007158b7()
    fs2_open_3_6_10_d.exe 00715b3e()
    fs2_open_3_6_10_d.exe 00bd9027()
------------------------------------------------------------------

The F3 only shows one lod for it (even though theres 3) and if I click on it, this results in debug mode. In normal mode nothing happens.
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 04, 2008, 05:03:36 am
Hmm.. i can't remember hitting that error.. Well at least for some time.

Just a wild guess... Check if there is something odd with the files associated (textures etc.) with the model. Check both the filenames and paths.
Title: Re: Ship type flags and warning questions...
Post by: Titan on March 04, 2008, 11:43:33 am
ship type flag affects the default briefing icon it uses, and it also affects a little about things like

cargo can't have guns

a player gan only fly fighters and bombers.
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 04, 2008, 04:51:48 pm
I don't think it's a texturing issue, I reassigned the textures back to the cob file and it still complains.  It might be a PCS2 issue.
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 04, 2008, 11:26:17 pm
Ok I'm stumped.... this model converted correctly with pcs1....

I gutted all but two pieces of the geometry and fs2 still goes belly up
http://scoobydoo.freespacemods.net/Problems/Corrupt-Essex.rar
Title: Re: Ship type flags and warning questions...
Post by: blowfish on March 04, 2008, 11:45:13 pm
a player gan only fly fighters and bombers.

Except in a scramble mission (it works - i've tried it).
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 05, 2008, 01:48:29 am
Reading from the debug log (fs2_open.log) it appears the model is for some reason called as ' ' instead of 'pirate2t-01.pof' like with Volition pirate ship. This in turn is caused by the fact that you never terminated the string parsing after the 'Tech Description' using '$end_multi_text' line. So game doesn't find the ship model or any of the other data at all. All this was reported in the debug log but now as the popups have been disabled in some of the builds you need to search for these from the fs2_open.log file. Also add the missing '$'.

Also you might want to use save_essex.pof instead of essex.pof (which appears to be a bogus model for all purposes)

And do please check the names and the order of the string entries you are using.
Title: Re: Ship type flags and warning questions...
Post by: ssmit132 on March 05, 2008, 01:57:37 am
a player gan only fly fighters and bombers.

Except in a scramble mission (it works - i've tried it).

It also works if you edit the mission in Notepad to add other ships in the loadout. I've tried it and it works, too! (As in you can choose cap ships and other things that you would normally not be able to fly if you edit the loadout of the mission in Notepad.)
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 05, 2008, 03:50:52 am
It was a table thing? Oh geez....I would have been here forever trying to figure that one out.  Also why is $end_multi_text necessary? A fallback from the original engine?
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 05, 2008, 03:57:24 am
Well... its just used with those strings that might require multiple lines of strings... Like 'Description' and 'Tech Description'
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 05, 2008, 04:00:58 am
Huh? You mean /r/n within the string?

Edit: caught the missing $, I'm cleaning/detabbing my tables, probably deleted one too many chars.
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 13, 2008, 12:26:02 am
Another question....

Code: [Select]
Assert: count < max_ints
File: parselo.cpp
Line: 2446


Call stack:
------------------------------------------------------------------
    fs2_open_3_6_10_d.exe 0082c8ff()
    fs2_open_3_6_10_d.exe 0082fa71()
    fs2_open_3_6_10_d.exe 00915d79()
    fs2_open_3_6_10_d.exe 0082ff68()
    fs2_open_3_6_10_d.exe 00708df4()
    fs2_open_3_6_10_d.exe 007157d9()
    fs2_open_3_6_10_d.exe 00715b3e()
    fs2_open_3_6_10_d.exe 00bd9027()
    kernel32.dll 767d3833()
    ntdll.dll 775fa9bd()
------------------------------------------------------------------

The last lines in the log file are:
Code: [Select]
cf_get_file_list_preallocated looking for type=6, filter="*-shp.tbm"
TBM  =>  Starting parse of 'wcpirahna-shp.tbm' ...
TBM  =>  Starting parse of 'Vorshaki-shp.tbm' ...
Int3(): From d:\steven\projects\fsscp\3.6.9\fs2_open\code\globalincs\windebug.cpp at line 1054

Doesn't point to a line number  :confused:
and the table:
Code: [Select]
#Ship Classes

;------------------------------------------------------------------------------
; Torpedo Frigate Vorskahi
;-----------------------------------------------------------------------------------------------------------------------------------
; Read me:
;      Adjust Detail distance if you think the range should be changed
;      Change $Max Velocity for ship speed
;      Change $Rotation time for ship rotation time, cap ships should really use paths instead
;      Change $Shields if you wish to change their shield strength
;      Change $Hitpoints to change the amount of health/hull
;      Remove $Armor Type if you don't wish to use secondary phased shielding
;      Change turret's $Default PBanks to use whatever weapons you want
;      Remove turret's $Armor Type if you don't wish to use secondary phased shielding
;      Remove turret's $Flags: ("carry-no-damage") if you wish turret damaged to be also removed from ship health

$Name:                   Vorshaki
$Short name:             TVor
$Species:                Shivan
     +Type:              XSTR ("Torpedo Frigate", -1)
     +Maneuverability:   XSTR ("Low", -1)
     +Armor:             XSTR ("Capital Medium-Low", -1)
     +Manufacturer:      XSTR (" ", -1)
     +Description:       XSTR ("The Vorshaki is recent Kilrathi frigate. It's primary purpose is to launch torpedos against hostile targets.", -1)
     $end_multi_text
     +Tech Description:  XSTR ("The Vorshaki is recent Kilrathi frigate. It's primary purpose is to launch torpedos against hostile targets.", -1)
     $end_multi_text
     +Length:            XSTR ("~500 meters", -1)
     +Gun Mounts:        XSTR ("19 turrets", -1)
     +Missile Banks:     XSTR ("3 torpedo banks", -1)

$POF file:               vorshaki.pof
$Detail distance:        (0, 500, 1200, 5500)

$Show damage:            YES
$Density:                1
$Damp:                   0.2
$Rotdamp:                2.0

$Max Velocity:           0.0, 0.0, 40.0
$Rotation time:          40, 40, 40
$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:         750.0
$Expl damage:            200.0
$Expl blast:             11000.0
$Expl Propagates:        YES
$Shockwave Speed:        400.0
$Shockwave Count:        3

$Default PBanks:         ()
$Default SBanks:         ()
$SBank Capacity:         ()

$Shields:                10000
$Power Output:           80.0

$Max Oclk Speed:         65.0
$Max Weapon Eng:         100.0

$Hitpoints:              60000
$Armor Type:             CapHull

$Flags:                  ( "big damage"  "cruiser" "in tech database" "surface shields")
$AI Class:               Captain

$Afterburner:            NO

$Countermeasures:        0

$Scan time:              2000

$EngineSnd:              128
$Closeup_pos:            0.0, 0.0, -1000
$Closeup_zoom:           0.3

$Score:                  800

$Subsystem:              turret01, 15, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Light antimatter" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              turret02, 15, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Light antimatter" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 180, 0

$Subsystem:              turret03, 15, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Light antimatter" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              turret04, 15, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Light antimatter" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 180, 0

$Subsystem:              turret05, 5, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Tachyon Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              turret06, 5, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Tachyon Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              turret07, 5, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Tachyon Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              turret08, 5, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Tachyon Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              turret09, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:             turret10, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:             turret11, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 180, 0

$Subsystem:             turret12, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 180, 0

$Subsystem:             turret13, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 180, 0

$Subsystem:             turret14, 10, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Lancer" "Snipe" "Spike" "Pike" "Cruise Missile")
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:             turret15, 10, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Lancer" "Snipe" "Spike" "Pike" "Cruise Missile")
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 180, 0

$Subsystem:             turret16, 10, 1.0
     $Armor Type:        Everything
     $Default SBanks:    ( "Lancer" "Snipe" "Spike" "Pike" "Cruise Missile")
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    0, 0, 0

$Subsystem:             turret17, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:             turret18, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:             turret19, 3, 1.0
     $Armor Type:        Everything
     $Default PBanks:    ( "Turret Laser Cannon" )
     $Flags:             ("carry-no-damage")
     $animation:         triggered
     $type:              initial
     +relative_angle:    90, 0, 0

$Subsystem:              engine01, 5, 0.0
     $Armor Type:        Cap
     $Engine Wash:       Default300

$Subsystem:              engine02, 5, 0.0
     $Armor Type:        Cap
     $Engine Wash:       Default300

$Subsystem:              Bridge, 5, 0.0
     $Armor Type:        Cap

#End
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 13, 2008, 12:57:31 am
Turrets allow only 3 (MAX_SHIP_PRIMARY_BANKS) weapons into their primary weapons list. And you have apparently listed 4 for the missile turrets. Besides you most likely ain't gonna like what turret does with that kind of weapons loadout.
Title: Re: Ship type flags and warning questions...
Post by: Scooby_Doo on March 13, 2008, 05:06:59 am
Opps, your right, I missed those.

Can you reassign what the turret fires in Fred?
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 13, 2008, 07:14:33 am
Yes. But if you have multiple entries in for the turret the game will shoot with all of them.
Title: Re: Ship type flags and warning questions...
Post by: Getter Robo G on March 13, 2008, 07:29:59 am
At the same time? That is something I might want as an effect...

Forcing all those barrels to shoot like volley fire.
Title: Re: Ship type flags and warning questions...
Post by: Wanderer on March 13, 2008, 09:43:32 am
Err... Sorta... There are several problems though I haven't seen the guns targeting separate targets but i wouldn't count on that.

First... There is a flag to make all the guns shoot in sort of salvoes using separate firingpoints... They fire independently in salvos so it will not appear like the turret would fire for example three shot simulatanously.

Second... Guns are not in any way locked to a specific firing points so firepoint from which the gun shoots will alternate making it look very odd.

So best bet for salvo fire is still the good old classic '$swarm:' with ridiculously short 'swarmwait' times. And unless you are aiming for DEM or JAD level of realism do not stick different weapons into a single turret.