Jump to content
Game-Labs Forum

Modding Barbettes


Invisible

Recommended Posts

I'm wanting to remove the requirement to have a "Wide Barbette (Very Small)" fitted on my ships in order to put any other kind of Barbette on them. It's probably a bug, but it's an annoying one and I'd like to fix it myself if I can.

How would I go about doing that?

 

Thanks in advance for any help :)

Select barbette_1.jpg

Select barbette_2.jpg

Select barbette_3.jpg

Select barbette_4.jpg

Removal of WB(VS).jpg

Link to comment
Share on other sites

@Invisible Early hulls have no slots for any barbette, thus all barbettes are greyed out even if they exist within flags in particular hull's parts file.

However, all these rectangular barbettes have an enbedded slot for another barbette beside them, making barbettes legal to place because a slot for them simply exists. You can't have any barbette legal when there's no slot, even if there is deck space for it. Same goes for any other ship part, like funnel being illegal when there's not a single middle section in some hulls which were enshortened way too much wich all usually have a slot for funnels and towers.

In order to have barbettes placeable legally, you'll have to go into modding depths nobody else has dared, the place where collision boxes, flagged slots and prohibition boxes are placed in space relation to each individual tower/funnel/hull section/barbette, and put at least one barbette slot on all middle hull sections.

Link to comment
Share on other sites

9 hours ago, XerMGGW-2 said:

@Invisible Early hulls have no slots for any barbette, thus all barbettes are greyed out even if they exist within flags in particular hull's parts file.

However, all these rectangular barbettes have an enbedded slot for another barbette beside them, making barbettes legal to place because a slot for them simply exists. You can't have any barbette legal when there's no slot, even if there is deck space for it. Same goes for any other ship part, like funnel being illegal when there's not a single middle section in some hulls which were enshortened way too much wich all usually have a slot for funnels and towers.

In order to have barbettes placeable legally, you'll have to go into modding depths nobody else has dared, the place where collision boxes, flagged slots and prohibition boxes are placed in space relation to each individual tower/funnel/hull section/barbette, and put at least one barbette slot on all middle hull sections.

Easier to patch the placement code than to write a patch to place those mounts whenever the hull gameobjects are spawned, though. :D

Link to comment
Share on other sites

21 hours ago, NathanKell said:

Easier to patch the placement code than to write a patch to place those mounts whenever the hull gameobjects are spawned, though. :D

Making barbettes act like turrets when being placed is something probably everyone wanted ultimately, not having to be forced placing their barbettes in very specific pre-determined locations when not using some tedious tricks otherwise to place them almost freely.

Edited by XerMGGW-2
Link to comment
Share on other sites

4 hours ago, XerMGGW-2 said:

Making barbettes act like turrets when being placed is something probably everyone wanted ultimately, not having to be forced placing their barbettes in very specific pre-determined locations when not using some tedious tricks otherwise to place them almost freely.

I mean, so just do that? Isn't that just changing their mountPoints data in the parts TextAssets? Shouldn't require code. i.e. replace `si_barbette` with `free center side`. (or just `free side` for the big side ones, and for the ones with mountPoints `barbette`, just `free center` ? )

And I guess if you want to restrict them from some hulls you can add need() and/or exclude() tags to their params.

Edited by NathanKell
Link to comment
Share on other sites

...ugh ok looks like there's specific type checking. Ok, I can patch that easily enough.

EDIT: Nope I just screwed up my part editing. What I said above seems to work just fine.

Edited by NathanKell
Link to comment
Share on other sites

18 hours ago, NathanKell said:

...ugh ok looks like there's specific type checking. Ok, I can patch that easily enough.

EDIT: Nope I just screwed up my part editing. What I said above seems to work just fine.

Doing changes to barbettes in parts file won't help because they're still locked down to only being placed centerline much like towers and funnels, and removing restrictions/giving allowances would just make barbettes placeable on old ships without slots with barbettes. And on miscellaneous spots for guns, including slots on towers.
So, unless I'm missing something...

Edited by XerMGGW-2
Link to comment
Share on other sites

3 hours ago, XerMGGW-2 said:

Doing changes to barbettes in parts file won't help because they're still locked down to only being placed centerline much like towers and funnels, and removing restrictions/giving allowances would just make barbettes placeable on old ships without slots with barbettes. And on miscellaneous spots for guns, including slots on towers.
So, unless I'm missing something...

I have to figure out why they're not truly free-placing even with free attach type, didn't see that yet. Will check this evening. As for the other things you say, that's what I meant by using need/exclude tags. You can lock them just to the parts you want them placeable on that way. Gotta double-check if that will prevent tower placement, but it will certainly handle requiring or excluding various hulls.

Link to comment
Share on other sites

12 hours ago, XerMGGW-2 said:

Doing changes to barbettes in parts file won't help because they're still locked down to only being placed centerline much like towers and funnels, and removing restrictions/giving allowances would just make barbettes placeable on old ships without slots with barbettes. And on miscellaneous spots for guns, including slots on towers.
So, unless I'm missing something...

Ok, fixed in TAF 3.4.3. Note that to prevent barbettes being placeable on hulls where they shouldn't be, you'll need to add the need() and/or exclude() tags to the barbettes' params along with adding free to its mountPoints. (Note that the free mounting is only available to the player; the AI still uses the old rules.)

  • Like 1
Link to comment
Share on other sites

thanks! this is awesome

Oh and the fact ai wont use it is very nice. I've actually tried to restrict barbettes a bit, because the ai simply can't use them properly (like 2 barbettes, with 1 gun behind, and one of the barbettes empty...)

Edited by MDHansen
  • Like 1
Link to comment
Share on other sites

7 hours ago, MDHansen said:

thanks! this is awesome

Oh and the fact ai wont use it is very nice. I've actually tried to restrict barbettes a bit, because the ai simply can't use them properly (like 2 barbettes, with 1 gun behind, and one of the barbettes empty...)

Doesn't the game start crashing for you immediately when you simply try to pick funnels when using 3.4.3, attempting to load them onto a ship deck and failing?

Edited by XerMGGW-2
Link to comment
Share on other sites

3 hours ago, XerMGGW-2 said:

Doesn't the game start crashing for you immediately when you simply try to pick funnels when using 3.4.3, attempting to load them onto a ship deck and failing?

Sorry, I did get that report today. I didn't notice this last night but perhaps I made a final change before uploading and didn't test that. Late night coding for the win. Apologies! I'll get it sorted out tonight.

  • Like 1
Link to comment
Share on other sites

10 hours ago, XerMGGW-2 said:

Doesn't the game start crashing for you immediately when you simply try to pick funnels when using 3.4.3, attempting to load them onto a ship deck and failing?

Apologies, fix released in 3.4.4. Also no longer requires any part editing (or work done to keep barbettes from being available on the wrong ships).

  • Like 1
Link to comment
Share on other sites

28 minutes ago, NathanKell said:

Apologies, fix released in 3.4.4. Also no longer requires any part editing (or work done to keep barbettes from being available on the wrong ships).

Thank you very much, I'll make sure it will come in very handy.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...