Open Thom293 opened 1 month ago
So to give extra context: we added the ability for users to scale scenario modifiers in campaign options. At the time I hadn’t realized that we treated base turrets and escorts as modifiers. If they use BV scaling it’s highly likely they’re being caught by the modifier campaign options.
One potential option would be to have them provide a fixed number of units. The downside to this is that they wouldn’t scale well with larger BV scenarios.
Another option would be to switch them to use Unit Count scaling. I think this is a bad idea unless that scaling method allows us to reduce the unit allowance - as this will result in 1 turret / escort unit per player-aligned unit which will likely balloon quickly.
The final option, as I see it, would be to specifically exclude the problematic modifiers from the campaign option scaling. This will be fragile and ugly, as we’ll likely have to exclude them by name string. If that name string changes this will break.
None of these are good options, so I think here we’re going to just have to pick the best bad option.
I dont think its needed, but just in case, save and customs and log. Celcius 23330710410.cpnx.gz mekhq.log ThomCustoms9.4.24.zip
Adding a comment here, because I know there was some confusion. I can confirm that force generation method indexes at 0, not 1. So <generationMethod>2</generationMethod>
(as seen in Allied Facility.xml
) would correspond with Unit Count Scaled
. Which means it won't be affected by the BV scaling modifiers seen in campaign options, I'm not confident it is being treated as a modifier either - though I'm investigating that now.
Ok, I've confirmed the issue: the relevant scenario spawned without a Force
assigned, which meant it had 0 units to base its convoy size on. When you assign a force, it doesn't regenerate the OpFor, which is why you were always seeing convoys of 2 units. It's not that the convoy (or turrets, as they work the same way) were being culled, it's that it was never being generated for a friendly force of greater than 0 units (maybe 1 unit, if it's taking friendly forces into consideration).
If you assign a force to the scenario and then regenerate the issue is removed. Likewise, it seems to be defaulting to a force size of 4 when regenerated (even if a friendly force isn't assigned) as I suspect regeneration uses a different system to standard generation, which would explain a lot of the problems we've seen over the years.
So, as this is working as intended I'm going to go ahead and close the case. I agree the results are a bit weird, but scenarios spawning without being based on an existing player force probably needs to be investigated separately and would benefit from having its' own case. So long as we can isolate the issue with reproductive steps. Without that it's going to be very difficult to track down.
This isnt working as intended. Spawning no units and/or with no force as a seed is a bug... please re-open.
You mistake me: this system is working as intended. Any issue with scenarios spawning without a base force is likely a bug. I was asking you to open a separate issue for that, ideally with reproduction steps, so it can be investigated properly without this (which is just a symptom) muddying the waters :)
I dont read code.
The result of whatever system it is, is a bug. Spawning zero units is a bug.
Also this isnt repeatable in the "Step 1, 2, 3 to repeat context" because without persistent RNG seed you cant duplicate what scenarios are rolled on a Monday.
I have provided a save and 3 screenshots as proof of the bug.
Please re-open.
Yes, which is why I've asked you to open a fresh issue report specifically for that issue, because this issue report is about units being 'culled' which isn't happening.
I won't have access to gaming computer for a few weeks. I changed the title. Now it's accurate. Please re-open.
This was discussed in discord. Basically - Turrets and Convoy units have always been generated as a base 4 unit - meaning most of the time you would get 4 or 8 turrets or convoy members. GIven the reasons for these units, their number should not go below 4. Scaling up would be ok.
For some reason, they are now being culled down to 2 or even zero. Note - if you regenerate bot forces, you will usually (But not always) get 4 again.
This seems a recent change. 49.19-ish or slightly before or after would be my guess. if it helps with timing - I seem to remember when new turrets were first introduced, we had an instance of a guy that had 24 turrets for some reason. So my presumption is the change was after that, or those would have been culled.
Reason for this change is unknown, based on discussions. It was discussed that if they are generated with a BV method then they might be getting clipped by new BV scaling code. A solution Illiani suggested might be to change them to a different generation method, or exempt them from culling somehow.
I will paste the screens.