Login

russian armor

Schwerer panzer HQ flak gun upgrade

8 Jul 2019, 19:51 PM
#1
avatar of Fargoth88

Posts: 30

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.
8 Jul 2019, 21:03 PM
#2
avatar of RagnarTheGamer
Master Modmaker Badge

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?
9 Jul 2019, 04:37 AM
#3
avatar of Fargoth88

Posts: 30

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.
9 Jul 2019, 09:15 AM
#4
avatar of RagnarTheGamer
Master Modmaker Badge

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 :)
9 Jul 2019, 09:55 AM
#5
avatar of Fargoth88

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.
14 Jun 2020, 12:06 PM
#6
avatar of James Hale

Posts: 574

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.
14 Jun 2020, 18:35 PM
#7
avatar of Angrade (Ægion)
Senior Modmaker Badge

Posts: 765 | 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.
14 Jun 2020, 19:46 PM
#8
avatar of James Hale

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",

}

14 Jun 2020, 20:30 PM
#9
avatar of Angrade (Ægion)
Senior Modmaker Badge

Posts: 765 | Subs: 2

That is same as default

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?
14 Jun 2020, 21:06 PM
#10
avatar of James Hale

Posts: 574

Oh yes, all buildings are default. My mod has no building .abps at all.
14 Jun 2020, 21:11 PM
#11
avatar of James Hale

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.
14 Jun 2020, 23:46 PM
#12
avatar of Angrade (Ægion)
Senior Modmaker Badge

Posts: 765 | 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",

15 Jun 2020, 00:15 AM
#13
avatar of James Hale

Posts: 574

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...
15 Jun 2020, 00:54 AM
#14
avatar of Angrade (Ægion)
Senior Modmaker Badge

Posts: 765 | 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.
15 Jun 2020, 01:23 AM
#15
avatar of James Hale

Posts: 574

It's an old mod I've updated but everything seems to be working alright, it's just this weird anim glitch on the Panzer HQ I can't figure out. I assume it's to do with the fact that at some point in vanilla the gun was made a separate entity that requires an upgrade to activate.

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.
16 Jun 2020, 14:51 PM
#16
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | 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.
16 Jun 2020, 18:55 PM
#17
avatar of James Hale

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?
16 Jun 2020, 19:07 PM
#18
avatar of James Hale

Posts: 574

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?
16 Jun 2020, 20:00 PM
#19
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | 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.
16 Jun 2020, 23:30 PM
#20
avatar of James Hale

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.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

536 users are online: 536 guests
19 posts in the last 24h
45 posts in the last week
99 posts in the last month
Registered members: 44644
Welcome our newest member, felayo364
Most online: 2043 users on 29 Oct 2023, 01:04 AM