Ammo Crates Fix

Discussion in 'DayZ Mod' started by BoNeHeD, Jun 19, 2013.

  1. delpi

    delpi Well-Known Member

    Joined:
    Feb 4, 2014
    Messages:
    336
    Likes Received:
    15
    no, but not having what I said about would.
     
  2. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    if you,had a script that added that variable to all objects of your crate class, then they would all either stay put or be deleted. if you are only losing some, then there is another factor.
    are you SURE they are all being spawned to begin with? add a diag_log line to your code to output to the log when and where each is spawned, or perhaps create a map marker.
     
  3. Cikez

    Cikez Well-Known Member

    Joined:
    Feb 3, 2014
    Messages:
    116
    Likes Received:
    3
    Hmm.. My hivelog file shows that they are all spawning.
     
  4. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    then if they are spawned and then actually being deleted then its a cleanup script. there are a handful of sched****** files that cleanup dead bodies etc. every few minutes ... the 'permaloot' variable is one of the checks to prevent these from being deleted, perhaps there is another check taking place.
    here is the search results for 'delete', see if any of those hits might be your issue.
    https://github.com/DayZMod/DayZ/search?utf8=✓&q=delete
     
  5. delpi

    delpi Well-Known Member

    Joined:
    Feb 4, 2014
    Messages:
    336
    Likes Received:
    15
    Its the only check. I've already set something up on my server for this version. He just needs to do that and everything will be fine.
     
  6. Cikez

    Cikez Well-Known Member

    Joined:
    Feb 3, 2014
    Messages:
    116
    Likes Received:
    3
    Hmm I have this:

    if (_type == "AmmoBoxBig") then { _object setVariable ["permaLoot", true]; };

    Right below this:

    if (_type == "Base_Fire_DZ") then { _object spawn base_fireMonitor; };

    In server_monitor.sqf

    For some reason they still seem to disappear randomly. Am I missing something?

    In the database i also have a character ID of a created character assigned to the ammoboxes. I also want to clarify when this happens they just disappear. They are not actually removed in the database.

    Thanks.
     
    Last edited: Nov 30, 2015
  7. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    lets see your files and an rpt log where they have been deleted.
     
  8. Cikez

    Cikez Well-Known Member

    Joined:
    Feb 3, 2014
    Messages:
    116
    Likes Received:
    3
    Hey sorry I have been very busy. I just got some intel from a donator.. He said:

    "After a restart the crate is usually there for about 15 mins or so then disappears. However, if a restart happens and I'm not at the house, once i return the crate is there for about 15 mins as well. It seems it "spawns" like other items in the house when we get close then after a few mins it goes away."

    Hopefully this helps with troubleshooting. If you still need to see my files let me know which ones. Thanks.
     
  9. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    If it spawns and disappears after some time then it must be getting deleted by a cleanup script.
    Lets see the servers RPT log and lets see the file where you set the "permaloot" variable.
     
  10. Cikez

    Cikez Well-Known Member

    Joined:
    Feb 3, 2014
    Messages:
    116
    Likes Received:
    3
  11. ShootingBlanks

    ShootingBlanks OpenDayZ Guru!

    Joined:
    Mar 31, 2013
    Messages:
    2,422
    Likes Received:
    336
    I looked through the github code quickly and your files. I see no reason why it wouldnt be working. Sounds like they are inside of a building, have you tried to put one outside a building to see if it stays? How about if you restart the server and stand there and watch them, do they delete if a player is nearby? (no idea if either of those thoughts has any merit, just thoughts). Have you disabled Infistar?
     
  12. Cikez

    Cikez Well-Known Member

    Joined:
    Feb 3, 2014
    Messages:
    116
    Likes Received:
    3
    I have not tried putting them outside of a building or disabling Infistar.

    It seems like from what I have seen if a player is nearby they do not disappear but I could be wrong. I will try disabling infistar to see if that fixes it. Thanks.
     

Share This Page