Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Clawandfang on April 07, 2008, 09:45:21 am

Title: Additional IFFs
Post by: Clawandfang on April 07, 2008, 09:45:21 am
I'm sure I heard somewhere once that you could manufacture new IFFs in FRED Open, but I can't work out how. What I'm thinking about it a fight between two forces where the player and his escort get caught in the crossfire. So I really need to set one team to "Neutral" and another to"Neutral2" and make them both ignore the player but be hositle to one another.

Thanks in advance.
Title: Re: Additional IFFs
Post by: Snail on April 07, 2008, 10:10:08 am
http://www.hard-light.net/wiki/index.php/Ai_profiles.tbl
Title: Re: Additional IFFs
Post by: Clawandfang on April 07, 2008, 10:11:06 am
Righty, thanks a bundle Snail.

EDIT: I spoke too soon... I'm not entirely sure this is what I'm looking for... and even if it is, I have no idea how to use it.
Title: Re: Additional IFFs
Post by: Snail on April 07, 2008, 10:18:42 am
Whoops wrong table. Wait a sec.

http://www.hard-light.net/wiki/index.php/Iff_defs.tbl
Title: Re: Additional IFFs
Post by: Galemp on April 07, 2008, 10:20:04 am
It isn't what you want. Use this instead.
http://www.hard-light.net/wiki/index.php/Iff_defs.tbl

It's ridiculously easy to use, just take a look at the example at the bottom of the page.

Though, you could get the results you wanted in the mission by having one team "Hostile", one team "Neutral", and setting the "All teams at war" flag.

EDIT: Thanks, Snail. Not so slow, are you? :p
Title: Re: Additional IFFs
Post by: Snail on April 07, 2008, 10:20:47 am
I wuz first. :(
Title: Re: Additional IFFs
Post by: Clawandfang on April 07, 2008, 10:29:12 am
Okay, thanks people.
Title: Re: Additional IFFs
Post by: Clawandfang on April 11, 2008, 03:34:47 pm
I'm still having trouble with this. I've crated an iff_defs.tbl in a mod folder, but when I try and change a ship's IFF to a new IFF I've created, Freespace just bombs out. Here's the table I've created:

Code: [Select]
#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" )

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

;------------------------
; Council
;------------------------
$IFF Name: Council
$Color: ( 255, 0, 255 )
$Attacks: ( "GTVA" )
+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

I'm trying to change a ship to "GTVA", but can't get it to work. What am I doing wrong?
Title: Re: Additional IFFs
Post by: Roanoke on April 11, 2008, 04:05:22 pm
;------------------------                                    
"; Traitor                                                
;------------------------                                    
$IFF Name: Traitor                                          
$Color: ( 255, 0, 0 )                                       
$Attacks: ( "Friendly" "Hostile" "Neutral" "Traitor" ) -I'd add your factions to this list and see what happens      
+Sees Friendly As: ( 255, 0, 0 )"                              
Title: Re: Additional IFFs
Post by: FUBAR-BDHR on April 11, 2008, 04:46:08 pm
Shouldn't make a difference if traitor is set to attack them or not.  We have a non-combatant in TBP that isn't attacked by traitor and it works just fine. 

Are you trying to change the IFF in FRED, or by using an event.  Either way try the debug build  for the exe that is crashing and see what message you get.   

Title: Re: Additional IFFs
Post by: Clawandfang on April 11, 2008, 04:59:39 pm
When Freespace notices the error I get this:

Code: [Select]
Error: Invalid team name.

In sexpression: ( when
   ( true )
   ( change-iff "GTVA" "GTD Orion 6" )
)
(Error appears to be: GTVA)
File: MissionParse.cpp
Line: 5831


Call stack:
------------------------------------------------------------------
    parse_mission()    parse_main()    mission_load()    game_start_mission()    game_enter_state()   

gameseq_set_state()    game_process_event()    gameseq_process_events()    game_main()    WinMain()   

WinMainCRTStartup()    kernel32.dll 763f3833()
    ntdll.dll 7773a9bd()
------------------------------------------------------------------

In debug mode, it bombs. In normal mode, I can opt to just continue, but when the event takes place which would alter IFF it bombs out without an error messaeg. I think this is probably due to my lack of expertise in using mods. At the momnet I just have a folder with the table in it, and select that mod in the launcher.
Title: Re: Additional IFFs
Post by: FUBAR-BDHR on April 11, 2008, 05:54:40 pm
Temporarily move it to your main data/tables folder and see if it works without any mods on then move it back.  Also what version of FS2 are you using?  Might want to test it with one of the newer 3.6.10 builds.
Title: Re: Additional IFFs
Post by: FUBAR-BDHR on April 11, 2008, 07:32:51 pm
Just saved that text as iff_defs.tbl in my data/tables directory and it works just fine in 3.6.9 and the 4/3 trunk release of 3.6.10.
Title: Re: Additional IFFs
Post by: Clawandfang on April 12, 2008, 04:09:38 pm
I honestly feel like such an idiot; I completely forgot to shove it in a tables folder, I just popped it in the data folder. I suppose I can be exused to some extent, as this is my first atmept at anything of this ort, but I still feel a bit thick. Thanks to everyone who has helped me, sorry I've wasted some of you time.
Title: Re: Additional IFFs
Post by: Roanoke on April 12, 2008, 04:28:17 pm
Thicko!!

Haha I use to do that all the time. Trying to get models saved in a 3DSMax folder working ingame  ;)
Title: Re: Additional IFFs
Post by: Clawandfang on April 14, 2008, 12:25:24 pm
Okay I have another query, but thought I should just keep this thread going to try and aviod clutter.
I need to disable the wingmen display in the top right for this mission. How do I do that?
Title: Re: Additional IFFs
Post by: Mustang19 on April 14, 2008, 12:30:09 pm
Wish I had time for a more detailed explantion, but look here (http://www.hard-light.net/wiki/index.php/Hud_gauges.tbl).
Title: Re: Additional IFFs
Post by: Clawandfang on April 14, 2008, 01:20:59 pm
That makes almost no sense to my inexperienced table modding eyes. If I need to hide the wingmen display for just one mission, do I really need to go fiddling with tables?
Title: Re: Additional IFFs
Post by: karajorma on April 14, 2008, 01:38:15 pm
Why do you need to hide it?
Title: Re: Additional IFFs
Post by: FUBAR-BDHR on April 14, 2008, 01:47:43 pm
If you want to just get rid of beta, gamma, etc.  For that particular mission go into mission specs and change the custom wing names.  Those are the ones that will show up.  Won't work for the wing the player is in though.  Alternately you could put the player in a wing by himself and fake the rest of the players in the wing by using special undisplayable characters between Alpha and 2, etc.
Title: Re: Additional IFFs
Post by: Clawandfang on April 14, 2008, 03:16:44 pm
Ah, that's good, thanks. I need it as I'm playing around with a civil war type plot, but one where the player is on neither side. So I really need wing names like Gamma, Epsilon, etc., but don't want them to look like the player's wingmen.

Thanks again.
Title: Re: Additional IFFs
Post by: Goober5000 on April 14, 2008, 06:57:31 pm
Won't work for the wing the player is in though.
Will too!
Title: Re: Additional IFFs
Post by: FUBAR-BDHR on April 14, 2008, 10:51:46 pm
Maybe but FRED will complain.
Title: Re: Additional IFFs
Post by: Goober5000 on April 14, 2008, 11:09:36 pm
It won't.  Squadron wing names are completely different from starting wing names.  I should know; I coded it.
Title: Re: Additional IFFs
Post by: FUBAR-BDHR on April 14, 2008, 11:16:54 pm
Got me on that one.  It only complains if the player isn't in a wing.