Hard Light Productions Forums

Modding, Mission Design, and Coding => The Modding Workshop => Topic started by: bigchunk1 on June 28, 2011, 11:47:04 pm

Title: Untargetable Turrets... is it possible?
Post by: bigchunk1 on June 28, 2011, 11:47:04 pm
Let's say I have a capital ship. I want to have active turrets on that ship, but I don't want the player to be able to target them.

I went to tables first, looking for a possible flag or something that would disable targeting on turret subsystems. Note: '$Flags: ( "untargetable" )' under '$Subsystem:' does NOT work.

I have looked in FRED for a possible sexp, but I can't find one.

Anyone know a way I can get this to work? Or if it's even possible?

Edit(unrelated): While i'm at it... the armor.tbl does not seem to restrict shockwave damage, only impact weapon damage. Anyone have any insight as to why this could be, or how I can fix it?
Title: Re: Untargetable Turrets... is it possible?
Post by: Spoon on June 29, 2011, 05:34:07 am
Did you assign $Shockwave Damage Type: to the weapon/ship with the shockwave damage that you want reduced?
Title: Re: Untargetable Turrets... is it possible?
Post by: bigchunk1 on June 29, 2011, 05:54:30 pm
I got the armor table to block out area effect damage (+1 Spoon), but now I can't seem to figure out how to also block out shield and subsystem damage. The "ignore subsystem damage" (http://www.hard-light.net/wiki/index.php/Armor.tbl#.24Flags:) flag won't work. I'm not exactly sure if it's what I want. :(

Also, the change-class sexp does not seem to be changing the armor values of the ships (as specified in the tables) when I use the sexp in game. I'm 75% sure I'm missing something here, but perhaps it's healthy to vent a little frustration. Anyone else try changing armor types in game? I'd prefer to use change-class over the set-armor-type sexp.

Lastly, I still haven't been able to resolve the turret targeting issue so if anyone knows that would be a :)
Title: Re: Untargetable Turrets... is it possible?
Post by: Spoon on June 29, 2011, 06:20:21 pm
http://www.hard-light.net/wiki/index.php/Ships.tbl#.24Shield_Armor_Type:
And subsystems also need to be assigned armor  http://www.hard-light.net/wiki/index.php/Subsystem#.24Armor_Type:

Also, why can't you just use both change-class and set-armor-type sexps? It's not like they are mutually exclusive
Title: Re: Untargetable Turrets... is it possible?
Post by: IronBeer on June 29, 2011, 06:31:10 pm
Also, why can't you just use both change-class and set-armor-type sexps? It's not like they are mutually exclusive
Shouldn't change-class invoke the proper set armor from the .tbl anyways? I know using set-armor alongside it shouldn't hurt, but isn't it redundant? (Based on what little I know about these SEXPs)
Title: Re: Untargetable Turrets... is it possible?
Post by: Spoon on June 29, 2011, 07:50:01 pm
Also, why can't you just use both change-class and set-armor-type sexps? It's not like they are mutually exclusive
Shouldn't change-class invoke the proper set armor from the .tbl anyways? I know using set-armor alongside it shouldn't hurt, but isn't it redundant? (Based on what little I know about these SEXPs)
That's my initial thought as well but bigchunk1 is apparantly experiencing something else
Title: Re: Untargetable Turrets... is it possible?
Post by: bigchunk1 on June 29, 2011, 10:39:53 pm
Armor classes work as intended now, thanks Spoon.

Also, why can't you just use both change-class and set-armor-type sexps? It's not like they are mutually exclusive
Shouldn't change-class invoke the proper set armor from the .tbl anyways? I know using set-armor alongside it shouldn't hurt, but isn't it redundant? (Based on what little I know about these SEXPs)

You're right in that the two sexps don't contradict, in fact it works when you use set-armor-type. I still would prefer not to do things this way since I am conducting the operation with roughly a dozen ships in a single event which has the possibility of triggering every 5 or so seconds, and like Ironbeer said it is redundant. Well, that is IF change-class would properly change armor types when triggered, which for me It does not.

I feel at least comfortable with the idea that it works, if in a slightly less efficient way that is slightly more cluttered.
Title: Re: Untargetable Turrets... is it possible?
Post by: Dragon on July 10, 2011, 02:52:28 pm
I went to tables first, looking for a possible flag or something that would disable targeting on turret subsystems. Note: '$Flags: ( "untargetable" )' under '$Subsystem:' does NOT work
It's strange that "untargetable" flag doesn't work on turrets, because it should. Could you create a small mod with retail assets that would show this issue? It looks like a bug to me and if it's a bug, it needs to be fixed.
Title: Re: Untargetable Turrets... is it possible?
Post by: bigchunk1 on July 10, 2011, 06:55:37 pm
Hmm... ok. I guess the main reason I made this topic was to check if anyone else had any experience with this and some other way to do it was available. If there is not, I'll post a mantis within the next few days.
Title: Re: Untargetable Turrets... is it possible?
Post by: Goober5000 on July 13, 2011, 11:53:43 pm
It's strange that "untargetable" flag doesn't work on turrets, because it should. Could you create a small mod with retail assets that would show this issue? It looks like a bug to me and if it's a bug, it needs to be fixed.
What he said.