Page 1 of 1

Can you add Bay Types?

Posted: Wed Mar 08, 2023 5:13 am
by zgrssd
I was wondering if it might be possible to add a Bay Type to files.

I have been mulling the Idea to make the Ion Protection it's own bay type.
Then you only need to decide on the ship either getting only passive protection (civil ship) or active (military ship).

But of course that idea will stand or fail based on the ability to add a bay type in the first place

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 7:46 am
by frankycl
Yes, you can do this, but the game will only use types that are defined in the ShipHullList.xsd:

Code: Select all

  <xs:simpleType name="ComponentBayType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Undefined" />
      <xs:enumeration value="General" />
      <xs:enumeration value="Engine" />
      <xs:enumeration value="Weapon" />
      <xs:enumeration value="Defense" />
      <xs:enumeration value="Sensor" />
So, I guess that for your wanted "Ion Protection" you'd need to change/add the ComponentBayType "Defense" and then add the regarding components by their IDs. ;)

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 8:20 am
by zgrssd
frankycl wrote: Wed Mar 08, 2023 7:46 am Yes, you can do this, but the game will only use types that are defined in the ShipHullList.xsd:

Code: Select all

  <xs:simpleType name="ComponentBayType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Undefined" />
      <xs:enumeration value="General" />
      <xs:enumeration value="Engine" />
      <xs:enumeration value="Weapon" />
      <xs:enumeration value="Defense" />
      <xs:enumeration value="Sensor" />
So, I guess that for your wanted "Ion Protection" you'd need to change/add the ComponentBayType "Defense" and then add the regarding components by their IDs. ;)
That is good news. So it would be as simple as:
1. Add the Custom Bay type
2. Change the 5 Components (2 armors, 2 fighter armors, 1 component) to use that bay type
3. Give every ship it the game a bay. One Size 10 for Civil ones. One Size 10 plus Size 20 for military ones.

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 11:34 am
by frankycl
zgrssd wrote: Wed Mar 08, 2023 8:20 am That is good news. So it would be as simple as:
1. Add the Custom Bay type
2. Change the 5 Components (2 armors, 2 fighter armors, 1 component) to use that bay type
3. Give every ship it the game a bay. One Size 10 for Civil ones. One Size 10 plus Size 20 for military ones.
No, it's not "simple as..."

1. There's no "Custom Bay type" you can use - only the ones from above, and for armor/shields this would be "Defense".
(maybe you could also use "Undefined", but I'm not sure what the AI would do with this if it should be upgraded/retrofitted :? )

2. You can change/add as much component-bays (with the same Type) as you want, but you'd need to define what components are used for these component-bays in the design-templates (with the regarding component-IDs*).

3. You can define the sizes of those component-bays yourself, yes, but I don't know which sizes will work for what components :roll: - you'll have to test/figure out this by yourself.

...and last but not least, it would be needed to tell the AI what components should be upgraded/retrofitted and when - which might be the biggest problem of you project (and I sadly don't know yet how to do this outside of the game - sorry :( )

* EDIT: with the regarding component-types; - you don't need the IDs. :oops:

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 1:28 pm
by zgrssd
frankycl wrote: Wed Mar 08, 2023 11:34 am
zgrssd wrote: Wed Mar 08, 2023 8:20 am That is good news. So it would be as simple as:
1. Add the Custom Bay type
2. Change the 5 Components (2 armors, 2 fighter armors, 1 component) to use that bay type
3. Give every ship it the game a bay. One Size 10 for Civil ones. One Size 10 plus Size 20 for military ones.
No, it's not "simple as..."

1. There's no "Custom Bay type" you can use - only the ones from above, and for armor/shields this would be "Defense".
(maybe you could also use "Undefined", but I'm not sure what the AI would do with this if it should be upgraded/retrofitted :? )

2. You can change/add as much component-bays (with the same Type) as you want, but you'd need to define what components are used for these component-bays in the design-templates (with the regarding component-IDs*).

3. You can define the sizes of those component-bays yourself, yes, but I don't know which sizes will work for what components :roll: - you'll have to test/figure out this by yourself.

...and last but not least, it would be needed to tell the AI what components should be upgraded/retrofitted and when - which might be the biggest problem of you project (and I sadly don't know yet how to do this outside of the game - sorry :( )

* EDIT: with the regarding component-types; - you don't need the IDs. :oops:
1. Oh, I misunderstood. I read it that I can add new types by adding to that file. But I am guessing that just lists the bay types the game will look for?

About Upgrades:
The whole point is to make the Upgrade Trivial.
If there is a limited number of elegible items, the AI has very little room to mess up.

Currently we need a certain minimum of Ion Protection and Armor Ablation. Making sure the Autodesigner gets that - but only once - is hard work. Currently the game just always prefers Ion Armor over Regular.

Much simpler if it only had one slot for the Environmental Protection and there is only 1 line of items (Ion Armor) that can both:
1. Fit the bay type
2. Fit the bay size

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 3:43 pm
by frankycl
zgrssd wrote: Wed Mar 08, 2023 1:28 pm 1. Oh, I misunderstood. I read it that I can add new types by adding to that file. But I am guessing that just lists the bay types the game will look for?
Yes - it (the game) will look for and already uses (only not for all shiphulls equally).

zgrssd wrote: Wed Mar 08, 2023 1:28 pm About Upgrades:
(...)
Currently the game just always prefers Ion Armor over Regular.
Yes - that's what I meant that won't be easy to change / I don't know how / in what files, etc. :(
But maybe you can find a way to prevent auto-upgrading for special ship-types (like the civilian) and special components (like ion-protection) at all - then it should be possible. ;)

But, why do you want to split the protection-types, anyway ? - Ion-protection is mainly for actions that take place inside a dangerous nebula - but the moment you have a colony (or a mining station, etc.) inside such nebula, you would need the ion-protection for the civilian ships like freighters, etc., too. :?
So, this might only make sense if you additionally would get rid of all nebulae - but this isn't possible yet, because of the story-events that need some of those nebulae. :roll:

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 8:50 pm
by AKicebear
I think his suggestion is that every ship design template would have a slot specifically for ion protection, for reactive armor, etc in addition to (or replacing?) generic defense slots. This would make the AI optimization easier, as it's choosing the best ion protection for a single slot, best reactive armor for a single slot, etc, rather than ambiguously juggling what to put in generalized slots. This would be a shift in the direction of Stellaris, where all slots are component type specific, and in principle make the upgrading more trivial to optimize.

I see some advantages to the approach. But it does sound like a massive project.

Re: Can you add Bay Types?

Posted: Wed Mar 08, 2023 9:23 pm
by zgrssd
AKicebear wrote: Wed Mar 08, 2023 8:50 pm I think his suggestion is that every ship design template would have a slot specifically for ion protection, for reactive armor, etc in addition to (or replacing?) generic defense slots. This would make the AI optimization easier, as it's choosing the best ion protection for a single slot, best reactive armor for a single slot, etc, rather than ambiguously juggling what to put in generalized slots. This would be a shift in the direction of Stellaris, where all slots are component type specific, and in principle make the upgrading more trivial to optimize.

I see some advantages to the approach. But it does sound like a massive project.
Yes, it would make the whole thing simpler.
Currently you have to get the Auto designer to put either a Ion Protection under General or a Ion Armor under Defenses. Or just prefer Ion Armor in general.

If there was a single dedicated slot - Size 20 - then the game could just decide:
- Civil Ship? Should prefer a Armor, but will take the protection
- Military Ship? Should prefer the active protection, but will take a armor

Leaving defenses and General Slots free for juggling of a good defense.

Re: Can you add Bay Types?

Posted: Mon Oct 23, 2023 1:49 pm
by tofudog
Would it be feasible to change the way things work instead?
Make ion protection a bonus you get if you have researched it and you don't get if you haven't, while doing away with the dedicated component altogether?
Which way would be preferrable to you and why?

Re: Can you add Bay Types?

Posted: Mon Oct 23, 2023 11:45 pm
by zgrssd
tofudog wrote: Mon Oct 23, 2023 1:49 pm Would it be feasible to change the way things work instead?
Make ion protection a bonus you get if you have researched it and you don't get if you haven't, while doing away with the dedicated component altogether?
Which way would be preferrable to you and why?
The main reason to keep it a bay type, is because of stacking. At least for me, both Ion Protection things fullfill a different role:
Ion Armor is perfectly good for civil ships. But only a stopgap for military ships.
While the Ion Shield is better for military ships, but only a Stopgap for civil ships.
It should be relatively easy to modify weights so that each ship type prefers the "proper" protection, but takes the other one in a pinch.

But I guess a passive bonus and just removing the Ion Armor component could work too? Could the weights for civil ships pick up on that?

Re: Can you add Bay Types?

Posted: Mon Dec 25, 2023 1:24 am
by OrnluWolfjarl
To PARTLY achieve what you wish, it'd be far easier to mod all armor components so they provide at least some level of passive ion protection, and mod all Shields so they provide some level of active ion protection. That would work better with the current ship-building AI, without fiddling with it (which I'm not sure is possible anyway).

You might need to also mod Ion Weapons, so that they are still relevant.