Difference between revisions of "Iff defs.tbl"

From FreeSpace Wiki
Jump to: navigation, search
(Sample Entry)
m (update)
Line 1: Line 1:
'''''This feature requires SCP'''''<br>
+
{{SCP_table}}
 +
 
 +
Revision information.. <!-- Please update this information when page is updated -->
 +
::'''3.6.x branch:''' 1.9.2.3
 +
::'''3.7 branch:''' 1.13
  
----
 
  
 
The IFF (Identification, Friend or Foe) table stores data on FS2's IFF entries. This tables default version (shown as example) is included to the code so '''iff_defs.tbl''' is not required unless entries are to be added or changed.
 
The IFF (Identification, Friend or Foe) table stores data on FS2's IFF entries. This tables default version (shown as example) is included to the code so '''iff_defs.tbl''' is not required unless entries are to be added or changed.
Line 13: Line 16:
 
*Different IFFs entries begin with '''[[iff_defs.tbl#$IFF Name:|$IFF Name:]]
 
*Different IFFs entries begin with '''[[iff_defs.tbl#$IFF Name:|$IFF Name:]]
 
*Table ends with #'''End'''
 
*Table ends with #'''End'''
 +
  
 
==$IFF Name:==
 
==$IFF Name:==
 +
  
 
===$Colour: or $Color:===
 
===$Colour: or $Color:===
 +
{{Table36|
 
*Defines the color of the IFF as seen in by default (e.g. in briefing icons).
 
*Defines the color of the IFF as seen in by default (e.g. in briefing icons).
*Syntax: ( ''Value'', ''Value'', ''Value'' ), values from 0 to 255; red, green and blue respecticely
+
*Syntax: ( '''Color''' ), three '''integers''', values from 0 to 255; red, green and blue respectively
**Example: ( 0, 255, 0 )
+
**Example: ( 0, 255, 0 )}}
 +
 
  
 
===$Attacks:===
 
===$Attacks:===
 +
{{Table36|
 
*Defines the IFFs that are attacked by default
 
*Defines the IFFs that are attacked by default
*Syntax: ( ''IFF Name'' )
+
*Syntax: ( '''String''' ), name of the IFF
**Example: ( "Friendly" "Neutral" "Traitor" )
+
**Example: ( "Friendly" "Neutral" "Traitor" )}}
 +
 
  
 
===+Sees ''IFF Name'' As:===
 
===+Sees ''IFF Name'' As:===
 +
{{Table36|
 
*IFF can be set to be seen as in different color than what that IFFS default color is.  
 
*IFF can be set to be seen as in different color than what that IFFS default color is.  
*Same IFF may have multiple '''+Sees ''IFF Name'' As:''' entries
+
*Same IFF may have multiple ''+Sees '''IFF Name''' As:'' entries
 
*'''''IFF Name''''' defines the name of the IFF to have a different color.
 
*'''''IFF Name''''' defines the name of the IFF to have a different color.
**Example: +Sees ''Hostile'' As:
+
**Example: +Sees '''Hostile''' As:
*Syntax: ( ''Value'', ''Value'', ''Value'' ), values from 0 to 255; red, green and blue respecticely
+
*Syntax: ( '''Color''' ), three '''integers''', values from 0 to 255; red, green and blue respectively
**Example: ( 255, 0, 0 )
+
**Example: ( 255, 0, 0 )}}
 +
 
  
 
===$Flags:===
 
===$Flags:===
 +
{{Table36|
 
*IFFs can have special flags assigned to them.
 
*IFFs can have special flags assigned to them.
*Syntax: ( ''"Name"'' )
+
*Syntax: ( '''"String"''' ), name of the flag
 
**Example: ( "support allowed" )
 
**Example: ( "support allowed" )
**List of  
+
**List of flags:
 
***''"support allowed"''
 
***''"support allowed"''
***''"exempt from all teams at war"''
+
***''"exempt from all teams at war"''}}
 +
 
  
 
===$Default Ship Flags:===
 
===$Default Ship Flags:===
 +
{{Table36|
 
*Ships belonging to a particular IFF can have a default set of flags when created in FRED.
 
*Ships belonging to a particular IFF can have a default set of flags when created in FRED.
*Syntax: ( ''"Name"'' )
+
*Syntax: ( '''"String" "String"''' ), names of the flags
 
**Example: ( "cargo-known" )
 
**Example: ( "cargo-known" )
 
**List of default ship flags:
 
**List of default ship flags:
Line 66: Line 80:
 
***''"beam-protect-ship"''
 
***''"beam-protect-ship"''
 
***''"guardian"''
 
***''"guardian"''
***''"special-warp"''
+
***''"special-warp"''}}
 +
 
  
 
==Sample Entry==
 
==Sample Entry==
  
  #IFFs
+
<pre>
 +
#IFFs
 
    
 
    
  ;; Every iff_defs.tbl must contain a Traitor entry.  Traitors attack
+
;; Every iff_defs.tbl must contain a Traitor entry.  Traitors attack
  ;; one another (required by the dogfighting code) but it is up to you
+
;; one another (required by the dogfighting code) but it is up to you
  ;; to decide who attacks the traitor or whom else the traitor attacks.
+
;; to decide who attacks the traitor or whom else the traitor attacks.
  $Traitor IFF: Traitor
+
$Traitor IFF: Traitor
 
    
 
    
  ;------------------------
+
;------------------------
  ; Friendly
+
; Friendly
  ;------------------------
+
;------------------------
  $IFF Name: Friendly
+
$IFF Name: Friendly
  $Color: ( 0, 255, 0 )
+
$Color: ( 0, 255, 0 )
  $Attacks: ( "Hostile" "Neutral" "Traitor" )
+
$Attacks: ( "Hostile" "Neutral" "Traitor" )
  $Flags: ( "support allowed" )
+
$Flags: ( "support allowed" )
  $Default Ship Flags: ( "cargo-known" )
+
$Default Ship Flags: ( "cargo-known" )
 
  
 
  
  ;------------------------
+
;------------------------
  ; Hostile
+
; Hostile
  ;------------------------
+
;------------------------
  $IFF Name: Hostile
+
$IFF Name: Hostile
  $Color: ( 255, 0, 0 )
+
$Color: ( 255, 0, 0 )
  $Attacks: ( "Friendly" "Neutral" "Traitor" )
+
$Attacks: ( "Friendly" "Neutral" "Traitor" )
  +Sees Friendly As: ( 255, 0, 0 )
+
+Sees Friendly As: ( 255, 0, 0 )
  +Sees Hostile As: ( 0, 255, 0 )
+
+Sees Hostile As: ( 0, 255, 0 )
 
+
 
  ;------------------------
+
;------------------------
  ; Neutral
+
; Neutral
  ;------------------------
+
;------------------------
  $IFF Name: Neutral
+
$IFF Name: Neutral
  $Color: ( 255, 0, 0 )
+
$Color: ( 255, 0, 0 )
  $Attacks: ( "Friendly" "Traitor" )
+
$Attacks: ( "Friendly" "Traitor" )
  +Sees Friendly As: ( 255, 0, 0 )
+
+Sees Friendly As: ( 255, 0, 0 )
  +Sees Hostile As: ( 0, 255, 0 )
+
+Sees Hostile As: ( 0, 255, 0 )
  +Sees Neutral As: ( 0, 255, 0 )
+
+Sees Neutral As: ( 0, 255, 0 )
   
+
 
  ;------------------------
+
;------------------------
  ; Unknown
+
; Unknown
  ;------------------------
+
;------------------------
  $IFF Name: Unknown
+
$IFF Name: Unknown
  $Color: ( 255, 0, 255 )
+
$Color: ( 255, 0, 255 )
  $Attacks: ( "Hostile" )
+
$Attacks: ( "Hostile" )
  +Sees Neutral As: ( 0, 255, 0 )
+
+Sees Neutral As: ( 0, 255, 0 )
  +Sees Traitor As: ( 0, 255, 0 )
+
+Sees Traitor As: ( 0, 255, 0 )
  $Flags: ( "exempt from all teams at war" )
+
$Flags: ( "exempt from all teams at war" )
 
+
 
  ;------------------------
+
;------------------------
  ; Traitor
+
; Traitor
  ;------------------------
+
;------------------------
  $IFF Name: Traitor
+
$IFF Name: Traitor
  $Color: ( 255, 0, 0 )
+
$Color: ( 255, 0, 0 )
  $Attacks: ( "Friendly" "Hostile" "Neutral" "Traitor" )
+
$Attacks: ( "Friendly" "Hostile" "Neutral" "Traitor" )
  +Sees Friendly As: ( 255, 0, 0 )
+
+Sees Friendly As: ( 255, 0, 0 )
 
+
  #End
+
#End
 +
</pre>
 +
 
  
 
[[Category:Tables]]
 
[[Category:Tables]]

Revision as of 18:41, 28 July 2007

This feature requires FreeSpace Open

Revision information..

3.6.x branch: 1.9.2.3
3.7 branch: 1.13


The IFF (Identification, Friend or Foe) table stores data on FS2's IFF entries. This tables default version (shown as example) is included to the code so iff_defs.tbl is not required unless entries are to be added or changed.

General Format

  • IFF_defs table consist of the traitor iff definition and from the actual iff definitions
  • Table begins with #IFFs
  • First the traitor must be defined with $Traitor IFF:
    • This entry is used to define which IFF is used to represent the traitors IFF
    • Value: IFF Name
  • Different IFFs entries begin with $IFF Name:
  • Table ends with #End


$IFF Name:

$Colour: or $Color:

FS2 Open, 3.6.x:
  • Defines the color of the IFF as seen in by default (e.g. in briefing icons).
  • Syntax: ( Color ), three integers, values from 0 to 255; red, green and blue respectively
    • Example: ( 0, 255, 0 )


$Attacks:

FS2 Open, 3.6.x:
  • Defines the IFFs that are attacked by default
  • Syntax: ( String ), name of the IFF
    • Example: ( "Friendly" "Neutral" "Traitor" )


+Sees IFF Name As:

FS2 Open, 3.6.x:
  • IFF can be set to be seen as in different color than what that IFFS default color is.
  • Same IFF may have multiple +Sees IFF Name As: entries
  • IFF Name defines the name of the IFF to have a different color.
    • Example: +Sees Hostile As:
  • Syntax: ( Color ), three integers, values from 0 to 255; red, green and blue respectively
    • Example: ( 255, 0, 0 )


$Flags:

FS2 Open, 3.6.x:
  • IFFs can have special flags assigned to them.
  • Syntax: ( "String" ), name of the flag
    • Example: ( "support allowed" )
    • List of flags:
      • "support allowed"
      • "exempt from all teams at war"


$Default Ship Flags:

FS2 Open, 3.6.x:
  • Ships belonging to a particular IFF can have a default set of flags when created in FRED.
  • Syntax: ( "String" "String" ), names of the flags
    • Example: ( "cargo-known" )
    • List of default ship flags:
      • "cargo-known"
      • "ignore-count"
      • "protect-ship"
      • "reinforcement"
      • "no-shields"
      • "escort"
      • "player-start"
      • "no-arrival-music"
      • "no-arrival-warp"
      • "no-departure-warp"
      • "locked"
      • "invulnerable"
      • "hidden-from-sensors"
      • "scannable"
      • "kamikaze"
      • "no-dynamic"
      • "red-alert-carry"
      • "beam-protect-ship"
      • "guardian"
      • "special-warp"


Sample Entry

#IFFs
   
;; Every iff_defs.tbl must contain a Traitor entry.  Traitors attack	
;; one another (required by the dogfighting code) but it is up to you	
;; to decide who attacks the traitor or whom else the traitor attacks.	
$Traitor IFF: Traitor
   
;------------------------												
; Friendly																
;------------------------												
$IFF Name: Friendly														
$Color: ( 0, 255, 0 )													
$Attacks: ( "Hostile" "Neutral" "Traitor" )						
$Flags: ( "support allowed" )											
$Default Ship Flags: ( "cargo-known" )								
   	
;------------------------												
; Hostile																
;------------------------												
$IFF Name: Hostile													
$Color: ( 255, 0, 0 )													
$Attacks: ( "Friendly" "Neutral" "Traitor" )						
+Sees Friendly As: ( 255, 0, 0 )										
+Sees Hostile As: ( 0, 255, 0 )

;------------------------												
; Neutral																
;------------------------												
$IFF Name: Neutral														
$Color: ( 255, 0, 0 )													
$Attacks: ( "Friendly" "Traitor" )									
+Sees Friendly As: ( 255, 0, 0 )										
+Sees Hostile As: ( 0, 255, 0 )											
+Sees Neutral As: ( 0, 255, 0 )											
  	
;------------------------												
; Unknown																
;------------------------												
$IFF Name: Unknown														
$Color: ( 255, 0, 255 )													
$Attacks: ( "Hostile" )												
+Sees Neutral As: ( 0, 255, 0 )											
+Sees Traitor As: ( 0, 255, 0 )											
$Flags: ( "exempt from all teams at war" )							

;------------------------												
; Traitor																
;------------------------												
$IFF Name: Traitor														
$Color: ( 255, 0, 0 )													
$Attacks: ( "Friendly" "Hostile" "Neutral" "Traitor" )			
+Sees Friendly As: ( 255, 0, 0 )										
 	
#End