Magazine API
Фото и видео: 1 из 8. Материалы автора из Steam Workshop.
О материале
«Magazine API» — материал мастерской Project Zomboid. Карты, транспорт, оружие и моды для выживания. Данные Steam, описание автора и ссылка для установки через подписку. Совместимость редакцией не проверена.
Описание автора
If you want buy me a coffee? then hit the UP & Favorite button instead giving me some dollars. I can buy coffee myself :D
(or some steam points.. I want to buy new profile wallpapers..)
Description
This mod does not add any weapons or magazines.
This mod allows other modders to use multiple magazine types on the same firearm. For example, an AK with a 30-round mag AND 95-round RPK drum mag.
>>Example Mod (Vanilla Firearm Magazine Expansion)<<
Main Feature
-
For modder: Single line per a weapon. simple.
-
Tooltip will be automatically generated by API. You can see that in the screenshot. will be fancy in the future tho.
-
Best Magazine will always be "magazine that has highest ammo count" no matter magazine types.
-
Also, when you are inserting bullets in your spare magazine, mod try to insert bullet into where the Best Magazine is.
-
When you are inserting bullets, If you don't have any bullets for Best Magazine, mod will try to find next magazine type.
-
Regarding above, you can use multiple type of ammo for single firearm. (for now, single type per single magazine however will be changed.)
-
When there's no ammo in all of your magazines, magazine which has highest Max Capacity will be the best magazine.
-
If you want to change your magazine manually, not automatically selected magazine, right-click your weapon and find "select magazine" menu
How To Use
- MagAPI.defineParam(weapon, mag1, mag2, ... mag99, mag100) -- This is all you have to do.
Example
require = "MagAPI"
MagAPI.defineParam("Base.AssaultRifle", "Base.9mmClip", "Base.556Clip", "Base.M14Clip", "Base.44Clip")
If you need more detailed description, check the pinned discussion.
Stability & Compatibility & Performance
It's pretty stable as I believe, but I'm not sure about performance when there are many magazine types. I believe it will be okay too, but anyway, this is why I'm saying this is in testing.
About Compatibility, since weapon mods does not allow to use more than one weapon mod, it will be okay. Also, you can fix & edit my code freely unless you are gonna set this mod as required of your mod.
About MP I will try when B42 MP is out, but honestly, I have not played MP in the last 11 years of PZ. So I'm not sure.
Future?
Known Issue
Tooltip will show correct maxAmmo and currentAmmo, However, name of magazine will not be changed.
This is my first API mod and also my first medium-sized mod, so anything bad can happen. I wrote this code in 6 hours, but the idea came 1-2 months ago.
If you are a developer, You CAN DO ANYTHING you want to implemented by copy&paste my files. You can include files into your mod directly to overwrite API, any actions, any codes. however, you should set this API as requirement.
Workshop ID: 3436296238 Mod ID: MagazineAPI
Как установить и запустить
Откройте оригинальную страницу в Steam Workshop, проверьте версию игры, зависимости и порядок загрузки в описании автора. Нажмите «Подписаться» и дождитесь загрузки Steam. Включите материал в меню модификаций или контента игры, если это требуется. Совместимость и запуск редакцией не проверены.