Hi everybody,
I am working on my first mod for project zomboid. It adds quick access bar for items from player inventory. Mod idea is based on similar mod "Hotbar for 5-20 often-used" (Blindcoder) and other games like WoW and ETF. Mod is also using library "Blindcoders Modding Utility". My idea was to have more bars with option to change dimensions and also more automatic functions.
Mod is public . You can find mod here Steam Workshop
The basic version of mod have one bar with 1 row and 8 columns. You can drag bar around. Bar is using same windows like inventory page (X for hide and pin for collapsable window).
Also you can use Mod Options to add more quick access bars. With modoptions mod you can set number of bars from 1 to 5. How many rows and columns for each bar will have. Also default key for toggle bars can be changed with modoptions ( default: tab )
PZ: build 41 beta only
Required mods:
blindcoders Modding Utility (saving data to ini)
Optional mods:
Mod Options
Usage:
"tab" for show/hide bars. Drag and drop item into slot. You don't need to have item in inventory to add it to slot. Slot counts non broken items in inventory ( number in slot example: (24) five items in inventory ) and in all containers that you have on you ( even in containers in containers like bandage in medkit in backpack)
Broken items are iqnored, you have to go into inventory to work with them.
Note: Some items have same name and they merge in inventory, but they are not same items.
Right mouse click: Same like in inventory window.
Left mouse click have smart functions based on item in slot. Functions are using code already in project zomboid. Many function return used item into original container.
Example:
Click slot with Disinfectant ( item is inside medkit in backpack)
Disinfectant is moved to main inventory if needed
Disinfectant is used on damaged parts
Disinfectant is moved inside medkit in backpack if still exist.
Note: If you cancel action, item will remain in main invetory (start running etc.).
Food
this works like double click in inventory (Cola, Chips, Cigarettes)
If food is non posion eat half or use whole if something like cigarettes etc.
After use item returns to original container.
Water
If item contain water, player is thirsty and water is not tainted then drink.
After use item returns to original container.
Pills (BetaBlock, AntiDeb, SleepingTablets and Vitamins)
Take pill. Same like right click but item is put in original container after use.
Disinfectant and alcohol wipes
Apply alcohol on every damaged body part without alcohol.
After use item returns to original container.
Dish cloth or bath towel
Like right click option - dry yourself with a towel
Thread
If you have needle in inventory it will stitch all deep wounded body parts.
After use item returns to original container. (needle and thread)
Hand weapon
If two handed then equip two handed else one hand
Idea: spear -> broke -> click on slot with spears -> re equip new -> broke -> click on slot with spears -> re equip new
Bandage (should work on any item that can bandage
Clean burns if bandage is strong or apply bandage on damaged part
Clothing
Equip if not have extra options (right click - change to right etc.).
Literature
Start reading.
Suture needle holder or tweezers
Remove all glass and bullets from damaged parts
After use item returns to original container.
Suture needle
Stitch one deep wounded body part.
After use item returns to original container.
Comfrey Cataplas
Apply to fractured body part without any comfrey.
Wild Garlic Cataplasm
Apply to one infected wound without any comfrey.
Plantain Cataplasm
Apply to one scratched, deep wounded or cut body part without any comfrey.
Splint
Apply to fractured body part without any splint.
Other items
Do nothing -> use right click
Tips and ideas for items :
- ammo -> counter how many bullets|shells
- ammo box - right click -> open box
- watches - Equip -> add to slot -> right click to set alarm etc.
- items for quick crafting
- do not forget items
- spears -> broke -> left click -> re equip -> broke -> left click -> re equip (need to throw away broken ones)
- any item with info after right click (compass, radios gps...)