Author Topic: shiptypes.tbl  (Read 7404 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Newest build:   http://fs2source.warpcore.org/exes/latest/shiptypes3.zip

I have the basic framework & changes done for this, so it should really be an at-will dealie to add more fields.

Edit: Oh I added new animation type "afterburner", didn't test it tho.

http://fs2source.warpcore.org/exes/latest/shiptypes.zip

For now shiptypes.tbl is required (included in zip). I need to make sure that this is compatible with stuff, especially SEXPs like kills by ship type. Behavior should be exactly the same as retail FS2 with this table.

Here's an entry near and dear to my heart:
Quote
$Name:         Fighter
$EMP Multiplier:   4.0
$Fog:
   +Start dist:   10.0
   +Compl dist:   500.0
$AI:
   +Valid goals:   ("fly to ship" "attack ship" "waypoints" "waypoints once" "depart" "attack subsys" "attack wing" "guard ship" "disable ship" "disarm ship" "attack any" "ignore ship" "guard wing" "evade ship" "stay still" "play dead" "stay near ship" "keep safe dist" "attack besides")

EMP multiplier makes EMP take longer to go away (from weapons). Start dist should be when fogging starts. Compl dist should be when ship is totally obscured. Valid goals are goals that the ship will accept. It would be interesting to know if capships support "Attack subsys" type orders if this is added to their valid goals list.

The full list of goal names (in code form, tough, not typing these out by hand yet another time):
Code: [Select]
ai_goal_list Ai_goal_names[] = {
{"Attack ship", AI_GOAL_CHASE},
{"Dock", AI_GOAL_DOCK},
{"Waypoints", AI_GOAL_WAYPOINTS},
{"Waypoints once", AI_GOAL_WAYPOINTS_ONCE},
{"Depart", AI_GOAL_WARP},
{"Attack subsys", AI_GOAL_DESTROY_SUBSYSTEM},
{"Form on wing", AI_GOAL_FORM_ON_WING},
{"Undock", AI_GOAL_UNDOCK},
{"Attack wing", AI_GOAL_CHASE_WING},
{"Guard ship", AI_GOAL_GUARD},
{"Disable ship", AI_GOAL_DISABLE_SHIP},
{"Disarm ship", AI_GOAL_DISARM_SHIP},
{"Attack any", AI_GOAL_CHASE_ANY},
{"Ignore ship", AI_GOAL_IGNORE},
{"Guard wing", AI_GOAL_GUARD_WING},
{"Evade ship", AI_GOAL_EVADE_SHIP},
{"Stay near ship", AI_GOAL_STAY_NEAR_SHIP},
{"keep safe dist", AI_GOAL_KEEP_SAFE_DISTANCE},
{"Rearm ship", AI_GOAL_REARM_REPAIR},
{"Stay still", AI_GOAL_STAY_STILL},
{"Play dead", AI_GOAL_PLAY_DEAD},
{"Attack weapon", AI_GOAL_CHASE_WEAPON},
{"Attack besides", AI_GOAL_CHASE_ANY_EXCEPT},
{"Fly to ship", AI_GOAL_FLY_TO_SHIP},
};
« Last Edit: December 20, 2005, 05:34:41 am by WMCoolmon »
-C

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Cool!  :yes:

Would this table perhaps in some foreseeable future enable new ship types, bring the ability to define which ships are big (valid targets for huge weapons) and which are not, and the ability to define AI behaviour for these to enable true 'gunboats' and stuff like that?
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
I agree.  We'd need an ability to define which AI format to use as well.  For example, if I make the described Gunship AI, I want it to use the same attack method of a fighter or bomber, but there's no way to define that... yet.  Also, I'd like to request that an entry determine whether or not a ship can carry cargo, and also a list of which player orders may be accepted by a class.
The Trivial Psychic Strikes Again!

 

Offline Flaser

  • 210
  • man/fish warsie
AFAIK Ai.tbl and Diffucult.tbl were already merged since they were pretty much connected and inseperable.
What's your take on shiptypes.tbl in this regard?
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Wanderer: Maybe, it depends on if there are differences between the ship types in the code. You can define as many new types as you like now. see feature description in the Wiki for my 'mission statement' on this.

TP: tehe. err, the AI probably has these toggles built in as depending on ship types, so again, yeah, that is a definite possibility.

Flaser: I think that shiptypes.tbl will not be moved, because it makes more sense to keep ship-type specific stuff in one spot. However as you can see I've tried to divide up some sections, so if at some point someone wants to add support for different AI behavior for a given ship type, they can by just changing the "$AI:" field.
-C

 

Offline Cobra

  • 212
  • Snake on a Cain
    • Skype
    • Steam
    • Twitter
awesome! will this specify what weapons attack which type of ship? because during my free time, i was trying to update Omni's star trek tables, but i kept getting conflicts between the phaser duplicates (one for fighters and one for capships).
To consider the Earth as the only populated world in infinite space is as absurd as to assert that in an entire field of millet, only one grain will grow. - Metrodorus of Chios
I wept. Mysterious forces beyond my ken had reached into my beautiful mission and energized its pilots with inhuman bomb-firing abilities. I could only imagine the GTVA warriors giving a mighty KIAAIIIIIII shout as they worked their triggers, their biceps bulging with sinew after years of Ivan Drago-esque steroid therapy and weight training. - General Battuta

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Assuming there is a difference between types, I will try to get to it. Has anyone tried the table yet though? At this point I am assuming everything's working fine.
-C

 

Offline Taristin

  • Snipes
  • 213
  • BlueScalie
    • Skelkwank Shipyards
Meh. Every month a new table. This is getting more and more complicated and confusing for those of us who have stopped keeping track of all the new features (me).
Freelance Modeler | Amateur Artist

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
il test that animation eventually. with the christmas rush (Bah Humbug!!!), work, and the new g/f, it seems i have very little time/energy to test features and work on the mod.
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Sorry, I wanted to put it in ships.tbl, but that would've got unwieldy.

Also, FRED can die in a ****ing fire.  :blah: Guess what I get to fix now.
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
FRED is pretty much fixed, there are three spots relating to briefing icons, freighters, and cargo that have me puzzled, which may force me to do some kind of icon.tbl.

I've updated the build and am taking a break from this for now.

There is a missing field in the included table, not too big a deal
Quote
$Name:         Fighter
$Counts for Alone:   YES
$On Hotkey List:   YES
$Target as Threat:   YES
$Show Attack Direction:   YES
$Scannable:      NO
$Warp Pushable:      YES
$Max Debris Speed:   200
$FF Multiplier:      1.0
$EMP Multiplier:   4.0
$Beams Easily Hit:   NO
$Fog:
   +Start dist:   10.0
   +Compl dist:   500.0
$AI:
   +Valid goals:      ("fly to ship" "attack ship" "waypoints" "waypoints once" "depart" "attack subsys" "attack wing" "guard ship" "disable ship" "disarm ship" "attack any" "ignore ship" "guard wing" "evade ship" "stay still" "play dead" "stay near ship" "keep safe dist" "attack besides")
   +Accept Player Orders:   YES
   +Player Orders:      ("attack ship" "disable ship" "disarm ship" "guard ship" "ignore ship" "form on wing" "cover me" "attack any" "depart" "disable subsys")
   +Auto attacks:      YES
   +Guards attack this:   YES
   +Turrets attack this:   YES
   +Can Form Wing:      YES

Counts for alone - Toggles whether the "No reinforcements are available" message will play even if this ship is present
Praise destruction - I forgot to put this in the default table, but it is in the code. (TODO: Add this) What it does is it toggles whether your wingmen will ever compliment you for killing this ship ("Beautiful kill, sir!")
On Hotkey list - ie the thingy that comes up if you press F3.
Target as threat - Not sure what this does :p It has something to do with you targetting stuff.
Show attack direction - Toggles whether little red arrows are shown on the HUD to point to this ship when it attacks you.
Scannable - Guess.
Warp pushes - Ship will push warp-pushable ships when it moves really fast (ie jumps in or out of subspace)
Warp pushable - Ship can be pushed by ships with "warp pushes" turned on
Max debris speed - Seems to only take effect in debug builds. Guess again. :p
FF multiplier - Multiplies damage received from friendly fire by this amount.
Beams easily hit - You'll notice that anti-fighter beams can remain constant if they're shooting at bigger ships (ie instead of 3 small shots). A "Yes" here turns on the long beam when a beam is fired at this ship type.

Accept player orders: Will the ship type accept orders from the player
Player orders: Yay, the first really useful field. Seems to toggle what orders the player can give to a ship type from the comm menu
Auto attacks: Toggles whether ship can go after nearby enemy ships
Guards attack this: Toggles whether ships that are guarding another ship will ever attack this ship type
Turrets attack this: Toggles whether turrets will attack this ship type
Can form wing: Mostly for FRED at this point, toggles whether ship can be in a wing.


Here's the list of player orders (stuff on the left, in quotation marks).
Code: [Select]
comm_order Comm_orders[] = {
{ "Attack ship", ATTACK_TARGET_ITEM },
{ "Disable ship", DISABLE_TARGET_ITEM },
{ "Disarm ship", DISARM_TARGET_ITEM },
{ "Attack subsys", DISABLE_SUBSYSTEM_ITEM },
{ "Guard ship", PROTECT_TARGET_ITEM },
{ "Ignore ship", IGNORE_TARGET_ITEM },
{ "Form on wing", FORMATION_ITEM },
{ "Guard me", COVER_ME_ITEM },
{ "Attack any", ENGAGE_ENEMY_ITEM },
{ "Dock", CAPTURE_TARGET_ITEM },
{ "Rearm me", REARM_REPAIR_ME_ITEM },
{ "Abort rearm", ABORT_REARM_REPAIR_ITEM },
{ "Depart", DEPART_ITEM },
//WMC - These don't appear for some reason
//support-ship-only
{ "stay near me", STAY_NEAR_ME_ITEM},
{ "stay near ship", STAY_NEAR_TARGET_ITEM},
{ "keep safe dist", KEEP_SAFE_DIST_ITEM},
//All ships
{ "Disable subsys", DISABLE_SUBSYSTEM_ITEM},
};

EDIT: I should also note that both builds are/were fully XMT-compliant. Use "*-stp.tbm" (seemed better than "*-sht.tbm" :p)
« Last Edit: December 19, 2005, 07:08:35 pm by WMCoolmon »
-C

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Okay, TBP, eat your heart out.

http://fs2source.warpcore.org/exes/latest/shiptypes3.zip

This build fixes a few little errors (OpenGL being totally whacked, comm system screwed up, "H" and "F" keys broken) in the other build.

  • attempts broadside - specifies whether ship tries to broadside when attacking. However in testing I had an odd problem...ships always chase each other. I tried the build from the 18th, and ships would broadside, but for some reason they aren't in this build - even though I can confirm that the option is working in the code via debugger, and turning it on and off has different effects. This even happens when I remove the toggle and put the original one back in, so I'm guessing this is either broken in CVS (and not just my codebase) or one of the subsidiary functions used by the broadside function has been changed by my changes somewhere down the line.
  • active docks - Specifies which docks a ship will try to dock with. When a docking occurs, a ship's active docks are matched up against the passive docks of the ship it's trying to dock with. There are three types - "cargo" "support" and "generic" (which is used by default or if the other docks don't exist on the model). See cargo containers, freighters, support ships, and fighters for how these should be used.
  • passive docks - Specifies what dock types a ship will accept (as well as generic).

BIG FAT WARNING ALERT[/i][/u] - I made a slight change to the code. Basically when a capship is supposed to be attacking a small ship, its mode of behavior changes..somehow. Since I'm trying to get rid of these hardcoded defines, it'd be very nice if someone competent with FRED could test this eventually and tell me if this needs a workaround, if the broadside problem is ever fixed.
« Last Edit: December 20, 2005, 05:33:30 am by WMCoolmon »
-C

 

Offline Col. Fishguts

  • voodoo doll
  • 211
attempts broadside - specifies whether ship tries to broadside when attacking. However in testing I had an odd problem...ships always chase each other. I tried the build from the 18th, and ships would broadside, but for some reason they aren't in this build - even though I can confirm that the option is working in the code via debugger, and turning it on and off has different effects. This even happens when I remove the toggle and put the original one back in, so I'm guessing this is either broken in CVS (and not just my codebase) or one of the subsidiary functions used by the broadside function has been changed by my changes somewhere down the line.


Triv, are you reading this ?
"I don't think that people accept the fact that life doesn't make sense. I think it makes people terribly uncomfortable. It seems like religion and myth were invented against that, trying to make sense out of it." - D. Lynch

Visit The Babylon Project, now also with HTL flavour  ¦ GTB Rhea

 

Offline Trivial Psychic

  • 212
  • Snoop Junkie
An interesting feature, but there aren't THAT many TBP ships that attack with broadsides.  For ships like the Omega, sure its got alot of broadside weapons, but they're intended for fighter-defence rather tha cap-ship slug-fests.  Now, the opposite of this feature is something that's been a requested SCP feature for a couple of years.  Many have suggested a "big guns in front" flag, and it seems like a shiptypes.tbl option is the closest thing we'll come to that.

I'd comment further, but I've got to get to work.
The Trivial Psychic Strikes Again!

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Ahemm, http://fs2source.warpcore.org/exes/latest/shiptypes3.zip might work better...

Yay!! Somebody tried to download it!! :D

(Link fixed btw)
-C

 

Offline Spicious

  • Master Chief John-158
  • 210
Are capital ship turrets shooting at anything for anyone with this build?

 

Offline IPAndrews

  • Disgruntled Customer
  • 212
  • This site stole my work
Yay!! Somebody tried to download it!! :D

I'm very interested in this too and I'll be giving it a go. Just a bit tied up at the moment. Incidentally I was wondering. By default most FS2 AI classes (cruiser etc...) try to broadside when they get close to an enemy. What does a fighter do? Just keep flying at it till collision avoidance code kicks in? Starts bombing runs? Slows to stop facing it?
Be warned: This site's admins stole 100s of hours of my work. They will do it to you.

 

Offline MetalDestroyer

  • Starwars reborn!
  • 210
Those AI, are they linked to FRED2 (initial order) or directly to Fs2 Open and FRED2 ?
And, could we see a new feature like the way Ships are jumping, instead of using a vortex like Fs2/Babylon 5, could we have some sort of Lightspeed Jump like XWA ??

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
The second half of that is completely off-topic here. Lets stick to the discussion at hand please.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]