Login

russian armor

Suplpy Truck to Deliver Supplies to Allies

23 Nov 2020, 12:10 PM
#1
avatar of Popsicle

Posts: 42

The group of people I play COH2 with rather enjoy large messy battles against four Expert AI, the larger the map the better, but small maps offer their own unique challenges. We also like to try and have each human play a different faction such that we can benefit from each faction's unique units and abilities. As a result we often find that one of us is lacking munitions but has plenty of fuel and another of us is lacking fuel but has plenty of munitions. A game/skirmish lasting an hour is a quick game for us, we often play 2+ hour games. It is not for everyone, but we enjoy it.

There doesn't appear to be a way to give my extra fuel to another player through the existing UI. I have been thinking about an in-game mechanic that we might use to accommodate the transfer of one player's resources to another player. High attrition rates and costly end game units drain resources quickly, and often hamper our efforts. We are not however, looking for a "cheat" or "trainer" solution to our problem. We enjoy difficult games and morn the loss of every unit. Winning is not the fun part of the game for us, the struggle, comradery, and team efforts are. So the idea that I have come up with, on paper, is to use the Opel Blitz supply truck to literally transport a resource from my HQ building to another player's preferred delivery point.

The way I would like to accomplish this is by giving the Opel Blitz 2 unique construction menus in command card positions 21 and 22.

Loading the Truck
The construction menu in slot 21 would be labeled "Load Truck" and would open up into a standard 3x4 grid where the player would see the following "Items": Load 100 Fuel, Load 200 Fuel, Load 400 Fuel, Load 1000 Fuel (positions 11-14), Load 100 Munitions, Load 200 Munitions, Load 400 Munitions, Load 1000 Munitions (positions 21-24). Only the "Items" with the requied_resource would be active; that is to say that if the player does not have 1000 fuel then the "Load 1000 Fuel" item would not be active, it would be visible but not active.

In order to load the truck it would have to be near the player's HQ building in order for the "Load Truck" Construction Menu to be active (near_entity requirement). Once the vehicle was near the HQ then the player could select the "Load Truck" button which would bring up the 3x4 grid mentioned above. If the player then had enough fuel to load 400 fuel they would select that "construction item", a player upgrade of "400 Fuel Loaded" would be applied to the Opel Truck Entity, and 400 fuel being the "Cost" for this action would be deducted from the player's balance. The "400 Fuel Loaded" upgrade would "unlock" the "Unload 400 Fuel" construction item in the "Unload Construction Menu". Taking the 400 fuel from the player now, adds an element of concern and anxiety, if the truck is destroyed the resource is lost forever.

Unloading the Truck
The construction menu in slot 22 would be labeled "Unload Truck" and would open up into a standard 3x4 grid where the player would see the following "Items": Unload 100 Fuel, Unload 200 Fuel, Unload 400 Fuel, Unload 1000 Fuel (positions 11-14), Unload 100 Munitions, Unload 200 Munitions, Unload 400 Munitions, Unload 1000 Munitions (positions 21-24). Only the "Items" unlocked by the appropriate Player Upgrade would be active/selectable.

After having loaded their Opel Blitz truck, the player providing the resources would then send the truck to the desired delivery location; the customer, a.k.a. needy player, may only have infantry that can receive the shipment at a forward or midfield position. Upon arrival the delivering player would then select the "Unload Truck" construction menu and select an available "Unload button". This action would then spawn an appropriate entity on the ground worth x-amount of resources, and would remove the player upgrade that unlocked it. The needy player would then send infantry over and have it pick up the item, thus gaining the resource.

Another Delivery Option
Another option I am entertaining is a new "Shipping and Receiving" building that once built spawns Rear Echelon like troops who will automatically pickup resource entities that spawn on the ground near them. Much like the British mechanics who repair vehicles that are near a Forward HQ. This would be one less thing the receiving player would have to worry about mid-to-late game when things are the most hectic. It would however mitigate the risk involved in the delivery process which might ruin some of the "fun". Although the receiving player could just as easily have infantry at their own HQ that are ready to receive the supplies so it probably all balances out.

The questions that I have are: How do I setup the "Load Truck" construction menu such that I can apply a player upgrade at a cost of resource x, without actually constructing something? Unless there is a Transformers mod I am not aware of, there aren't any construction animations for the Opel Truck. It does have a loading and unloading animation, I wonder if that would appease the "entity_blueprint_ext\animator" gods? I noticed an option of "visible_in_world" but not sure of the implications; maybe an invisible entity could be built that only lives for 30 seconds and then dies?

And finally, the "Unload Truck" construction menu items. In the on_construction ext there is an option to spawn an entity, but again, do I really have to construct something? If so, invisible, dies after 30 seconds? The whole Transformers thing again as vehicles do have construction animations?

Thanks for listening. What are your thoughts? Concerns? Ideas? Advice?
23 Nov 2020, 13:57 PM
#2
avatar of FichtenMoped
Editor in Chief Badge
Patrion 310

Posts: 4785 | Subs: 3

This sounds like a good idea for a gameplay mod but in the core game, this isn't really going to be wanted I fear. Good suggestion nonetheless it was nice to read how much thought you put into the concept
23 Nov 2020, 17:18 PM
#3
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

As I look at it there are 3 options on how to implement this.

The first one being the most simple one. Make a submenu in each faction HQ that would have different values that you would like to transfer. Each value would be a targeted ability that would take the x amount of your resource type and would dispatch a truck to your desired location where it would be dropped off and collected by your teammates.

The second way of looking at this is also quite simple and still within tunning pack options. The first part of this is the same as the previous implementation, making a submenu. This time though a truck could spawn next to your HQ (you need to overlook the fact the truck just appeared out of thin air) there it would perform the loading animation (not all faction trucks have this animation) for let's say x amount of seconds to simulate the actual loading of the truck with your resource type. After this is done you would gain control of the truck and you could drive it to your teammates' desired location.

And the last option for implementing this is the hardest out of these and will require some sort of programming knowledge. You could create a win condition pack that supports making your own UI assets (and much more of course). So here you could create your own button that would open up a "trade hub" where you could as in most RTS games transfer your stated amount of resources to another player. After this logic is done you can move on to the visual part. Where you could dispatch the truck to your HQ there perform the loading animation and then move to the destination you set to it or manually drive it to your desired location.

Out of all of these options, my go-to for me would be the third one. The third one is more complicated but giving you more control and options on what you can do. If you don't have programming knowledge this might not be the way for you. But if you have the time I would highly recommend looking up some Lua tutorials. Because in the end with win condition packs you can achieve much more.
23 Nov 2020, 19:09 PM
#4
avatar of Popsicle

Posts: 42

This sounds like a good idea for a gameplay mod but in the core game, this isn't really going to be wanted I fear. Good suggestion nonetheless it was nice to read how much thought you put into the concept


Yup, we don't see the value in this for most players. But like I said, we enjoy the journey more than we do the outcome.

Thanks for your input.
23 Nov 2020, 19:31 PM
#5
avatar of Popsicle

Posts: 42

As I look at it there are 3 options on how to implement this.

The first one being the most simple one. Make a submenu in each faction HQ that would have different values that you would like to transfer. Each value would be a targeted ability that would take the x amount of your resource type and would dispatch a truck to your desired location where it would be dropped off and collected by your teammates.

The second way of looking at this is also quite simple and still within tunning pack options. The first part of this is the same as the previous implementation, making a submenu. This time though a truck could spawn next to your HQ (you need to overlook the fact the truck just appeared out of thin air) there it would perform the loading animation (not all faction trucks have this animation) for let's say x amount of seconds to simulate the actual loading of the truck with your resource type. After this is done you would gain control of the truck and you could drive it to your teammates' desired location.

And the last option for implementing this is the hardest out of these and will require some sort of programming knowledge. You could create a win condition pack that supports making your own UI assets (and much more of course). So here you could create your own button that would open up a "trade hub" where you could as in most RTS games transfer your stated amount of resources to another player. After this logic is done you can move on to the visual part. Where you could dispatch the truck to your HQ there perform the loading animation and then move to the destination you set to it or manually drive it to your desired location.

Out of all of these options, my go-to for me would be the third one. The third one is more complicated but giving you more control and options on what you can do. If you don't have programming knowledge this might not be the way for you. But if you have the time I would highly recommend looking up some Lua tutorials. Because in the end with win condition packs you can achieve much more.


Ragnar this is great! Thanks for taking the time to respond with this. I like all three of these, I'll pass this on to my teammates and see which one they prefer. I imagine we'll start with a quick tuning pack option and shoot for the lua scripting as a long term option. I do have formal training and some experience with programming, old school stuff like Basic, Pascal, C-shell. And I play around with Java and LUA. So I would not be afraid of or shy away from your LUA suggestion. Thanks again for your great response I will update this thread once we decide which direction we wan to go in.

Anybody else have any input? The only silly suggestion is the one that isn't suggested. ;)
24 Nov 2020, 19:55 PM
#6
avatar of Popsicle

Posts: 42

As I look at it there are 3 options on how to implement this.

The first one being the most simple one. Make a submenu in each faction HQ that would have different values that you would like to transfer. Each value would be a targeted ability that would take the x amount of your resource type and would dispatch a truck to your desired location where it would be dropped off and collected by your teammates.

The second way of looking at this is also quite simple and still within tunning pack options. The first part of this is the same as the previous implementation, making a submenu. This time though a truck could spawn next to your HQ (you need to overlook the fact the truck just appeared out of thin air) there it would perform the loading animation (not all faction trucks have this animation) for let's say x amount of seconds to simulate the actual loading of the truck with your resource type. After this is done you would gain control of the truck and you could drive it to your teammates' desired location.

And the last option for implementing this is the hardest out of these and will require some sort of programming knowledge. You could create a win condition pack that supports making your own UI assets (and much more of course). So here you could create your own button that would open up a "trade hub" where you could as in most RTS games transfer your stated amount of resources to another player. After this logic is done you can move on to the visual part. Where you could dispatch the truck to your HQ there perform the loading animation and then move to the destination you set to it or manually drive it to your desired location.

Out of all of these options, my go-to for me would be the third one. The third one is more complicated but giving you more control and options on what you can do. If you don't have programming knowledge this might not be the way for you. But if you have the time I would highly recommend looking up some Lua tutorials. Because in the end with win condition packs you can achieve much more.



Okay, so I setup the sub-menu stuff for my HQ building, but only one of the current "abilities" in my building is an actual ability, the others are Spawner squads. I do not see how to add a required_player_upgrade to the Spawner. It does not seem to be possible. What am I missing?
25 Nov 2020, 20:25 PM
#7
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

You have to add the requirement to the squad itself.
26 Nov 2020, 08:41 AM
#8
avatar of Popsicle

Posts: 42

You have to add the requirement to the squad itself.


Right! Okay. Got it.

On a second note, I am also trying to set up the sub-menu for abilities in a squad. I thought it would work the same as for the building. But I can't get it to work. If I leave activation as "null" then in-game it says Ability Cant Be Used on this Target. If I set it to targeted I have to left-click on the ground. "Timed" just sits there and looks at me like I am daft, which apparently I am. And Always On, well, we know what that does.
26 Nov 2020, 10:19 AM
#9
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

I have mine set to timed and works just fine. are you applying the upgrade on strat_self_action?
2 Dec 2020, 12:08 PM
#10
avatar of Popsicle

Posts: 42

I have mine set to timed and works just fine. are you applying the upgrade on strat_self_action?


Hello. Thanks for the response. I have been distracted. In the mean time my team mates have decided against using a building, existing or new. We all voted on options. Using a truck to get supplies from HQ and then driving them over to someone else won. I could not figure out how to get an ability to start without having to click on something in the world. I'll try the timed activation again at a later date.

What I did get working is using an upgrade to "load" the supplies with a requirement to be within 25 meters of entity HQ. Then there is an ability that is usable that spawns a resource entity with the same amount of and type of supplies that were loaded. I used the method you described with usage_and_display to replace the "Load 250 Fuel" upgrade in slot 21, with the "Unload 250 Fuel" ability also in slot 21. Only one is allowed to be shown at any given time. With the use of a couple status-flags it is easy to keep track of how many and what kind of supplies have been loaded on to the truck and whether or not any can be unloaded. It all works like a champ and team mates are relatively happy.

I am using the US6/ZIS-6 supply truck for this. Thanks to information about the state_machine_name that Sneakeye provided in another thread, I am able to use those states to show differing amounts of supplies in the truck. However, I have not been able to figure out how to use requirement_actions to determine if the truck should be showing half full with supplies, partially full, or completely full.

I was having difficulty trying to figure out where I was going wrong in the logic and decided to add a couple more "flags" to tell me if a partiular upgrade currently existed or not. I use them to drive the display of an up arrow if the upgrade exists and down arrow if it does not. Even with the up and down arrows I could not figure out why the state was always being set to "empty". So I decided to add a requirement that the "half_flag" upgrade exist before I could use the "unload ability". In the following unload_25_fuel ability you can see that there is a requirement that the status-flag "half_flag" must exist before the ability can be used (reason usage). Then in the sstart_target_actions you can see where I use a requirement_action to decide if the state_machine should be set to "empty" or not. That requirement_action says that the state_machine status should only be set to "empty" when the upgrade "half_flag" does NOT exist. Well, "half_flag" does exist because I can not use the ability unless it does. And yet, the state_machine is set to "empty" anyway.

I do not understand. Can I not use requirment_actions in start_target_actions? I could really use a sanity check here.

6 Dec 2020, 09:59 AM
#11
avatar of RagnarTheGamer
Master Modmaker Badge

Posts: 317

Well from the looks of it doesn't seem you actually added the upgrade. So the requirement check will never pass. But if you add the upgrade somewhere else to the entity then it should work as intended. So my advise would be to check where you are adding the upgrade and to what you are adding it to.
13 Dec 2020, 19:48 PM
#12
avatar of Popsicle

Posts: 42

Well from the looks of it doesn't seem you actually added the upgrade. So the requirement check will never pass. But if you add the upgrade somewhere else to the entity then it should work as intended. So my advise would be to check where you are adding the upgrade and to what you are adding it to.


So, what you are saying is that requirement_actions are supposed to work properly in the actions_list. Okay, thanks. I'll take another look. The part that confuses me is that I made the upgrade a requirement for the ability. And I can use the ability. Yet the requirement_action acts like the upgrade has not been applied. I'll look at it again. Thanks for the response.
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

623 users are online: 623 guests
1 post in the last 24h
7 posts in the last week
39 posts in the last month
Registered members: 49061
Welcome our newest member, Rihedcfrd
Most online: 2043 users on 29 Oct 2023, 01:04 AM