{"id":27206866,"url":"https://github.com/w33zl/fs22_weezlsmodlib","last_synced_at":"2025-04-09T23:55:48.682Z","repository":{"id":246412637,"uuid":"464179215","full_name":"w33zl/FS22_WeezlsModLib","owner":"w33zl","description":"This library contains quality of life functions to ease development of script (LUA) based mods for Farming Simulator 22 (FS22)","archived":false,"fork":false,"pushed_at":"2022-02-28T15:07:49.000Z","size":15,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T23:55:43.854Z","etag":null,"topics":["farming-simulator","fs22","games","lua","mod","modding"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/w33zl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":"wzlmodding","open_collective":null,"ko_fi":"w33zl","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-02-27T15:44:23.000Z","updated_at":"2025-01-25T08:40:37.000Z","dependencies_parsed_at":"2024-06-27T21:30:09.233Z","dependency_job_id":"a37c5439-77e2-4a7a-b579-30230e6ebd6d","html_url":"https://github.com/w33zl/FS22_WeezlsModLib","commit_stats":null,"previous_names":["w33zl/fs22_weezlsmodlib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w33zl%2FFS22_WeezlsModLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w33zl%2FFS22_WeezlsModLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w33zl%2FFS22_WeezlsModLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/w33zl%2FFS22_WeezlsModLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/w33zl","download_url":"https://codeload.github.com/w33zl/FS22_WeezlsModLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248131417,"owners_count":21052819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["farming-simulator","fs22","games","lua","mod","modding"],"created_at":"2025-04-09T23:55:47.895Z","updated_at":"2025-04-09T23:55:48.666Z","avatar_url":"https://github.com/w33zl.png","language":"Lua","funding_links":["https://patreon.com/wzlmodding","https://ko-fi.com/w33zl","https://www.patreon.com/wzlmodding","https://ko-fi.com/X8X0BB65P","https://patreon.com/wzlmodding?"],"categories":[],"sub_categories":[],"readme":"# Weezl's Mod Lib for Farming Simulator 22\n\nThis library contains quality of life functions to ease development of script (LUA) based mods for Farming Simulator 22 (FS22).\n\n\n## Contents/features\n* [ModHelper](#modhelper) - A base class/bootstrapper for any script based mod\n* **LogHelper** - Quality of life class/library for logging and debugging\n* **DebugHelper** - Extension to the LogHelper that is particularly useful when debugging\n* **FillTypeManagerExtension** - Extension class to the FillTypeManager that enables your mod to add custom fill types and height types (material that can be dumped to ground) \n\n\n## Like the work I do?\nI love to hear you feedback so please check out my [Facebook](https://www.facebook.com/w33zl). If you want to support me you can become my [Patron](https://www.patreon.com/wzlmodding) or buy me a [Ko-fi](https://ko-fi.com/w33zl) :heart:\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/X8X0BB65P) [![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dwzlmodding%3F%26type%3Dpatrons\u0026style=for-the-badge)](https://patreon.com/wzlmodding?)\n\n\n## ModHelper\n\n#### 1. Copy the `\"lib\"` folder to the root folder of your mod\n\n#### 2. Create a script file (if you haven't already), e.g. *\"YourModName.lua\"*, with the following content:\n```lua\nYourModName = Mod:init() -- \"YourModName\" is your actual mod object/instance, ready to use\n```\n\n#### 3. Add this line to the `\u003cextraSourceFiles\u003e` section of your *ModDesc.xml* file:\n```xml\n\u003csourceFile filename=\"lib/ModHelper.lua\" /\u003e\n```\n\nIt shoud look something like this:\n```xml\n\u003cextraSourceFiles\u003e\n    \u003csourceFile filename=\"lib/ModHelper.lua\" /\u003e\u003c!-- Must be above your mod lua file --\u003e\n    \u003csourceFile filename=\"YourModName.lua\" /\u003e\n\u003c/extraSourceFiles\u003e\n```\n\n#### 4. Now your mod is ready to be used, e.g. you could att these lines to \"YourModName.lua\" to print a text when your mod is loaded:\n\n```lua\nfunction YourModName:loadMap(filename) \n    print(\"Mod loaded\")\nend\n```\n\nSome more events that can be used similar to loadMap:\n* `loadMapFinished()` - This event execute *after* the actual map has finished loading and *before* other mods are loaded (with `loadMap`)\n* `startMission()` - When user selects \"Start\", execute after both `loadMapFinished` and `loadMap`\n* `update(dt)` - Looped as long game is running (*CAUTION!* Anything in here will constantly execute and might severly affect performance)\n\n### Built-in properties in your mod\nThe `Mod` class will automatically add a number of field/properties to your for convinient access, e.g.\n```lua\nlocal authorsName = myMod.author -- The name is automatically read from the modDesc file\n```\n\n* `dir` - The mod directory, i.e. folder or zip file on disk (same as `g_currentModDirectory`)\n* `name` - The name of your mod (i.e. `g_currentModName`)\n* `title` - The english title of your mod (from modDesc.xml)\n* `author` - The author node from modDesc.xml\n* `version` - The version node from your modDesc.xml\n\n### Built-in functions in your mod\nThe `Mod` class will automatically add a number of functions/methods to your mod for convinient access, e.g.\n```lua\nlocal aSound = myMod:loadSound(\"SoundName\", \"/sounds/aSound.ogg\")\n```\n\n* `loadSound(name, relativeFilename)` - Loads a sound/sample (automatically appends the mod.dir path to the filename) \n* `trySource(relativeFilename, [silentFail])` - Will try to load/source a LUA script file if that file exists, automatically adding mod.dir path to the filename, and with optional \"silent fail\" (no error message if file is missing)\n\n### Automatic support for user config file\nBuilt-in (semi-)automatic support to read and write user settings.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw33zl%2Ffs22_weezlsmodlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fw33zl%2Ffs22_weezlsmodlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fw33zl%2Ffs22_weezlsmodlib/lists"}