-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cargo - Add BI Vehicle in vehicle support #7984
base: master
Are you sure you want to change the base?
Conversation
we could use engine events for ViV stuff. 🙏 @dedmen |
This comment has been minimized.
This comment has been minimized.
I like this conceptually but play mostly with ww2 mods where the modern style of cargo pallet will not be a great look. |
Do you have a class name for the WW2 pallet? |
I'll have a look for something I think is good, but not everyone will run the same ww2 mods as my unit. |
|
Use ACE own interraction to unload all vehicles as BI action unload all vehicles do.
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
… ACE "CargoNet_01_box_F"
…ed with BI system
This allow player to select the cargo type fitting their current game play periode of history
if you make FT ticket now, and DM me on discord I may be able to get it into 2.02. |
|
Btw I completely forgot the ViV events. I'll put them back onto my todo now that I just saw them |
Is this blocked by something? I was considering making something like this but it seems the work has already been done. |
@Vdauphin I'm good to review and test? Nothing else to be done here? |
Yes sure but it definitely need some testing in "real" condition to find some edge cases |
Seems we are still missing: #7984 (comment) |
But since (I completely missed this change back then)
And https://github.com/acemod/ACE3/pull/7984/files#diff-19cb528ab9cffb1ff448fcf3c1125e9fb154cfa1c9b49ca23cc7b27ac643f3ffR4 But there is still atleast one unhandled way to unload a box. You can ACE-Carry pull it off the back of the truck. Okey I tested it Repro: IMO we should keep this carrying feature and fix it up instead.
This does NOT detect the unload. Because Carrying doesn't detach. IMO the detach is a bug. The vehicle will notice that the object isn't attached in the next simulation cycle and remove it from the internal list. The Eventhandler should fire there too when it notices it missing. I will fix it for 2.18. The easy fix would be to use this eventhandler, and inside carrying, check if the thing you are picking up, is currently attached to anything, and if yes then detach it from that first.
It does. https://community.bistudio.com/wiki/setVehicleCargo
When on some platform high in the air, even when not flying and standing on some platform, this could be causing issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I've reviewed the PR in it's current form and before I merged master into it recently.
The cargo net idea is neat, but it's the cause of several headaches:
- If the cargo net is unloaded via ViV (but not ACE Cargo), something should happen: Either it's replaced and the unloaded cargo net is deleted (making it impossible to unload cargo nets essentially)
or the space left behind should be filled up by some of the contents of said cargo net. Currently nothing happens. Generally, when you unload something, the space left behind is not filled by items inside ACE cargo, which imo it should replenish - I can address that though. I'm a bit hesitant about this suggestion though, since you might want to load something ViV that isn't ACE cargo and if the thing replenishes automatically, you'll need to unload all of the stored ACE cargo (and some ViV cargo) before being able to store your ViV item.Thought about this again, not a good idea, so I won't implement it.- I'm trying to use the ViV EH, but given that ACE very dynamically loads & unloads stuff from ViV, I'm not sure how to prevent those EH from triggering when ACE is doing the loading/unloading vs a 3rd party.
- Bug: Once you have filled up all ViV spaces (including using the cargo nets), adding another cargo item will make the "loose" cargo items (the ones not in the form of a cargo net) go into ACE cargo, where they can't be seen.
E.g.: Load numerous wooden boxes into a flatbed HEMTT until you have 3 cargo nets (you might have to increase the cargo space of the vehicle). Load several more wooden boxes - the first ones will stay, but after a certain threshold the wooden boxes will disappear, being moved to ACE cargo. You can start loading more boxes and the cycle begins again.
If we get rid of the cargo nets, it would make things easier, as the only time something can be unloaded is when something is purposely unloaded and not put into ACE cargo immediately. We could use the CargoUnloaded
EH and check is something is in the loaded array of a vehicle - if it is, remove it from the array.
It would also remove the cargo-net-type setting. I really don't like it being a setting, imo it should be config, but even better is if we don't need it at all.
One more thing: Do we want to have the "unload all vehicles" action unload all ViV, including ACE cargo or do we exclude ACE cargo from that (PR has the latter implemented already)?
Thoughts?
New entity events in 2.18 Detached also fires on ViV cargo unload. And could also handle the ACE carry issue. (tho it would throw asserts in diag and I don't like that :D)
Considering how many headaches it causes. Also there might be cases where you don't want it. Say you take a box from the front out, to interact with it. And then you put it back in. It can go into the same spot as it was before. I think I would have more situations where I don't want to replenish. |
I believe I've resolved the ACE carry issue in 623e77d by just unloading from ViV if they are loaded in ViV.
Yea, I won't add it then. |
The more I think about it, the more I think this is whole PR is a bad idea as it's implemented currently. Please don't get me wrong, I really like the visual effect this adds, but I don't think it's done right.
At the moment, if you load something, you have no control over if it goes into ViV or ACE cargo space directly. As the PR is currently, if you use the "Unload all vehicles" action, it will unload all ViV items except items that are part of ACE cargo, although for some reason it unloads the cargo nets (at least according to the code - I'm guessing it's a bug, if not, unexpected behaviour). As dedmen pointed out before:
I agree: It's confusing and inconsistent, especially seeing as at the moment you have no control over anything. The "unload all vehicles" action should truly unload all ViV items imo. Solution to that would be to add a button inside the cargo menu that would allow items to be moved from ViV to ACE cargo space and vice versa. This would allow one to set specific items to be ACE cargo and others to be ViV. So: Why not keep both mechanics separate instead? The idea I have in mind is to have two loading options for each item: one for regular ACE cargo and one for ViV if it exists. The ViV items added to vehicles wouldn't be stored as ACE cargo and would only use regular ViV mechanics, it would be completely independent of the ACE cargo system. This means that the "Unload all vehicles" action would remain as it is in Vanilla and truly unload all ViV objects. Going with this suggestion would also avoid the whole cargo nets system. |
I've come up with a first draft of this idea, see https://github.com/acemod/ACE3/tree/cargo-add-viv/addons/cargo.
Thing to sort out if people want this version: Regardless of which version we adopt, I noticed that the main interaction points of ViV cargo are quite low and sometimes interfere with the main interaction point of the vehicle. Culprits are |
When merged this pull request will:
To-do:
Land_WoodenBox_02_F
)Concept:
Click here
Here the ViV start to be full:
Some objects are migrated to the ACE Cargo system and replace visually by a pallet:
Here again the ViV is full so some item are migrated to ACE Cargo:
Let's continue to load objects:
Here again the ViV is full so some item are migrated to ACE Cargo:
Example of behavior when a vehicle is already loaded:
A player can load his vehicle. Objects added after through ACE Cargo will shown
User experience with vehicle loaded with BI action ViV and objects loaded with ACE cargo:
Click here
Code to test this PR:
Click here
Community idea: