Tinkerer's Workshop - OXP tweaking for fun and profit!
Moderators: winston, another_commander
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I guess I'd have to advise potential downloaders that installing other ship-OXPs might screw with the FE Ships' availability, then. (If no other solutions are found).
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Well, there are 2 solutions, you offer only at the main station or you scan the system for all stations and update all of them, it could be done with a script.
Scars remind us where we've been. They don't have to dictate where we're going.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
No, I'd rather stick with the Main Station, as that's where every Jameson starts, correct?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
If you want to make sure just at Lave main station at the start of the game, I would advise this test before calling the function to insert the ship(s) in the shipyard at the event handlers I mentioned:
Code: Select all
if (galaxyNumber === 0 && system.ID === 7 && clock.seconds <= 180058007622 + <time window the ship should be available in seconds>) {
//call the ship insertion code for the main station here
}
Last edited by dybal on Thu Nov 05, 2020 3:05 pm, edited 1 time in total.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Great. Muchisimas gracias
Edit: Oops, I mean muito obrigado
Edit: Oops, I mean muito obrigado
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Yes, and from what I've learned today, it seems to be majorly flawed and essentially uncontrollable.
I mean, there doesn't seem to be any logic to it. Whatever values I plug in for chance results in completely unpredictable ship-stock (but I guess that was the purpose). But it would be nice to be able to see consistent changes at the shipyard as you vary the probability. But there's no rhyme or reason.
For example I'm seeing long lists of Pythons and Boas at Tionisla and my geckos, kraits, mambas, adders scarcely get a look in...
Of course, there's the TL to factor in too, so we're essentially juggling plates.
Edit: Maybe someone familiar with the game core could offer a hint or two as to the optimal range of probabilites that would bring one at least close to one's desired shipyard-inventory, and how that relates to the second variable (TL).
Edit2: I suppose what I'm getting at is that it is the distribution that is skewed. We should expect just one or two of the heavies (Boas, Pythons, Anacondas), a good spread of medium-class ships (Cobras, Asps, Morays, Vipers), and a just a sprinkling of smaller craft (Gecko, Krait, Mamba, Sidewinder, Adder), to get the bell-curve right, no?
PS. What PRNG does Oolite use? And is the output uniform or Gaussian?
Last edited by Reval on Fri Nov 06, 2020 2:03 am, edited 2 times in total.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Going back to the Frontier-style OXP... I'm thinking that I shall probably need to alter the average commodity quantities to bring the market into line with the overall increased size of the FE Ships cargo holds. Probably a third OXP to handle that. Is there an override for the market entities?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Update note: Now getting the right mix at Lave after setting chance to 0.5 on all the new ships. This is even without the startUp scripts suggested by montana05 and dybal. Offered were: 3 Adders, 2 Kraits, 1 Cobra Mk I, and 1 Sidewinder.
So am now in two minds as to whether I need the startUp scripts...
What I would like to do, however, is somehow override the game start options and have just Normal and Strict, but giving a clue in the text that the Cobby could profitably be sold. (and also to change the ship name - currently "Cobra Mark III" - in Normal, though of course keep it as a Cobra III).
Edit: Do I assume right that chance=0.5 is a simple heads-or-tails coin toss?
Edit2: If I implement the "must have Adder and Gecko" event handler scripts for Lave, will there also be the standard random selection of ships, as above? ie. will an Adder and Gecko be added to that list, or preclude everything else?
So am now in two minds as to whether I need the startUp scripts...
What I would like to do, however, is somehow override the game start options and have just Normal and Strict, but giving a clue in the text that the Cobby could profitably be sold. (and also to change the ship name - currently "Cobra Mark III" - in Normal, though of course keep it as a Cobra III).
Edit: Do I assume right that chance=0.5 is a simple heads-or-tails coin toss?
Edit2: If I implement the "must have Adder and Gecko" event handler scripts for Lave, will there also be the standard random selection of ships, as above? ie. will an Adder and Gecko be added to that list, or preclude everything else?
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
chance is not broken, it works as designed. It is not a straightforward implementation though. This is the formula that calculates it:Reval wrote: ↑Fri Nov 06, 2020 12:09 amYes, and from what I've learned today, it seems to be majorly flawed and essentially uncontrollable.
I mean, there doesn't seem to be any logic to it. Whatever values I plug in for chance results in completely unpredictable ship-stock (but I guess that was the purpose). But it would be nice to be able to see consistent changes at the shipyard as you vary the probability. But there's no rhyme or reason.
For example I'm seeing long lists of Pythons and Boas at Tionisla and my geckos, kraits, mambas, adders scarcely get a look in...
Of course, there's the TL to factor in too, so we're essentially juggling plates.
Edit: Maybe someone familiar with the game core could offer a hint or two as to the optimal range of probabilites that would bring one at least close to one's desired shipyard-inventory, and how that relates to the second variable (TL).
Edit2: I suppose what I'm getting at is that it is the distribution that is skewed. We should expect just one or two of the heavies (Boas, Pythons, Anacondas), a good spread of medium-class ships (Cobras, Asps, Morays, Vipers), and a just a sprinkling of smaller craft (Gecko, Krait, Mamba, Sidewinder, Adder), to get the bell-curve right, no?
Code: Select all
double chance = 1.0 - pow(1.0 - [ship_info oo_doubleForKey:KEY_CHANCE], MAX((OOTechLevelID)1, techlevel - ship_techlevel));
Code: Select all
chance = 1.0 - pow(1.0 - chanceFromShipyardPlist, max(1, systemTechLevel - shipTechlevelFromShipyardPlist)
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Interesting. Correct me if I'm wrong, but I also notice that Oolite does not seem to randomize the seed on restarting (from the system clock or whatever). We get the same ship selection at Lave every time we start a Jameson. Is this stable for only the player's system, for the Oolite version, or is it permanent? I now see what dybal meant about implementing a dice-roll
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
-
- Quite Grand Sub-Admiral
- Posts: 6682
- Joined: Wed Feb 28, 2007 7:54 am
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Some things are fully random and some are pseudo-random. The pseudo-random ones are those based on the procedural generation routines we use and have to be so in order to generate the same predictable results every time. Planet textures for example are procedurally generated and always the same and we can't let them be fully random because this would make no sense. Shipyard chances are another such example. In other cases where we don't care about repeatability of results we are free to use truly random generation, e.g. selecting escorts for a trader NPC.
If you want more detail on the (pseudo)randomness in Oolite, have a go at this page: http://wiki.alioth.net/index.php/Random ... _generator
It is very informative, but some of the subjects discussed have become hardcoded in plists since then, like the planet properties.
If you want more detail on the (pseudo)randomness in Oolite, have a go at this page: http://wiki.alioth.net/index.php/Random ... _generator
It is very informative, but some of the subjects discussed have become hardcoded in plists since then, like the planet properties.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Oh cool. Thank you. I shall definitely do that (RNGs are one of my coding obsessions hehe).
BTW, if anyone fancies early, early, early Beta testing FE Ships and FE Ships Player, just shoot me a PM and I'll link you to a zip. I'm particularly keen to know how these little darlings handle in combat (as I don't do so much of that myself). Overall top speeds have been reduced, but not sure it matters since it's been done across the board. It is subject to change and normalization, of course, if enough users request it.
Provisionally, Forward, Aft, Port and Starboard views have been tied to weapons positions (it seemed the easiest way). Again, really don't know how that will affect combat...
The new flyable ships with FE specs are: Gecko, Krait, Mamba, Sidewinder, Viper, Viper 2.
BTW, if anyone fancies early, early, early Beta testing FE Ships and FE Ships Player, just shoot me a PM and I'll link you to a zip. I'm particularly keen to know how these little darlings handle in combat (as I don't do so much of that myself). Overall top speeds have been reduced, but not sure it matters since it's been done across the board. It is subject to change and normalization, of course, if enough users request it.
Provisionally, Forward, Aft, Port and Starboard views have been tied to weapons positions (it seemed the easiest way). Again, really don't know how that will affect combat...
The new flyable ships with FE specs are: Gecko, Krait, Mamba, Sidewinder, Viper, Viper 2.
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
FE Ships v.0.1 Beta update: All views fixed and laser accuracy tuned to perfection.
Hit me with a PM if you'd like to test-fly the featherweights of the Ooniverse...
Hit me with a PM if you'd like to test-fly the featherweights of the Ooniverse...
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- Reval
- ---- E L I T E ----
- Posts: 402
- Joined: Thu Oct 29, 2020 3:14 am
- Location: At home in the Xexedi Cluster, driving an FE Asp II, Laenina's Flux.
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
I was wondering if someone could give me a quick example of how to use
I assume that commodity, units, price are _passed_ to the function by Oolite and can be referenced within it? Or are we expected to supply them ourselves?
(Oh, why is the Wiki so sparse and cryptic?)
Code: Select all
this.playerSoldCargo = function(commodity, units, price)
{
// Your code here
}
(Oh, why is the Wiki so sparse and cryptic?)
Dor 'call me Grocer' Reval (a Xexedian Laver) was always considered a little backward.
- montana05
- ---- E L I T E ----
- Posts: 1166
- Joined: Mon May 30, 2016 3:54 am
- Location: lurking in The Devils Triangle (G1)
Re: Tinkerer's Workshop - OXP tweaking for fun and profit!
Yes, this function will return commodity, units and price and therefore you can reference to them.
Scars remind us where we've been. They don't have to dictate where we're going.