Difference between revisions of "Mod Folder Structure"
(4 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
− | + | == Simple Example: Modding Total Skill Points == | |
− | 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. | + | 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 | Part 1 | ||
Line 16: | Line 16: | ||
Part 2 | 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 | + | * 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 | + | * 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. | + | * This table contains 2 more variables '''Single''' and '''Total'''. Now that we isolated what needs changed we can create a mod override. |
Part 3 | Part 3 | ||
Line 25: | Line 25: | ||
* That is it, you save the file. Launch your server and will now have a cap of 700 skills. | * That is it, you save the file. Launch your server and will now have a cap of 700 skills. | ||
+ | Final Script Example | ||
+ | |||
+ | require 'default:globals.server_settings.skills' | ||
+ | |||
+ | -- allows players to have 100 more skill points then offical | ||
+ | ServerSettings.Skills.Total = 700 | ||
===== Tips ===== | ===== Tips ===== |
Latest revision as of 15:30, 1 April 2021
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: Modding Total Skill Points
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.
Final Script Example
require 'default:globals.server_settings.skills' -- allows players to have 100 more skill points then offical ServerSettings.Skills.Total = 700
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