Schwerer panzer HQ flak gun upgrade
Posts: 30
Posts: 317
Im trying to make the flak gun on the panzer HQ an upgrade. The upgrade itself seems to be in the files already, but there is something else i've probably got to change and i don't know what.
Could you please explain bit more what are you trying to achieve?
Posts: 30
Posts: 317
My idea was to make the gun not do anything until the upgrade is bought. After the upgrade is bought, it can just fire like it used to.
Ok, that is simple to do.
1) to action_apply_ext add requirement_action
2) to action_table add apply_modifiers_action
3) to modifiers add enable_weapon_modifier
4) set the enable_weapon_modifier as follow:
target_type_name = hardpoint_01
value = -1
5) in requirement_table in the requirement_action you will add required_not
6) to requirement_table in the required_not you will add required_entity_upgrade
7) set the upgrade_name to the upgrade that will enable the weapon
And you are done. This is how it should look in the end.
I hope this helped you
Posts: 30
Ok, that is simple to do.
1) to action_apply_ext add requirement_action
2) to action_table add apply_modifiers_action
3) to modifiers add enable_weapon_modifier
4) set the enable_weapon_modifier as follow:
target_type_name = hardpoint_01
value = -1
5) in requirement_table in the requirement_action you will add required_not
6) to requirement_table in the required_not you will add required_entity_upgrade
7) set the upgrade_name to the upgrade that will enable the weapon
And you are done. This is how it should look in the end.
I hope this helped you
Yes, this really helped me out.
Posts: 574
My mod uses the old pre-upgrade flak; it's set up and works correctly (shoots at air and ground units as soon as the truck is set up) but the gunners do not animate correctly - they're kind of stood up through the truck model, rather than sitting on the flak gun seats.
Is there a way to fix this without making the flak gun a separate upgrade? I really don't want to have to do that, and although only a visual quirk it is an annoyance I'd like to fix.
I did try making the gunners not be added to the truck until the truck has finished constructing (through an on_build_completion action) but it didn't fix it.
Posts: 766 | Subs: 2
On the subject of the flak gun, how do I get the gunners to animate properly?
My mod uses the old pre-upgrade flak; it's set up and works correctly (shoots at air and ground units as soon as the truck is set up) but the gunners do not animate correctly - they're kind of stood up through the truck model, rather than sitting on the flak gun seats.
Is there a way to fix this without making the flak gun a separate upgrade? I really don't want to have to do that, and although only a visual quirk it is an annoyance I'd like to fix.
I did try making the gunners not be added to the truck until the truck has finished constructing (through an on_build_completion action) but it didn't fix it.
Double check the crew ext. Also the default the crew are armies\german\soldiers\vehicle_crew\vehicle_crew
Ensure your abp files are correct. Not sure if you are using old files or not.
Posts: 574
Double check the crew ext. Also the default the crew are armies\german\soldiers\vehicle_crew\vehicle_crew
Ensure your abp files are correct. Not sure if you are using old files or not.
Does the flak gun need to be in the .abp file of the unit that mans it, then? (like weapons they carry)
If so, I never knew that. I think I use an Obersoldaten anim for the flak gunners on the Panzer HQ truck; would I need to add something to their .abp then?
German vehicle crew have this:
model =
{
"..\\..\\..\\Common\\CompleteMotionTree.abp",
"..\\..\\weapons\\stielgranate\\stielgranate",
"..\\..\\weapons\\rifle_kar98\\rifle_kar98",
"vehicle_crew",
"..\\..\\..\\common\\vehicles\\abandon_sync\\abandon_sync",
"..\\..\\..\\common\\vehicles\\crew\\crew\\crew",
}
Posts: 766 | Subs: 2
try looking at the west_german building 2
--3DSMax Toolset Generated: abp_functions.ms--
model =
{
"base_building_02",
"..\\..\\..\\common\\vehicles\\crew\\gunner_basebuilding_02_left\\gunner_basebuilding_02_left",
"..\\..\\..\\common\\vehicles\\crew\\gunner_basebuilding_02_right\\gunner_basebuilding_02_right",
}
does it have this?
can you post an image of the crew_ext?
Posts: 574
Posts: 574
Here's the crew.
Note that the gunners were not animated properly before, when I believe the anim was Obers rather than Falls. I'm not aware of the crew anim itself causing issues with things like this though - for example, I also use Falls as my 2cm flak gunners and they work fine there.
Posts: 766 | Subs: 2
Here's the crew.
Note that the gunners were not animated properly before, when I believe the anim was Obers rather than Falls. I'm not aware of the crew anim itself causing issues with things like this though - for example, I also use Falls as my 2cm flak gunners and they work fine there.
Try the regular German vehicle crews. 2cm Flaks are team weapons that are meant to be recrewed. The Flak HQ is not so there maybe a limited number models this animations.
If you want to try adding this to falls, try adding to the abp for the falls
"..\\..\\..\\common\\vehicles\\abandon_sync\\abandon_sync",
"..\\..\\..\\common\\vehicles\\crew\\crew\\crew",
Posts: 574
Worth mentioning (and this was the case before): if I spawn a Panzer HQ in cheat mod then the gunners appear fine, they don't animate properly when being added after the truck has setup after its loading animation...
Posts: 766 | Subs: 2
Didn't work.
Worth mentioning (and this was the case before): if I spawn a Panzer HQ in cheat mod then the gunners appear fine, they don't animate properly when being added after the truck has setup after its loading animation...
Question one: (mod builder)
Is this techincally a new mod or editing an old mod? If you copy and paste the folders in the CoH2 Mod builder and change the route. The abp files are not actually modded in. In the Coh2 Mod builder remove and re add the art folder to fix this.
Option two: (editor)
Its hard to tell what is going on. Try deleting and re-cloning the structure. On on_construction_actions add upgrade panzer_authorization_upgrade with a 1 second delay.
Posts: 574
Looking at the Panzer Authorization upgrade it seems to activate the passive building_2 upgrade, but this is already done in the on_construction_action for the building, so I don't see why it's necessary. I tried a one second delay and added the upgrade then, but no dice.
It's not a big deal, it's just a visual annoyance, and I don't know why it doesn't work but I'm also not bothered enough by it to start messing around deleting/re-doing the structure and potentially messing up other stuff. I'd hoped there was an easier explanation.
Posts: 817 | Subs: 5
My mod uses the old pre-upgrade flak; it's set up and works correctly (shoots at air and ground units as soon as the truck is set up) but the gunners do not animate correctly - they're kind of stood up through the truck model, rather than sitting on the flak gun seats.
I recognize this bug, it appeared randomly in my mod. To fix it, I added a requirement action in the action_apply with a required_constructionstate (do_construction_completion_check = true).
There are 3 actions:
2x apply_crew_action to add attach_gunner_basebuilding_02_left and attach_gunner_basebuilding_02_right.
And an animator_set_variable to set the variable 'build' to 1.
The cause was not clear to me, but somehow these settings were not set correctly in my case. Hopefully it works for you as well.
Posts: 574
I recognize this bug, it appeared randomly in my mod. To fix it, I added a requirement action in the action_apply with a required_constructionstate (do_construction_completion_check = true).
There are 3 actions:
2x apply_crew_action to add attach_gunner_basebuilding_02_left and attach_gunner_basebuilding_02_right.
And an animator_set_variable to set the variable 'build' to 1.
The cause was not clear to me, but somehow these settings were not set correctly in my case. Hopefully it works for you as well.
I appreciate the response, but this didn't work. Now no one appears on the guns.
What about add_crew_action? And does that mean gunner_left and gunner_right aren't needed?
Posts: 574
Do you think it has anything to do with the build time for the truck? My truck takers longer to setup than the actual build animation, so could that be it?
Posts: 817 | Subs: 5
I was just watching the building animation and the two guys do set up the truck and then get on the gun... but then they're stood through the truck.
Do you think it has anything to do with the build time for the truck? My truck takers longer to setup than the actual build animation, so could that be it?
That is certainly possible, worth trying. Most structures have their animations tight to the build variable, however these trucks animate for a fixed time.
Posts: 574
That is certainly possible, worth trying. Most structures have their animations tight to the build variable, however these trucks animate for a fixed time.
Well, rather embarrassingly that seems to have been the issue all along. Once I set the truck build time back to 45s it seems to have done the trick - I guess my 90s build time just broke the animation.
Livestreams
84 | |||||
35 | |||||
28 | |||||
12 | |||||
6 | |||||
5 | |||||
176 | |||||
13 | |||||
10 | |||||
2 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.653231.739+13
- 2.839223.790+2
- 3.35057.860+15
- 4.592234.717-1
- 5.278108.720+29
- 6.306114.729+2
- 7.645.928+5
- 8.922406.694+1
- 9.1122623.643+3
- 10.265138.658+2
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
0 post in the last week
28 posts in the last month
Welcome our newest member, Baqis73421
Most online: 2043 users on 29 Oct 2023, 01:04 AM