Defined likelihood for encountering a ship

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Defined likelihood for encountering a ship

Post 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
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

All of this can already be done.
User avatar
maik
Wiki Wizard
Wiki Wizard
Posts: 2028
Joined: Wed Mar 10, 2010 12:30 pm
Location: Ljubljana, Slovenia (mainly industrial, feudal, TL12)

Post 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 ;-)
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Post 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.
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post 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.
User avatar
caracal
Deadly
Deadly
Posts: 205
Joined: Wed Jun 25, 2008 11:31 am
Location: The Desert, USA
Contact:

Post 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".)
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post 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
User avatar
caracal
Deadly
Deadly
Posts: 205
Joined: Wed Jun 25, 2008 11:31 am
Location: The Desert, USA
Contact:

Post 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!
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: Defined likelihood for encountering a ship

Post 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.
User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: Defined likelihood for encountering a ship

Post 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? :?:
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
DaddyHoggy
Intergalactic Spam Assassin
Intergalactic Spam Assassin
Posts: 8515
Joined: Tue Dec 05, 2006 9:43 pm
Location: Newbury, UK
Contact:

Re: Defined likelihood for encountering a ship

Post 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)
Selezen wrote:
Apparently I was having a DaddyHoggy moment.
Oolite Life is now revealed here
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Defined likelihood for encountering a ship

Post 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.
Post Reply