equipment.plist questions

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

equipment.plist questions

Post by Lestradae »

Two questions ...

1.) Does anyone know, if I want a piece of equipment to be only available to be bought if the player`s ship has a certain weapons energy or higher, how to do this with the conditions key in the equipment.plist?

Would do it somewhat like this:

Code: Select all

<dict>
                        <key>available_to_all</key>
                        <true/>
                        <key>conditions</key>
                        <array>
                                <string>weapon_energy greaterthan 100</string>
                        </array>
                </dict>
... actually work ingame?

If not, how then, or is it even possible to set such a condition?

2.) I want to create a new equipment item that reduces the hyperspace_motor_spin_time of a ship to a certain value. How do I do that?

:?:

L
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

I don't think that it is possible. The conditions part depends on legacy scripting and getting properties is JS only. But maybe I'm wrong.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: equipment.plist questions

Post by Commander McLane »

Lestradae wrote:
Two questions ...

1.) Does anyone know, if I want a piece of equipment to be only available to be bought if the player`s ship has a certain weapons energy or higher, how to do this with the conditions key in the equipment.plist?

Would do it somewhat like this:

Code: Select all

<dict>
                        <key>available_to_all</key>
                        <true/>
                        <key>conditions</key>
                        <array>
                                <string>weapon_energy greaterthan 100</string>
                        </array>
                </dict>
... actually work ingame?

If not, how then, or is it even possible to set such a condition?
Like Svengali said, not possible. Via conditions in equipment.plist (or in any legacy-script) only the states available to legacy scripts can be queried, and the list of these states is unfortunately brief. You find it in the Querying states section of the legacy-methods documentation. If a whatever_number is not mentioned there, you can't use it.
Lestradae wrote:
2.) I want to create a new equipment item that reduces the hyperspace_motor_spin_time of a ship to a certain value. How do I do that?
Also not possible. Hyperspace_motor_spin_time is set once and for all in shipdata.plist. You cannot change it from a script. This would require to make it a read/write JS-property, preferably of PlayerShip, which it doesn't yet seem to be.

So you would have to request it first.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

..

Post by Lestradae »

Thanks, guys, for the helpful comments, even if they didn`t bring a solution the way I hoped they would :(
Post Reply