Monster Hunter Rise
0 of 0

File information

Last updated

Original upload

Created by

DSC-173

Uploaded by

DSC173

Virus scan

Safe to use

About this mod

A module for creating and managing skills.

Requirements
Permissions and credits
Commission status and information (Google Docs)

Finally updated for Sunbreak. The mod might be unstable, but it should work as intended as long as your REFramework is up to date (last tested 1.3.3). Be vigilant and report any significant bugs you come across.

A lot of the older skills will not work, despite this update. From my knowledge, a few of the old mods that work are:
Drug knowledge
Point breakthrough

For the average mod user:

The only thing you should download is the module itself. Drop the "reframework" folder into Rise's game folder (can be found by right clicking the game on steam -> Manage... -> Browse Local Files). DO NOT DOWNLOAD THE BASE SCRIPT!
This is a module. That means it has no functionality on its own, and is instead a library for other REFramework mods to use. You'll likely be redirected here by another mod using this as a dependency.

Even if you are using a modded-only deco, you can uninstall safely. Modded decos become invalid objects that can safely be removed from armors. Modded decos removed from armors will be disappeared forever, but modded decos kept in the box (unequipped) can be restored by reinstalling the respective mods.

For mod developers:
The module itself contains all basic functions to create a skill, replace decorations, and add the skill to armors. However, since modules don't like doing hooks, these have to be done through a main script, a sample of which is provided in the downloads.

The module script:
  • Includes all the functions that do not rely on a hook.
  • Includes hooks that edit names of skills
  • Includes hooks that stop online interactions from crashing the client.
  • Does not need to be touched by developers.
The base script:
  • A basic on-frame function to check when the module can be called.
  • Variables to edit name and descriptions of both skills and decorations.
  • Developers must create their own functionality for skills. This can be done any means necessary, including hooks and on-frame events.

Developer mindfulness:
  • Do not publish the module alongside your script. Instead, mark this mod page as a dependency.
  • Refrain from making broken skills. Nobody thinks you're cool for barging in a quest and one-tapping the monster.
  • Consider how your mod interacts with online functionality, and whether or not extra measures must be taken in order to avoid crashing other people's clients.
  • If you want a feature to be added, feel free to ask me. Do not edit the module and re-release it without my permission.

To do:
  • Add capabilities for custom decorations: Attempted for 3 days before hitting a hardcoded check. Generally more trouble than it's worth.

List of module functions:

SkillParam, SkillBaseData, SkillId = SkillAddModule.Skill.AddSkill(int MaxLevel, int IconColor) - Initializes the skill. Returns a skillparam (mostly useless), a skillbasedata (for use with other functions) and the id of the new skill.

SkillAddModule.Decoration.Replace(ReplacementDecoId, skillColor, DecoLevel, DecoRarity, DecoSort, SkillId, SkillBaseData) - Replaces the decoration with an Id of ReplacementDecoId, giving it the color of skillColor, the slot requirement of DecoLevel, the rarity of DecoRarity, assigns it to the skill of SkillId and its corresponding SkillBaseData (from AddSkill)

Recipe = SkillAddModule.Decoration.createCraftingData(int ReplacementDecoID, [[int Type, int Count]] CraftingData) - Creates and assigns crafting data for the Replacement DecoID. Returns the recipe managed object.
Example of a decoration recipe table: 
local DecoRecipe = {
    {68158476, 3}, -- Bloodrun Jewel x3
    {68157866, 9}, -- Bird Wyvern Gem x1
    {68157458, 1}, -- An entire BBQ spit
    {67108864, 0}, -- An empty slot
}


SkillAddModule.Skill.AssignArmorData(data[] ArmorEditList, int SkillId) - Adds skills to an armor set in accordance to the ArmorEditList.
An example of an ArmorEditList: 
ArmorEditList[147] = { -- Mizutsune Armor
true, -- HR or not
{
  {true, 2, 1}, -- Helmet : Lv 2, the piece has one skill beforehand
  {false},-- Arms : No skill
  {false},-- Chest : No skill
  {false},-- Waist : No skill
  {true, 1, 1}, -- Legs : Lv 1, the piece has one skill beforehand
}
}

SkillAddModule.Strings.AddHandled(int SkillId, str Name, str Explain, str[] LevelExplain, int ReplacementDecoId, str DecoName, str DecoExplain)


Whilst not in the module, a useful method for collecting information about whether the main player has your skill and what level it is at:
local AttackerID = gm.PlayerManager.d:call("getMasterPlayerID")
local level = 0
for i = 1,skillLevel+1 do
if gm.PlayerManager.d:call("hasPlayerSkillInQuest",AttackerID,SkillId,i) then
  levels = levels + 1
end
end
Although this uses getMasterPlayerID, you shouldn't be getting the ID that way. Instead, find all players that have the skill, or check for skills within a hook that is called from the player or passes the player as an argument.

For Translation Files:
Download the translation file example in the files tab.

What each value in the json file is for:
Name = Name of the skill
Explain = Explanation of the skill
LevelExplain = Explanation for each level of the skill (can increase or decrease the size of the array if needed)
DecoName = Name of the decoration
DecoExplain = Explanation of the deco (typically in the format "A decoration that enhances the [Name] skill."

Notes:
You have to add \n for linebreaks. Rise doesn't linebreak automatically, so if you don't use any \n, the text will become squished. This is most important for Explain, LevelExplain and DecoExplain (although DecoExplain's is consistently at "...that enhances\nthe [Name]...")

The file must be in the directory "\reframework\data\SkillModuleTranslations" and be named according to the rule "[Skill Name]_[Language code].json". For instance, the japanese translation of Tactician would be "\reframework\data\SkillModuleTranslations\Tactician_JP.json".
List of language codes:
JP = Japanese
EN = English
FR = French
IT  = Italian
DE = German
ES = Spanish
RU = Russian
PL = Polish
PT = Portuguese (Brazilian)
KR = Korean
TC = Chinese (Traditional)
SC = Chinese (Simplified)
AR = Arabic