Author Topic: IFF bug  (Read 2947 times)

0 Members and 1 Guest are viewing this topic.

So in my mod. I try to set a group of ships that are friendly by default to hostile in the ship editor. When testing the mission they are marked as green and act as if friendly. This is my iff_def.tbl folder and all seems fine.

#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: ( 155, 155, 155 )                                       
$Attacks: ( "Friendly" "Hostile" "Traitor" )                           
+Sees Friendly As: ( 0, 255, 0 )                              
+Sees Hostile As: ( 255, 255, 0 )                                 
+Sees Neutral As: ( 255, 0, 0 )                                 
     
;------------------------                                    
; Unknown                                                
;------------------------                                    
$IFF Name: Unknown                                          
$Color: ( 255, 0, 255 )                                       
$Attacks: ( "Hostile" )                                    
+Sees Neutral As: ( 0, 255, 0 )                                 
+Sees Traitor As: ( 255, 0, 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   

Is it possible that this is a FRED related bug?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
What happens if you remove the IFF_Defs table?

Unless you've altered it in some way you don't need that table at all.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Removing it didn't change anything. I'm using fred2_open_3_6_10r-20081217_r5008-Wanderer

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Can you post the mission then?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 
Sorry to keep you waiting. I don't think the mission file has anything to do with it. The same thing occurs with even the simplest of missions. I think the problem is in my modpack somewhere. I'm also afraid that having to find it will hider my progress.

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
So you want to add iff that is friendly towards the ships which have 'hostile' iff?

On a quick look at your table all other iffs had 'hostile' in their 'attacks' entry so they all should attack the ships with 'hostile' iff on sight.
Do not meddle in the affairs of coders for they are soggy and hard to light

 
The problem was, with or without the table ,the ship that where set to hostile show up green and could be targeted as friendly and attacking them would be treason. It's no longer a problem though. I'm just using the Traitor IFF with setting as if hostile so no I'm moving on somehow.

 

Offline Aardwolf

  • 211
  • Posts: 16,384
Were they part of a wing, or something?

Or maybe you accidentally put the player as hostile?

 
Quote from: Aardwolf
Or maybe you accidentally put the player as hostile?

<Checks mission>

<*Slaps Forehead*>

"D'oh!"

Thanks, I can't belive I've been failing so hard. :ick:

Shivan ships where set to hostile as standard.

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
$Flags: ( "support allowed" )

So...that's what enables each faction to call in support ships? And what happens if a docking bay arrival/departure is set? Both hostile and friendly support ships will take off from/land to the same ship?
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Never tried it but as far as I know there isn't any reason you can't launch a hostile ship or supply ship from a friendly destroyer.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Uhm...

Two separate "Hostile" entries, let's say "Hostile" and "Hostile#2", could be used when necessary to represent both effects. The first, default one would be used for missions in which friendly support ships take off from a destroyer/station/whatever while the second could be used in any normal situation(support ships jumping in) so that there will be no significant difference between the arrival anchor of friendly and hostile support ships.

I might give this a try. :nod:


EDIT: What's the correct name of the IFF Def.s table? I don't see the new entry in FRED.
« Last Edit: February 16, 2009, 06:03:52 pm by Mobius »
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito

 

Offline Wanderer

  • Wiki Warrior
  • 211
  • Mostly harmless
iff_defs.tbl

And do note that '_' is not the same as ' '.
Do not meddle in the affairs of coders for they are soggy and hard to light

 

Offline Mobius

  • Back where he started
  • 213
  • Porto l'azzurro Dolce Stil Novo nella fantascienza
    • Skype
    • Twitter
    • The Lightblue Ribbon | Cultural Project
Yeah, that was a typo in my post.

I found the error: I added the ".tbl" part in the name, thus having "iff_defs.tbl" as name when the correct name is "iff_defs". The new entry works, now. :)
The Lightblue Ribbon

Inferno: Nostos - Alliance
Series Resurrecta: {{FS Wiki Portal}} -  Gehenna's Gate - The Spirit of Ptah - Serendipity (WIP) - <REDACTED> (WIP)
FreeSpace Campaign Restoration Project
A tribute to FreeSpace in my book: Riflessioni dall'Infinito