Quasimorph

Quasimorph

58 Bewertungen
How to mod Quasimorph
Von Applejack
Official developer manual how to create Steam Workshop item for Quasimorph. Also contains technical information about modding.
4
3
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
How to create mod in Steam Workshop
  1. Subscribe to official developer console mod. https://steamcommunity.com/sharedfiles/filedetails/?id=3281579458
  2. Restart game and Steam client.
  3. Any mod in Qusimorph require modmanifest.json, *.dll and thumbnail.png at least. To generate manifest use console command mod_createmanifest where unique_mod_name is string (only letters, numbers and underscore) and contentPath is a path to mod content (where modmanifest.json and all mod content should be stored).
  4. After successful manifest generation, you need to open it in any text editor. And replace ModAssemblyFilenameHere with a relative path to your mod assembly dll. (Assembly generation tip will be described later).
  5. After that you are ready to create a workshop item for your mod. Run console command mod_createworkshopitem where contentPath is the path to the folder with modmanifest.json. During command execution a Steam workshop item with initial content will be created. Keep showed item id for future (it’s required to send update request).
  6. To update mod content you need to run the console command mod_updateworkshopitem with given item id, content path. If you want to upload a thumbnail add “TRUE” as the third parameter to a command. Thumbnail should be placed in contentpath/thumbnail.png. This is the only way to upload a mod thumbnail.
  7. Don’t forget to subscribe to your mod and make it visible to other users after it is done.
Console modding commands
  • mod_createmanifest - Create mod manifest on a given path. Syntax: mod_createmanifest <unique_mod_name> <contentPath>
  • mod_createworkshopitem - Create Steam workshop item. Warning! This command will create a new entity in steam, keep the created id. Syntax: mod_createworkshopitem <contentPath>
  • mod_updateworkshopitem - Update Steam workshop item. Syntax: mod_updateworkshopitem <item_id> <contentPath> <update_thumbnail>
  • mod_listworkshopitems - List all Steam workshop items created by current user.
  • listmod - List all mods currently active.
How to create mod assembly with access to game code (JetBrains Rider)
  1. Create new Unity Class Library solution.

  2. Click RMB on Dependencies in the Explorer block.

  3. Locate your Quasimorph game folder, and find inside file Assembly-CSharp.dll, add it as dependency.

  4. Now you have access to Quasimorph game code, to make you code to be called you need to create public static method with Hook attribute (all hook types will be described later) as shown below:
    using MGSC; namespace ModName { public static class ModMain { [Hook(ModHookType.AfterConfigsLoaded)] public static void AfterConfigsLoaded(IModContext context) { // Mod code runs here } } }
  5. Each hook method must have an IModContext parameter to be called from game.
  6. After build you need to copy target.dll to the mod content folder. Without UnityEngine or Assembly-CSharp.dll dependencies!
Hook types
  • MGSC.ModHookType.BeforeBootstrap - Called before any game initialization code.
  • MGSC.ModHookType.AfterConfigsLoaded - Called after game configs loaded during initialization.
  • MGSC.ModHookType.AfterBootstrap - Called after game initialization, before transition to main menu.
  • MGSC.ModHookType.MainMenuStarted - Called after the main menu game mode initialized and started.
  • MGSC.ModHookType.MainMenuDestroyed - Called after the main menu game mode was destroyed, but before the next game mode started.
  • MGSC.ModHookType.DungeonStarted - Called after the dungeon game mode initialized and started.
  • MGSC.ModHookType.DungeonFinished - Called after the dungeon game mode was destroyed, but before the next game mode started.
  • MGSC.ModHookType.DungeonUpdateBeforeGameLoop - Called every frame while in dungeon mode before game loop tick.
  • MGSC.ModHookType.DungeonUpdateAfterGameLoop - Called every frame while in dungeon mode after the game loop tick.
  • MGSC.ModHookType.SpaceStarted - Called after the space game mode initialized and started.
  • MGSC.ModHookType.SpaceFinished - Called after the space game mode was destroyed, but before the next game mode started.
  • MGSC.ModHookType.SpaceUpdateBeforeGameLoop - Called every frame while in space mode before the game loop tick.
  • MGSC.ModHookType.SpaceUpdateAfterGameLoop - Called every frame while in space mode after the game loop tick.
  • MGSC.ModHookType.ResourcesLoad - Called before default Resources.Load. Has special method signature, This hook must return UnityEngine.Object:
    [MGSC.Hook(MGSC.ModHookType.ResourcesLoad)] public static UnityEngine.Object CustomResoucesLoadHookMethod(string path)
  • MGSC.ModHookType.BeforeSaveLoaded - Called before loading game save from json (before Dungeon or Space modes). Has special method signature:
    [MGSC.Hook(MGSC.ModHookType.BeforeSaveLoaded)] public static void BeforeSaveLoadedHookMethod(JSONNode rootNode)
  • MGSC.ModHookType.BeforeDungeonLoaded - Called before loading dungeon save from json. Has special method signature:
    [MGSC.Hook(MGSC.ModHookType.BeforeDungeonLoaded)] public static void BeforeDungeonLoadedHookMethod(JSONNode rootNode)
  • MGSC.ModHookType.BeforeSpaceLoaded - Called before loading space save from json. Has special method signature:
    [MGSC.Hook(MGSC.ModHookType.BeforeSpaceLoaded)] public static void BeforeSpaceLoadedHookMethod(JSONNode rootNode)
  • MGSC.ModHookType.AfterDungeonLoaded - Called after loading dungeon from json.
  • MGSC.ModHookType.AfterSpaceLoaded - Called after loading space from json.
  • MGSC.ModHookType.AfterSaveLoaded - Called after loading game from json (after Dungeon or Space mode loaded).
IModContext
  • IModContext.State - State, contains game modules.
  • IModContext.ModContentPath - Actual path to mod content.
How to update Steam tags
1) Modify modmanifest.json, to contain field SteamTags, as on picture below (example):

2) Put one or more tags from next list:
  • New Content
  • Quality of Life
  • UI
  • Graphical
  • Gameplay Tweaks
  • Overhaul
  • Utility
  • Other

Important note: Also you can add version tags, such as 0.9.1. It's required for player to filter mod compatibility.

3) Update mod from console command mod_updateworkshopitem as regular pipepline update.
24 Kommentare
Хач Арменович 27. März um 7:49 
Can you guys tell me how to make a mod with a modified mercenary template?
Soviet47 16. März um 14:40 
Oh thanks, i will check it
Applejack  [Autor] 16. März um 5:21 
@Soviet47, It's better to ask in game discord server, modding-forum. There people who did Weapon Importer API. They can guide, I think
Soviet47 15. März um 7:52 
I saw a guy make WH40k guns, is there any guide to make guns for the game?
Kill3rDr3w 20. Okt. 2024 um 20:46 
Does anyone know how to go about configuring this to a handheld ROG ally? That intro song haunts me and would like to see and hear the rest of this game!
soppyamoeba8402 2. Sep. 2024 um 11:17 
Waiting to see a DOOM mod, i got time
sergfoma007 31. Juli 2024 um 11:01 
Большая проблема JetBrains Rider в том, что она платная... А в Visual Studio Community подобное делать не позволяет уже установленные настройки для C++. Есть ли подобные настройки окружения, но для Visual Studio Code? Какие модули скачать? Опыта разработки на Unity не имею(
Czar 10. Juli 2024 um 18:49 
@STNC NBKRedSpy posted their ChangeExploredColor mod on github, it's pretty lightweight and reviewing the code has helped point me in the right direction. The link is in the workshop post.
STNC 10. Juli 2024 um 11:31 
Would be great if someone on discord published an example, as a guideline and a base for us peasants.