Prompted by the recent discussion on Sturmtiger, I looked around for workarounds for two main complaints: undershooting when firing from a slope and environment objects blocking shots. Sadly there's no silver bullet, but I still want to share what I found. Maybe other modders will find this useful.
For undershooting on slopes, I found two possible fixes:
1. In Sturmtiger's projectile:
- projectile_ext/artillery/is_artillery - change from "True" to "False".
With that, the shots land almost exactly where you aim them every time. However, this causes the second problem - shots being blocked by objects - to be even more prevalent. As the rocket no longer travels in an arc but in a straight line, if there's pretty much anything in the way (wreck, wall, fountain, well, dead cow...), it will hit that instead. The arc does look a bit nicer too, but I think that having a rocket that always land where it should is more important. Plus, this would allow modifying the rocket's speed, which could be used for further balancing.
2. In Sturmtiger's projectile:
- projectile_ext/artillery/firing_angle_type - change from "low_angle" to "lowest_non_collide_angle".
Again, shots land almost perfectly (although less accurately as in the previous case), but there are 2 big problems with this. First of all, this will allow Sturmtiger to shoot above shot-blockers like buildings. Secondly, it will no longer shoot through line-of-sight blockers like hedges, but instead shoot above them too. If fired very close to hedge, the calculated angle can be super high, causing the rocket to land after several seconds of travel time. In extreme cases, when the game can't find a non-collide angle, it automatically sets it to highest value (89 degrees), which causes the rocket to hilariously fall right in front of the Sturmtiger. All in all, not that great of a fix, but useful info for anyone willing to turn Sturmtiger into a mobile B4 Howitzer.
For environment objects blocking the rocket, things get more finnicky.
First of all, every projectile has a collision_type. Every object (hedge, tree, wreck, building, etc.) has hit_object_ext, which dictates which collision types pass through and which blocked instead. There are exactly 7 collision types in the game: tp_artillery, tp_artillery_inf, tp_artillery_overwatch, tp_homing, tp_homing_inf, tp_sticky, tp_throw. There's no way of adding more. About 95% of all projectiles in the game fall under tp_artillery (mostly artillery, including Sturmtiger and AVRE), tp_homing (mostly tank guns) and tp_throw (mostly grenades). What's important is that there's one collision_type that's literally not used by anything - tp_artillery_inf.
1. Now, one ardours way of fixing Sturmtiger's (and AVRE's, though it has it a bit better because its main gun is located higher) projectiles getting blocked by random objects would be to set its projectile collision_type to tp_artillery_inf
and for every object in the game manually set whether tp_artillery_inf should pass through or be blocked. Theoretically it's doable and offers 100% customization. Practically, modifying every object in the game is not recommended and is asking for trouble.
2. Alternatively, tp_artillery collision type stays with Sturmtiger, but a manageable number of notorious blocking objects gets modified to allow that collision type to pass through. It would be far less invasive, but on the other hand it would also affect other weapons (e.g. howitzers, mortars, rocket artillery).
3. One more potentially useful collision type is tp_throw. While it is mostly used for grenades, grenade projectiles have another weird trait to them. They have "use_collision_building_wall_panel_ignore" set to "True", which effectively ignores collision_type settings of buildings. So even though all buildings in the game are set to block tp_throw projectiles, grenades still pass through them. Outside buildings, there are very few objects that block tp_throw collision type. As such, if Sturmtiger's projectile is changed to tp_throw, it would be still blocked by buildings, but would phase through pretty much everything else - hedges, trees, wrecks, dead cows, wells, fountains etc. Sadly, that also includes solid walls like these, which infantry can't vault, but can still lob grenades over them:
Another side effect is that those projectiles would no longer detonate when hitting enemy vehicles. It's only important in rare cases when a vehicle crosses flight path of the rocket - if a vehicle is at or close to the target location, it will still be dealt massive damage and stun as usual.
To sum up - if slope undershot solution #1 is combined with one of the object blockers solutions (preferably #2 or #3), Sturmtiger and AVRE would likely be in better place. I bet that other modders already tried tackling those issues, so there's a good chance that those "fixes" are more problematic than what I could discern, but maybe I'm lucky enough to bring something new to modders.