This explains how to use the functionality that facilitates using softcoded paths to your mod. This allows you and
end users to rename the folder of your mod without problems. I'm sure you don't want to wade through tons of code
to replace the old folder name with the new folder name. Neither do I!


SOFTCODED PATH TO YOUR MOD
--------------------------

This is useful when you add new .lua files that don't exist in stock FA.

The community bugfix patch uses a couple of new .lua files (they're not hooked). To use these new files I needed to
get the path to these files. Rather than hardcoding "CommunityBugFixPatchV3" I used the function provided by 
Manimal to find the correct path.

The path finding is located in "\lua\Game.lua." There is a global var that is set to the correct path at game 
start. I can then use that variable to import the correct files. For an example of this look at the top of file
"\lua\seraphimweapons.lua".


To use this in your own mods you need to do two things. Create a "Game.lua" file for your mod and make it so it's
hooked. Add a global variable that contains the UID of your mod, check "CBFP_ModUID" in the "Game.lua" file in
the Community Bug Fix Mod. Also add a variable that'll contain the path to the files in your mod. Then add a call
to "GetActiveModLocation()" with the variable that contains the UID of your mod as argument. The result of this
call should go into the variable that should contain the path.

Here's an example:

    MyMod_ModUID = 'EF2043F0-5721-11DD-B030-41E255D89593'  # UID of my mod
    MyMod_Path = GetActiveModLocation(MyMod_ModUID)  # will contain the path of my  mod

You can then import your new files this way:

    local Game = import('/lua/game.lua')
    local DefaultMyWeapon = import(Game.MyMod_Path..'/hook/lua/defaultmyweapon.lua').DefaultMyWeapon


SOFTCODED PATHS IN BLUEPRINTS
-----------------------------

I've changed the blueprint loader so it can now find full paths for files for which you can't specify the full
path without hardcoding the path. An example of this in this mod is the fixed animation for the Seraphim T1 mobile
anti-air land unit, I couldn't set the path without hardcoding it. Here's what it looks like:

    ## HARDCODED ##
    Display = {
        AnimationWalk = '/mods/CommunityBugFixPatchV3/hook/units/XSL0104/XSL0104_Awalk01.sca',
    },

    ## SOFTCODED ##
    ResolvePath = true,
    Display = {
        AnimationWalk = '[...]/XSL0104_Awalk01.sca',
    },

The first example is what it would look like if I hardcoded the path. The second example is what it looks like
softcoded.

The blueprint loader checks for the variable "ResolvePath" and whether it's set to "true". If so then it begins
looking for paths that begin with "[...]". If it finds this it looks for the file specified. If the file is found
the path is corrected. If it can't find the file a warning is shown in the log.

So if you want to use this you need to specify the "ResolvePath" variable in the units blueprint and add "[...]"
to the file path which need to be looked up.


CODE LOCATIONS
--------------

- \lua\game.lua -> GetActiveModLocation()
- \lua\sim\system\Blueprints.lua -> ModBlueprints(), ResolvePaths()
