Page 1 of 1

Defined likelihood for encountering a ship

Posted: Sun Jun 06, 2010 7:13 pm
by maik
Background:
I was just discussing the BigShips OXP with ADCK and it seems that as long as there are not a lot of ships with the same role those few that do exist will be spawned quite frequently. In my case, I have seen up to three dredgers in one system which doesn't seem right at all.

Suggestion:
I would like to suggest to add a probability to encounter a given ship to its definition. This kind of probability should exist for roles as well. Both probabilities should be modifiable so that OXP requirements can be taken care of. So an OXP could spawn one ship and afterwards set the probability to zero to make sure that there is only one per system.

Example:
For the standard roles trader and pirate this probability would default to 1.0 because they always appear in a system (I guess there is some other property that defines how many e.g. pirates there are as that differs based on government type). For special roles as defined in the BigShips OXP the probability would be rather low, e.g. 0.05. If a role has been selected to exist based on it's probability then the number of ships has to be determined and for each ship that belongs to this role its own probability has to be taken into account. So a dredger could have a lower probability than a large trader.

Other uses:
I believe that more expensive ships should be significantly more rare, like e.g. the Imperial Courier. However, at the moment I encounter it quite frequently. So this property would better balance that aspect of the game.

I know I'm making a lot of assumptions here, so does this make sense?

EDIT: ADCK just explained that a per-ship probability already exists, so it seems to boil down to role probabilities and number of ships per role.

Thanks,
-Maik

Posted: Sun Jun 06, 2010 7:17 pm
by JensAyton
All of this can already be done.

Posted: Sun Jun 06, 2010 7:19 pm
by maik
Thanks for the quick reply. That would imply that it's up to OXP authors to make better use of the existing facilities ;-)

Posted: Sun Jun 06, 2010 7:30 pm
by DaddyHoggy
maik wrote:
Thanks for the quick reply. That would imply that it's up to OXP authors to make better use of the existing facilities ;-)
It's purely psychological - somebody goes to a lot of effort to create a new ship then they want it to appear in the game - so rather than 0.01 or even 0.001 chance of appearing the ship might have 0.1 - which at the time of creation feels like a low number but in practice means you see a lot of these ships a lot of the time.

Posted: Sun Jun 06, 2010 8:26 pm
by Thargoid
And bigShips is designed as a generic facilitator for the big traders - it deliberately doesn't include any of its own (aside from an Anaconda with a stupidly low defined probability role).

That Anaconda is a nice example though, even if it's role is set at (0.0001) - I forget offhand exactly what it is, but if that's the only choice available (if no other OXPs using the bigTrader role are installed) then you'll get that one every time.

As has been said if you want something unique then you don't want to be using bigShips or something like that, that's not its purpose. And if you want to dilute things then just make a ship with the relevant role that removes itself again immediately that its spawned. Then by careful balancing of roles your desired rarity is easily tunable.

Posted: Sun Jun 06, 2010 8:37 pm
by caracal
DaddyHoggy wrote:
It's purely psychological - somebody goes to a lot of effort to create a new ship then they want it to appear in the game ...
Quite true. During development, you always want them to appear. (And there are several ways to make that happen.) Afterward, though, rarity can make a ship more interesting. I've never seen a Vector, for example, despite having the OXP installed for over a month. When I do, I'll surely draw alongside and ogle it extensively. 8)
DaddyHoggy wrote:
... so rather than 0.01 or even 0.001 chance of appearing the ship might have 0.1 - which at the time of creation feels like a low number but in practice means you see a lot of these ships a lot of the time.
No kidding. I'm working on a goofy little OXP, and I set the initial chance of something happening to 0.1 every time you enter the aegis or exit the main station. Whoa! Too often! I'm thinking that 0.01 might be too often as well, although with OXPConfig the player should in theory be able to adjust it to his taste, presuming I can figure out how to expose a numeric value to OXPConfig. (There are hints that it can be done, like the slider values in Snoopers, but those don't show up on my screen so maybe it's "yet to come".)

Posted: Sun Jun 06, 2010 8:54 pm
by Svengali
caracal wrote:
DaddyHoggy wrote:
It's purely psychological - somebody goes to a lot of effort to create a new ship then they want it to appear in the game ...
Quite true. During development, you always want them to appear. (And there are several ways to make that happen.) Afterward, though, rarity can make a ship more interesting. I've never seen a Vector, for example, despite having the OXP installed for over a month. When I do, I'll surely draw alongside and ogle it extensively. 8)
Yes, they are quite rare - exactly what I've had in mind .-)
caracal wrote:
DaddyHoggy wrote:
... so rather than 0.01 or even 0.001 chance of appearing the ship might have 0.1 - which at the time of creation feels like a low number but in practice means you see a lot of these ships a lot of the time.
No kidding. I'm working on a goofy little OXP, and I set the initial chance of something happening to 0.1 every time you enter the aegis or exit the main station. Whoa! Too often! I'm thinking that 0.01 might be too often as well, although with OXPConfig the player should in theory be able to adjust it to his taste, presuming I can figure out how to expose a numeric value to OXPConfig. (There are hints that it can be done, like the slider values in Snoopers, but those don't show up on my screen so maybe it's "yet to come".)
This is a coming feature in OXPConfig2 (when I ever finish this baby). Sliders and numeric values (integers) are on my list and partly already working, but it still needs some thinking. So don't hold your breath... https://bb.oolite.space/viewtopic.php?t=4908

Posted: Sun Jun 06, 2010 10:55 pm
by caracal
Svengali wrote:
caracal wrote:
I've never seen a Vector, for example, despite having the OXP installed for over a month. When I do, I'll surely draw alongside and ogle it extensively. 8)
Yes, they are quite rare - exactly what I've had in mind .-)
And you have succeeded! :P
Svengali wrote:
caracal wrote:
(There are hints that it can be done, like the slider values in Snoopers, but those don't show up on my screen so maybe it's "yet to come".)
This is a coming feature in OXPConfig2 (when I ever finish this baby). Sliders and numeric values (integers) are on my list and partly already working, but it still needs some thinking. So don't hold your breath... https://bb.oolite.space/viewtopic.php?t=4908
Ah, thanks for the update. I went back and looked at the Snoopers page again, and it actually does say "OXPConfig2". It'll be nice whenever you get a chance to put the new stuff in, and I'm certainly keeping both the current and future configuration capabilities in mind when coding OXPs. I think OXPConfig is a great idea!

Re: Defined likelihood for encountering a ship

Posted: Thu Jun 10, 2010 1:01 pm
by Commander McLane
maik wrote:
Background:
I was just discussing the BigShips OXP with ADCK and it seems that as long as there are not a lot of ships with the same role those few that do exist will be spawned quite frequently. In my case, I have seen up to three dredgers in one system which doesn't seem right at all.
Just to clarify a little more on how roles are used:

Oolite's game engine (the system populator) only recognizes and uses very few generic roles, in order to populate the space lanes. Namely:

trader
hunter
pirate
police
thargoid
asteroid

Additionally some ships can be accompanied by others with roles:

escort
wingman (same as escort, but for police ships)

These are all the roles there are. If you want a ship to appear outside this list, you have to take care of it yourself by spawning it via a script command. Of course, in this case, it is entirely up to yourself how frequently the ship will be seen.

So, in case of the dredgers, perhaps the script went overboard. Or they arte created simply with role "trader", which could indeed lead to systems with many dredgers, and would therefore be bad scripting.

Re: Defined likelihood for encountering a ship

Posted: Thu Jun 10, 2010 1:30 pm
by Smivs
Commander McLane wrote:
Just to clarify a little more on how roles are used:

Oolite's game engine (the system populator) only recognizes and uses very few generic roles, in order to populate the space lanes. Namely:

trader
hunter
pirate
police
thargoid
asteroid
Something I would like to know...what are the frequencies of the above? For example I assume that more traders are generated than say hunters, so does anyone know what percentage (or however it works) of ships generated are traders or hunters or pirates and so on? :?:

Re: Defined likelihood for encountering a ship

Posted: Thu Jun 10, 2010 3:23 pm
by DaddyHoggy
Smivs wrote:
Commander McLane wrote:
Just to clarify a little more on how roles are used:

Oolite's game engine (the system populator) only recognizes and uses very few generic roles, in order to populate the space lanes. Namely:

trader
hunter
pirate
police
thargoid
asteroid
Something I would like to know...what are the frequencies of the above? For example I assume that more traders are generated than say hunters, so does anyone know what percentage (or however it works) of ships generated are traders or hunters or pirates and so on? :?:
It's related to system (I think) - anarchy systems generate many more pirates than police than say a Corporate State system would - I'm sure somebody who can look in the code can give the bounding numbers (I have a vague recollection that such info has been supplied before)

Re: Defined likelihood for encountering a ship

Posted: Thu Jun 10, 2010 4:23 pm
by Eric Walch
Smivs wrote:
..Something I would like to know...what are the frequencies of the above?
When you really want to know, open the file "logcontrol.plist" and look for the line:

Code: Select all

universe.populate		= no;
Change this into "yes". logcontrol can be found inside oolite's own config folder. (Don't change it there, but place a copy in your own config folder inside addOns). After changing you get a list in your log after every jump about the number the populator is going to add.