spara wrote:Fritz wrote:I want to make it as simple as possible. If the ship has been given a name already by any OXP, I'll change it.
If you at some point want to release your OXP to the public, you don't want to do this. It might be crucial for some OXPs that the name of the ship does not change. They might be checking the name or it's essential for identification for example.
Yes, but then I would have to recognize if a name has been given by a special OXP or by Random Ship Names or something similar. That would only be possible if the special names had some common properties, but even with my fixed-scheme "company names" that would be difficult in some cases. To be perfect, there should be something like a ship.remarks property that could be written by OXPs to "claim" their ships. But most OXP will use their own models, shipdata entries and/or roles, so only changing the core trader freighters shouldn't be a problem in many cases.
Currently the only OXP you need to be aware of is randomshipnames. And it does it's best not to break anything.
I noticed this. I kept the checking parts for my "Shorter Ship Names" OXP (in fact, most of the shipSpawned function is identical), although I didn't understand everything of it.
Your idea sounds good. Maybe at some point you could make an alternative to randomshipnames?
When I think it's good enough, I won't hide it! The technological part is working fine already but I still have to find some additional naming schemes and/or adjust some probabilities to reduce the appearing of similar sounding names. I could even keep the company naming part inside and deactivate it if my freighter OXP is installed.
Or they could complement each other?
I don't think so. To combine them into one OXP would fail because of the completely different naming rules. The only solution would be to do a random split up very early, so that x% of the ships get "random ship names" and y% get "shorter ship names". Simpler would be to install both OXPs, but each of them would have to be modified so that it only affects half of the ships and leaves the other half unchanged.
Btw. Norby kindly added a hook to the randomshipnames for me to use, that allows adding a secondary naming engine to it. I planned on using it to inject ship names from Rescue Stations OXP and Random Hits OXP into the Ooniverse, but never used it. Maybe you could use it?
Perhaps. But doing the naming separately from the texturing would cause new problems. I would have to read the texture filename to find out which naming scheme has to be used. And I have some ideas in my head that would reduce the naming part to a minor issue, so I don't want the OXP to be connected too closely to a naming OXP.
As I said, at least in the first version I just want to change the looks and names of the ships, so I don't have to bother about their AI and behavior. The modified ships remain "traders" and should behave like any core trader. I perhaps will include some additional functionality later, that would require different roles, but that will probably be far in the future.