|
1. For artillery weapons, accuracy is irrelevant - only scatter is used for the calculation of where the shot lands. Most important are angle_scatter, which determines how far to the left or right from the target the shot can go, and distance_scatter_ratio, which determines how much it can over- or undershoot the target. If you decrease these values, your howitzer will be more accurate. For more fine-tuning, read the descriptions for all the variables in the weapon's scatter category!
Hardpoints are found in an entity's combat_ext. They are used to store the entity's weapons. For example, a Grenadier entity has only one hardpoint, which contains a K98k weapon. A Panzer IV has several hardpoints: One for the main gun, one for the coaxial MG, one for the hull MG, one for the pintle MG. Artillery weapons usually also have several hardpoints, because every barrage ability uses a different weapon. The barrage ability always has to specify which hardpoint to use. Generally, hardpoint 1 contains the weapon that is used for auto-attack, so units which can't auto-attack, such as howitzers, have a dummy weapon in hardpoint 1.
2. I'm not completely sure, but I think that for increasing the search range, you have to increase the range of this weapon: weapon\west_german\ballistic_weapon\tank_gun\infrared_searchlight_mp
The other settings for the searchlight are stored in the squad bp:
sbps\races\west_german\vehicles\halftrack_squads\sdkfz_251_20_ir_searchlight_halftrack_squad_mp
Take a look at its squad_team_weapon_ext. |
BUT, the mortars in the trench do not show any animations when doing Barrage( I have changed "show passenger animation" to TRUE. Do you know what is wrong with it?
For the autofire issue. I have figured out what was wrong by myself.It was because, For some reason, when the mortars get into the trench. They will automatically follow the trench sight data in epbs. I have fixed it by increasing the sight max radius of the mortar trench. BUT!It seems like this is a bad idea. Because, since all the mortars and a weapon that more than 60. Some of them even having a range of 120. It is radiculose when I changed the mortar sight to 130.It could literally have a vision that more than the half-length of a map. Do you any better idea to fix my autofire issue?
I totally understand. But, right now. For some reason. When the mortars get into the trench. It will be automatically limited by the sight of the trench(whatever I set the trench into natural or not). So, just pretend the trench has only 35 range in max sight angle. Then the mortars inside it can only auto attack the targets inside that range.( I set the mortar autofire weapon range to 70, so it should be able to attack any target inside 70 range). I realized it by changing the sight of the trench 100, then the 82mm mortar(which has a range of 70) work fine. But for 120mm mortar( which has a range of 120) won't attack anything outside 100 range, however, I could still ground attack everything in 120 range.I know it is kind of unbelievable. But, I guess there should be something wrong with the trench epbs!
Yes, there is something wrong with the trench ebp. You used a version that probably hasn't been touched since before the game's release It would have been better to base your mortar pit on the Ostheer or British trench instead.
To properly enable auto-attack, you need to set "use_building_target_scan_radius" in the mortar pit entity's hold_ext to False. Otherwise, only the building's sight is used to calculate if a unit garrisoned inside it can fire.
The barrage animations don't look right because the auto-attack weapon is not disabled by the barrage ability, so it keeps firing while the barrage weapon is also firing. This is because your new mortar weapons do not have the proper parent hardpoints. For the mortar entity's new hardpoints (6 and 7), you need to set "parent_hardpoint" to 1.
[...] the murky waters of modding emplacements/garrisons [...]
That, my good sir, is a very good description of what emplacements look like in the AE |
No problem!
Your new barrage abilities are not working because you forgot to change which hardpoint they use - they are still trying to use the original, unchanged weapons which don't work while garrisoned.
You also didn't add the new auto-fire weapon to the mortar entity. It still uses the original weapon with 80 range. I would suggest adding it as a second weapon to hardpoint 1 and creating a requirement_action with required_in_structure in the entity's action_apply_ext to switch between the two weapons! |
Sure, I can have a look. I can't access the file, though. Could you unlock it or upload it somewhere else? |
I made this idea into a small mod, or rather updated an old mod that did something similar.
- Ordnance ML 3-inch Mortar Team:
Buildable in British T1 for 240MP. Slower rate of fire than the German GrW 34, but more accurate. White Phosphorous Barrage at Vet 1. Counter Barrage unlocked with the Advanced Emplacement Regiment.
- Artillery Pit:
Replaces the British Mortar Emplacement. An empty structure that can be built by Royal Engineers for 100MP. All mobile mortars and artillery pieces can be garrisoned and receive a 15% bonus to the range of their barrage abilities. When empty, the structure can be garrisoned by the enemy. (Might be restricted to mortars only. Still playing around!)
- Known Issue:
Artillery guns and heavy mortars can only fire to the front side of the emplacement, because they can't move or rotate while garrisoned. I'm not sure if this can be changed.
It's available on the Workshop:
http://steamcommunity.com/sharedfiles/filedetails/?id=679152285 |
Yes, I have done all that you mentioned. I have changed everything that might control firing in garrison to "true". And, also. "you need to make sure the weapon has at least the same range as the ability.", Sorry, What do you mean by that? Considering the garrison buffing ability is interdependent on the barrage ability. Do I really need to make sure both of them are having the same range? ( pack support gun is having a different auto fire range and barrage range. ). At this point. Do you think there is any possibility that something is wrong with the emplacement entity?
For auto fire question, I meant for team weapons like mortars and support guns. They should be able to auto-chase(aim) the enemy and fire at them. Originally, they should do these too when they are in garrison. Do you remember if there was a default mortar trench( I think it is under epbs, environment)?Any Mortar in that trench could auto fire at the enemies. I made my trench base on that entity. I only changed the model link and added a construction command. Here are more details about what is happening right now to the mortars in the trench which i made. It will auto_fire (rotate their fire angle and start firing)only when the enemies are close enough( almost face to face, out of the closest limit range). If the enemies are too far away from them(Still in the weapon range, and they are visible.), I have to give them commands to attack the enemies. I think there may be something wrong with the line of sight entity( considering the buff I set up for the garrisoned mortar is only for increasing their weapon range).
Yes. If you can send me your source file, I would appreciate you a lot!
I will give you my email address when you respond to me again.Also, I will send you my source file too. Could you help me check the mortar entities if there is anything wrong?
Once again, Thank you very much Planet Smasher, Thank you very much!!!!
No problem, helping each other out is the purpose of this forum!
Which model did you use? The trench or the mortar pit? I don't quite understand what you mean.
Let's use the Pack Howitzer as an example. The entity has five different weapons in its combat_ext. The first one is for right-click attack, auto-attack and attack ground. For that one, you need to make sure the minimum range is not too high. The second weapon is used for the standard barrage ability. This ability has a maximum range of 120. Let's say you increase that by 50%, so it becomes 120*1,5=180. Now the range of the weapon also needs to be at least 180, or the barrage ability will not always work.
This means that for every barrage ability, you need to check how high the maximum range can possibly be, including veterancy modifiers and everything. Then you need to make sure the weapon used by the barrage ability also has at least the same range. (More is also alright.)
You can download the files for my mod here: https://github.com/PlanetSmasherCOH/NoMoreSimCity
Open them with the Mod Tools and have a look, maybe that will help you. If there's anything you don't understand, feel free to ask.
If nothing else works, you can also send me your files, maybe I'll find your mistake. |
I have changed "enable_in_building" to True for the barrage abilities. To be more specific, When I am trying to active the mortar ability, it will start cooldown(the icon will turn yellow), but no actual action will be done, and because of this. The cooldown bar will maintain at the beginning. Could you please tell me how to fix it?
Edit, the mortar in the trench will not autofire at long range( close range yes).How do I suppose to change it?( I have added an ability to increase mortar performance when they are in garrison which including increase weapon range.)
Each weapon has, under "behaviour", a flag named "attack_ground_type". This needs to be set to "anywhere" for barrages to work while garrisoned.
Have you done this? Also, note that for barrages, you need to make sure the weapon has at least the same range as the ability. Make sure to increase both when garrisoned. Lastly, as far as I know, mobile team weapons (everything with wheels, basically) will only be able to fire to the front of the emplacement, because they can not rotate once set up.
I have a mod that I'll probably release later today where this stuff is included. I can send you the source files, if you want. |
I have tried to put soviet 120mm mortar into the trench. For some reason, the mortar was placed at the infantry position( the place where the infantries stand where is on the edge of the emplacement) instead of in the middle( where usually the two mortars place in the default UKF emplacement). I have tried to change the type of the 120mm mortar, and also the hold unit type of the trench. None of them work. Do you guys know how to fix it.( Same idea for At guns and Support guns)? And, thx for your guys help.
The mortar pit model works with the HM-38, as you can see in the trending image on the front page. Clone the mortar entity's "holdable_ext" and change "holdable" from "hold_large_gun" to "hold_mortar". You can do that for the light artillery guns as well. If you then also modify their weapons as I described above, they should be fully functional.
Edit: You also need to set "enable_in_building" to True for the barrage abilities. |
You only need to add the other models in the abp file when they have to act as one entity. An emplacement with garrison doesn't require any abp changes. You only need to change the hold of the emplacement to enable the hold of other unit types (Default is only infantry and mg). I doubt that the models will get the right position in the trench, but you just have to try it
Oh, I didn't realise the question was about ABP files You're right - that's not necessary in this case.
Also, from my testing, I can say that the le.IG fits into a mortar pit pretty well, but the Pack Howitzer doesn't quite fit. |