Members | Sign In
All Forums > Mission Scripting
avatar

Civilian Comms Orders

posted May 30, 2013 18:02:48 by TravisHead
Minor issue with Civilian comms orders;
seems the "will accept comms orders" AI bit works (I have seen conflicting points about that in this forum).
The issue I am having is that the ships which are set to ignore comms orders still respond to the affirmative via comms.
They never actually DO what you tell them, which is what I want, but they respond as if they will and then simply ignore you.... seems kind of snide :-/

Is there a way to suppress the default affirmative response of the civilian ships?

This is my last hurdle to completing my first mission since January so I am itching to get it out there.
:)

T
[Last edited Jun 01, 2013 13:02:51]
page   1
4 replies
avatar
Captain said May 30, 2013 20:24:43
Look into the waning dark or end of peace. They both come with the game and one of them (I think waning dark) has a civilian ship that responds thy they will not accept your orders.
To Mankind
And the hope that the war against folly may someday be won, after all

Isaac Asimov
avatar
TravisHead said May 31, 2013 01:02:33
Thanks.
No luck, however.

I had a look at Waning Dark and found the code responsible;
<create type ="neutral" raceKeys="friendly" hullKeys="cargo" x="70100" y="0" z="45000" name="Borland Cargo" angle="0"/>
<set_object_property name="Borland Cargo" property="willAcceptCommsOrders" value="0" />

I also found similar code from another mission, "Party Crashers" which does not allow orders, but those all seem to be commented out;
<create type="neutral" x="2000" y="0" z="76000" angle="270" name="Donner Supply 4" raceKeys="USFP friendly" hullKeys="Transport Cargo"/>
<add_ai type="POINT_THROTTLE" value1="90000" value2="0" value3="75000" value4="1" name="Donner Supply 4"/>
<!-- set_object_property property="willAcceptCommsOrders" value="0" name="Donner Supply 4" /-->

However later in the mission they begin accepting orders with this;
<set_object_property property="willAcceptCommsOrders" value="1" name="Donner Supply 4"/>

When I added this code to my mission it made no difference, ships still respond to the affirmative and yet ignore me.
Here is my code;
<create type="neutral" x="25500.0" y="0.0" z="90000.0" angle="0.0" name="DS1Defender1" raceKeys="TSN friendly" hullKeys="Destroyer" />
<set_object_property property="willAcceptCommsOrders" value="0" name="DS1Defender1"/>

(I've tried it with and without the trailing space as well as set as neutral/cargo/friendly and it makes no difference)

So at this point I have no idea why it works in Waning Dark and not in my mission.
There doesn't seem to be a way to suppress that affirmative message or even have an order trigger an event (players says "go here", ship responds "ok" and then someone else says "negative, disregard that order" sort of thing).

I did notice that the mission editor flags the object property as an "unknown property name" but the command WORKS in Waning so the game itself obviously recognizes it, even if the editor does not.

Any thoughts?
avatar
TravisHead said May 31, 2013 01:19:14
GOT IT!
I had to clear the AI stack before giving it my desired AI.
Here is my modified code which does cause them to refuse your orders;
<create type="neutral" x="25500.0" y="0.0" z="90000.0" angle="0.0" name="DS1Defender1" raceKeys="TSN friendly" hullKeys="Destroyer" />
<set_object_property property="willAcceptCommsOrders" value="0" name="DS1Defender1" />
<clear_ai name="DS1Defender1" />

I tried removing the middle line there to see if it was just the act of clearing the ai stack but that didn't work. Seems you need to give it that property value 0 as well as clear the ai stack to make them ignore your orders.
Must be built-in hidden ai that makes them default to accepting orders.

I wonder what other properties exist that are not included in the editor?

Thanks for pointing me in the right direction, much appreciated.
T.
avatar
xavierwise.tsn said May 31, 2013 22:05:10
I always script AI stacks in a seperate event to the event in which I create a ship.

I do know that you must have the AI stack in the right order too, so if you want to give entirely new AI to a ship, the first actions should be "clear AI stack". If you set up an event that clears the AI stack of a ship, then it will not accept comms orders. I believe that if you create a new ship, it has its own AI stack already "inbuilt" that it starts with.
Login below to reply: