Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: soilder198 on May 23, 2019, 09:23:55 am

Title: Few Questions
Post by: soilder198 on May 23, 2019, 09:23:55 am
1. How do I get the directives menu to shuffle through to new directives faster after old ones are completed? During a certain mission, there are several fighter wings and ships to destroy. The directives menu cannot display more than eight directives at a time, and there is no instance during the mission where there are more than eight active directives. There comes a point in the mission where the directives menu is full, and I only send in new enemy fighter wings and ships in an amount that would equal, but not exceed, the number of completed directives. However, the game does not shuffle to these new directives fast enough, if at all, therefore leaving them unviewable for the player.

2. During a mission, I have an instance where an enemy destroyer makes a surprise appearance, and Command subsequently orders all fighter wings to disables its engines. The SEXP goes like this When --> Is event true delay --> fighter wings (message from command to disable the destroyer) --> add goal, Alpha --> ai destroy subsystem --> destroyer, engine, 89. This SEXP is repeated four times for the four allied wings in the mission. All of them successfully receive the directive as can be determined when targeting their ships in game and reading their current order. However, none of them actually attempt to destroy the destroyers engines. Every single fighter ship instead travels in any direction away from the destroyer for an infinite amount of time....  :confused: :confused: :confused:


I have tried using a Goal priority of 150, and I have also tried using the goal ai-disable instead of ai-destroy-subsystem but the behavior remains exactly the same. Any ideas?
Title: Re: Few Questions
Post by: Novachen on May 23, 2019, 09:33:00 am
Quote
1. How do I get the directives menu to shuffle through to new directives faster after old ones are completed? During a certain mission, there are several fighter wings and ships to destroy. The directives menu cannot display more than eight directives at a time, and there is no instance during the mission where there are more than eight active directives. There comes a point in the mission where the directives menu is full, and I only send in new enemy fighter wings and ships in an amount that would equal, but not exceed, the number of completed directives. However, the game does not shuffle to these new directives fast enough, if at all, therefore leaving them unviewable for the player.

You can display more than eight directives at once if you change the hud_gauges.tbl. But the better solution is, to combine several invidiual directives into one.

If you have several wings, that are attacking you, why do you use individual directives for every wing instead of one "Destroy all fighters" directive?
Title: Re: Few Questions
Post by: soilder198 on May 23, 2019, 09:36:31 am
Quote
You can display more than eight directives at once if you change the hud_gauges.tbl. But the better solution is, to combine several invidiual directives into one.

If you have several wings, that are attacking you, why do you use individual directives for every wing instead of one "Destroy all fighters" directive?

Never thought of doing that. Could solve my problem. Anyway to make the directives disappear quicker to make room for new ones nonetheless?
Title: Re: Few Questions
Post by: 0rph3u5 on May 23, 2019, 10:48:36 am
2. During a mission, I have an instance where an enemy destroyer makes a surprise appearance, and Command subsequently orders all fighter wings to disables its engines. The SEXP goes like this When --> Is event true delay --> fighter wings (message from command to disable the destroyer) --> add goal, Alpha --> ai destroy subsystem --> destroyer, engine, 89. This SEXP is repeated four times for the four allied wings in the mission. All of them successfully receive the directive as can be determined when targeting their ships in game and reading their current order. However, none of them actually attempt to destroy the destroyers engines. Every single fighter ship instead travels in any direction away from the destroyer for an infinite amount of time....  :confused: :confused: :confused:


I have tried using a Goal priority of 150, and I have also tried using the goal ai-disable instead of ai-destroy-subsystem but the behavior remains exactly the same. Any ideas?

Please provide a fs_open.log (http://www.hard-light.net/forums/index.php/topic,56279.msg1180359.html#msg1180359), so we have all the relevant information with respect to build used and mods enabled.
Title: Re: Few Questions
Post by: soilder198 on May 23, 2019, 11:50:04 am
2. During a mission, I have an instance where an enemy destroyer makes a surprise appearance, and Command subsequently orders all fighter wings to disables its engines. The SEXP goes like this When --> Is event true delay --> fighter wings (message from command to disable the destroyer) --> add goal, Alpha --> ai destroy subsystem --> destroyer, engine, 89. This SEXP is repeated four times for the four allied wings in the mission. All of them successfully receive the directive as can be determined when targeting their ships in game and reading their current order. However, none of them actually attempt to destroy the destroyers engines. Every single fighter ship instead travels in any direction away from the destroyer for an infinite amount of time....  :confused: :confused: :confused:


I have tried using a Goal priority of 150, and I have also tried using the goal ai-disable instead of ai-destroy-subsystem but the behavior remains exactly the same. Any ideas?

Please provide a fs_open.log (http://www.hard-light.net/forums/index.php/topic,56279.msg1180359.html#msg1180359), so we have all the relevant information with respect to build used and mods enabled.

Here is a log of the mission. Strangely, when I ran in debug mode I was given a warning regarding missing 3d sound files which I do not receive when not in debug mode. Also, I use FS open 3.8.0 sse2 64-bit with the 2014 media vps.

Also, I should add that when ordering the fighters to disable the destroyer through player commands it works as it should. Just not when doing so through sexp.

[attachment eaten by a Shivan]
Title: Re: Few Questions
Post by: General Battuta on May 23, 2019, 12:40:35 pm
I wonder if the disarm order is protecting the destroyer and forcing the AI to ignore it.
Title: Re: Few Questions
Post by: Colt on May 23, 2019, 12:55:36 pm
2. During a mission, I have an instance where an enemy destroyer makes a surprise appearance, and Command subsequently orders all fighter wings to disables its engines. The SEXP goes like this When --> Is event true delay --> fighter wings (message from command to disable the destroyer) --> add goal, Alpha --> ai destroy subsystem --> destroyer, engine, 89. This SEXP is repeated four times for the four allied wings in the mission. All of them successfully receive the directive as can be determined when targeting their ships in game and reading their current order. However, none of them actually attempt to destroy the destroyers engines. Every single fighter ship instead travels in any direction away from the destroyer for an infinite amount of time....  :confused: :confused: :confused:


I have tried using a Goal priority of 150, and I have also tried using the goal ai-disable instead of ai-destroy-subsystem but the behavior remains exactly the same. Any ideas?
I'm unfamiliar with this method, but if you want this should work. Only needs two events.

Code: [Select]
Destroyer arrive
    When
        has-arrived-delay
            Destroyer
            0
        do-nothing

Disable engine
    When
        is-event-true-delay
            Destroyer arrive
            0
        add-goal
            Alpha
            ai-destroy-subsystem
                Destroyer
                engine
                89           
        add-goal
            Beta
            ai-destroy-subsystem
                Destroyer
                engine
                89
        send-message
            #Command
            High
            message

Used an SD Demon here. If there are multiple engines on the ship (like a Hatshepsut), you can change the ai-destroy-subsys to ai-disable-ship > Destroyer > 89.
Title: Re: Few Questions
Post by: soilder198 on May 23, 2019, 01:08:00 pm
I wonder if the disarm order is protecting the destroyer and forcing the AI to ignore it.


The destroy-subsystem goal I believe does not call for a protect order on the destroyer. However, when I previously used ai-disable-ship as my goal for the fighter wings, the corvettes and cruisers in my mission continued to bombard the destroyer without regard for its health, which I presume means the protect order wasn't given in that case either?
Title: Re: Few Questions
Post by: soilder198 on May 23, 2019, 01:09:54 pm
2. During a mission, I have an instance where an enemy destroyer makes a surprise appearance, and Command subsequently orders all fighter wings to disables its engines. The SEXP goes like this When --> Is event true delay --> fighter wings (message from command to disable the destroyer) --> add goal, Alpha --> ai destroy subsystem --> destroyer, engine, 89. This SEXP is repeated four times for the four allied wings in the mission. All of them successfully receive the directive as can be determined when targeting their ships in game and reading their current order. However, none of them actually attempt to destroy the destroyers engines. Every single fighter ship instead travels in any direction away from the destroyer for an infinite amount of time....  :confused: :confused: :confused:


I have tried using a Goal priority of 150, and I have also tried using the goal ai-disable instead of ai-destroy-subsystem but the behavior remains exactly the same. Any ideas?
I'm unfamiliar with this method, but if you want this should work. Only needs two events.

Code: [Select]
Destroyer arrive
    When
        has-arrived-delay
            Destroyer
            0
        do-nothing

Disable engine
    When
        is-event-true-delay
            Destroyer arrive
            0
        add-goal
            Alpha
            ai-destroy-subsystem
                Destroyer
                engine
                89           
        add-goal
            Beta
            ai-destroy-subsystem
                Destroyer
                engine
                89
        send-message
            #Command
            High
            message

Used an SD Demon here. If there are multiple engines on the ship (like a Hatshepsut), you can change the ai-destroy-subsys to ai-disable-ship > Destroyer > 89.

I made a test mission in FRED just to test both the ai-disable-ship and ai-destroy-subsystem goals and both worked completely fine. It seems only in my mission does everything freak out.
Title: Re: Few Questions
Post by: Nightmare on May 23, 2019, 01:25:45 pm
Do the wings still have other orders?
Title: Re: Few Questions
Post by: soilder198 on May 23, 2019, 01:34:15 pm
Do the wings still have other orders?

Yes. Wings Delta and Gamma arrive with an initial order to guard a corvette and do not receive any other orders until the destroy-subsystem order and cannot be given orders by the player.

Alpha and Beta wings are initially ordered to guard a separate corvette, are also ordered to destroy-subsystem, and can be given orders by the player.