1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

INIT folder

Discussion in 'Loader' started by Churchill, Aug 18, 2014.

  1. Churchill

    Churchill Potential Patron

    Joined:
    Jun 21, 2014
    Messages:
    20
    Likes Received:
    1
    I cannot get mods placed in the $INIT$ folder to load automatically. For example, I wish to have SBY's ffbehaviorv3 mod load on startup.

    The ffbehaviorV3 mod is in the $INIT$ directory. Adding a path to the swf in the Mods.txt file results in an error stating the settings file could not be found. Alternatively, adding a reference in the CharacterFolders.txt gives no results at all.

    I don't suppose someone could set me straight on this?
     
  2. I. R.

    I. R. Guest

    The specific mod you are talking about got a setting-file that needs to be placed in the same folder as where you load the mod from. Alternatively you could place it in the "settings"-folder (located in the loader root directory), should work either way.

    In case you dont have this settings-file consider redownloading the mod. It should be within the archive the mod comes in.
     
  3. sby

    sby Club Regular Content Creator

    Joined:
    Sep 11, 2012
    Messages:
    1,337
    Likes Received:
    76
    ^ correct
     
  4. Churchill

    Churchill Potential Patron

    Joined:
    Jun 21, 2014
    Messages:
    20
    Likes Received:
    1
    Oddly enough the mod in its entirety is in the directory, thus everything in the ffbehaviorV3 package lies in Mods/$INIT$/ffbehaviorV3. When I copied the settings file into the game directory settings folder it loads just fine, however.

    Thanks very much to you both, cheers!
     
  5. BuckWild

    BuckWild Casual Client

    Joined:
    Feb 3, 2013
    Messages:
    342
    Likes Received:
    0
    So you are saying that ffbehaviorV3.swf and it's settings file are located in "Mods\$INIT$\ffbehaviorV3\" folder, and settings didn't load. Perhaps if you try that with the settings loaded in the $INIT$ folder instead, it could work?

    Another possibility is that some mods stop working after a reset or that some mods cause others to cease functioning. I know that it sometimes happens with my mods every now and then. Maybe we can get people to start adding persist after reset options in settings files from now on.
     
  6. sby

    sby Club Regular Content Creator

    Joined:
    Sep 11, 2012
    Messages:
    1,337
    Likes Received:
    76
    for code mods, inclusion/duplicate guards are also nice (to prevent loading more than 1 of the same persist mod at the same time)

    i don't even have this in many of my mods, as i didn't think of it until i accidentally loaded moreclothing twice xD
     
  7. Churchill

    Churchill Potential Patron

    Joined:
    Jun 21, 2014
    Messages:
    20
    Likes Received:
    1
    Correct, the mod was placed as described... all files in root/Mods/$INIT$/ffbehaviorV3.

    It was able to load the SWF since Loader snarled about the settings file in red at the top right. I stripped out all other mods and just attempted with ffbehaviorV3 just to isolate/debug, no dice. I also attempted it with other mods such as SlapHotkey or StrandLimit, same results. Attempts to load them from the Mods folder work, but that is manual and hardly satisfactory.

    Placing the settings files in the root/Settings folder is a viable solution, though. I do appreciate the assistance.
     
  8. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    22
    Code:
    function retryModSettings(e)
    {
    	mSL.removeEventListener(IOErrorEvent.IO_ERROR,retryModSettings);
    	mSL.addEventListener(IOErrorEvent.IO_ERROR,failedModSettings);
    	mSL.load(new URLRequest("Mods/" + ((cData == null) ? loader.cData : cData) + "/" + modSettingsName + ".txt"));
    }
    This code will look in a char folder (includes $ folders) for the "*.txt" file instead of subfolders within it.
    Place the text file in $INIT$, not $INIT$\\ffbehaviorV3.

    EDIT:

    The reason why this happens comes down to the fact that relative file paths don't really exist outside of the main .SWF, in this case Loader.swf.
    Everything is relative to this file, even if you load some code from a subfolder the file requests are not adjusted to this new path.
    To allow for files to still load we reference a known path, the character folder. While it's possible to add subfolders to the search list it's not worth the effort. Sure it'd be tidier but having > 1 fallback path for something so trivial makes no sense.
     
  9. Churchill

    Churchill Potential Patron

    Joined:
    Jun 21, 2014
    Messages:
    20
    Likes Received:
    1
    Thanks for the snippet and explanation, this makes sense. It is a simple matter to work around and certainly does not necessitate change.