Dayz не работает спавн лута
В последнее время каждый 3-й задает вопрос: «рестарт прошел, а лута нету, где лут, админы. »
Устал вам отвечать одно и то же. Эту тему посвятим именно этому вопросу!
И начнем с малого — с логики (кто не понял, вам в google).
Где вы все были, когда разработчики игры выпускали информацию по разработке игры и видео-блоги? И с чего вы решили вообще, что лут должен спавниться с рестартом сервера? Задайте сами себе эти вопросы хотя бы, не надо нам отвечать на них! Вы идете в игру, о которой ничего не знаете. Так если не знаете, почему нельзя эту информацию банально «погуглить», «заяндексить» и «нарамблерить»?
Впрочем, все что выше — это риторический вопрос, который вас в первую очередь должен беспокоить.
Перейдем к сути вопроса, а именно информации о системе спавна лута в версиях DayZ 0.60 и более новых (версии выше DayZ 0.60, DayZ 0.61, DayZ 0.62 к ним относится).
С версии DayZ 0.60 и выше разработчики игры внедрили в игру динамическую систему спавна игровых вещей на карте, завязанную на «центральной экономике лута» на сервера. Что это значит? Отвечаю:
Динамическая система спавна лута означает, что лут будет спавниться не с рестартом сервера, а в может спавниться в любой момент, когда это необходимо серверу. Т.е. буквально перед носом у вас лут может появиться, замениться на другой или вовсе исчезнуть (поскольку спавн вещи подразумевает очистку от старой вещи).
Система «центральной экономики лута» на сервере подразумевает большую огромную систему, собирающую информацию о количестве лута на всем сервере (т.е. на земле, в домах, в палатках, бочках, машинах, на разбитых вертолетах, и т.п.), состоянии каждой вещи (ruined, damaged, pristine и т.п.), количестве определенных типов вещей на карте, количестве именно одной вещи на всей карте (объект поиска вещей все тот же, весь сервер со всеми составляющими), и т.п. Перечислять тут можно долго, общее описаниие данной функции примерно такое, кто хочет более точную и полную информацию — изучайте записи от разработчиков игры, их дневники, стримы, форумы, найдете массу полезной и интересной информации.
Тем самым, вместе 2 названные выше операции (или функции, если их можно назвать таковыми) составляют одну единую систему спавна лута на сервере, которая:
1. Постоянно на протяжении какого-то времени проверяет все точки спавна лута на сервере
2. Оценивает количество лута в целом, количество определенного лута (одной вещички, и так с каждой), тип лута (к примеру, штанов на сервере в целом 756 (цифры с потолка)), состояние лута (каждой вещички), время от спавна данной вещи или от момента ее использования (поднятия, осмотра кем-либо) до момента ее переспавна, и другие параметры
3. Анализирует эти данные в каждой точке спавна лута на сервере, включая и бочки, и палатки, и мышины, и лут на земле, и на точках спавна, и т.п.
4. Принимает решение о переспавне определенных видов лута в одной из возможных точек спавна (они также просчитываются системой спавна в зависимости от множества ранее оцененных параметров)
5. Производит переспавн лута, вне зависимости от рестарта сервера
6. При рестарте сервер сохраняет информацию о всех вещах на сервере, в том числе и информацию об использовании этой вещи игроками, и уже с загрузкой сервера снова он просто ее восстанавливает, визуализируя нам картину того, что лут не переспавнивался (а он и не переспавнивался, ибо надобности не было в этом у «центральной экономике лута» на сервере).
Причем, этот лут может появиться и пропасть у вас перед носом, может пролежать в одном месте очень долго, благодаря тому, что игроки его изучают, может не переспавниться с рестартом, но переспавниться в любой момент при работающем сервере.
Примерно вот так все и работает.
Так что если у вас нет лута перед носом, далеко не факт, что он не спавнится. Возможно у кого-то на сервере палатки завалены этими самыми AKM-и и магазинами к нему, и он просто жадный и не делится ни с кем. А может вашу кофточку, которую вы видите на одном месте в казарме 10-й раз, уже изучило половина всех, посетивших сервер, игроков, и ее время переспавна банально обнулилось, поскольку этот предмет пользуется спросом именно в том месте на сервере игроками.
И не пишите больше «админ, спаси, помоги, не респавнится лут после рестарта», все респавнится, просто далеко не так, как вы думаете
Ну а тем, кто всетаки не понял ничего, советую скачать DayZ 0.59 и играть там, поскольку эта система спавна никак не редактируется и зашита железно в функционал сервера игры.
Изменено: Phantom666, 02 Июнь 2021 — 11:19
Источник
Dayz не работает спавн лута
Репутация: 0 бал.
Замечания: 0 бал.
Репутация: 572 бал.
Замечания: 0 бал.
Добавлено (20.01.2014, 08:32)У меня тоже на арене мод не работал,поставил на Айс хост и всё норм стало
Репутация: 0 бал.
Замечания: 0 бал.
Репутация: 572 бал.
Замечания: 0 бал.
Репутация: 16 бал.
Замечания: 0 бал.
Репутация: 81 бал.
Замечания: 0 бал.
Репутация: 0 бал.
Замечания: 0 бал.
Репутация: 572 бал.
Замечания: 0 бал.
Репутация: 0 бал.
Замечания: 0 бал.
Репутация: 0 бал.
Замечания: 0 бал.
Репутация: 572 бал.
Замечания: 0 бал.
Репутация: 81 бал.
Замечания: 0 бал.
Репутация: 0 бал.
Замечания: 0 бал.
Добавлено (20.01.2014, 16:11)из-за этого наверное
Репутация: 572 бал.
Замечания: 0 бал.
Репутация: 0 бал.
Замечания: 0 бал.
Источник
Dayz не работает спавн лута
(Not a ranting, not trolling nor do i have any intentions of doing either of those)
Answer: Loot doesnt respawn anymore then CLE spawns on server restart. Pipsi the server im playing on has got Persistance wipes twice a day which as a result makes a ton of loot spawn 😀
From wiki: (It’s late I am lazy)
Central Loot Economy
The Central Loot Economy (often abbreviated «CLE») is DayZ’s unique management system for loot spawning and clean-up. It is a complex system of tags, categories, zones, maximums, minimums, averages, and so on. The CLE dictates exactly how many of each item can be present on a single instance of the game at a time (one server), with important factors like randomization and rarity baked in. These values can be adjusted at any time, without requiring players or servers to install a game update.
In addition to controlling how much of each item is present, it also «cleans up» the map by removing items which have become ruined or which have gone untouched for a set amount of time. This function prevents the game from becoming cluttered with useless items, serves players with a continually refreshed pool of available gear, acts as one method of preventing individual players from having too much influence over the entire server’s economy. For more information about how long items stay in place without activity, please see the table below for Persistence.
Short answer: Not intended to at least.
Nope. CLE is spawns loot. not server restarts
I dont entirely believe that being true.
yes loot spawns overtime via CLE but it also respawns alot more on a restart. as for why tisy is always full of m4s and svds just after a restart.
Imo yes loot spawns on restarts.
If you loot tisy just after a restart its gonna be full of loot. So loot up leave. Come back just b4 the next restart and check it over. Yes loot will have respawned. But wont be much if your on a full server. Now the server just restarted. Check tisy again it will be full of loot. So i assume loot does spawn on restarts.
Yes loot from b4 will still be there but alot more added to it.
Someone prove me wrong of you think otherwise.
Источник
Loot RE-spawn is bugged (spawns only once per building and client connect) #1470
Comments
Rob2222 commented Jul 30, 2014
In building_spawnloot you are working with:
_obj setVariable [«looted»,diag_tickTime + dayz_tickTimeOffset];
In player_spawncheck you are working with:
_dateNow = (DateToNumber date);
_x setVariable [«looted»,_dateNow,true];
It is a different time metric. Cause of that it is messing up the age variable in player_spawncheck:
_age = (_dateNow — _looted) * 525948;
And we have no more loot-respawn until server restart in this building, cause the age is negative.
At least if I understand it correct.
Diag Log example:
«SPAWN LOOT: Land_telek1 Building is 8.02533 old»
«SPAWN LOOT: Land_Misc_Cargo1Bo Building is 8.02533 old»
«SPAWN LOOT: Land_budova4_in Building is -3.7898e+009 old»
«SPAWN LOOT: Land_Mil_Barracks Building is -3.78988e+009 old»
«SPAWN LOOT: Land_budova4_in Building is -3.7899e+009 old»
Is this intended?
When you go to a base, loot spawns. You leave it, it despawns. You go again there after a while, nothing happens. The buildings have a wrong(?) looted value, the age is negative and the IF’s in player_spawncheck ( «(_age > DZE_LootSpawnTimer) &&. » ) will never get true until/if the building_monitor sets «looted» to a correct «datetonumber date» value anywhen. I don’t know, when/if building_monitor is called.
But the 10 minute respawn timer does not work atm.
After removing «_obj setVariable [«looted»,diag_tickTime + dayz_tickTimeOffset];» in building_spawnloot, loot spawning is working and after cleanup it will respawn when the 10 minutes are over.
For me it looks like it is not intended to set «looted» in building_spawnloot, cause it is already set in player_spawncheck when building_spawnloot is called.
(The cleared variable is never set to false, also. I think.)
However, I don’t know which loot behaviour you guys intend.
The text was updated successfully, but these errors were encountered:
Источник
Dayz не работает спавн лута
add as attachments or something like this //Light Gunner
itemEnt = player.GetInventory().CreateInInventory(«AthleticShoes_Black»); itemBs = ItemBase.Cast(itemEnt);
pGun = player.GetInventory().CreateInInventory(«MP5K»); itemBs = ItemBase.Cast(itemEnt); // added the gun before any backpacks so attachments would be added to the gun and not in the players inventory
itemEnt = player.GetInventory().CreateInInventory(«MP5_RailHndgrd»); itemBs = ItemBase.Cast(itemEnt); //doing this before adding inventory spaces ensured the attachment was on the gun by default
itemEnt = player.GetInventory().CreateInInventory(«MP5k_StockBttstck»); itemBs = ItemBase.Cast(itemEnt); // same thing with the buttstock for the gun
itemEnt = player.GetInventory().CreateInInventory(«MP5_Compensator»); itemBs = ItemBase.Cast(itemEnt); // and the compensator
itemEnt = player.GetInventory().CreateInInventory(«BoonieHat_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitJacket_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitPants_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt); // note that when spawnin players with mags, they are full by default
player.SetQuickBarEntityShortcut(itemEnt, 1, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 2, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 3, true);
itemEnt = player.GetInventory().CreateInInventory(«Ammo_9x19»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«HighCapacityVest_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TacticalBaconCan_Opened»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(pGun, 0, true);
break;
What your code look like at the moment?
What your code look like at the moment?
https://pastebin.com/TVe8SjzM
basically it’s just a bunch of
«GetInventory().CreateInInventory(‘»);»
for everything, clothes, items, etc. Before everything I have «player.RemoveAllItems();» to hopefully take everything out. I’ve also removed the tactical shirt. So basically I’m wondering how to add stuff in the jacket and vest, and if I can’t, how can I spawn stuff around the player?
One more question, is there a way to add multiples of something? Like instead of 3 lines putting a pistol mag in the inventory can I do something like «x.quantity(3);»?
Initially looking at this all the items just end up in the inventory correct ??
you also appear to have some excess lines such as:
where if you just removed the rand = Math from the first set of foods you would not need the second set and have it read:
However the above FoodArray will only pick from one of the food items.
Note: i’m only glancing over your init file right now as i’m still working so forgive any formatting or typos i’ve made in my examples.
Edit: altered typo in rndindex definitions.
add as attachments or something like this //Light Gunner
itemEnt = player.GetInventory().CreateInInventory(«AthleticShoes_Black»); itemBs = ItemBase.Cast(itemEnt);
pGun = player.GetInventory().CreateInInventory(«MP5K»); itemBs = ItemBase.Cast(itemEnt); // added the gun before any backpacks so attachments would be added to the gun and not in the players inventory
itemEnt = player.GetInventory().CreateInInventory(«MP5_RailHndgrd»); itemBs = ItemBase.Cast(itemEnt); //doing this before adding inventory spaces ensured the attachment was on the gun by default
itemEnt = player.GetInventory().CreateInInventory(«MP5k_StockBttstck»); itemBs = ItemBase.Cast(itemEnt); // same thing with the buttstock for the gun
itemEnt = player.GetInventory().CreateInInventory(«MP5_Compensator»); itemBs = ItemBase.Cast(itemEnt); // and the compensator
itemEnt = player.GetInventory().CreateInInventory(«BoonieHat_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitJacket_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitPants_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt); // note that when spawnin players with mags, they are full by default
player.SetQuickBarEntityShortcut(itemEnt, 1, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 2, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 3, true);
itemEnt = player.GetInventory().CreateInInventory(«Ammo_9x19»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«HighCapacityVest_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TacticalBaconCan_Opened»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(pGun, 0, true);
break;
I don’t see where you define pGun🤔🤔🤔🤔
So i’ve taken a more in depth look at your init.c file and this is what i’m spotting.
I first added clothes, backpacks, a vest
you have the right idea with player.RemoveAllItems(); just in the wrong place ( at least i see it as being in the wrong place as you was adding items just to remove them with that ).
If you use it here instead:
That will remove the random generated ones / chosen clothing.
On to the clothing you want, create a line space after removing the clothes and create your outfit in the same way as you are inventory items ( if you want the option of putting specific items into a backpack or something you will need to alter the way you create / add the items ).
Just adding clothing without the option of adding loot to a specific piece of clothing do:
Edit: I can help further if you would like just add me.
So I’ve taken a more in depth look at your init.c file and this is what i’m spotting.
Thank you Smokey, I have programmed in c for a year or two now and have taken a year of comp sci in college, I just don’t know the classes and how everything is defined in DZ. Everything you’ve said makes sense and I think I have the basic functions down for now. If you know any useful functions, or ones you find yourself using a lot I would appreciate it if you could post them, I might find them useful, and even if I don’t someone else will.
EDIT: another question, can the EntityAI class be used to attach objects to guns, such as
«EntityAI g1 = . («FNX45″);»
«itemEnt = g1. («PistolSuppressor»);»
or is there another way of doing this? Unless you’re on right now I’m about to figure it out for myself but it’s useful to have someone who already knows lol. Thanks again, by the way. You’ve been a great help.
This is my new code, everything is working great! I did need the «remove items» inside the if condition, for some reason when its outside where you suggested it removes all items AFTER they have been placed on the character (I spawned with no items or clothes when using your suggestion, commented the line out and it worked but I had default clothes, so I moved it to the if condition and it worked). The EntityAI does work with guns, belts, everything and it’s great, but if you use it with a magazine in a gun it seems to either despawn it or have no ammo, so that’s staying out for now.
This is my new code, everything is working great! I did need the «remove items» inside the if condition, for some reason when its outside where you suggested it removes all items AFTER they have been placed on the character (I spawned with no items or clothes when using your suggestion, commented the line out and it worked but I had default clothes, so I moved it to the if condition and it worked). The EntityAI does work with guns, belts, everything and it’s great, but if you use it with a magazine in a gun it seems to either despawn it or have no ammo, so that’s staying out for now.
I will have a look at your new file shortly, the weekend is here and my attention can be split though so will take a while haha.
When it comes to adding magazines just adding them as an attachment or in any simple way bugs out the weapon and / or magazine and I suspect you also need to add ammo to the chamber for that weapon ( I was investigating this yesterday but have no solution as of yet ).
EDIT: another question, can the EntityAI class be used to attach objects to guns, such as
«EntityAI g1 = . («FNX45″);»
«itemEnt = g1. («PistolSuppressor»);»
or is there another way of doing this? Unless you’re on right now I’m about to figure it out for myself but it’s useful to have someone who already knows lol. Thanks again, by the way. You’ve been a great help.
What I have been doing is this:
EntityAI G1 = player.GetInventory().CreateInInventory(«»);
When it comes to an attachment that requires another item ( such as a light needing a battery ) create a new class with EntityAI.
Defining a class should allow for attachment of the likes of chemlights and radios to backpacks, granades to vests and even NVGs and lights, with batteries to helmets.
Источник