Load protobuf(.data) file at runtime to avoid conflicts.
Load protobuf(.data) file at runtime. All mods opens source in github. Special thanks to @chenstack for the CSharpLoader
The following text is basically for developers. If you are a user, you don't really need to know details about this mod. You only need to follow another author's installing-instruction if he says his mod is requiring this mod. And know the Ctrl+F7 is reload hotkey.
(The part after "-" is not necessary.For example, if you modify "FUStBuffDesc-Item.data" ,you can name it as "FUStBuffDesc_MyName.data")
Wrong example:
ABC_青田葫芦改为上限10口.data //Wrong.Must start with original table name(EquipAttrDesc) EquipAttrDesc_青田葫芦改为上限10口aabc //Wrong.Must end with .data FUStSuitDesc_lalalalal_abcd_imgood.bak.data //Wrong. ".bak.data" will be ignored automatically.
2.5.(Optional) If you rename your data file as "[TableName]_[Comment].insert.data", any record will be inserted into the first empty line and may get a new ID.
3. Put data files in a folder.Copy the folder to BlackMythWukong\b1\Binaries\Win64\CSharpLoader\Mods\ProtobufLoader\[AnyFolder]. For example:
4.Run the game. This mod will load the .data files in correct folders.
Why You Need this? This mod can load record one by one instead of overwritting the whole table. IF modders make ".data" mods instead of ".pak" mods ,there is a very good chance they won't conflict with each other. (This mod doesn't magically delete all conflicts! Even if you install this mod,your old "pak" mods still conflict as before.) For modders, you can modify .data file and reload it at runtime.Saves your time to pak, debug ,or merge paks for users.
0.Reload And Reset Press Ctrl+F7 to reload data files. Data in memory WILL be Reset(Since v1.1) before reloading. But Data types that are not Clonable won't be reset. This mod will both modify prorobuf and refresh cache in GameDB when reloading. Press Ctrl + F8 to Reset. When load data files, this mod stores the values before modified. When Reset , this mod writes stored records back. If another mod modifies the record modified by this mod between load and reset, those changes will be lost. When press Ctrl+F7 to reload, this mod will automatically Reset before reload.
Press Ctrl+F9 to Super Reset. Reload everything from virtual files. When "Reset",this mod try to recover only the modified data. When "Super Reset",this mod discards everything and load them from .pak files(like what the game did when start). If there is not a bug or loading failure or another mod changing the protobuf, "Reset" and "Super Reset" should have exactly the same effect.
1.Load Order: This mod load sub folders in Lexicographic Order(aka dictionary order). For example ,the folder "100_abc" must be loaded before "200_lalla". Won't search folder recursively. Forexample,files under "CSharpLoader/Mods/ProtobufLoader/BestSuit/MoreSuitSubDir/" won't be loaded. Strongly recommend to name your folder in form of [Number]_[Name] in case your need to load in certain order. For files in the same folder: This mod loads all ".data" (not including ".insert.data" or ".bak.data") in dictionary order first, Then this mod loads all ".insert.data" in dictionary order.
2.Load Rule When a record in ".data" is loaded. If it's not in the table in memory,it will be added into the table. If it's already in the table in memory ,the old record will be EntirelyReplaced by the new one. Means you can have several data files that modifies the same table, they won't conflict as long as they doesn't modify the same record. If they do modify the same record, the last loaded one wins.
When a record in ".insert.data" is loaded. If it's not in the table in memory,it will be added into the table. If it's already in the table in memory , increase its ID until the new ID is not in table.Modify its ID and insert it into table with the new ID.
This mod will load files After localization init. When this mod is loaded by CSharpLoader, if the GameInstance and GSLocalization both have finished init,this mod will load files immediately. Otherwise this mod will load filese as soon as GSlocalization is inited.
3.What does this mod modify? Generally the data in game exists in : A) Virtual files in .pak. B) GSProtobufRuntimeAPI/BG_ProtobufDataAPI Cache in memory. C) GameDBRuntime/BGW_GameDB Cache in memory D) Other Instances in memory
When game start, the game read all data from A into B, then build the cache of some data in C. During the game process, some instances directly read from B/C, others build cache of B/C in D upon init and read from D later.
When you use a tranditional `pak` mod,you are actually overriding A. When this mod loads mods,it modifies B and force rebuilding C.
4.2.Config File: ProtobufLoader/Config.json: ShutUp: reduce the log output if true. False by default. If you have massive data files to load ,turn on this to increase performance. ShuutUp: reduce the log output future more if true. False by default. ShuuutUp: won't have any log output unless encounter an error if true. False by default. EnableChineseConsoleLog: Set the codepage of CSharpLoader console to UTF-8 to display Chinese console log correctly. True by default. (Turn this off if you need other characters in console.)
4.3.NOTICE: If you want to modify several records in a table. Your data file should contain ONLY the modified records to avoid conflicts. (Because that's the whole point of using this loader.)
(If you need a "Delete anything other than this" button in DataEditor. You can wait for the DataEditor author to add it. Or use my fork of Data Editor.)
6.Be aware of items with the same name but different id. For example, A medicine may have a recipe item and a medicine item both in item table with the same name.But they are different. A equip could have serveral records for each level in equip table. A vigor passive effect could have several records for each level ,too. Etc.
7.Be aware of datas that are only read from desc table upon init. For example, The TransQiTianDaShengConfigDesc table is used to init BUS_QiTianDaShengComp. If you reload the table after starting the game, it may not take effect because the init func hasn't been called again yet.
Data File Examples: You can download following examples in File Page. 100_增加一个珍玩套装(君子牌风铎仙篆)增加火抗 200_锦鳞套加2条套装效果_日金乌套改为加大量攻防 300_青田葫芦改为10口上限 400_金箍棒(大圣套)添加天龙棍效果 500_行者套改为1件即可触发 600_InsertData_插入全局设置和被动技能映射 Example of turning existing mods to data file version
You can use the DataEditor to check what exactly they did. (Notice that some of the examples modify the same table and they can work at the same time. And each example data file contains ONLY necessary records.)
Install Manually: 0.Install CSharpLoader (>= v0.0.8) (Notice a lower version of this mod may not work with latest CSharpLoader. Recommend to also upgrade this mod if you want to upgrade CSharploader)
1.download the zip file and extract.
2. copy the [ModName] folder to [GameFolder]\b1\Binaries\Win64\CSharpLoader\Mods\ the dir struct should be like: -- b1\Binaries\Win64\CSharpLoader\Mods\ -- [ModName] -- [ModName].dll
Install By Vortex: Supported
Top Mods for Black Myth: Wukong
Explore the best mods for Black Myth: Wukong that bring new features, upgraded visuals, and exciting ways to transform your gameplay experience.
ROOM 1201,12/F TAI SANG BANK BUILDING 130-132 DES VOEUX ROAD CENTRAL HK
We use cookies to make interactions with our websites and services easy and meaningful. For more information about the cookies we use or to find out how you can disable cookies, click here