project-navigation
Personal tools

Author Topic: Equipment disapears  (Read 5843 times)

Offline Azrael0480

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Equipment disapears
« on: November 05, 2012, 03:01:49 pm »
Hi, i just realized that different items disappear randomly. This ranges from weapons, medikits, ir-goggles, grenades ...

I realized it in the nightly build from November 04, 2012.
In the build from October 18, 2012 there where no problems.

A savegame is atttached.

Azrael

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Equipment disapears
« Reply #1 on: November 05, 2012, 03:45:09 pm »
can you explain a little bit more when this might happen? what actions you did and so on? we recently made it possible to equip soldiers without an aircraft.

Offline Azrael0480

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Re: Equipment disapears
« Reply #2 on: November 05, 2012, 05:20:16 pm »
Hi, i tried to reproduce it.
I equiped a squad and changed the armor and equipment from inactive to active squad members.
Then I took some sceens of the items I own, went on a mission. After winning the mission I looked at the buy/sell screen and saw that I lost 8 grenades (used only one in the mission), 5 medikits (used 2 in the mission), one grenade launcher + PA ammo was missing (owner wasn't even a active squad member and waiting "at home"), 2 IR goggles missing, 2 Plasma grenades missing..


Two squad members were killed during the mission, but i thought that all equipment of dead soldiers should be brought back with the transport after the mission. (I compared some screenshots before the transport arrived after the mission and after the transport arrived back home, and saw that the items of the dead soldier were brought back succesfully. So missing items are not from the dead squard members.)

I'm not sure but it could be that the missing items are all from squad members that stayed at home during the mission.
I'll try to reproduce and check that later.

Azrael




Offline Anarch Cassius

  • Squad Leader
  • ****
  • Posts: 176
    • View Profile
Re: Equipment disapears
« Reply #3 on: November 05, 2012, 09:43:01 pm »
Dead soldiers won't leave recoverable armor is one thing I've noticed.

I'm not sure this is a bug or a feature. On the one hand that armor being damaged is likely but on the other hand you can recover the aliens' armor.

Offline Lynol

  • Rookie
  • ***
  • Posts: 11
    • View Profile
Re: Equipment disapears
« Reply #4 on: November 06, 2012, 10:11:21 am »
Greetings everybody!

I want to report the same / a similar problem like Azrael:

I use the nightly build of November 1st  and upgraded on the 4th and 6th. The bug first occured on the 5th. Win 7 64bit, full campaign, hard dif, no other problems occured so far.

In the attached save, a firebird returns from a mission. After it has landed, the soldiers will still have all their equipment in their portrait (menu: aircraft, goto Firebird, goto tab: soldiers).

But when you click on "Equip soldiers" on the firebird, several items will have disappeared. They are neither in the soldiers' inventory nor in storage.

E.g. The first soldier, "Sylvie" does not lose anything, while three others will lose all their equipment and armor.

The bug is reliably reproducable. The disappearing items are consistently the same, as far as I can see (which is why I initially thought of a memory problem; I hired more soldiers and buyed more weapons just before it happened and then maybe "item230 to item248" are cut off from an array or something like that).


If the bug is just the expected result from the recent changes you did to the equipment system, please ignore this.  ;)

Offline johndo42

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: Equipment disapears
« Reply #5 on: November 06, 2012, 12:35:27 pm »
Hello,

I also noticed this bug after "equip soldiers without an aircraft" feature was added. this feature is very useful and i like it much.

as the bug is quite much annoying, i gave a try to look in the code and commit logs of changes related to the new feature, and my findings are following:

in commit 3c13bdc675d91149b98fee3200e917103169ea54 from Oct 28, 2012
* allow equipping soldiers without aircraft (call: "ui_push equipment…

there was change to src/client/cgame/campaign/cp_campaign.cpp in function CP_StartSelectedMission (void):
-  CP_CleanupAircraftCrew(aircraft, &ccs.eMission);
+  CP_CleanupTeam(base, &ccs.eMission);
i understand this change as all soldiers in base are now equipped before any mission and their inventory is removed from the stock in base. before this change, only soldiers assigned to aircraft were equipped.

I found the logic happenning after the mission in src/client/cgame/campaign/cp_aircraft.cpp in function void AII_CollectingItems, which collects all items from the ground and carried (i believe) only by soldiers included in the mission (assigned to aircraft) and return it to the inventory...

so from my quite high level point of view, equipping all soldiers in a base before mission, but returning equipmnet of only soldiers included in combat seems to be the casue of equipment disappearing.

as this was my very first try to look in the code, which is quite complex, i might be wrong. anyway i still believe this information may be helpful to someone that is able to fix it (unfortunately i am not yet...).

 
« Last Edit: November 06, 2012, 12:45:46 pm by johndo42 »

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Equipment disapears
« Reply #6 on: November 06, 2012, 01:27:12 pm »
Equipping doesn't remove any items from the base storage at all (yet), but it's possible that I missed some trick in AII_CollectingItems, I'll check it as I find some free time.

-geever

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Equipment disapears
« Reply #7 on: November 07, 2012, 08:44:32 pm »
Update: The issue has been patched yesterday. Report back if still happens...

-geever

Offline Lynol

  • Rookie
  • ***
  • Posts: 11
    • View Profile
Re: Equipment disapears
« Reply #8 on: November 08, 2012, 08:20:59 am »
Heh, great you looked into this. I guess it's not safegame compatible. Will report back when as soon as I have the time to start a new campaign.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Equipment disapears
« Reply #9 on: November 08, 2012, 08:24:01 am »
Heh, great you looked into this. I guess it's not safegame compatible. Will report back when as soon as I have the time to start a new campaign.

It is compatible. Ofc. It doesn't give you back the items were lost but otherwise works.

TBH, It was a temporary fix, I'm going to revamp the item collecting system when I find some time.

-geever

Offline Lynol

  • Rookie
  • ***
  • Posts: 11
    • View Profile
Re: Equipment disapears
« Reply #10 on: November 08, 2012, 04:07:25 pm »
Continued from the uploaded safe.

The same items disappeared (firebird landed, solderis have requip, click "euqip", item disappear). It's no gamebreaker, I'll buy replacements and check whether it happens again after the next mission.


Offline johndo42

  • Cannon Fodder
  • **
  • Posts: 2
    • View Profile
Re: Equipment disapears
« Reply #11 on: November 08, 2012, 04:34:42 pm »
i tried the patch today and it was OK for me. i tried new mission from a quicksave which is automatically done before each mission and no item was lost, so i am even able continue my campaign.
ps: thanx.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Equipment disapears
« Reply #12 on: November 08, 2012, 05:02:26 pm »
The same items disappeared (firebird landed, solderis have requip, click "euqip", item disappear).

Items of equipped soldiers of the base who were not on the mission were faultly deducted from storage.

-geever