Members | Sign In
All Forums > Mission Scripting
avatar

question about set_ship_text command

posted Mar 23, 2013 17:32:39 by john
I'm running full version 1.702 or Windows 7. Running both client and server on the same laptop for testing. I have a barebones mission to test the set_ship_text functionality (see complete code below).

The issue I have is that the "desc" and "scan_desc" fields are being applied properly to the Kralien cruiser "KR01" but are NOT being applied to the transport ship "BI233". Is it a syntax problem or does the set_ship_text command not apply to neutral/friendly ships? Thanks.

COMPLETE MISSION CODE:
<!-- mission_data is the big wrapper for all the parts of a mission -->
<mission_data version="1.7" background_id_arme="">
<!-- ******************************************************************************************** -->
<!-- all the things that exist at the start of the mission -->
<start>
<create type="station" x="30000" y="0" z="23000" name="DS01" raceKeys="friendly" hullKeys="base" />
<create type="player" x="30100" y="0" z="23300" name="Artemis" />

<create type="enemy" x="20000" y="0" z="80000" angle="0" name="KR01" raceKeys="Kralien enemy" hullKeys="small" fleetnumber="1" />
<set_ship_text name="KR01" desc="desc1" scan_desc="desc2" />

<create type="neutral" x="10000.0" y="0.0" z="10000.0" angle="230.0" name="BI223" raceKeys="TSN friendly" hullKeys="Transport cargo" />
<set_ship_text name="BI233" desc="desc1a" scan_desc="desc2b" />
</start>
<!-- ******************************************************************************************** -->
</mission_data>


*edit* What I'm trying to accomplish is a "customs" mission where the players must scan merchant cargo ships looking for contraband, criminals, undercover Kraliens, etc.
[Last edited Mar 23, 2013 17:47:22]
page   1
5 replies
avatar
therealisa said Mar 26, 2013 11:23:39
Hey John,

I tried the exact same thing yesterday - make a scenario where you need to scan freight, and experienced the same thing. It is kind of a pitty that you cannot react to scans via events and I indeed found, too, that anything besides "enemies" do not have scan descriptions that are visible. I think that this should be fixed - if you want to get intel about friendly ships (like shield frequencies) you should be allowed to get them via scans... anyway, I came up with a "fix" for this problem, if you do not mind that the transporters turn up a enemies on the maps (just instruct the captain not to shoot at everything that is red):

<!-- Create an enemy -->
<create type="enemy" x="64000" y="0" z="12800" name="T54" raceKeys="Arvonian" hullKeys="Transport medium" angle="270" />
<!-- Set descriptions -->
<set_ship_text name="T54" desc="Destination: Torgoth homeworld" scan_desc="Freight: Music instruments, Arvonian wood" />
<!-- Make enemy dumb - especially don't let it attack anything -->
<clear_ai name="T54" />
<!-- ... just let it try to get to its destination -->
<add_ai name="T54" type="POINT_THROTTLE" value1="95000" value2="0" value3="10000" value4="0.8" />


I started mission scripting a few days ago... I kind of wish the author would have chosen for an established scripting language (Lua/Python) and perhaps added a bit more possibilites to react on stuff a ship can do (scans/custom comm messages...). The game is still awesome though :D
[Last edited Mar 26, 2013 11:26:26]
avatar
john said Mar 26, 2013 14:32:09
Good suggestion. I already went down a different path though. Once the player ship comes within range 10,000, I use a popup to the Science Console advising they can do a "customs scan" and watch for that scan using the if_client_key logic.

I return the results of the scan in another popup. Not the cleanest way to do things but I think it will work for my purposes. I'm using similar code to allow them to send an inspection team to the target ship.

Thanks for the input.
avatar
Mike_Substelny said Mar 26, 2013 20:32:41
I am pretty sure this is a new bug we have discussed before in the forums. Thom meant for the set_ship_text block to work for enemies and neutrals but it only workd for enemies. I believe he plans to fix it soon.
"Damn the torpedoes! Four bells, Captain Drayton!"

(Likely actual words of Admiral David Farragut, USN, at the battle of Mobile Bay. Four bells was the signal for the engine room to make full steam ahead).
avatar
matt.schillinger said May 22, 2013 13:25:24
Actually, it isn't a bug. When you name the object, it is Bl2 -2- 3.

When you attempt to set shoot txt, you used Bl2 -3- 3.
avatar
matt.schillinger said May 22, 2013 13:26:30
Set SHIP txt
Login below to reply: