Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
toskp10

Registered:
Posts: 13
Reply with quote  #1 
I'm having a problem with Arvonian Carriers and fighters. The Carriers don't always launch their fighters when they get close to the target they are pursuing (but they do attack with beams). Sometimes they launch fighters, the target warps away, fighters return to carrier, but when the target returns they don't re-launch. Is there anything in the mission script that needs to be configured to make sure a Carrier always launches fighters? Some AI command or parameter for fighters? I'm using Version 2.4 with the mission GM Sandbox 5a by Arrew that I'm slightly tweaking for my own needs.
Arrew

Avatar / Picture

Registered:
Posts: 2,721
Reply with quote  #2 
Did you try the Launch fighters/ Fighter BINGO AI command?

I don't actually remember if it's in the sandbox script, it's been a long time [wink] .
toskp10

Registered:
Posts: 13
Reply with quote  #3 
I checked and there was some code for a "Launch Fighters" command, but it was commented out. I un-commented it and also changed the add_ai property from FIGHTER_BINGO to LAUNCH_FIGHERS, and that seemed to work.

Thanks for your help!
Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,716
Reply with quote  #4 
I'm not sure why, but carriers don't seem to get the Launch_fighters AI block by default. You need to add that. On the plus side, this forces you to customize the fighters to suit your scenario. I've always thought the stock AI stack didn't give the fighters enough range.
__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
toskp10

Registered:
Posts: 13
Reply with quote  #5 
With some more testing, it seems there are still more than a few bugs. The ships do launch their fighters, but they seem to go straight ahead for a few seconds, rather than locking on the player. By the time they turn around and have caught up, they head back to the carrier. And using the control to set the LAUNCH_FIGHTERS ai doesn't cause them to relaunch. Is there a fuel parameter that needs to be set? Can the duration they fly be modified in the vesselData.xml file?

Here is the relevant section of code:

<event name_arme="Launch Fighters" id_arme="7baaffcc-7a9f-4126-b895-34b1eb952ab3" parent_id_arme="d522f4b1-226a-4141-8dfd-8f6f8ef3453b">
<if_gm_button text="Hostiles/AI/Launch Fighters" />
<!---->
<clear_ai use_gm_selection="" />
<add_ai type="CHASE_PLAYER" value1="100000" value2="100000" use_gm_selection="" />
<add_ai type="LAUNCH_FIGHTERS" value1="50000" use_gm_selection="" />
</event>

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,716
Reply with quote  #6 
The LAUNCH_FIGHTERS statement applies to the carrier, not the fighters. I'm not sure if the documentation is up-to-date.

That LAUNCH_FIGHTERS should cause the carrier to launch fighters if a player ship is within range 50,000. But fighters cannot see that far, so they will just fly straight ahead until they are bingo fuel.

After the fighters are launched you could add a CHASE_PLAYER block to each fighter individually. That would mean a lot of clicking by the GM but it should work. Your command could clear the fighter's AI stack so that it won't go bingo fuel, then have the fighter chase players and attack players. Later the GM could click another command to each fighter to add BINGO_FUEL to the brain stack.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Xavier Wise

Registered:
Posts: 983
Reply with quote  #7 
What about reducing the range that fighters are launched to 10,000, or even less. Then it would simulate an arvonian holding back until your close and launching at the last minute to overwhelm. It may also solve the chase player problem if what mike s says is correct.
__________________
Captain Xavier Wise TSN Raven (BC-014)
Link to TSN RP Community website
Link to TSN Sandbox
Link to Blog
toskp10

Registered:
Posts: 13
Reply with quote  #8 
The carriers are behaving the way I want them to now (I think). The carrier creation code is below. Is there anyway to include a random number in the name? I would prefer to have something like "Carrier_83" and "Carrier_37", instead of all carriers having the same name "Arvonian Carrier". Is there a problem with multiple ships having the name from the game side? 
Is it possible to control things like fighter fuel and fighter "vision" (how far they can see)? I would like to tinker with vesselData.xml, but I can't find anything that explains the different parameters. Are they documented anywhere?

<event name_arme="Arvonian Big" id_arme="41213e4e-ddf8-4e6d-b140-1aadf41d62ac" parent_id_arme="d522f4b1-226a-4141-8dfd-8f6f8ef3453b">
<if_gm_button text="Hostiles/Arvonian/Big" />
<set_variable name="GMRandomA" randomIntLow="1" randomIntHigh="100" />
<create type="enemy" use_gm_position="" hullID="3002" fleetnumber="3" name="Arvonian Carrier" />
<clear_ai name="Arvonian Carrier" />
<add_ai type="CHASE_PLAYER" value1="100000" value2="100000" name="Arvonian Carrier" />
<add_ai type="LAUNCH_FIGHTERS" value1="10000" name="Arvonian Carrier" />
</event>

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 1,716
Reply with quote  #9 
There is a way to do that; just include a counting variable and write more code.

That is:

If GM button is clicked
If carrier_counter=0
Create "Arvonian Carrier 21"
Set AI for Arvonian Carrier 21
Let carrier_counter=1

If GM button is clicked
If carrier_counter=1
Create "Arvonian Carrier 36"
Set AI for Arvonian Carrier 36
Let carrier_counter=2

If GM button is clicked
If carrier_counter=0
Create "Arvonian Carrier 14"
Set AI for Arvonian Carrier 14
Let carrier_counter=3

If GM button is clicked
If carrier_counter=1
Create "Arvonian Carrier 77"
Set AI for Arvonian Carrier 77
Let carrier_counter=4

If GM button is clicked
If carrier_counter=0
Create "Arvonian Carrier 27"
Set AI for Arvonian Carrier 27
Let carrier_counter=5

If GM button is clicked
If carrier_counter=1
Create "Arvonian Carrier 04"
Set AI for Arvonian Carrier 04
Let carrier_counter=6

If GM button is clicked
If carrier_counter=0
Create "Arvonian Carrier 81"
Set AI for Arvonian Carrier 81
Let carrier_counter=7

If GM button is clicked
If carrier_counter=1
Create "Arvonian Carrier 56"
Set AI for Arvonian Carrier 56
Let carrier_counter=8

This lets you create 8 different carriers with one button. Because the names are known to you, this has the added bonus that you could give each carrier its own personality (captain type, ship characteristics, taunt immunity, elite abilities, AI stack, ship scan_text, even custom comms messages).

With a little more code you could recreate any of these ships more than once. That is, after you have created the 8th carrier cycle back to carrier_counter=0, but within each create block make sure that carrier does not already exist. If it does exist cycle to the next carrier. That way you can always have up to 8 distinctive carriers present on the map. Of course 8 is arbitrary; there is no limit to the number of times you can do this.


__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.