daid / EmptyEpsilon

Open source bridge simulator. Build with the SeriousProton engine.
https://daid.github.io/EmptyEpsilon/
GNU General Public License v2.0
534 stars 181 forks source link

[Ship categories] Freighters and Ktlitan ships should get their own category. #1925

Open hemmond opened 1 year ago

hemmond commented 1 year ago

I'd recommend adding ship category for Freighters and Ktlitan ships. As of now, Freighters are in "Corvette" category and Ktlitan ships are in "No class" category. I don't believe freighters are corvettes, since freighters usually don't have any weapons. Is there a reason not to do that? If not, I can fix this issue and file a PR.

oznogon commented 1 year ago

I assume you mean "class" here when you say "category". What's the goal or benefit of changing their classes? To change the organization in the science database? Something else?

For what it's worth, freighters already have a subclass ("Freighter").

Some scenarios employ freighters and Ktlitan ships, and classes are a factor in docking, though only the Jump Carrier has Corvettes as a dock class. Would this change add freighters as a dock class to more ships?

Scenarios 44, 47, 59, 74, and 88 manually modify the science database and rely on the class "No class" or subclass "Freighter" for queryScienceDatabase calls, so the scenarios might need retesting or updates if ships are reclassified.

hemmond commented 1 year ago

Yes, I meant ship class. The main idea was to de-clutter science database, since freighters come in a LOT of shapes and sizes.

From my point of view, when I'm (as GM) picking up ship of suitable size and armaments, those three Corvettes (that are not Freighters) that would do the trick, but they are burreid deep inside Freighter list. And also feels a little ilogical to have Freighter class and not having any Freighters in it. But yes, the scenarios would probably need some more testing afterwards. I haven't thought of that relation yet.

Daid should probably say if it is worth fixing or not really.

oznogon commented 1 year ago

And also feels a little ilogical to have Freighter class and not having any Freighters in it.

The Freighter _sub_class isn't empty, the six freighter types all use the subclass. Like all subclasses, the science DB doesn't use it.

Daid should probably say if it is worth fixing or not really.

I haven't suggested that it's not worth changing. I'm trying to understand the problem in order to also understand the options available to solve the problem while trying to avoid causing other problems.

For instance, if the problem is science DB's navigation, the science DB could also organize ships based on subclass. This would require no changes to ship templates, but would result in new subclass categories in the science DB for all non-Ktlitan ships, not just corvettes.

Either reclassifying the ships or restructuring the science DB would require changes in scenarios that rely on a specific science DB structure and strings. For example with Freighters, that'd be at least the 7 genericFreighterScienceInfo lines copied in each of scenarios 44 and 74:

scripts/scenario_44_outpost.lua:                                genericFreighterScienceInfo(physics_research_db,queryScienceDatabase("Ships","Corvette","Garbage Freighter 3"),ship)

scripts/scenario_74_omicron.lua:                                genericFreighterScienceInfo(omnibus_db,queryScienceDatabase("Ships","Corvette","Personnel Jump Freighter 5"),ship)

For Ktlitans, that'd be at least the five "base ship database entry" lines copied in each of scenarios 44, 59, 74, and 88:

scripts/scenario_44_outpost.lua:                                queryScienceDatabase("Ships","No Class","Ktlitan Drone"),     --base ship database entry
...
scripts/scenario_59_border.lua:                         queryScienceDatabase("Ships","No Class","Ktlian Drone"),     --base ship database entry
...
scripts/scenario_74_omicron.lua:                                queryScienceDatabase("Ships","No Class","Ktlitan Drone"),     --base ship database entry
...
scripts/scenario_88_chaos.lua:                  queryScienceDatabase("Ships","No Class","Ktlitan Fighter"),   --base ship database entry