Author Topic: Ye olde objecttypes patch  (Read 1465 times)

0 Members and 1 Guest are viewing this topic.

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
Ye olde objecttypes patch
A blast from the past but something that could be modified (ie. rewritten) to function with current builds and which if deemed fit would help getting rid of the dependance on the retail ship types and allow fully functional custom objecttypes be used.

First... here is a list of the flags the patch added - do keep in mind that these DO NOT work currently with any build, however this is likely to change
Code: [Select]
$Enemy Fighters Unleash All Weapons:
$Preferred Target for Bombs:
$Allow Strafe Against This:
$Turrets Count as Attackers:
$Engines Stutter On Death:
$Use Large Ship Sparks:
$No Doppler Effect:
$Engine Noise While Idle:
$Allow Targeting of Turrets:
$Limited EMP Effects:
$Allow Large Target Targeting:
$Do Not Avoid Shockwaves:
$Keep Firing During Deathroll:
$Lethality Ignores Beams From Ship:
$Cause Asteroid Collision Warnings:
$Kamikaze Die on Impact:
$Beams Target Model Directly:
$Allow Beam Culling:
$Allow Checking Cargo:
$Add Class String In Briefings:
$Allow Non-Depletable Cargo:
$Use Non-Centered Warpout:
$Guardian Ship During Warpout:
$Assign Engine Wash By Default:
$Ship Scannable Subsystems by Default:
$No Shockwave Damage Adjustment:
$Do Not Accelerate During Warpout:
$Not Protected When Subsystems Targeted:
$Not Flyable:
$May Use Countermeasures:
$Allow Shield Balancing:
$May Enter Strafing Mode:
$Allow Subsystem Repair By Default:
$Warn Player If This Ship Attacks:
$Do Not Allow Engine Wash:
$No Subsystem Damage From Shockwaves:
$Ship Vaporized By Beams:
$No Notification If Ship Is Disarmed:
$Allow Flyby Sounds:
$Allow Enemy Evade and Break Maneuver:
$Allow Enemy Take Distance Maneuver:
$Allow Enemy Take Continuous Turn Maneuver:
$Allow Enemy Break Super Attack Maneuver:
$Allow Evade Missile Maneuver:
$Allow Evade Shockwave Maneuver:
$Self-destruct If Disarmed or Disabled:
$Check Number of Missiles Homing In:
$Destroy AI Ships In Dogfight Missions:
$Allow Wingmen Screams:
$AI Ignore Friendly Lasers:
$Allow Shields Low Checks:
$Include When Counting Number of Enemies:
$Allow Scannable Cargo:
$Allow Pilot Callsigns:
$Allow Protected Status Be Overriden:
$Has SuperCap Damage Immunity:
$Force Sentrygun AI:
$Considered a Threat:
$Special Warpout Device:
$Center Shockwaves:
$Special Dying Time:
$Use Knossos Type Explosions:
$Use Special Super Cap Collisions:
$Use Special Super Cap Warps:
$Ignore Area Effect Damage:
$Ignore Electronics Damage:
$Will Not Collide:
$Use Neutral Radar Blip Color:
$Do Not Target If Newest:
$Do Not Target As Friendly or Hostile:
$Do Not Use As Observers:
$Not a Valid Target For Orders:
$Allow Goals:
$Use Support Ship AI:
$Mark Ship As Strikecraft:
$Allow Form Wing Command:
$Allow Support Requests:
$Mark Ship As Bomber:
$Affected by Engine Wash:
$Use Smaller Amount of Sparks:
$Allow Primitive Sensors Option:
$Allow No Jumpdrive Option:
$Allow Affected by Gravity Option:$Mark As Cargo:
$Allow Shorter Deathroll:
$Allow Enemy AI to Use Short Burst AI Code:
$Huge Weapons Not Allowed to Home In:
$Ship Size Index:
"Small"
"Big"
"Huge"
$CapShip Size Index:
"Major"
"Medium"
"Minor"
$Subsystem Destruction Sound Index:
$Ship Destruction Sound Index:
$3D Model Rotation Multiplier:
$Max Warpout Angle:

Recommendations for better table entry names are warmly welcomed.

There are couple of woes with the patch..
  • The entries $Ship Size Index: and $CapShip Size Index: both contain options actually worth several additional flags but my ideas for them (names) have long since dried up. Those basically act as in some manner of 'extensions' of retail SIF_<objecttype> flags instead of allowing modder to alter the variables directly.
  • System greatly increases the size of the internal hardcopy of the objecttypes.tbl - though this is not technically a problem it becames managing issue and is prone to errors


Patch - currently in pastebin - http://pastebin.com/uQF31DDT - patch (as it is) is too old to go in without manual labour.

Perhaps the most critical piece of the patch is actually this function which allows easier (and safer) access to the objecttype data without undue fuzz with array indexers
Code: [Select]
+ship_type_info *ship_get_type_info(object *objp)
+{
+ Assert(objp != NULL);
+    Assert(objp->type == OBJ_SHIP);
+    Assert(objp->instance > -1);
+    Assert(Ships[objp->instance].ship_info_index > -1);
+    Assert(Ship_info[Ships[objp->instance].ship_info_index].class_type > -1);
+
+ return &Ship_types[Ship_info[Ships[objp->instance].ship_info_index].class_type];
+}
+

EDIT: https://rapidshare.com/files/458108529/temp_a.rar
« Last Edit: April 19, 2011, 03:59:56 pm by Wanderer »
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline swashmebuckle

  • 210
  • Das Lied von der Turd
    • The Perfect Band
Re: Ye olde objecttypes patch
Sign me up to test these features with FotG whenever it gets to a buildable state :yes:

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Ye olde objecttypes patch
I'd be quite happy to see the dependency on old retail classes removed so I'm all for this too.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Re: Ye olde objecttypes patch
that would be great!
$Formula: ( every-time
   ( has-time-elapsed "0" )
   ( Do-Nothing
   )
   ( send-message
      "#Dalek"
      "High"
      "Pro-crasti-nate"
   )
   )
)
+Name: Procratination
+Repeat Count: 99999999999
+Interval: 1

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Ye olde objecttypes patch
I feel issue #2 is unavoidable.  The only other option would be to default the values directly, instead of having an internal table, but then what would people use as a starting point?

Also, this might be a good time to suggest this:  What about a flag to dump all internal tables to the filesystem?  That way, instead of having to dig through the source, anyone with a build could get a copy of the table that exactly build is using.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays