[3.63] URW Mod Extender v0.0.3(UnReal World Mod Extender)This project is aimed at extending the capabilities of the current modding system and adding additional functionality to the game to provide players and mod makers with a much broader range of content than currently available. The scope of this project is quite large, with a variety of different byproducts resulting from its completion including QoL improvements to general gameplay, extended recipe syntax, events with scriptable conditions/actions, fully customizable hotkeys with assignable functionality, extended menudef_ handling, extended read/write of game data (player, npcs, items, world data), a lightweight C# wrapper for URW data management, and much much more as this develops.
In its current state, the project will start with an initial beta testing/bug fixing phase, whilst constructing the base minimum functionality to consider the project stable, useful, and fun for the player base to use, with little to no irritable drawbacks.
The initial beta release will be most appealing to current mod-makers who wish to extend their recipe's functionality and bypass the menudef_ limit, as there are no mods that
currently make use of this
(yet) there will not be many
(if any) extended mods until they are made/tested/released as an extended mod.
Installation, running, exitingExtract contents of the zip folder anywhere, but for easier management I suggest extracting it to your UnRealWorld folder. (mine is C:\Program Files (x86)\Steam\steamapps\common\UnRealWorld). After you extract URWME.exe and URWME_Files somewhere (must both be in the same folder), running URWME.exe will handle the rest. If the game is already running, it will use that instance of the game as its target process, if the game isn't already running, it will attempt to run the game in this order:
- Current directory - runs urw.exe from the folder you ran URWME.exe in
- Steam directory - Checks to see if you have steam installed via registry keys, then attempts to run the game from your default steam directory with the default game path
- Steam shortcut - Attempts to run the game via URW's steam URL (steam://rungameid/351700)
Keep this in mind if you're using old game versions/non-steam directories. (designating path from URWME_Config.txt is planned for an upcoming patch)
To exit the program, either close UnReal World or the application itself through the main form. diy_ModExtender.txt and menudef_ModExtender.txt should automatically be deleted when this happens, but incase they don't, it is recommended to manually delete them.
Assigning and using extended menudefsExtended menus can be assigned inside of the URWME_Config.txt file; to do this, simply open the file in notepad and insert the what you would normally put in a Menudef_ file, under [Menuhotkeys] on a new line.
The only additional bit you will need to add is the key / key combination you would like to use to activate this particular menus when using the Menu Manager. Below is an example of how this section of the config will look:
When accessed in game via the Menu manager,
(~ key by default) you will be presented with a UI showing you the menudefs with their respective hotkeys, pressing the key/keys for the desired menu executes the following process:
- key pressed
-> - assigned keys menudef_ is written to UnReal World's folder as menudef_ModExtender.txt
-> - mod extender macros the appropriate keys to reach the menu (shift+m+z)
-> - menu manager is minimized and the menu is now open with affiliated diy_ recipes.
Here is what the UI looks like with the above configuration:
Make sure the menu manager is focused/active when you're attempting to access a menu. (by default, it opens focused)
Important Idiosyncrasies:Any menu you add as an extended menudef to the config, should not be defined in a regular menudef_, and should not use hotkeys used by regular menudef_ menus, as this will conflict when menudef_ModExtender.txt is written to. Any custom menudef_ defined within the config file may ignore this rule and use the same key. (-Z- was used in my example). Defining recipes for the menu may be done in either regular diy_ files or custom ext_ files.
Defining ext files & using new syntaxext_ files work exactly like diy_ files, except they're processed into a master diy_ModExtender.txt file whenever the user is about to use the crafting menu. When the crafting menu is accessed, a function is triggered that reads each ext_ file defined within UnReal World's folder, the recipes are organized into a dictionary of submenu's and their respective recipes. each submenu is iterated through and each recipe within that submenu is read line by line checking for extended functions. When a line contains one of these extended functions, that particular function is executed and returns a true or false value, depending on whether the conditions of that functions were met, or not, which in turn determines if the recipe has all the requirements needed to use it. Multiple functions can exist within a single recipe, creating a much richer crafting system with more complex concepts and ideas emerging with each new function I am able to add and implement.
Here is an example of what an ext_file.txt looks like:
Here is the resulting diy_ModExtender.txt file after the functions have been executed and handled:
The current functions implemented consist of the following: (green fully working, yellow WIP)
- IsNearNPC(string Name); - returns true if an NPC within 1 square has the designated text within their name
- RecipeKnown(string Name); - returns true if an item with the designated name has been set as a 'recipe' via the [SKILL:recipe] tag (used to restrict an item if a recipe has not been learned yet)
- RecipeUnknown(string Name); - returns true if an item with the designated name is not found/has not been set to a 'recipe' using the [SKILL:recipe] tag (used to 'learn' a recipe)
- HideWhenFalse(); - removes the recipe from the crafting menu if any custom syntax is false, otherwise the recipe is shown.
- {[TILE:FunctionName]} +'Descriptor' - any [TILE:] placed right after a function with the function name as the tile will act as a placeholder for the crafting system to use. This line gets replaced by a passing or failing requirement depending on its relative functions success or failure. Additionally acts as a descriptor for the function
- [SKILL:recipe] - designates this item as a recipe, when a recipe is found in the players inventory or on the ground it is automatically removed from the game. Using RecipeUnknown(name) with the recipe's name as the parameter will hide the recipe once it has been crafted/learned for the first time when used in conjunction with HideWhenFalse(). Currently I have not implemented an 'unlearn' function yet, but it is a possibility if requested/needed.
- PlayerIs(string variable, string comparator, string value); - returns true if the variable compared using a specified comparator with the value is true. Example: PlayerIs(Fatigue,>=,20) (partial implementation/untested)
Unimplemented but planned functions include:
- WorldIs(string variable, string comparator, string value); - same as PlayerIs(), but for world data.
- LastInputIs(string variable, string comparator, string value); - same as PlayerIs(), but for custom player input.
Important Idiosyncrasies:All functions and data are case-sensitive, functions must end with );. Parameters are separated with a , with no spaces IE: (param1,param2,param3) spaces will be considered part of the parameter if you use them (which may be necessary, in some cases). Most functions require a [TILE:FunctionName] tag to be used on the next line as a placeholder ingredient, with the exception of a few special cases (so far, just HideWhenFalse()
I have attached an example mod to be used with the Mod Extender for demonstration/learning purposes, includes IsNearNPC, RecipeKnown, RecipeUnknown, and [SKILL:recipe] usage. If you have any questions please post below.
Version History:- v0.0.3 3/10/21
- Added functions: RecipeKnown(), RecipeUnknown(), [SKILL:recipe]
- Automatic removal of items marked as a recipe from ground and inventory.
- Automatically move files from Images\truetile to URW's truetile folder (does not overwrite) - v0.0.2 2/~/21 - Improved UI, improved game detection/start, organized folders/files
- v0.0.1 2/15/21 - Initial beta release
Please report any bugs to me via this thread, my PMs, or contact me directly on steam:
https://steamcommunity.com/id/Nightipoo/Download attached to thread.
Credits:
Night - Creator/Programming.
Jiggie - Reviewing code.
Unrealworld.fi/forums - Multiple ideas from multiple forum users.
Enormous Elk - Unreal world.
Requires Microsoft .NET Version 4.6 or later. (Usually already installed)