[Tutorial] How loot spawns work

Page 1 of 2 12 LastLast
Results 1 to 25 of 26
  1. #1
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    [Tutorial] How loot spawns work

    Okay guys, I was.. "inspired" to make this tutorial. I can see that a lot of you STILL don't realize how loot works so i'll go ever this in detail.

    1. How to do I place loot spawns?
    First, you spawn an obj_ItemSpawnPoint and add locations where you want things to spawn.
    To add location to an item spawn point, make sure that the pole is checked, then go to edit tab, scroll down and right below LootID there will be locations tab. where you just press "Add location" then select that location and click anywhere on the map while holding Control key.

    After that, you want to decide what loot should spawn at those locations. For this example I used ZOMBIE - Money, but it doesn't matter which one it is because procedure is same for everything.




    2. How does studio know?
    Studio takes data from the itemsDB.xml located in data\weapons\ folder. there's some useful things here and that's where everything studio related is.
    itemsDB.xml and items database on the server have to be synced for the server to work properly.



    Important note: Name you see here is NOT. I repeat. IS NOT!!! the name you see in-game. For seeing proper names inside studio, you must go to data\LangPack\ and open english.lang.
    In there, you must configure name of the item by writing it's ID and adding "_name". Like this:

    "******_name=Write name here" (****** marks the item ID)


    Note: For loot tables, there's no need for a description, but add it regardless.


    3. How does the server know?
    Server takes everything from the database on the server, and checks the data written in itemsDB.xml (that's why they need to be synced.
    Loot boxes are located inside items_generic database table. There are a lot of entries in that table, but with a simple sql query I can get what I need easily.
    It's important for loot boxes to have Category=7 and FNAME = Item_LootBox. You can also set your name here, but it's not important, so don't worry, rest of the columns in these cases are irrelevant too.

    ItemID here is actually the ID of the lootbox, not a real "item".



    4. How do I decide what spawns?
    What will which loot box spawn is decided elsewhere and to be precise, it is located inside items_lootdata database table.
    In there you will see a lot of stuff and I'll go over the columns first.
    RecordID column is just for indexing all of the loot boxes (aka, Loot tables)
    LootID column is the ID of the lootBox. this MUST be equal to ItemID in items_generic and to the ID of the LootBox inside itemsDB.xml
    Chance column is the column what decides the chance of items spawning. higher the number, higher the chance of that item spawning.
    ItemID column stands for what items will spawn.
    if you want any loot table to spawn money, then itemID must be 0 and GDMin (Game Dollars Minimum) and GDMax (Game Dollars Maximum) have to be set accordingly.
    if you want any loot table to have chance of spawning nothing, then as ItemID put "-1"



    Note: You can't have lootboxes spawn other or the same lootbox. ItemIDs have to be equal to an ItemID of a weapon/gear/armor/ whatever is that you want to spawn that a player can pick up and use.



    Any questions?


  2. #2
    Account Upgraded | Title Enabled! KlausVander is offline
    MemberRank
    May 2013 Join Date
    BrasilLocation
    240Posts

    Re: [Tutorial] How loot spawns work

    Good Work :D

  3. #3
    Valued Member Bambo1421 is offline
    MemberRank
    May 2013 Join Date
    145Posts

    Re: [Tutorial] How loot spawns work

    nice tut for beginners :)

  4. #4
    Member wavebird is offline
    MemberRank
    Apr 2013 Join Date
    63Posts

    Re: [Tutorial] How loot spawns work

    nice one, much better than me, when i tried to explain to therehere lol
    anyway to change item respawn time?

  5. #5
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by wavebird View Post
    nice one, much better than me, when i tried to explain to therehere lol
    anyway to change item respawn time?
    look at the first image in the tutorial again. that's a good start.
    @ Everyone else, thanks.

  6. #6
    Member wavebird is offline
    MemberRank
    Apr 2013 Join Date
    63Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by Kratos147 View Post
    look at the first image in the tutorial again. that's a good start.
    @ Everyone else, thanks.
    i see, but how it works? i dont understand

  7. #7
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    Tick period is the time in seconds when it actually checks for players around.
    cooldown time is cooldown when tick doesn't detect players around. once cooldown expires, de-spawn time starts.
    De-spawn time is the time for the item to know how long must an item be there with no players around so it despawns..

    basically..

    player comes in.. spawns items, tick period starts.. player stays for about 5 minutes.. tick period restarts 5 times.. player leaves.. tick timer ends, cooldown starts.. player comes back. cooldown stops, tick re-activates.. player leaves.. tick ends. cooldown starts.. no one comes around, cooldown reaches 0.. de-spawn time starts.. if no players around for next 3600 seconds, item de-spawns permanently.




    I think.

  8. #8
    Member wavebird is offline
    MemberRank
    Apr 2013 Join Date
    63Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by Kratos147 View Post
    Tick period is the time in seconds when it actually checks for players around.
    cooldown time is cooldown when tick doesn't detect players around. once cooldown expires, de-spawn time starts.
    De-spawn time is the time for the item to know how long must an item be there with no players around so it despawns..

    basically..

    player comes in.. spawns items, tick period starts.. player stays for about 5 minutes.. tick period restarts 5 times.. player leaves.. tick timer ends, cooldown starts.. player comes back. cooldown stops, tick re-activates.. player leaves.. tick ends. cooldown starts.. no one comes around, cooldown reaches 0.. de-spawn time starts.. if no players around for next 3600 seconds, item de-spawns permanently.




    I think.
    i have a small map
    everytime i come for looting, i can see the items spawning(dropping in the air)
    maybe changing this will help?
    i dont want to mess up everything

  9. #9
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    Of course that this will happen. it's only natural.

    place player spawns where items spawning won't be visible?

  10. #10
    Member wavebird is offline
    MemberRank
    Apr 2013 Join Date
    63Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by Kratos147 View Post
    Of course that this will happen. it's only natural.

    place player spawns where items spawning won't be visible?
    i know that this will happen
    but its ridiculous
    example: i come into PD and they spawn right front of me.

  11. #11
    Ass(et) Man The Owl is offline
    MemberRank
    Oct 2013 Join Date
    377Posts

    Re: [Tutorial] How loot spawns work

    Should help alot of people! Good work! :D

  12. #12
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by wavebird View Post
    i know that this will happen
    but its ridiculous
    example: i come into PD and they spawn right front of me.
    weird. because if I remember correctly, loot spawn radius should be 140 meters or so. at least it was in original WarZ back when everyone used Rei cheat. :D

  13. #13
    Member wavebird is offline
    MemberRank
    Apr 2013 Join Date
    63Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by Kratos147 View Post
    weird. because if I remember correctly, loot spawn radius should be 140 meters or so. at least it was in original WarZ back when everyone used Rei cheat. :D
    damn, replaced all loots, still same lame damn bug
    created another map, same size, no bugs lol.

  14. #14
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by wavebird View Post
    damn, replaced all loots, still same lame damn bug
    created another map, same size, no bugs lol.
    only one word can explain everything...


    Hammerpoint.

  15. #15
    Alpha Member javaz97 is offline
    MemberRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: [Tutorial] How loot spawns work

    thank a lot, Kratos147

  16. #16
    Alpha Member javaz97 is offline
    MemberRank
    May 2006 Join Date
    HellLocation
    1,537Posts

    Re: [Tutorial] How loot spawns work

    up up up

  17. #17
    Valued Member D132ian1 is offline
    MemberRank
    Nov 2013 Join Date
    138Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by javaz97 View Post
    up up up
    why do you bump everything?

  18. #18
    Member asmed321 is offline
    MemberRank
    Jul 2013 Join Date
    CampingLocation
    75Posts

    Re: [Tutorial] How loot spawns work

    Kratos i got a Easier one

    Go to Data/langpack/english
    Open with Notepad
    Make new lootbox/table

    Works fine for us!

  19. #19
    f793 eXtremousZ is offline
    MemberRank
    May 2013 Join Date
    Planet ShearLocation
    857Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by javaz97 View Post
    up up up
    Tutorials don't need to get bumped.

  20. #20
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by asmed321 View Post
    Kratos i got a Easier one

    Go to Data/langpack/english
    Open with Notepad
    Make new lootbox/table

    Works fine for us!
    My tutorial is not about how to make one.

    it's about HOW they WORK.

    please read before posting something completely unrelated.

  21. #21
    Apprentice Glar is offline
    MemberRank
    Feb 2014 Join Date
    18Posts

    Re: [Tutorial] How loot spawns work

    Kratos hey man thank you! But there's one problem. My "Loot box" (in the studio) is "empty". Where can I change what items are spawning on the spawnpoint?

  22. #22
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work



    1. go here

    2. Check what loot table you need to edit

    3. add desired items you want to spawn as new database rows

    4. set chance. (I'm am still not sure how they work, so I can not help you here)

    5. If it's NOT money ( ItemID = 0) then leave GDMin and GDMax as "0". set these only if you want money to spawn ( you can add a row for that too, of course)


    did that answer your question?

  23. #23
    Apprentice Glar is offline
    MemberRank
    Feb 2014 Join Date
    18Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by Kratos147 View Post


    1. go here

    2. Check what loot table you need to edit

    3. add desired items you want to spawn as new database rows

    4. set chance. (I'm am still not sure how they work, so I can not help you here)

    5. If it's NOT money ( ItemID = 0) then leave GDMin and GDMax as "0". set these only if you want money to spawn ( you can add a row for that too, of course)


    did that answer your question?
    Hmmm not really.... That's my problem, the Loot box is Empty. Where can I change what I want to spawn there?


    Another question, do I have to change the ItemDB.xml to let the loot spawn? Cause my seems kinda broken, it says: Server Error

    404 - File or directory not found.

    The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.



    Thank you

  24. #24
    Holy mother jesus tractor Kratos147 is offline
    MemberRank
    Jan 2011 Join Date
    CroatiaLocation
    470Posts

    Re: [Tutorial] How loot spawns work

    You have broken files all over the place obviously.


    you need properly set itemsDB to see loot boxes.

    I suggest you delete your files and get new ones...

  25. #25
    Apprentice Glar is offline
    MemberRank
    Feb 2014 Join Date
    18Posts

    Re: [Tutorial] How loot spawns work

    Quote Originally Posted by Kratos147 View Post
    You have broken files all over the place obviously.


    you need properly set itemsDB to see loot boxes.

    I suggest you delete your files and get new ones...

    Ok that would explain a lot. Yes I have downloaded the oldest files. Stidio.exe version 1.0. Where can I get the latest files?



Page 1 of 2 12 LastLast

Advertisement