Поиск по STEAMB

Игры и программы по онлайну, скины по объёму продаж

Ничего не найдено

Попробуйте другое название или переключите категорию.

Меню

ReviveMP

Положительные голоса72%60 голосов игроков
Подписчики4 тыс.4 048 в Steam Workshop
Размер файла289,87 КБЗагрузка через Steam
Обновление автора12 апр. 2022 г.Дата обновления материала

Изображение 1 из 5. Материалы автора из Steam Workshop.

Изображение 1 из 5
Установить через Steam

О материале

«ReviveMP» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.

Описание автора

This mod allows you to return back to life by selecting "Revive" occupation in the character creation screen without losing any of your progress (weight, skills, skill boosts, traits and recipes. Can be changed which one(s) will be recovered in the SandBox settings). It will also set your occupation back to what it was when you die. Your new character's Forename and Surname must be same with the character you died with. (If you pick up "Revive" occupation but have no data stored on server, your character will be killed instantly so you can create a new character. This is to prevent people playing with "Revive" occupation. I couldn't find a way to delete the character so that's why I choosed to kill. Let me know if you have a better way.)

Tested on 41.66. (This mod only works in multiplayer)

Available Add-on List:

NameDescription
Permanent InjuriesAdds a permanent injury to your character everytime he/she revives.
Admin ManagementAdds an admin managament system to the game for allowing using the revive option.

Want to support development and motivate me?

Изображение 5 из 5

Note: This mod inspired by Respawn mod and developed solely for multiplayer. Respawn mod is saving your character data on client side even if you are playing on multiplayer. This can easily be exploited by simply editing your character's JSON file that's generated when you died and change the values inside. However ReviveMP saves your data on server-side which means no one can edit the values of the revive data.

To Modders: If you wish to build a mod and take an action when a character revives, please add your callback function to ReviveMP.onReviveEventTable. Or if you want to save your own mod data to the revive data of the died character (which will be loaded when character revives and will be passed as parameter to callback function in onReviveEventTable) you can add your callback function to ReviveMP.onDeathEventTable.


-- Simply save all worn clothes by the character.
-- Note that this callback function takes "IsoPlayer" object as parameter.
function ReviveMPAddons.ExampleAddon.OnDeathEvent(player)
    local data  = { clothes = {} }
    local inv   = player:getInventory()
    local items = inv:getItems()

    for i=0, items:size() - 1 do
        local item = items:get(i)

        if item:IsClothing() and item:isEquipped() then
            table.insert(data.clothes, { fullType  = item:getFullType(),
                                         condition = item:getCondition() })
        end
    end

    return data
end

ReviveMP.onDeathEventTable.ExampleAddon = ReviveMPAddons.ExampleAddon.OnDeathEvent

Data returned from the ReviveMPAddons.ExampleAddon.OnDeathEvent will be saved to revive data under the "addonData" with the key of "ExampleAddon" as you assigned this callback function to "onDeathEventTable" using "ExampleAddon" key. As long as you avoid duplicate keys with other mods, you shouldn't be concerned with keys as ReviveMP will automatically pass your addon data. Now please see the example below about using the saved mod data. Also be sure to use same key names while assigning callback function to event tables of ReviveMP.


-- Simply give all the worn clothes back to player. (You need to write some more code to make them equipped when player revives, I will not do that.)
-- Note that this callback function takes "IsoPlayer" object and your addon data that you saved at the other example as parameters.
-- Always check if your addonData is null or not before proceeding.
function ReviveMPAddons.ExampleAddon.OnReviveEvent(player, addonData)
    if not addonData then
        print("Oops! Please be sure you used the same key while assigning this callback and OnDeathEvent callback functions.")
        return
    end

    local inv = player:getInventory()
    for _,clothData in pairs(addonData.clothes) do
        local item = inv:AddItem(clothData.fullType)
        item:setCondition(clothData.condition)
    end
end

ReviveMP.onReviveEventTable.ExampleAddon = ReviveMPAddons.ExampleAddon.OnReviveEvent

With these you can implement your own add-ons like letting players keep their inventory after dying or giving them a negative trait as penalty of reviving. There are many possibilities, your imagination is your only limit.

Workshop ID: 2792421325 Mod ID: ReviveMP

Оригинал в Steam Workshop

Как установить и запустить

Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.

Настройки cookies

Вы можете изменить выбор в любой момент. Отказ от аналитики не ограничивает доступ к сайту.

Технологии, провайдеры и сроки хранения