Kenshi
评价数不足
KenshiPatcher
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
442.063 KB
10 月 11 日 上午 11:25
10 月 25 日 上午 8:24
5 项改动说明 ( 查看 )

订阅以下载
KenshiPatcher

描述
🛠️ Kenshi Patcher v1.04

A standalone tool to safely generate a patch for Kenshi mods — no installation required!
Automatically applies patch rules to active mods and basegame data with .patch files, helping you manage mod records like races, animations, items and more.
It reads all of your active mods and patches accordingly; when adding ExtraData; if any of your other mods already added any, then it will not be added when patching; for example if you already have animation patches that you don't plan to use after patching using this Patcher, then turn it off before patching. GetField assumes also all of the mods loaded, so if you have any mod that modifies a record, GetField will take its value.

🌟 For Users
  • Locate the tool here:
    C:\Program Files\Steam\steamapps\workshop\content\233860\3585091348
  • Run KenshiPatcher and select the mod you want to patch (it must be active).
  • The mod to be patched must contain a modname.patch file — this tells KenshiPatcher what to do.
  • after generating a patch, KenshiPatcher will copy the original mod into modname.unpatched, if you run the patch again, it will patch from the unpatched one.
  • No installation needed — just run the executable.

🌟 For Modders
  • Create a modname.patch file in your mod folder.
  • Everything right of ; are comments and will be ignored.
  • Lines with := define a definition. Example:

    WhateverNameYouWant:=(all)(A:TYPE|condition)
    or
    some_table[some value]:=some value
    all targets all active mods. You can also list specific mods, e.g., mod1.mod,mod2.mod.

    A means "all records," E means "only one record."

    TYPE is the type of record, such as RACE, ANIMATION_FILE, BUILDING, etc. If your type is missing, let me know and it can be added.

    condition is one of:
    • true,
    • FieldExist("some field"),
    • FieldIsNotEmpty("some field"),
    • isExtraDataOfAny(defined_variable,"some category")
    • hasAnyAsExtraData(defined_variable,"some category")
    • isExtraDataOfAny(defined_variable);<- this means it searches across all categories
    • hasAnyAsExtraData(defined_variable)
    also operations that requires a field:
    • GetField("some field")>0.
    • all sort of comparisons <,>,>=,<=,!=,==
    • all sort of operations -,+,*,/

  • Lines with <<< define extractions. Example:
    variable1<<<(variable2|condition)
    which means take all records from variable2 which meets condition
  • Lines with -> define procedures. Example:

    definition1->AddExtraData(definition2,"category")
    definition1->SetField("field",value)

    More Procedures will be added in future updates. Suggestions are welcome!
  • Kenshi Patcher assumes you know what you are doing, if you add Races to Buildings in category "forthelols" KenshiPatcher might patch it, but it may generate a corrupted mod or just make your game not run.

🛠️ Requirements
🔗 Links



💬 Any suggestions or bug reports? Comment below — I’ll fix it ASAP!
⚡ More patching features will be added in future updates.

Note: This is a helper tool only — it does not change gameplay directly.
2 条留言
wherethesunnoshine  [作者] 10 月 24 日 上午 5:19 
此留言正在等待我们的自动内容检查系统分析。在我们证实其内容无害之前(例如试图窃取信息的钓鱼站点链接),留言将暂时隐藏。
Hiro 10 月 24 日 上午 3:38 
Hi, I actually try to use this mod but I have no clue where to look for the patch file in the patcher mod and how to patch the original mod with patcher with the description you got there. Please do help as I want to patch recruit anyone mod.....