Page 17 of 29
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 6:15 am
by montana05
Reval wrote: ↑Tue Nov 03, 2020 5:42 am
Major 'tweak' in mind (or an OXP)...
First, is it possible to override/replace an entire core plist (like shipdata or shipyard)? If so, as an inexperienced OXPer, I'm eager to know how.
(if, say, for example, one had a notion to replace all the Oolite ships with their Frontier FE equivalents. I'm guessing one could use like_ship, but then wouldn't the originals remain in place?)
Both are possible with shipdata-overrides.plist and shipyard-overrides.plist. Some existing OXP's using this concept for core-ships already.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 6:18 am
by another_commander
Reval wrote: ↑Tue Nov 03, 2020 5:42 am
Major 'tweak' in mind (or an OXP)...
First, is it possible to override/replace an entire core plist (like shipdata or shipyard)? If so, as an inexperienced OXPer, I'm eager to know how.
(if, say, for example, one had a notion to replace all the Oolite ships with their Frontier FE equivalents. I'm guessing one could use like_ship, but then wouldn't the originals remain in place?)
Yes, it is possible. You may want to have a look at
shipyard-overrides.plist and
shipdata-overrides.plist.
Griff's ships OXP and plenty others use this to completely swap out the default ships with their own.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 6:37 am
by Reval
Thanks for the prompt replies!
Ok, so just to be clear: in the shipdata-overrides.plist I could use like_ship for all the new ships (no graphic changes contemplated, just the specs) and the originals would still be overwritten (ie not appear in the game)?
Edit: I mean, use like_ship in the overrides file if I wanted to change the ship-name slightly, say to "Adder FE"?
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 7:10 am
by another_commander
I don't think you need to like_ship anything in the override plists. Just insert the properties that you want to have changed and that should do it. Anything you don't insert yourself should be read from the standard plists.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 7:22 am
by Reval
Many thanks. Just one more small thing regarding this alteration:
Is there an easy way to change the relative sizes of the ships as they appear in game? For example, I think the FE Asp needs to look a little bigger...
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 7:52 am
by another_commander
Reval wrote: ↑Tue Nov 03, 2020 7:22 am
Is there an easy way to change the relative sizes of the ships as they appear in game? For example, I think the FE Asp needs to look a little bigger...
will make your model twice as big as the original. Adjust 2.0 to whatever value you require.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 10:26 am
by dybal
Reval wrote: ↑Tue Nov 03, 2020 6:37 am
Thanks for the prompt replies!
Ok, so just to be clear: in the shipdata-overrides.plist I could use like_ship for all the new ships (no graphic changes contemplated, just the specs) and the originals would still be overwritten (ie not appear in the game)?
Edit: I mean, use like_ship in the overrides file if I wanted to change the ship-name slightly, say to "Adder FE"?
You use like_ship if you are creating a new kind of ship (a new datakey), if you want to change an existing kind of ship you use the existing ship datakey, for eaxmple to make a really small ship have a credible cargo space:
Code: Select all
{
aquatics_shark = {
extra_cargo = 0;
max_cargo = 1;
}
}
All other properties of aquatics_shark remain unchanged.
Beware:
I think (I might be wrong) if you want to change a sub-property (a property of a property), like materials.<whatever>.diffuse_map, you would have to put the whole parent property and all it's sub-properties there or they would become undefined.
If you want to add a value to a list, or append something to a string, you have to put the whole list or string there.
I'm not sure if you can just undefine a property... perhaps:
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 10:38 am
by montana05
dybal wrote: ↑Tue Nov 03, 2020 10:26 am
I think (I might be wrong) if you want to change a sub-property (a property of a property), like materials.<whatever>.diffuse_map, you would have to put the whole parent property and all it's sub-properties there or they would become undefined.
If you want to add a value to a list, or append something to a string, you have to put the whole list or string there.
I'm not sure if you can just undefine a property... perhaps:
You are correct, for materials for example you need to overwrite the entire property. Be careful with subentities like flasher, sometimes they merge rather than get replaced.
Btw As much as I can remember like_ship in a overwrite is useless, it will simply be ignored.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 10:43 am
by Reval
Thanks for those additional pointers; I'll experiment. It's just the ship_name field I was unsure about (hence thinking I might've needed like_ship, but now I realize I was confusing ship-name, as displayed, with the property-name itself, ie. "adder-player").
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 10:48 am
by montana05
Reval wrote: ↑Tue Nov 03, 2020 10:43 am
Thanks for those additional pointers; I'll experiment.
I am currently working on some fixes for old OXP's so most of it is overwrites. In case you need some pointers feel free to shoot me a message.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Tue Nov 03, 2020 11:10 am
by Reval
Will do; that's most kind, montana
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Wed Nov 04, 2020 8:38 am
by Reval
Is there a way to make absolutely certain that a given ship will be available at a given TL station?
For example, in my developing OXPs 'FE Ships' and 'FE Ships PLayer', at least an Adder, Gecko and Krait must be available everywhere that has a TL of 1-6.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Wed Nov 04, 2020 10:02 am
by montana05
Reval wrote: ↑Wed Nov 04, 2020 8:38 am
Is there a way to make absolutely certain that a given ship will be available at a given TL station?
As much as I remember there is no absolute certainty, however by setting the chance and the techlevel in the shipyard.plist you could highly improve the chances.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Wed Nov 04, 2020 10:09 am
by Reval
For the Adder, the Krait and the Gecko I set the chance to 0.999 and the min TL to 1, and they don't appear anywhere now
Edit: They're not appearing at Lave, but they are available at other stars (Tionisla for eg).
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Posted: Wed Nov 04, 2020 9:13 pm
by Reval
I'm assuming that if I put allowOfferShip in a condition script inside the Scripts folder of my OXP, I can dictate what ships appear where and under what conditions. However, the wiki documentation on the use of this function is sparse (to say the least). Could anyone give me an example of its use (say I wanted to ensure that a Krait and a Gecko always appeared in stations with TL 6 or lower)?