Page 1 of 1
equipment_price_factor - accessible from JS?
Posted: Wed Dec 09, 2009 4:28 pm
by Screet
Hi,
I currently would like to access the key "equipment_price_factor" but searching the wiki I have not come up with any access methods.
Is there something or a workaround for it?
Screet
Posted: Wed Dec 09, 2009 4:36 pm
by Cmd. Cheyd
One of the more knowledgable I'm sure can give you a precise answer, but I believe it's set in the station's shipdata plist. Least, that's where I set it for one of my WiP OXP's and it worked.
Posted: Wed Dec 09, 2009 7:33 pm
by Screet
Cmd. Cheyd wrote:One of the more knowledgable I'm sure can give you a precise answer, but I believe it's set in the station's shipdata plist. Least, that's where I set it for one of my WiP OXP's and it worked.
Yes, it's in there - but how to access it from JS? I need to know how the current station does affect the equipment price...
Screet
Posted: Wed Dec 09, 2009 9:07 pm
by Kaks
To the best of my knowledge, there's no way of finding out the equipment price factor from javascript...
Nor there's a way to change equipment prices from javascript either.
One thing you might be able to do is to refund part of the price, if you think the player was charged too much, or charge more if they paid too little.
The way prices are calculated can be a bit tricky to get right, and looking at that part of the code is probably something we will do post for EMMSTRAN.
Re: equipment_price_factor - accessible from JS?
Posted: Wed Dec 09, 2009 10:12 pm
by Eric Walch
Screet wrote:Hi,
I currently would like to access the key "equipment_price_factor" but searching the wiki I have not come up with any access methods.
Is there something or a workaround for it?
Screet
McLane asked the same recently in scripting requests. It would be very easy to make it a read-only property of station when needed.
As a workaround you could store the price of a missile on startup and compare it with the local value. (I guess it should work as a workaround)
Posted: Thu Dec 10, 2009 10:35 am
by another_commander
The equipmentPriceFactor read-only property for stations is now accessible from JS.
Posted: Thu Dec 10, 2009 11:39 am
by Screet
another_commander wrote:The equipmentPriceFactor read-only property for stations is now accessible from JS.
Many thanks!!!
Screet