Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: WouterSmitssm on January 21, 2012, 03:12:22 pm

Title: how to set alpha wing atteck frandly target
Post by: WouterSmitssm on January 21, 2012, 03:12:22 pm
Does someone know how to do that
just watch this if you want to understand me
http://www.xfire.com/video/31e9ff/
Title: Re: how to set alpha wing atteck frandly target
Post by: FelixJim on January 21, 2012, 03:35:13 pm
I'm pretty sure you can force it with either a initial wing order (you will get a warning - just ignore it) for Alpha wing, or with an ai-chase sexp under ai orders.
Title: Re: how to set alpha wing atteck frandly target
Post by: headdie on January 21, 2012, 03:41:50 pm
I am pretty sure AI chase will just cause alpha will just follow the friendly.

the only solution i can think of is to create a new IFF class to use
Title: Re: how to set alpha wing atteck frandly target
Post by: WouterSmitssm on January 21, 2012, 03:42:44 pm
how to use it
Title: Re: how to set alpha wing atteck frandly target
Post by: headdie on January 21, 2012, 03:45:29 pm
read up on http://www.hard-light.net/wiki/index.php/Iff_defs.tbl and when you have set it up use change IFF sexp to change the target IFF
Title: Re: how to set alpha wing atteck frandly target
Post by: WouterSmitssm on January 21, 2012, 03:52:39 pm
Where's table file named thits Iff_defs.tbl
i dont have it how to change the tbl
Title: Re: how to set alpha wing atteck frandly target
Post by: headdie on January 21, 2012, 04:09:32 pm
Its a non retail file introduced by FSO.  What I suggest you do is open up notepad,  copy paste the example at the bottom of the wiki page into the notepad window and save the file as iff_defs.tbl.  then you can add your new entry to it.
Title: Re: how to set alpha wing atteck frandly target
Post by: FelixJim on January 22, 2012, 05:32:11 am
Oops, my bad. Either of what I suggested causes "Attack [friendly]" to come up in Alpha wing's orders when you target them, but they don't actually follow it through. That doesn't seem right, to me.

Another probably nonsense idea - change the friendly's iff to hostile, and then it's iff colour to green. Would that work?

EDIT: To answer my own question, yes, I tested this briefly and it does work. This does come with the problem that the "friendly" target will fight back unless ordered not to. It will also be treated as an ally of any other hostiles (you can overcome this by using the neutral iff rather than hostile) and will trigger battle music cues (you may or may not mind this). You'll also need to switch its iff back to friendly afterwards.

And just to clarify, using this method wouldn't require any changes to iff_defs.tbl.
Title: Re: how to set alpha wing atteck frandly target
Post by: WouterSmitssm on January 24, 2012, 05:07:05 am
i did that got this error's

Code: [Select]
iff_defs.tbl(line 5:
Error: Missing required token: [#IFFs]. Found [$IFF Name: Hostile ]  instead.

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>


iff_defs.tbl(line 6:
Error: Missing required token: [#IFFs]. Found [$Color: ( 255, 0, 0 ) ]  instead.

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>
ntdll.dll! RtlImageNtHeader + 1814 bytes
ntdll.dll! RtlImageNtHeader + 782 bytes
KERNELBASE.dll! CreateFileW + 1018 bytes
ntdll.dll! RtlImageNtHeader + 2832 bytes
ntdll.dll! RtlImageNtHeader + 2879 bytes
KERNELBASE.dll! ReadFile + 280 bytes
KERNELBASE.dll! ReadFile + 362 bytes

iff_defs.tbl(line 7:
Error: Missing required token: [#IFFs]. Found [$Attacks: ( "Neutral" "Traitor" ]  instead.

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>
ntdll.dll! RtlImageNtHeader + 1814 bytes
ntdll.dll! RtlImageNtHeader + 782 bytes
KERNELBASE.dll! CreateFileW + 1018 bytes
ntdll.dll! RtlImageNtHeader + 2832 bytes
ntdll.dll! RtlImageNtHeader + 2879 bytes
KERNELBASE.dll! ReadFile + 280 bytes
KERNELBASE.dll! ReadFile + 362 bytes

iff_defs.tbl(line 8:
Error: Missing required token: [#IFFs]. Found [+Sees Friendly As: ( 255, 0, 0 )]  instead.

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>
ntdll.dll! RtlImageNtHeader + 1814 bytes
ntdll.dll! RtlImageNtHeader + 782 bytes
KERNELBASE.dll! CreateFileW + 1018 bytes
ntdll.dll! RtlImageNtHeader + 2832 bytes
ntdll.dll! RtlImageNtHeader + 2879 bytes
KERNELBASE.dll! ReadFile + 280 bytes
KERNELBASE.dll! ReadFile + 362 bytes

iff_defs.tbl(line 9:
Error: Missing required token: [#IFFs]. Found [+Sees Hostile As: ( 0, 255, 0 )]  instead.

KERNELBASE.dll! IsNLSDefinedString + 1166 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>
ntdll.dll! RtlImageNtHeader + 1814 bytes
ntdll.dll! RtlImageNtHeader + 782 bytes
KERNELBASE.dll! CreateFileW + 1018 bytes
ntdll.dll! RtlImageNtHeader + 2832 bytes
ntdll.dll! RtlImageNtHeader + 2879 bytes
KERNELBASE.dll! ReadFile + 280 bytes
KERNELBASE.dll! ReadFile + 362 bytes

Invalid team name.

In sexpression: ( when
   ( or
      ( shield-quad-low "Aries 1" 20 )
      ( shield-quad-low "Aries 2" 20 )
      ( shield-quad-low "Aries 3" 20 )
      ( shield-quad-low "Aries 4" 20 )
      ( shield-quad-low "Aries 5" 20 )
      ( shield-quad-low "Aries 6" 20 )
   )
   ( change-iff
      "Friendly"
      "Aries 1"
      "Aries 2"
      "Aries 3"
      "Aries 4"
      "Aries 5"
      "Aries 6"
   )
   ( send-message
      "Aries 1"
      "High"
      "What the...!"
   )
)
(Error appears to be: Friendly)
ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>
fs2_open_3_6_14_RC2.exe! <no symbol>

Please fix this
Thanks for explain for no more working crash
Title: Re: how to set alpha wing atteck frandly target
Post by: FelixJim on January 24, 2012, 08:55:45 am
Try this one. Friendly2 is exactly like Friendly, but Friendlies will attack it.

[attachment deleted by a ninja]