The roles system - @Oolite developers, mainly
Moderators: winston, another_commander
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
The roles system - @Oolite developers, mainly
Hi Ahruman & consorts,
I have been trying to completely understand the way roles work before attempting to repair the inconsistencies in RS3.
An idea has arisen to simplify their function. Not sure if this is actually a scripting request, hence the Suggestions Forum.
I don`t know if it would be an easy or even really practical idea to implement or not. Anyways, perhaps this is the right time to mention it, as I read that for 1.72 the roles system has been rewritten or reworked anyways and that in 1.71.2 diverse things are broken with role functions that are located in the main game engine.
First, the roles should in my opinion have the purpose of being easily able to give a ship a certain span of possibilities. Having to rewrite the entire shipdata entry for a ship for different purposes doesn`t seem very convenient or logical to me if it could also be done otherwise.
So, to my actual suggestion.
What if the roles would simply add the nescessary gimmicks to the ships which are spawned with the given role?
Examples:
1. Why not give the role "police" the scan class police automatically by the script and not the other way around as it seems to have been reworked? That way, many inconsistencies with police not showing up as police or not noting crimes would become impossible in itself.
2. Why not give roles like "pirate", "scavenger" or "miner" an automatic "boost" of, say, 20 cargo, and automatically add a fuel scoop, which means that them attempting to scoop something will always work?
3. Why not give bounty automatically in conjunction with a certain role? I read somewhere that pirates, for example, get a random bounty by the game even if none was defined for a ship in question. Makes sense. It would also make sense that a ship of, i.e. the police role is made automatically clean, and so on. This again would make it near impossible to break something with the roles simply by assigning them to an unfitting ship.
4. Why not give escorts the same legal status or a fraction of it of its mother? Then there would be no pirates escorted by some nice guys or nice guys escorted by pirates automatically.
Can anyone see where I am going with this? This would not solve conflicts like giving a SuperCobra the shuttle role, and the SuperCobra as a consequence running away from a Krait. But it would make many rolefunction-breaking conflicts impossible and mean that if you simply enter a string of roles under "roles", the game engine will always at least work as intended.
I think this could be of interest to anyone who just wants to add-in some NPC ships and wants to conveniently say "they shall appear as this and that" - it would be possible to enter a role span and that`s it, no mistakes possible.
Good idea or not? I think it would be an improvement. Discuss ...
L
I have been trying to completely understand the way roles work before attempting to repair the inconsistencies in RS3.
An idea has arisen to simplify their function. Not sure if this is actually a scripting request, hence the Suggestions Forum.
I don`t know if it would be an easy or even really practical idea to implement or not. Anyways, perhaps this is the right time to mention it, as I read that for 1.72 the roles system has been rewritten or reworked anyways and that in 1.71.2 diverse things are broken with role functions that are located in the main game engine.
First, the roles should in my opinion have the purpose of being easily able to give a ship a certain span of possibilities. Having to rewrite the entire shipdata entry for a ship for different purposes doesn`t seem very convenient or logical to me if it could also be done otherwise.
So, to my actual suggestion.
What if the roles would simply add the nescessary gimmicks to the ships which are spawned with the given role?
Examples:
1. Why not give the role "police" the scan class police automatically by the script and not the other way around as it seems to have been reworked? That way, many inconsistencies with police not showing up as police or not noting crimes would become impossible in itself.
2. Why not give roles like "pirate", "scavenger" or "miner" an automatic "boost" of, say, 20 cargo, and automatically add a fuel scoop, which means that them attempting to scoop something will always work?
3. Why not give bounty automatically in conjunction with a certain role? I read somewhere that pirates, for example, get a random bounty by the game even if none was defined for a ship in question. Makes sense. It would also make sense that a ship of, i.e. the police role is made automatically clean, and so on. This again would make it near impossible to break something with the roles simply by assigning them to an unfitting ship.
4. Why not give escorts the same legal status or a fraction of it of its mother? Then there would be no pirates escorted by some nice guys or nice guys escorted by pirates automatically.
Can anyone see where I am going with this? This would not solve conflicts like giving a SuperCobra the shuttle role, and the SuperCobra as a consequence running away from a Krait. But it would make many rolefunction-breaking conflicts impossible and mean that if you simply enter a string of roles under "roles", the game engine will always at least work as intended.
I think this could be of interest to anyone who just wants to add-in some NPC ships and wants to conveniently say "they shall appear as this and that" - it would be possible to enter a role span and that`s it, no mistakes possible.
Good idea or not? I think it would be an improvement. Discuss ...
L
- Commander McLane
- ---- 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:
Obviously the engine already takes care of some of that, e.g. the defined bounty of a ship is ignored, if it is called as trader by the system populator.
Some other stuff doesn't make sense. Why should a scavenger be created with any cargo in its hold? It is launched from the station in order to scoop debris and return immediatly. That's his sole and only purpose. So obviously it would be launched with a completely empty cargo hold. (The people who clean up after a big event start their work having an empty dust-bin or garbage-bag, not one that is already full.)
And if it's not the cargo actually carried that is meant here, but the cargo capacity of a ship (the size of its cargo hold), there is also no sense in an automatic boost for specific roles. A Cobra Mk1 can carry so-and-so-many tons. Why should its cargo hold miraculously become bigger if it's a pirate?
And still the basic rule is: If a ship isn't fit to work as a hunter, don't make it a hunter. If a ship isn't fit to be a scavenger, don't make it a scavenger. If a ship isn't fit to be a shuttle, don't make it a shuttle. So it will always be the responsibility of an OXP-writer (as it has always been, and generally all OXP-writers have fulfilled this responsibility) to give his ship only those roles that it is fit for.
So I don't see the need for an "improvement". All that is needed is to simply understand what words like "trader", "hunter", "police", "scavenger" or "shuttle" in English language mean. If an OXP-writer understands that, he will know which of these tasks his ship is capable of, and he won't try to give it a task (= roles) which makes no sense for that specific ship.
That's all.
Some other stuff doesn't make sense. Why should a scavenger be created with any cargo in its hold? It is launched from the station in order to scoop debris and return immediatly. That's his sole and only purpose. So obviously it would be launched with a completely empty cargo hold. (The people who clean up after a big event start their work having an empty dust-bin or garbage-bag, not one that is already full.)
And if it's not the cargo actually carried that is meant here, but the cargo capacity of a ship (the size of its cargo hold), there is also no sense in an automatic boost for specific roles. A Cobra Mk1 can carry so-and-so-many tons. Why should its cargo hold miraculously become bigger if it's a pirate?
And still the basic rule is: If a ship isn't fit to work as a hunter, don't make it a hunter. If a ship isn't fit to be a scavenger, don't make it a scavenger. If a ship isn't fit to be a shuttle, don't make it a shuttle. So it will always be the responsibility of an OXP-writer (as it has always been, and generally all OXP-writers have fulfilled this responsibility) to give his ship only those roles that it is fit for.
So I don't see the need for an "improvement". All that is needed is to simply understand what words like "trader", "hunter", "police", "scavenger" or "shuttle" in English language mean. If an OXP-writer understands that, he will know which of these tasks his ship is capable of, and he won't try to give it a task (= roles) which makes no sense for that specific ship.
That's all.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: The roles system - @Oolite developers, mainly
Can you please give an example of broken roles within the 1.71.2 engine?Lestradae wrote:I read that for 1.72 the roles system has been rewritten or reworked anyways and that in 1.71.2 diverse things are broken with role functions that are located in the main game engine.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
The concept is already very flexible because you can create a template ship. And when you want your ship with an other role having slightly different values you make a like_ship entry with only the changed things.Lestradae wrote:First, the roles should in my opinion have the purpose of being easily able to give a ship a certain span of possibilities. Having to rewrite the entire shipdata entry for a ship for different purposes doesn`t seem very convenient or logical to me if it could also be done otherwise.
Only watch out: References are not cumulative. When a like_ship points to an other like_ship, it is not changing that one but first looks for the original and changes that one. This is an error I often see (And also made myself in he past)
Further on your ideas: A lot of those are already working that way when the populator adds traders, police etc. Problems only arises when traders are added by a script. Than it often isn't automated. Part of these problems are already covered by introducing the auto_ai for script added ships.
----
Just a note to the cargo. Creating entities takes time. Therefor the populator does not add cargo to ships on entering the system. (Nobody will ever see this and most ships make it to the station without ever need to show their cargo). Cargo is added to the system when a ship is destroyed. (Based on maximum cargo for traders and on likely_cargo for pirates).
This is not just cargo, but the cargo or splinters stay in the game until they are destroyed. That means when a ship scoops them, they are actually inside the ship. When a ship scoops a splinter and a red barrel with textiles, it will exactly release those items on destruction of the ship. An exception is scripted cargo that is removed after script execution and also a certain percentage of the cargo is deliberately destroyed in the explosion.
What actually happens on destruction of a ship: When it has already scooped barrels it is releasing those in the hold and when never scooped anything it is creating new cargo based on shipdata.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Commander McLane
- ---- 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: The roles system - @Oolite developers, mainly
I forgot that one: This is not the purpose of roles. The purpose of roles is - simply said - to call an entity into being, with a specific role, like the role some actor plays in a movie or theater. The actor with the role Hero is - in most cases at least - different from the actor with the role Villain, and again different from the actor with the role Gentle Maid. That means that the set of properties attached to each of them is different. Hero: good, Villain: bad, Gentle Maid: helpless and in love with the hero. This set of properties is in Oolite defined in shipdata. So the only logical and convenient way is to have a different shipdata-entry for each role. And a play or movie in which the hero, the villain and the gentle maid are just the same character usually makes not much sense.Lestradae wrote:First, the roles should in my opinion have the purpose of being easily able to give a ship a certain span of possibilities. Having to rewrite the entire shipdata entry for a ship for different purposes doesn`t seem very convenient or logical to me if it could also be done otherwise.
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
I am generally opposed to adding more magic behaviour to the engine, because a) it adds complexity, which leads to bugs, and b) it makes it harder to actually control the behaviour of a ship when you actually understand how things work. As Eric says, if you want several similar ships with slightly distinct traits, use like_ship. (If I were to write a hypothetical non-backwards-compatible Oolite 2.0, I’d remove all the magic completely and require that the shipdata entries be correct, or that scripts correct them as needed.)
If this means what I think it does, that’s a bug (which no-one has reported). like_ship is supposed to work the expected way: if a FastThing is like a GreenThing but fast, and a GreenThing is like a BlueThing but green, a FastThing is like a BlueThing but fast and green. If this was broken, it’s fixed for 1.72 with the new ship registry mechanism.Eric Walch wrote:Only watch out: References are not cumulative. When a like_ship points to an other like_ship, it is not changing that one but first looks for the original and changes that one. This is an error I often see (And also made myself in he past)
E-mail: [email protected]
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
...
That`s what I meant: Adding cargo capacity. Reason: Any ship that tries to scoop cargo can do so (as it has cargo space available), even if the original ship`s template doesn`t have enough cargo space.And if it's not the cargo actually carried that is meant here, but the cargo capacity of a ship (the size of its cargo hold), there is also no sense in an automatic boost for specific roles. A Cobra Mk1 can carry so-and-so-many tons. Why should its cargo hold miraculously become bigger if it's a pirate?
For example here:Can you please give an example of broken roles within the 1.71.2 engine?
https://bb.oolite.space/viewtopic.php?t=4551
... or here:
https://bb.oolite.space/viewtopic.php?t=4622
For RS 3.02, this will be the way to go anyways when I find the RL time - in two, three weeks presumably.The concept is already very flexible because you can create a template ship. And when you want your ship with an other role having slightly different values you make a like_ship entry with only the changed things.
Perhaps something like that should find its way to the wiki? It`s relevant information methinks ...Just a note to the cargo. Creating entities takes time. Therefor the populator does not add cargo to ships on entering the system. (Nobody will ever see this and most ships make it to the station without ever need to show their cargo). Cargo is added to the system when a ship is destroyed. (Based on maximum cargo for traders and on likely_cargo for pirates).
This is not just cargo, but the cargo or splinters stay in the game until they are destroyed. That means when a ship scoops them, they are actually inside the ship. When a ship scoops a splinter and a red barrel with textiles, it will exactly release those items on destruction of the ship. An exception is scripted cargo that is removed after script execution and also a certain percentage of the cargo is deliberately destroyed in the explosion.
What actually happens on destruction of a ship: When it has already scooped barrels it is releasing those in the hold and when never scooped anything it is creating new cargo based on shipdata.
Mind if I put this intuitively nicely fitting metaphor onto the wiki here:The purpose of roles is - simply said - to call an entity into being, with a specific role, like the role some actor plays in a movie or theater. The actor with the role Hero is - in most cases at least - different from the actor with the role Villain, and again different from the actor with the role Gentle Maid. That means that the set of properties attached to each of them is different. Hero: good, Villain: bad, Gentle Maid: helpless and in love with the hero. This set of properties is in Oolite defined in shipdata. So the only logical and convenient way is to have a different shipdata-entry for each role. And a play or movie in which the hero, the villain and the gentle maid are just the same character usually makes not much sense.
http://wiki.alioth.net/index.php/Role
Aw ...I am generally opposed to adding more magic behaviour to the engine, because a) it adds complexity, which leads to bugs, and b) it makes it harder to actually control the behaviour of a ship when you actually understand how things work.
I do understand this, though, I`m just thinking that if it was possible to remove potential conflict in a way similar to my suggestions this would make it more difficult to break something with too-strange role distributions.
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
One of those is an AI bug. The other is a bug in an OXPs shipdata. Remember if you want a ship to act in a special way, you can give it a custom role and call it with script with a custom AI. The general roles are really that: general. It isn't "realistic" for a sidewider to gain cargo space (when it doesn't actually have any) if it is called as a miner or scavenger. If you want to use a sidewinder in one of these roles, it's really more fun to make a custom varient. Change the model slighty peharps to give it a ram scoop and make the Miners Guild version a little slower, but it shouldn't just grow a cargo bay. Also traders need really to act like traders. Many OXPs will summon traders expecting them to act like traders (eg during the Malfunctioning Battle Bott mission). If you want a ship to behave in a non-standard way, then its best not to use a standard role. The roles are working, but the game assumes that you are kitting out your ship to do the role its meant to be playing.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Commander McLane
- ---- 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:
Nothing against it. Although I never thought this would need to be explained at all. I always supposed the word "role(s)" itself is pretty self-explanatory (like the word "ship"). And I also thought that words like "trader", "shuttle" et al are pretty self-explanatory, too. And everything you need to furtherly know about it is here. There is really nothing else to say or know about it.Lestradae wrote:Mind if I put this intuitively nicely fitting metaphor onto the wiki here:The purpose of roles is - simply said - to call an entity into being, with a specific role, like the role some actor plays in a movie or theater. The actor with the role Hero is - in most cases at least - different from the actor with the role Villain, and again different from the actor with the role Gentle Maid. That means that the set of properties attached to each of them is different. Hero: good, Villain: bad, Gentle Maid: helpless and in love with the hero. This set of properties is in Oolite defined in shipdata. So the only logical and convenient way is to have a different shipdata-entry for each role. And a play or movie in which the hero, the villain and the gentle maid are just the same character usually makes not much sense.
http://wiki.alioth.net/index.php/Role
As for the cargo space-issue: I think it is completely unrealistic to "magicly" change the properties of a ship, because you want to play it a certain role, because the only reason you would need this change, is because the ship you've chosen isn't the right ship for the role. So the only logical solution to the problem is: Don't give it the role in question.
Example: Everybody knows that a Sidewinder has no cargo space. So from an in-game perspecive only a Rock Hermit who is a moron would use one as a miner or scavenger. A moron, however, wouldn't survive long as a Rock Hermit, so it can be expected there are no Rock Hermits who are morons. Therefore no Rock Hermit would ever think of employing a Sidewinder as a miner or scavenger (and the same goes for main stations, of course, which also generally are not run by morons). So the only logical thing to do is not: "give the Sidewinder magic witch-cargo space if it is called as a miner or scavenger"; but it is: "don't ever call a Sidewinder as miner or scavenger", which from an OXP author's perspective is the same as: "don't give the Sidewinder a role of miner or scavenger".
Or, in other words and more general: don't mess with something which has been carefully and thoughtfully (give and take the one or two occasional bugs that happen everywhere) invented. And if you mess with it, you don't add variety, but stupidity, inconsistency and madness.
Another example is the use of big ships as shuttles: pure madness. Nobody would ever do that, therefore completely unrealistic. And this is not, because they are too big to dock, this is a relatively minor problem. No, the major realism-problem is that a big ship contradicts the whole idea "shuttle". A shuttle is - by definition - a transporter of some kind, that shuttles between two points that can't be connected otherwise, usually because of their size. E.g. an airport shuttle is a bus that takes passengers from the terminal to the airplane and back. The reason a shuttle is needed in the first place is precisely that the airplane is too big to be parked next to the exit door of the terminal. Another example: In some ports passengers are embarked with small shuttle boats, precisely because the big ocean liner can't get into the port, but has to anchor somewhere outside. Or in space travel: the NASA's Space Shuttle is designed (and has to be designed so, or it wouldn't be functional) in a way that it may travel inside and outside the Earth's atmosphere. So it needs wings etc. And it has to be reasonable small, because it has to be propelled out of the atmosphere with every take-off. So the fuel-costs would become prohibitive, if the shuttle was bigger. A structure the size of the ISS would be of no use as a shuttle. And the same goes for big space-ships. They are not designed in the first place for manoeuvering in the atmosphere, and even if they could land without being completely pulverized, they are too big to ever take off again within any reasonable boundaries of fuel-efficiency. Only conclusion: They wouldn't be used as shuttles, but would stay in the upper regions of the atmosphere, and smaller craft would shuttle between them and the surface. Which breaks down to: if you are an OXP-author, don't give a capital ship the role shuttle.
And I always thought things like this would be self-evident from words like "scavenger", "miner" or "shuttle".
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
As LittleBear has already pointed out, none of these are related to Oolite's role system, which works precisely as intended.Lestradae wrote:For example here:
https://bb.oolite.space/viewtopic.php?t=4551
... or here:
https://bb.oolite.space/viewtopic.php?t=4622
Lestradae, in my opinion, your requests in this thread are a bit over the top (or, in the case of #3, already implemented). It should be RS adjusting itself to fit the Oolite engine, not the other way around.
- Lestradae
- ---- E L I T E ----
- Posts: 3095
- Joined: Tue Apr 17, 2007 10:30 pm
- Location: Vienna, Austria
...
OK!Lestradae, in my opinion, your requests in this thread are a bit over the top (or, in the case of #3, already implemented).
Well, that goes without saying!It should be RS adjusting itself to fit the Oolite engine, not the other way around.
* goes put the role metaphor onto the wiki *
PS: I do now make a point of it to put every explanation on the wiki that explains something that I didn`t properly understand at first and didn`t find documented anywhere else.
This on the not completely unreasonable assumption that I`m not the only one who has questions which are unanswered in documentation as yet. This way, any question that is answered for me is potentially answered for everyone who goes looking.
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
Re: ...
Excellent, I really think that will give a lot of people some real help.Lestradae wrote:PS: I do now make a point of it to put every explanation on the wiki that explains something that I didn`t properly understand at first and didn`t find documented anywhere else.
This on the not completely unreasonable assumption that I`m not the only one who has questions which are unanswered in documentation as yet. This way, any question that is answered for me is potentially answered for everyone who goes looking.