Page MenuHomeFeedback Tracker

setUnitLoadout command broken
Need More Info, NormalPublic

Description

Created faction in ALiVE ORBAT Creator does not show with weapon magazines in inventory when AI are killed. AI faction members only have 1 visible magazine; unsure if they shoot more than one magazine before being killed by players. When testing from Eden the AI show they have all magazines available as they are supposed to from when the faction is built.

http://steamcommunity.com/sharedfiles/filedetails?id=867968975

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
latest version of Windows 10
Category
Inventory
Steps To Reproduce

Load simple multiplayer mission with faction and required faction files then spawn in AI and kill to check their inventory.

Additional Information

ALiVE not needed to use faction; This started in 1.68RC from what I noticed in testing a mission I am building. My faction is linked for testing.

Similar to this issue linked here:
https://feedback.bistudio.com/T116980

Event Timeline

reschke created this task.Mar 20 2017, 7:08 PM
reschke edited Additional Information. (Show Details)
SpyderBlack723 added a subscriber: SpyderBlack723.EditedMar 20 2017, 7:24 PM

To add more detail to this, items and magazines seem to be added locally on whichever client/server executed the setUnitLoadout command - just as shown in the ticket linked above.

Original ticket repro should work fine for this as well - though the issue seems more linked to items and magazines and not the uniform/vest themselves.

reschke changed Category from AI Issues to Inventory.Mar 20 2017, 9:25 PM

Hello,

thank you for the feedback.

Could you by any chance, upload a simple repro mission that would not require an ALiVE mod?

razazel claimed this task.Mar 21 2017, 3:00 PM
razazel changed the task status from New to Need More Info.

I can it will be a while before I can put one up here for you guys to check.

SpyderBlack723 added a comment.EditedMar 21 2017, 10:36 PM

@razazel

Repro Mission

  1. Have two players, one loaded into slot unit1, and another loaded into slot unit2
  1. Load into mission
  1. Player loaded into unit1 slot must use the "Execute Test" action from their action menu
  1. Player 2 will see a hint indicating whether or not unit1's loadout is properly synced across the network

Basically,

  • Original loadout is stored
  • Loadout is reset using setUnitLoadout
  • Original loadout is sent to the second client
  • Original loadout var is compared to (getUnitLoadout unit2), if they are the same, inventories are properly synced
reschke added a comment.EditedMar 22 2017, 3:07 AM

Disregard this comment. It is not relevant to the issue that is happening with setunitloadout.

Also just noticed today that vehicles created only have a driver and gunner when created but do not have the remaining members of the team in when they spawn in on the multiplayer dedicated server.

That is related to ALiVE\ORBAT Creator, so leave that information on our forums (it sounds like intended behavior though).

@razazel any headway on this issue; Just checking in and I know you guys are slammed to the hilt with some things that were broken.

@razazel Has anything been done in regards to finding and fixing this issue?

Thanks

@reschke Hello, sorry for the late reply.

I have checked the repro mission provided by @SpyderBlack723 's but am unable to reproduce the issue :( hint showing up for the second player shows his loadout is same as for the first unit

Would it help if I submitted a video of a couple of missions with this showing so you can see what I and others are seeing in missions we are running?

Could you please try the repro provided by @SpyderBlack723 and tell me if its valid for you? If it is, there is perhaps only something I missed.

Will do after I get off work later today.

reschke removed a subscriber: reschke.Nov 17 2017, 4:41 AM

SetUnitLoadout is broken again

@HashCode How? What is your problem and reproducible test? I'm on it for a script right now, and I don't notice problem.

@HashCode How? What is your problem and reproducible test? I'm on it for a script right now, and I don't notice problem.

It has strange behavior. When I use this command in vanilla (from dedic on not local unit) it has chance to fail about 30% fail and 70% success. But right now I am writing script on moded server (armstalker mod) and it has 100% chance to broke replication. I've notice strange dependency - if my loadout array has uniform it will cause replication fail and sync will stop (only reconnect helps)
My steps is

  1. Apply setUnitLoadout command from dedic server to not local unit (uniform must be in loadout array)
  2. Ask that unit to drop any item (unit must ba player)
  3. Scan unit loadout by getUnitLoadout command from dedic

After that U can see, loadout array hasn't been changed
I can share video if needed

HashCode added a comment.EditedMay 17 2021, 6:30 PM

Video
P.S. Command brokes replication if loadout array has uniform

Well... I know setUnitLoadout is AG EG but you should avoid running (allPlayers #0) setUnitLoadout (getUnitLoadout allPlayers #0). I'm not sure it's fine from server due to sync.
Could you test something more "classic" like:
private _loadout = getUnitLoadout bob;
bob setUnitLoadOut _loadout;
(bob is the variable name of the player in editor you want to play).
Sorry not very helpful.

BI devs?

Well... I know setUnitLoadout is AG EG but you should avoid running (allPlayers #0) setUnitLoadout (getUnitLoadout allPlayers #0). I'm not sure it's fine from server due to sync.
Could you test something more "classic" like:
private _loadout = getUnitLoadout bob;
bob setUnitLoadOut _loadout;
(bob is the variable name of the player in editor you want to play).
Sorry not very helpful.

BI devs?

It's just reproduce example on the video, of course I've stuck with this while was writing code by classic methods like - _unitLoadout = getUnitLoadout _unit; _unit2 setUnitLoadout _unitLoadout and etc...
If needed I can post a function. Unfortunately it doesn't matter which way u choose to write code with this command, because only setUnitLoadout command brokes it (I've tried all possible ways to write this code to avoid bug)