Поиск по STEAMB

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

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

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

Меню

ОружиеБиблиотеки

Udderly Attachments

Положительные голоса93%71 голосов игроков
Подписчики5,4 тыс.5 392 в Steam Workshop
Размер файла148,74 КБЗагрузка через Steam
Обновление автора16 сент. 2023 г.Дата обновления материала
Изображение 1 из 1
Установить через Steam

О материале

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

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

Want to run your own PZ server at a reasonable price with good support? 2 days free, click here!

If this gains traction it will eliminate the need to make patch mods for guns and attachments to be intercompatible. Either way, I will be using this for my own gun releases.

This supports VFE and Vanilla calibers and attachments out of the box! If a gun is set up in a group but is not present, or if an attachment is set up in the list but is not present, it will be skipped harmlessly. That said, due to the nature of this mod it may assign attachments to a different (wider) selection of guns than in Vanilla or VFE out of the box since it does it by caliber/type of gun rather than one-by-one.

You must run at least one database (UdderlyAttachmentsLiteDatabase or UdderlyAttachmentsFullDatabase) as well as UdderlyAttachments. The Lite database doesn't expand upon VFE, the Full database expands access to attachments to anything sensible to have said access - things in the same group as things that have it but different calibers, or different types of guns in UA that aren't in VFE like LMGs. If there is interest, I will add other databases, but mind that it is more work to maintain as I add more.

How It Works

At runtime UA will scan through its table of functions added by other mods, and run the gun ones first, followed by the attachment ones. It will then go through all attachments in its database and for each one:

  • Iterate the guns in the groups it is assigned to and add them to a list of strings.

  • Build the MountOn list and reassign it to this list on the spot.

How Do I Use It? (for modders)

UA.Guns

To use UA, add your guns to the UA.Guns table in the following way:


UA.Guns.Type.Caliber

Both Type and Caliber (or Barrel Count/Length, for shotguns) are tables. The reason for this is so that mods can change what groups are assigned to what attachments, as well as what guns are assigned to what groups independently, and everything will all mesh up and support the right attachments.

The Types in UA by default:

- Pistols

- Revolvers

- SARs

- SMGs

- Shotguns

- BoltActions

- ARs

- LMGs

The calibers available (for non-shotguns) by default:

- Bullets22

- Bullets223

- Bullets308

- Bullets44

- Bullets45

- Bullets556

- Bullets762

- Bullets9

If you add new calibers to UA with one of your mods, please follow this naming convention. If you plan to use cartridge sizes (e.g., 7.62x54 rather than just 7.62), then write them as Bullets76254. If we all use the same naming convention then everything will stay compatible.

The types for shotguns:

- NoStock

- ShortBarrel

- DoubleShortBarrel

- LongBarrel

- DoubleLongBarrel

- Military

Military shotgun here means metal/fiberglass stock (e.g., not one that makes sense to replace with a fiberglass stock attachment) tactical shotguns like the SPAS12 that allow things like lasers to mount.

In order to have your gun strings added to the relevant tables, you need to make a tiny LUA script for it, like this:


print("[SomebodyGuns Big Chonker] Initializing.")
UA = UA or {}
UA.GunAddingFunctions = UA.GunAddingFunctions or {}
table.insert(UA.GunAddingFunctions, "table.insert(UA.Guns.BoltActions.Bullets308, \"SomebodyGuns.BigChonker\")")

We do this instead of just running the code on the spot because UA has to set up its tables prior to you adding to it, and it has to run its code after every other mod has added to it - this facilitates that.

Remember that if you want to set up a customized list of attachments for your gun and not inherit any from other mods/etc. (keep in mind this costs you in compatibility!) you can make a custom group for just your gun.

Once you've got that in place, you're done if you're just adding one or more guns. If you want to assign a custom group to an attachment, or you have new attachments to add, then you need to mess with the UA.Attachments table.

UA.Attachments

The UA.Attachments table is pretty simple - under the main table is a table for each attachment with the same name as the name from the item script, e.g., "x2Scope". Inside this table are a string and three more tables with no name. The first contains the groups of guns that are assigned to it, the second contains one-off additions to the list (not groups, just gun name strings), and the third contains exceptions to the groups, e.g, add all guns from the group unless on this list.

If you want to insert a new attachment for only 9mm Pistols called "Potato", you could do this:


print("[Potato Attachment] Initializing.")
UA = UA or {}
UA.AttachmentAddingFunctions = UA.AttachmentAddingFunctions or {}
table.insert(UA.AttachmentAddingFunctions, "table.insert(UA.Attachments, { \"PotatoAttachment.Potato\", { UA.Guns.Pistols9 }, { "PotatoGuns.PotatoPistol" }, { "PotatoGuns.NoPotatoPistol" } })"

If you want to assign a gun group to an attachment, you can do:


print("[OPGuns 308 Pistol LMAO] Initializing.")
UA = UA or {}
UA.AssignmentFunctions = UA.AssignmentFunctions or {}
table.insert(UA.AssignmentFunctions, "table.insert(UA.Attachments.x8Scope[2], UA.Guns.Pistols.Bullets308)") --Assigning all 308 pistols to x8Scope.

Note the "[2]" - the table you want to insert into is at this index, it will not vary, so just always include it. If you want to attach a single gun to an attachment without assigning other guns from the group to it, you can add it to index [3] as a string. If you wish to add a group but not one (or more) member of it, you can add the guns to exclude to index [4] as strings.

A real world example for my PPSh mod combines some of these:


print("[UdderlyGuns PPSh] Initializing.")
UA = UA or {}
UA.GunAddingFunctions = UA.GunAddingFunctions or {}
UA.GroupAssignmentFunctions = UA.GroupAssignmentFunctions or {}
table.insert(UA.GunAddingFunctions, "table.insert(UA.Guns.SMGs.Bullets762, \"UdderlyGuns.PPSh\")")
table.insert(UA.AssignmentFunctions, "table.insert(UA.Attachments.Sling[3], "\UdderlyGuns.PPSh\")")

Future Plans

- Other groupings built into UdderlyAttachments for other purposes, like stock material, intended range, etc. for ease of assignment.

If you have ideas let me know!

Like my mods? Help me survive, lol.

Venmo: @UdderlyEvelyn Paypal: yushatak@gmail.com (I do not check this email, do not contact me through it!) Ko-Fi: http://ko-fi.com/UdderlyEvelyn

Workshop ID: 2850431623 Mod ID: UdderlyAttachments Mod ID: UdderlyAttachmentsFullDatabase Mod ID: UdderlyAttachmentsLiteDatabase

Оригинал в Steam Workshop

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

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

Настройки cookies

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

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