Mod Folder Structure

From Legends of Aria Admin and Modding Wiki
Revision as of 15:10, 1 April 2021 by Gizmo (talk | contribs)
Jump to: navigation, search

For simplicity, Legends of Aria modding operates by adding and/or replacing files in the default (base) rules. This means that the folder structure is exactly the same as the one provided for the base. You can see the base folder structure and data/script files by browsing to ‘Build/base’ in your server folder.

Each subfolder in the ‘mods’ folder is its own mod and has a copy of this folder structure.


-- Simple Example -- When modding it is important to remember what was stated above. You basically need to mirror the build\base folder structure. Lets use a common example. Some developers want to change how many skill points a player can have in the game. this can be found in the build/base/scripts/globals/server_settings/skills.lua file. In order to override this we need to do the following...

Part 1

  • Create a identical file in our mod directory under mods/modname/scripts/globals/server_settings/skills.lua
  • Since this file is overriding, we want all of citadels info from their file. We can do this by requiring the default script like so
  • Type in require 'default:globals.server_settings.skills' , this will grab all tables and functions to override.
  • Now that we have a proper override file setup. It is time to override the max skill points a player can have.

Part 2

  • The information we are looking for is located in the base skills.lua file mentioned above. It is located in a table named ServerSettings.Skills
  • Inside this table we have a variable which contains the max skill cap and the max total skills cap. This variable is called PlayerSkillCap
  • This table contains 2 more variables Single and Total. Now that we isolated what needs changed we can create a mod override.

Part 3

  • Type in your override file below the require default the following.
  • ServerSettings.Skills.PlayerSkillCap.Total = 700
  • That is it, you save the file. Launch your server and will now have a cap of 700 skills.


Tips

Not all files in the base folder are overridable (moddable). Here is a full list of these files:

  • ClientIdReference.txt
  • ObjectCollisionData.xml
  • ObjectTagDefinitions.xml
  • mapdata/MAPNAME/StaticCollision.xml