Forum Mod Bakery Docs

❄ Cold Breathing ❄

Please login to contribute to the conversation.
This resource provides a lua script & a breathing effect that will apply on your characters once you launch the game.
Limitations: I've limited this to just the main characters & their outfits because of a crash occuring when too many characters with particle effects exist
(To enable it for all characters (which crashes), simply disable the comment I left in CustomFiles.ini)


Notes:
  • Using this resource requires the same crediting as Lua P3D Lib.
  • Crediting me is not necessary, but it is highly appreciated
  • Using way too many characters with the effect might crash
  • This resource contains a lua script/file for each known P3D chunk, in case you want to do your own modifications. You may want to remove the chunks you do not use to reduce file size.

Download here!

You have imported the entirety if the p3d library for a mod that only edits some p3d chunk types, ideally only load the scripts that open the chunks you need to. That is why there are all separate files. I reckon about 3/4 of this mod is bloat

Assuming you have p3d2.lua and p3dchunks/ in resources/lib this will only import the scripts you need, change for your use case and delete unnecessary scripts
local RequiredP3DChunks = {
	"StaticEntity",
	"InstStatPhys",
	"Skin",
	"WorldSphere",
	"AnimDynaPhys",
	"AnimObjWrapper",
	"Mesh",
	"ColourList",
	"OldPrimitiveGroup",
	"Shader",
	"ShaderColourParam",
	"OldFrameController"
}
for key, value in pairs(RequiredP3DChunks) do
	dofile(Paths.Libraries.."/P3DChunks/"..value.."P3DChunk.lua")
end
No need to do that table and loop. LoadChunks will load the files that exist, just delete the chunks that aren't used.
Main reason I've kept everything is because people are supposed to use it as a template to learn from and/or play around with it and find out things. If they would like to add any chunk (that I have not personally used) to the file, it's better to have everything laying around than having the person search for and download Lua P3D Lib.
If it was a framework (similar to the tuning one that I am very slowly working on) then I would've only included the necessary chunks, as the user would supposedly use a more user-friendly set of functions (that I kind of almost finished)
Fair enough, but advise other users to delete files they don't require
The quoted post is unavailable.

True - edited & did that just now