Login

russian armor

How to fix Tank Trap Repair Animation

3 Jun 2016, 12:14 PM
#1
avatar of Popsicle

Posts: 42

Hello, I have been trying to figure out how to change the Tank Trap repair animation from sandbags to blowtorch and can't figure it out. Searched the forums and don't see any discussion about it.

Any chance I could get a clue, hint, or straight-up answer?

I see in the various repair abilities that there are requirement_action(s), that there are heal_action(s) with target_info(s), and I see the state_machine_name being set to either blowtorch_state or build_shovel_sandbag_state but for some reason I just can't seem to figure out the logic and don't really know why or how either of those states is actually chosen.

Thanks in advance,

Pops.

3 Jun 2016, 12:39 PM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

animator_set_state is what causes the animation to play. do_action_state_name set to active will turn them on, inactive will turn them off.
3 Jun 2016, 12:58 PM
#3
avatar of Popsicle

Posts: 42

Hmmmm, okay. Thanks for that. But I am still lost.

Here's where I am mentally, maybe you can knock me loose. In delayed_actions they list list all the unit_types that you could want to repair under heal_action. Then later, still under delayed_actions, they have another requirement_action where they set the state_machine_name to blowtorch_state, do_action_state_name set to active, with a follow-on requirement_table that has unit_type set to building. aef_tank_trap_mp has 3 unit types, one of them being building. Why then doesn't the animation use blowtorch when repairing an aef_tank_trap_mp instead of the sandbag animation?

3 Jun 2016, 13:01 PM
#4
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Which ability are you looking at?
3 Jun 2016, 13:02 PM
#5
avatar of Popsicle

Posts: 42

aef_repair_ability_rear_echelon_mp
3 Jun 2016, 13:28 PM
#6
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Okay, let's walk through the logic:

requirement_action #1: cannot be injured
- requirement_action #2: cannot be moving
-- (delayed) requirement_action #3: cannot be moving
-- (delayed) requirement_action #4: target cannot be building (means it will only set blowtorch on when target is anything other than a building)
-- (delayed) requirement_action #5: target must be building and cannot be vehicle_building (means it will only set sandbags on when target is a building and not a vehicle_building)
-- (delayed) requirement_action #6: target must be both a building and a vehicle_building (means it will only set blowtorch on when target is both a building and a vehicle_building)

You would probably have to add the unit_type tank_traps in there for specificity. The thing about requirements is that they are very specific. As you can see in the logic above, the blowtorch only fires if the target is NOT a building OR is a building AND vehicle_building. There are no in-betweens, which is why it does not fire if the target is a building AND tank_traps. The logic would have to be OR, so maybe NOT a building OR a building AND tank_traps.

Something like this:

required_any_in_list (OR)
- required_not (NOT)
-- required_unit_type: building
- required_all_in_list (AND)
-- required_unit_type: building
-- required_unit_type: tank_traps

in the first blowtorch requirement, which reads as target is NOT a building OR (is both a building AND tank_traps)

or:

required_all_in_list (AND)
- required_unit_type: building
- required_any_in_list (OR)
-- required_unit_type: vehicle_building
-- required_unit_type: tank_traps

in the second blowtorch requirement, which reads as target is a building AND (either a vehicle_building OR tank_traps).
3 Jun 2016, 13:34 PM
#7
avatar of Popsicle

Posts: 42

ok digesting this.....
3 Jun 2016, 13:43 PM
#8
avatar of Popsicle

Posts: 42

I believe I understand what you have presented here. But looking back at my testing data (from trying to figure this out on my own) I think there are a couple cases that don't fit, or my notes are disjointed. Let me go into world builder and verify. Be right back....
3 Jun 2016, 13:54 PM
#9
avatar of Popsicle

Posts: 42

So.. I must first say that it is hard for me to have any doubt in what you say because I have watched all of your tutorials and read a lot of your posts and I know you know what you are doing. Am actually very happy you are on and have the time to help me.

For my testing I have been using Island Fortress and I use world builder to plant units, words, words, words... There is a "bridge_25_01" on this map, several actually. In their unit_type_list they have "demolishable_bridge" and "building" selected. When they are demolished the Rear Echelon troops repair them with a torch, not sandbags. Given that they use the ability we are discussing above, why are they using a torch? What am I missing?
3 Jun 2016, 14:00 PM
#10
avatar of Popsicle

Posts: 42

by the way, I am making adjustements to the ability to accomodate the tank traps. But I am not the kind of person who just wants to know what button to push or lever to pull, I always want to know how and/or why something works the way it does. I'd rather learn how to fish than be given fish.
3 Jun 2016, 14:07 PM
#11
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Just remembered that you'll also have to add tank_traps to target_special_validation. That is also where you'll find the bridge.
3 Jun 2016, 14:11 PM
#12
avatar of Popsicle

Posts: 42

3 Jun 2016, 14:12 PM
#13
avatar of Popsicle

Posts: 42

So, how does the target_special_validation hook into the delayed actions to determine which state should be used to do the repair?
3 Jun 2016, 14:14 PM
#14
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

requirement_actions are actions that fire only when their requirements are met.

target_special_validation is what can actually be targeted by the ability.

You'll need both.

Honestly, the logic already should work for tank traps, without modification, since they are buildings. I would try simply adding tank_traps to the target_special_validation, just before the has_all_in_list.
3 Jun 2016, 14:16 PM
#15
avatar of Popsicle

Posts: 42

So when I select the ability and hold the cursor over the bridge the first thing that happens is the target_special_validation, then the requirement_actions kick in?
3 Jun 2016, 14:19 PM
#16
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

When you use the ability, simply hovering would not fire any actions.
3 Jun 2016, 14:24 PM
#17
avatar of Popsicle

Posts: 42

hmmm... so I guess as soon as the bridge takes any damage it is considered wrecked? bridge_25_01_wrecked is not a building at that point, it is only of type "wrecked_bridge" and that is how it gets a torch for repairs?
3 Jun 2016, 14:26 PM
#18
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Exactly, it falls into the "NOT a building" logic.
3 Jun 2016, 14:27 PM
#19
avatar of Popsicle

Posts: 42

Awesome! Thanks. I should be able to get the tank traps sorted now.
3 Jun 2016, 14:52 PM
#20
avatar of Popsicle

Posts: 42

added tank_taps to target_special_validation where you suggested, didn't work. still using sand bags. going to try the building AND tank_traps option now
1 user is browsing this thread: 1 guest

Livestreams

unknown 20
Germany 907
Russian Federation 2
Germany 1
Germany 1

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

628 users are online: 628 guests
0 post in the last 24h
8 posts in the last week
34 posts in the last month
Registered members: 49113
Welcome our newest member, Dedek545
Most online: 2043 users on 29 Oct 2023, 01:04 AM