Jump to content
Game-Labs Forum

"Naval Arms Race" mod overhaul. BETA 1.0.6 "Major Powers update"


o Barão

Recommended Posts

On 7/19/2024 at 5:03 PM, DougToss said:

I was just reading about torpedoes in the First World War, and I think the game is just too good at calculating accurate firing solutions under battle conditions.

torpedo_inaccuracy,0.015,inaccuracy ratio as ratio of path which can be offsetted randomly,0.01,torpedo inaccuracy will be: (+/- m),40,,,,

This is the only torpedo accuracy modifier I have to edit. I will increase a little for the next update.

  • Like 1
Link to comment
Share on other sites

18 hours ago, SwissAdmiral said:

@o Barão Thank you for the response. Curious what you think of the other notes I made, particularly the "wishlist" bit

Well, I can't help you with that. 

 

About "2" it is not an issue for us in Europe. Superheavy cruiser or any other fancy name will not change the fact that those ships are battlecruisers and you can already build them in game. (Alaska, B-65) *I am not aware about that dutch design.

 

In theory, for anyone interested in editing the files, it is possible to increase the gun limit for the cruisers in the "ship types" and then limit the gun limit for all cruisers hulls launched before 1930 by editing each hull individually in the "parts". I am not sure now about the armor, but I think it is possible to reach similar result using the same method. 

 

"1" and "3"  are interesting ideas, but I am already exhausted. I am at moment living abroad with little time to do anything. My plans is to update for the new 1.6, import the new hulls and guns when they become available, then add new historical destroyers I hulls for some nations and I am done. After that, anyone is free to do whatever they want.

 

  • Like 1
Link to comment
Share on other sites

20 hours ago, o Barão said:

The problem is that the game engine can't tell the difference if the torpedo is coming from stern or somewhere else, or how the ship speed would make the sonar man life harder. Game engine limitation. But to be fair, in battle conditions, most likely all ships would be travelling at speeds impossible to detect any torpedoes with sonar.

Game engine has nothing to do with this. It's just a thing that was never considered by devs.
The angle of attack for shells is calculated from ship to ship upon firing to determine if the shell will penetrate or not once it hits, wherever it predetermined itself to land.
Same could be done for torpedoes, for they are kind of treated as tiny ships, thus a simple detection range function can be made by only picking the real distance to torpedo and the angle at which the ship is facing as well as including multiplier tied to ship speed.

Link to comment
Share on other sites

On 7/22/2024 at 2:22 PM, XerMGGW-2 said:

Game engine has nothing to do with this. It's just a thing that was never considered by devs.
The angle of attack for shells is calculated from ship to ship upon firing to determine if the shell will penetrate or not once it hits, wherever it predetermined itself to land.
 

This leads to the strangest fall of shot, where a salvo will have a realistic dispersion minus the shell that hits, which will sometimes veer wildly apart from the rest of the group. Over long ranges with long times of flight, it's absurd and looks terrible, as you can see a shell or two curve in midair, away from the rest to hit. 

I don't know why this was done over just using real ballistics. Do the calculations at firing to determine where the shells will hit, and if the target is there when they arrive, work out the damage. 

  • Like 1
Link to comment
Share on other sites

@o Barão sorry for the long delay, I got sidetracked. Tonight I finally sat down to port the minefield code and I've now done so, which means I can make it do whatever you like.

If memory serves, you wanted to limit the number of ships that could be damaged each turn by mines? That does have some strange effects, in particular it will concentrate the damage on a single task force, unless you also want a per-TF limit, and it will result in certain fields getting expended before others do. It also is likely to mean that submarine minelayers will be less useful, unless the ordering is flipped (the game by default will go through each task force, and check it first against every minefield, and then against every submarine TF with minelaying capability, so if minefields get first craft at task forces, subs probably won't).

 

(This is the commit, for anyone who wants to look: https://github.com/NathanKell/UADRealism/commit/8fdd717c6fb87dd71d0e2c5e111efff24dd99719 )

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

On 7/27/2024 at 9:15 AM, NathanKell said:

@o Barão sorry for the long delay, I got sidetracked. Tonight I finally sat down to port the minefield code and I've now done so, which means I can make it do whatever you like.

If memory serves, you wanted to limit the number of ships that could be damaged each turn by mines? That does have some strange effects, in particular it will concentrate the damage on a single task force, unless you also want a per-TF limit, and it will result in certain fields getting expended before others do. It also is likely to mean that submarine minelayers will be less useful, unless the ordering is flipped (the game by default will go through each task force, and check it first against every minefield, and then against every submarine TF with minelaying capability, so if minefields get first craft at task forces, subs probably won't).

 

(This is the commit, for anyone who wants to look: https://github.com/NathanKell/UADRealism/commit/8fdd717c6fb87dd71d0e2c5e111efff24dd99719 )

o7!!

"...in particular it will concentrate the damage on a single task force..."

If only affects the TF sailing in the minefield area, then it is perfect. I can always lower the mine damage in the "params" file to see if I can get a reasonable mechanic.

 

" It also is likely to mean that submarine minelayers will be less useful"

 In vanilla, those are the most broken OP units in game, so that is not an issue. ;)

 

 Later this week I will get some time to start updating the mod for the 1.6 version and I will test your changes! Many thanks.   🙏

  • Like 3
Link to comment
Share on other sites

ADDIT: Asked on the UAD Discord and it was clarified that the sort of issue I'm seeing is not uncommon in vanilla. Moreover, someone suggested that the "best practice" for dealing with such issues is to first exit and reboot the game and see if just that "fixes" it.

Turns out that is exactly how this worked! ROFLMAO!

Rebooting the last save and selecting the same Convoy mission and my BB started shoot on its own within seconds!

So, pretty much the entire previous post below can be ignored. Never mind

Have not played UAD for several months. Got NAR updated and did my standard, 1890 Japan. 1893 war with China breaks out. Next month I get a convoy protection mission with one my recently refitted 14k ton BB 1 defending a single TR. Chinese raider force is 1 CL and 2 CA.

For some reason, my BB just WOULD NOT fire its guns. I had managed to have one brief engagement in an earlier "test" session to re familiarize myself with the game in which my ships did fire, so I suspect this may have something to do with a design element that isn't working. I vaguely recall having this type of issue at least once in the past. Since I am running NAR I thought I'd ask about it here first. My next option would be to validate the game to overwrite and play vanilla and try to replicate that design to see if it occurs in vanilla.

I'll check back in this forum for a few days to see if anyone has any thoughts and I'm happy to share files or details of the design etc. I'll also preserve the save file(s) for the time being.

Edited by Anthropoid
semantic error
Link to comment
Share on other sites

I did in fact fiddle around with different settings to see if that "fixed" it. But as it turns out (and as I've now clarified with an ADDIT to my previous post), just rebooting the game and going into the same mission seems to have "fixed" it.

  • Like 1
Link to comment
Share on other sites

4 hours ago, o Barão said:

o7!!

"...in particular it will concentrate the damage on a single task force..."

If only affects the TF sailing in the minefield area, then it is perfect. I can always lower the mine damage in the "params" file to see if I can get a reasonable mechanic.

 

" It also is likely to mean that submarine minelayers will be less useful"

 In vanilla, those are the most broken OP units in game, so that is not an issue. ;)

 

 Later this week I will get some time to start updating the mod for the 1.6 version and I will test your changes! Many thanks.   🙏

Great :)

So are you asking for:
1. A limit to the number of ships in a task force  that can be hit by mines

or

2. A limit to the number of ships per country per turn that can be hit by mines, no matter how many task forces sail through minefields during their inter-turn movement?

 

I mean I guess I can just support both. I'll add some params to the params file that you can set. :)

If you're on 1.6 I'll need to switch over to that and tweak slightly for it, since it's possible the base game's mine code changed 1.5 -> 1.6 and I'll want to fix up my reimplementation of it. (My mod is currently for 1.5.1.6 since that's what NAR supports.)

Also, where are you 

Link to comment
Share on other sites

5 hours ago, NathanKell said:

Great :)

So are you asking for:
1. A limit to the number of ships in a task force  that can be hit by mines

or

2. A limit to the number of ships per country per turn that can be hit by mines, no matter how many task forces sail through minefields during their inter-turn movement?

 

I mean I guess I can just support both. I'll add some params to the params file that you can set. :)

If you're on 1.6 I'll need to switch over to that and tweak slightly for it, since it's possible the base game's mine code changed 1.5 -> 1.6 and I'll want to fix up my reimplementation of it. (My mod is currently for 1.5.1.6 since that's what NAR supports.)

Also, where are you 

If you can support both, great. Maximum 3 - 4 per turn. 

 

I want to start updating 1.6 in the next days but I can't say when it will be ready. I also want to study the changes you made to subs. 👍

  • Like 3
Link to comment
Share on other sites

9 hours ago, o Barão said:

If you can support both, great. Maximum 3 - 4 per turn. 

 

I want to start updating 1.6 in the next days but I can't say when it will be ready. I also want to study the changes you made to subs. 👍

I've pushed the changes. Folks who have saves that involve minefields, please test things out to be sure they still work normally (nothing should change yet, until @o Barão sets the params). Also please send me a save so I can test!

 

@o Barão here are the params you can add to the params file. The first four control the number of attacks per turn. -1 means unlimited. You can use some or all of them. For example you can set taf_mines_max_tf_attacks_per_player to 3 to make sure only 3 mine attacks occur per player per turn, and set taf_mines_max_ships_per_player to 10 to make sure that there will never be more than 10 ships hit (across those task forces).

The rest let you further tune how mine damage works. The game has a lot of hard-coded numbers; I went through the mine-damage function and made them all tunable for you. Here's the full set of params you can add:

Quote

taf_mines_max_tf_per_player,-1,Max number of task forces that can be attacked by mines each turn (the same TF can be attacked any number of times by different fields and it counts only once)
taf_mines_max_tf_attacks_per_player,-1,Max number of times mines can attack task forces in a turn (each attack against a TF is a separate instance),,,,,,,
taf_mines_max_ships_per_player,-1,Max number of ships that can be attacked in a turn across all of the task forces of the player and all minefields,,,,,,,
taf_mines_max_ships_per_tf,-1,Max number of ships that can be attacked in a single task force (across any number of minefield attacks),,,,,,,
taf_mines_fleetfactor_mult_war,2,Multiplier to fleet_factor when at war with the field owner,,,,,,,
taf_mines_fleetfactor_mult_peace,2800,Multiplier to fleet_factor when not at war with the field owner,,,,,,,
taf_mines_tonnagefactor_war,5,Multiplier to task force battletonnage when at war (this is used as a cap to minefield damage),,,,,,,
taf_mines_tonnagefactor_peace,0.04,Multiplier to task force battletonnage when at war (this is used as a cap to minefield damage),,,,,,,
taf_mines_max_randomdamagefactor,300000,This is the from value when remapping damage to number of ships hit. The damage is a random value between fleet_factor to tonnagefactor times field radius divided by detection value,,,,,,,
taf_mines_default_max_ships_per_tf,10,When the random damage value is taf_mines_max_randomdamagefactor it gets remapped to this number of ships. A higher value will map to a higher number of ships; there is no clamping,,,,,,,
taf_mines_antimine_min,0.05,The min value to use for the antimine tech,,,,,,,
taf_mines_antimine_max,10,The max value to use for the antimine tech,,,,,,,
taf_mines_ship_damage_percent_min,1,The minimum percent damage to apply to the ship when it hits a mine,,,,,,,
taf_mines_ship_damage_percent_max,200,The maximum percent damage to apply to the ship when it hits a mine. This is before being multiplied by the dmg_factor_ships and by antimine and by the minefield damage mult. Values above 100 are clamped to 100 which means that the default range of 1 to 200 means half the time the ship is sunk and half the time it takes random damage between 1 and 100 percent,,,,,,,
taf_mines_crew_damage_percent_min,5,The minimum percent damage to the crew of the ship,,,,,,,
taf_mines_crew_damage_percent_max,35,The maximum percent damage to the crew of the ship. This is before being multiplied by the dmg_factor_crew and by antimine and by the minefield damage mult.,,,,,,,

Also what do you mean by changes to subs? Do you mean the sub range fix I made a while ago?

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

Oh and note that I do not know if that will work on 1.6; I compiled against 1.5.1.6. I can look into making a 1.6 install and compiling against that. And as above, I haven't really been able to test this, because I don't have a save with mine combat.

  • Like 1
Link to comment
Share on other sites

13 minutes ago, NathanKell said:

Also what do you mean by changes to subs? Do you mean the sub range fix I made a while ago?

Yes!! I didn't have the time to test them in detail.

 

14 minutes ago, NathanKell said:

here are the params you can add to the params file. The first four control the number of attacks per turn. -1 means unlimited. You can use some or all of them. For example you can set taf_mines_max_tf_attacks_per_player to 3 to make sure only 3 mine attacks occur per player per turn, and set taf_mines_max_ships_per_player to 10 to make sure that there will never be more than 10 ships hit (across those task forces).

The rest let you further tune how mine damage works. The game has a lot of hard-coded numbers; I went through the mine-damage function and made them all tunable for you. Here's the full set of params you can add:

taf_mines_max_tf_per_player,-1,Max number of task forces that can be attacked by mines each turn (the same TF can be attacked any number of times by different fields and it counts only once)
taf_mines_max_tf_attacks_per_player,-1,Max number of times mines can attack task forces in a turn (each attack against a TF is a separate instance),,,,,,,
taf_mines_max_ships_per_player,-1,Max number of ships that can be attacked in a turn across all of the task forces of the player and all minefields,,,,,,,
taf_mines_max_ships_per_tf,-1,Max number of ships that can be attacked in a single task force (across any number of minefield attacks),,,,,,,
taf_mines_fleetfactor_mult_war,2,Multiplier to fleet_factor when at war with the field owner,,,,,,,
taf_mines_fleetfactor_mult_peace,2800,Multiplier to fleet_factor when not at war with the field owner,,,,,,,
taf_mines_tonnagefactor_war,5,Multiplier to task force battletonnage when at war (this is used as a cap to minefield damage),,,,,,,
taf_mines_tonnagefactor_peace,0.04,Multiplier to task force battletonnage when at war (this is used as a cap to minefield damage),,,,,,,
taf_mines_max_randomdamagefactor,300000,This is the from value when remapping damage to number of ships hit. The damage is a random value between fleet_factor to tonnagefactor times field radius divided by detection value,,,,,,,
taf_mines_default_max_ships_per_tf,10,When the random damage value is taf_mines_max_randomdamagefactor it gets remapped to this number of ships. A higher value will map to a higher number of ships; there is no clamping,,,,,,,
taf_mines_antimine_min,0.05,The min value to use for the antimine tech,,,,,,,
taf_mines_antimine_max,10,The max value to use for the antimine tech,,,,,,,
taf_mines_ship_damage_percent_min,1,The minimum percent damage to apply to the ship when it hits a mine,,,,,,,
taf_mines_ship_damage_percent_max,200,The maximum percent damage to apply to the ship when it hits a mine. This is before being multiplied by the dmg_factor_ships and by antimine and by the minefield damage mult. Values above 100 are clamped to 100 which means that the default range of 1 to 200 means half the time the ship is sunk and half the time it takes random damage between 1 and 100 percent,,,,,,,
taf_mines_crew_damage_percent_min,5,The minimum percent damage to the crew of the ship,,,,,,,
taf_mines_crew_damage_percent_max,35,The maximum percent damage to the crew of the ship. This is before being multiplied by the dmg_factor_crew and by antimine and by the minefield damage mult.,,,,,,,

WoW!! This is a big list! :D

Really interested to know how it will work out. Thanks!!!

 

29 minutes ago, NathanKell said:

I can look into making a 1.6 install and compiling against that. And as above, I haven't really been able to test this, because I don't have a save with mine combat.

If possible, it would be great. 👍

  • Like 1
Link to comment
Share on other sites

12 hours ago, o Barão said:

Yes!! I didn't have the time to test them in detail.

Ah, gotcha! Let me know if you want anything else changed with subs.

12 hours ago, o Barão said:

WoW!! This is a big list! :D

Really interested to know how it will work out. Thanks!!!

Yeah I figured I might as well make all that tweakable.

I also did rewrite the two functions that handle which minefields attack which task forces (and which submarine or vessel-laid temporary minefields attack which task forces), and in the process found some bugs in the game's code. For example, I believe the game is double-counting moving task forces when instead it's supposed to only check moving task forces in one case, and only check stationary task forces in another.

But I did not hook up those rewrites, because that has a higher risk of being broken and until someone tests this code--or sends me a save I can use to test it--I have no idea whether it works or not.

 

That said, because I rewrote all the mine code, that means I can completely change how they work if you like. Like how quickly they grow or shrink, what numbers are used to determine the size of sub or ship based minefields, how task forces interact with mines (i.e. decreasing the field density due to damage, or from minesweeping), which fields should actually attack which task forces, whether stationary task forces should be vulnerable at all, etc.

12 hours ago, o Barão said:

If possible, it would be great. 👍

Ok I'll look into doing that. It's entirely possible it'll already just work with 1.6 though since I am doubtful the code they changed for 1.6 will be the code I touched, but you never know. So it's worth trying anyway. Let me know if you run into issues running the mod.

 

And please, other readers of this thread / other NAR players, please try it out and let me know whether minefields still work as expected (there should be no change). Note that you should back up your saves and designs first, since once you install the mod and load a save (or shared design vessel), its format will be updated to support the whole "allow preserving old guns/torpedoes during refit" thing.

Link to comment
Share on other sites

On 7/30/2024 at 2:54 AM, o Barão said:

Yes!! I didn't have the time to test them in detail.

 

WoW!! This is a big list! :D

 

Also: I completely forgot about flags (sorry!) so I did that last night. I still have a bug so I have not uploaded it yet, but I will do so this evening.

With flag support, you make a folder in your Mods folder called flags, and put as many PNG images there you want, resolution 256x128 pixels. Then you make a file called flags.csv in your Mods folder and you can specify for each nation the default civil flag, the default military flag, and if desired the government-specific flags. These will override the game's defaults for flags, and will support any nation (not just the original ones).

  • Like 3
Link to comment
Share on other sites

21 hours ago, NathanKell said:

... and will support any nation (not just the original ones).

That is amazing. Great addition.

 

By the way, this last statement. You remember it was because there were flags missing the reason that it wasn't possible to add minor as playable factions in the campaign? At least I think that to be issue. So maybe there is a way to make it work now.

  • Like 1
Link to comment
Share on other sites

Hi. First of all: Awesome mod, couldn't play without it anymore. Love the rebalancing and the many new designs.

Now, the bidding:
Some updates ago you changed the model of american medium caliber guns (15,2cm to 22,9cm) to look more like the Guns of USS Cleveland - a bit softer shaped than the large guns that look like the modern Battleship Guns. New models are definitely looking great. But I wanted to ask if there will be another model for the 20,3cm and 22,9cm guns, that perhaps look like the Guns of Des Moines Class? That would be amazing and be a nice and historical difference between "heavy" and "light" cruiser guns.

Greetings!

Guns comparison.PNG

Link to comment
Share on other sites

1 hour ago, o Barão said:

That is amazing. Great addition.

 

By the way, this last statement. You remember it was because there were flags missing the reason that it wasn't possible to add minor as playable factions in the campaign? At least I think that to be issue. So maybe there is a way to make it work now.

Yes that is precisely what I'm talking about :)

  • Like 1
Link to comment
Share on other sites

9 hours ago, Peksern said:

Hi. First of all: Awesome mod, couldn't play without it anymore. Love the rebalancing and the many new designs.

Now, the bidding:
Some updates ago you changed the model of american medium caliber guns (15,2cm to 22,9cm) to look more like the Guns of USS Cleveland - a bit softer shaped than the large guns that look like the modern Battleship Guns. New models are definitely looking great. But I wanted to ask if there will be another model for the 20,3cm and 22,9cm guns, that perhaps look like the Guns of Des Moines Class? That would be amazing and be a nice and historical difference between "heavy" and "light" cruiser guns.

Greetings!

Guns comparison.PNG

Gun models are added by devs, I then move them around between nations and ship classes, change stats & size to fit better the time period. I don't expect the devs to add the Des Moines gun model, but maybe I am wrong ;)

  • Like 1
Link to comment
Share on other sites

7 hours ago, MDHansen said:

"home" regions will still be an issue, as it is hardcoded

Wait, what do you mean by region? I don't see anything like that in the game code so far, just references to whether provinces are home provinces or not (and that's just set in the provinces TextAsset). And the Army Force For Province stuff does some stuff where it checks for home provinces vs not, haven't bothered to fully analyze yet, but not seeing anything hardcoded. Given how there's nothing else in the code that makes _any_ reference to specific nations by name, to my knowledge, I'd be shocked if that were so, and not some function of something like "is this a part of the world where this player has home provinces, then it's a home region".

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...