Project Zomboid

Project Zomboid

152 ratings
Item Stories [b42] (All in One)
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
233.760 KB
16 Sep @ 9:17am
1 Change Note ( view )

Subscribe to download
Item Stories [b42] (All in One)

Description
A simple b42 port of my "Item Stories" b41 mod.

I've bundles all item stories into an All-In-One package, as requested.




This mod makes buildings more "lived in" by spawning items inside them. It is picking what to spawn randomly from a 'story' system.

If you've tried my "'immersive barricaded start" mod , this will spawn items in a similar way, but for every building, and at a much lower chance.




Since this mod will spawn extra items, it is recommended you play with LOWER loot than usually would.
I'd say it's pretty balanced so far, but I'm open to feedback.




Start and Peak sandbox settings : start settings are applied before the start day, peak settings applied after the peak day, and proportionally scaled settings are applied between start day and peak day.

Other stories can easily be added via submods, to spawn specific items in specific rooms and/or on specific furniture sprites for example.




List of Item Stories included :
  • "Room Loot": Spawns an item picked from the loot table of the room the item will spawn in. Kitchen items in kitchens, bedroom items in bedrooms, etc. Chance are low and customizable through sandbox settings, and it can trigger in ALL rooms and on ALL furniture sprites.
  • Propane Tanks in Garages :Triggers in garages, basements, and sheds, spawns propane tanks
  • ZuperCart's Supermarket Carts in Stores: Triggers in a variety of stores. Spawns Zupercart's supermarket carts. (Requires Zupercart mod, this story isn't used if you don't enable Zupercart)
  • ZuperCart's Trolleys in Warehouses & Factories : Triggers in a variety of factories & storage areas. (Requires Zupercart mod, this story isn't used if you don't enable Zupercart)
  • Pool cues and balls on billiard tables : self explatnatory
  • Pallet crates in warehouses : Triggers in a variety of factories & storage areas. (Requires Forklift mod, this story isn't used if you don't enable Forklift)

  • (New for this version) Rideable stories : Spawns a bicycle/skateboard/kick scooter sometimes in garages, basements, and some other rooms. (Requires Bicycle or Skateboard or Kick Scooter mod, this story isn't used if you don't enable one of them)

I've removed the "Tire Racks in Mechanics and Garages" story , it was too much of a pain in the ass to deal with.




Taking suggestions
If you have an idea for an item story, you want an item to have a chance to spawn in some rooms or furnitures, leave it in the comments.
Or better yet, simply make a mod yourself that uses the framework. You only need to know how set up a lua table, how building rooms are named (Click here for a list of PZ's rooms[pzwiki.net]), and how to check furniture sprite names using the Brush Tool of PZ's debug mode.
Though keep in mind that stories can only spawn inside a building (or basement). 'Forest' stories aren't possible, for example.




Limitations

Randomized Houses:
Item stories are only generated in rooms that have not generated a vanilla randomized house story event. So if you absolutely want Item Stories to trigger on every room, you'll need set the Sandbox Setting "Meta" -> "Randomized House Chance" to "Never".

Tilesets with no surface offsets :
Some mods use tilesets that haven't properly mapped their tiles' furniture surface offsets, which means some of their furniture tiles will be considered as floor instead of furniture. Which generally means much lower chances of item story spawns.
Even some furniture in vanilla don't have their surface offset mapped. One example would be the strongbox tiles, the I can't really do anything about it. The devs have said they're going to implement a sudo-3d map for each sprite, but it'll be a while before they release it in a build.
These sprites can be recognized easily by simply trying to "Place Item" on one of these tiles to see that it's not working.

The mod will still work fine though, it's not like these tiles break anything.

2D items :

Some items in vanilla (like the ValuTech television, or the candy) don't have a 3D model.
Also, some mods don't make proper 3D models for their items, too.
In such cases, the item will be displayed in 2D on the ground. So don't be surprised if you find some !




Can it spawn modded items?
Yep!
Specifically, the 'Room Loot' story (the most common one) can spawn them, since it picks items directly from the same loot tables as containers.
And then there's also Zupercarts carts & trolleys, and Forlift's pallet crates, for which I specifed the item Ids of the carts.

However, I am NOT responsible if another modder hasn't properly inserted their custom items in the loot tables.




What about performance?
I made sure that when the player explores, the item stories spawner triggers on one unexplored room at a time, every tick, instead of all unexplored rooms at once.
Because of this, even when I teleported into the middle of Louisville's biggest buildings, I didn't notice any lag.





Workshop ID: 3569303590
Mod ID: ItemStoriesB42
Popular Discussions View All (2)
5
19 Sep @ 2:25pm
PINNED: Bug reports
Champy
0
3 hours ago
TRANSLATIONS
SIMBAproduz
26 Comments
SIMBAproduz 3 hours ago 
Instead of creating a separate mod, I uploaded the PTBR translations in the discussions so they can be officially integrated into the mod
Adds so much immersion to the game, it’s great to see this make a return in build 42
dafnub 21 Sep @ 11:14am 
yes
DeoS 20 Sep @ 9:57pm 
and is randomized building chance the same as randomized house chance?
DeoS 20 Sep @ 9:56pm 
ye but i mean, in load order?
Champy  [author] 20 Sep @ 2:41pm 
@DeoS Item stories needs Zupercarts enabled to spawn carts and trolleys. Otherwise it won't spawn them
DeoS 20 Sep @ 1:20pm 
also, the randomized house chance is ''randomized building chance''?
DeoS 20 Sep @ 1:18pm 
should i put first zupercarts or ur mod so both mods work?
aluthewox 20 Sep @ 12:04am 
Are you gonna add pillow spawns?
barcelooo 19 Sep @ 6:18pm 
epic