Disappearing Sector Inventories[message #322486]
|
Sun, 07 July 2013 03:08
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Hi,
I ran into a very annoying bug today. What happens is this (can easily be reproduced):
- Enter a sector that uses an alternate map. You can do this by enabling all weapon caches in the ini, starting a new game and then teleporting to H10.
- Kill everybody, thereby generating items in the sector.
- Go to strategic and from there enter another sector (like A9).
- Go back to strategic. Now enter H10 again.
- Voila: All items in this sector have been removed. It is now empty, apart from a 10x scope that can neither be found nor accessed :computer2:
Had this particular bug with a uncommitted exe of mine... but learned in IRC that this is an ancient bug. Apparently never fixed. Any ideas?
What I've learned until know is that this is directly related to alternate maps. If I force he game during loading of the sector to load the original map, all items are there... but, well, the original map is too. In H10 this removes the building, but curiously, changes to the building (like mortared and broken walls) stay. So now I have an map without buildings, apart from a broken wall.
Moreover, not using alternate maps can't be good. For whatever reason, underground maps ALSO have the 'alternate map'-tag. :whoknows: How are alternate maps handled correctly?
The items are stored in i_H10.Dat. It even reads from that when I enter the inventory from the strategic view. Only when I enter the map it reads them differently - it then reads all data from H10_a.DAT. The '_a' stands for alternate.
This seems like when entering and saving an alternate maps, the items should be stored in i_H10_a.DAT. But that never happens. It saves them in i_H10.DAT. Moreover, it does the same with corpses an stuff... and those are read correctly. So should the items be saved as i_H10.DAT, but also saved in H10_a.DAT? I don't know. How is this supposed to work?
Why is GetMapTempFileName() always used with BOOLEAN fAddAlternateMapLetter = TRUE if we enter a sector, but always with = FALSE if we determine the name for a tempfile (items and stuff)? Might be okay if the convention is that a map only ever has one version ingame... but why is the data then not written into H10_a.DAT?
Srsly. I hate this. :rant2:
Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Disappearing Sector Inventories[message #323062]
|
Mon, 22 July 2013 14:01
|
|
Bambusar |
|
Messages:63
Registered:July 2012 |
|
|
That was massively happening in Urban Chaos i have been playing a while ago. Sometimes insted of scopes i got some NIV pockets. Usually grayed out in strategic screen but when you entered tactical and exited again they were pickupable.
Currently I noticed same bug in latest 6232/1704 in Alma. After you go to tactical and back to strategical all items are gone replaced by 10x scope.
If you need I can post saves.
Thor
I've had an 'inventory items disappearing' bug when I ctrl-clicked some items from the sector inventory into the vehicle inventory (r.6187). Happened with several guns that I had double. The second one disappears. Only had it with guns so far...
I noticed that too. With shotguns. If you put multiple shotguns from truck to map inventory with ctrl-click, they just dissapear.
[Updated on: Mon, 22 July 2013 14:02] by Moderator Report message to a moderator
|
Corporal
|
|
|
Re: Disappearing Sector Inventories[message #323240]
|
Thu, 25 July 2013 21:23
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
I hope I solved this issue now in r6242. The problem was as follows:
When entering a sector, we preinitialize enemy placements (the one from the map editor), which causes us to temporarily create pre-placed soldiers and pre-placed items for them. In all instances I observed, there were enemies with dragunovs (item #18) and attached 10x scopes (item #208). In vanilla, when the maps were created, these items were compatible - now they aren't anymore.
As a result, the attachment does not fit, so we try to drop that attachment into our inventory - which doesn't exist (remember, WE (=soldier) don't exist). As that fails, we try to drop it at our feet (that don't exist...). This is bad. So bad that it deletes the entire inventory, because why not or something. :hmm:
I changed it, so that we now drop the stuff to a location that does exist (unless I misunderstood how map gridnos work). The item still won't show up, as after all, the item shouldn't exist, as the person using it doesn't exist either. :headbanger:
It seems in ancient times, someone already tried to fix this, but code indicates he/she wasn't entirely sure of what they were doing. Who knows, maybe they'll say it about this fix too. Item creation, attachments and map placements are horrible, horrible things. :roulette:
Report message to a moderator
|
|
|
|
|
|
|
Re: Disappearing Sector Inventories[message #323762]
|
Wed, 07 August 2013 20:42
|
|
Flugente |
|
Messages:3507
Registered:April 2009 Location: Germany |
|
|
Using r6274, I can not reproduce that - items in Meduna airport stay (including a single Talon Launcher that cannot be picked up or seen on the map). If I remember correctly from vanilla, there was always a hardcoded RPK-74 with both bipod and talon in that map. This seems to be the case I described above.
Are you sure your exe is >= r6242?
Report message to a moderator
|
|
|
|