Jump to content

i26 Guide: Load/Save Defaults; Navigating Absolute & Relative Paths


qwy

Recommended Posts

i26 Guide: Load/Save Defaults; Navigating Absolute & Relative Paths

with a little extra focus on buildsavefile
(mApps 2.0, Chapter 1)

by qwy
  

 

The following guide's focus is to provide a single source reference on default paths when saving or loading a file. All paths, were determined using Windows10 64-bit. If your installation varies in anyway outside of, "C:/<RootInstall>/", please post, or message me, your findings, with relevant system information. It's intention is to both, provide the initiated an ability to scan for anything relevant to them and a, "How to" to anyone who may need it. 

 

 

Why a guide? An admission of ignorance

I love alts! I love how binds and the flexibility of the interface, can make playing an alt, compared to another, can almost feel like playing a different game. Back on live, I took advantage and, every alts ui grew further and further apart until, I lost it all. I don't remember exactly how it happened. It was over 10 years ago. I probably did something stupid however, I've done so many stupid things since then, I can't remember everything. I learned a lesson. I guess I remember that. 

 

This was a little after the CoV release and, a Mastermind was my main dejour.  I wouldn't say he had a lot of binds, he was BOUND! I rebuilt a shoddy, rush job, approximation but, he was never the same. Any commands added while I was still in the process of getting them from another player. Just gone.  A little wiser now, when I was done, I hit optionsave, bindsave, all the saves. Save save save. When I finished rebuilding the second alt, I ran all those new-to-me save commands again, and learned my next lesson... Those weren't the commands I was looking for.

 

There's a lot of scattered information out there. Most of this is the result of trial and error. I'm pretty bold with system files, and I like coming up with scenarios to see how much carnage I can create. Trying to blow up my interface is still, "playing" to me. I have more interesting projects I like to share and knowing there's a lot of people that don't like messing around with files at all so, reference material seemed like a great starting point.

 

 

Why BuildSaveFile?

Mostly, it's easy. I touch on the other save/load commands here but, I've got more on them in future guides. The emphasis here is more about default folders and navigating around them.

 

Also, I thought this particular command was bugged. I was working on an unrelated project and, entered /buildsavefile, followed by random characters, expecting an error. It did not. I vaguely recall conversations, forum posts and general in game chat where other people seemed to be under the same impression. Anyone else think that? Anyway, adequately distracted from the original project, I kicked off a new error campaign. Turns out, as long as I wasn't trying to escape the installation root, relative paths are fine. Absolute paths failed across the board. Information on relative paths is a little murky. This might explain how the misconception the command didn't work, entered the zeitgeist.

 

 

What's it do?

/BuildSaveFile

Function:    

  Generates a fixed-format text document detailing the commanding character's, active build. The user specifies the filename and

  optional, relative path within the CoX installation folder. Contains

  • Name / level / origin / class

  • Powers / level selected

  • Number of slots per power

  • enhancements slotted

 

  OnSubmit:   Simple logic test of valid syntax
      Is Invalid: 

 Default channel, "Error" reports, "UnableBuildSave" 

         Is Valid:   Default channel, "System" reports, "BuildSave"
   Modifiers:   None known. Not needed
Arguments:   (1) <OptionalRelativePath>/<NameFile>
Origination Point:   <System>/<RootInstall>/<NameAccount>/Builds/
    Specify Path:   Yes. Specified by valid system syntax and/or characters, followed by, at least one, forward or, backward slash. 
   Can Name:   Yes. Specified after the last optional forward slash by any valid system syntax and/or characters.

 

 

What are absolute & relative paths?

Absolute Paths: 

With Absolute paths, potentially set as, nop (joke), let's breeze through this. Your computer's hard drive. The one that the operating system is installed on. It's running the show so, it's top level folder, the one all other folders are within, is the system root. Absolute paths start there and apply to anywhere not there, within itself. 

 

Considering the breakdown above, for, "Defaults to:", I started with, "system". Your hard drive. Even with the absolute path, being partly responsible for my motivation to write a guide on using its counterpart, literal to its name, it is a definitive starting point, easily defined and recognized as "C:/", and leads away from itself. I had to shake my head using it for, "Defaults to", but, let's look at the alternative.

 

Relative Paths: 

Relative paths are also literal, it can only be identified from a point other, than itself. For example, "", is the relative path counterpart for, "Defaults to:", above. I Feel like, it's trying as hard as a little path can. I just can't escape a sense that... something's a little off. Like, we're not getting the WHOLE story, huh? Ok, I'll keep moving. 

 

Visually, once the second half of the path is known, they're similar to other common folder structures. The key difference is this path doesn't concern itself with the system, as a whole, it's path to a destination is always relative to itself.

 

An analogue simile might be flying in to a new city and using the airport to track a path to the hotel as a relative path. An absolute might be landing at the airport and tracking the path to the hotel from the, "Welcome  to...." sign, on the outskirts of town. Maybe city hall.. Airports don't typically move around a lot.... I don't know. Something like that. It makes sense if you don't overthink it.

 

 

Quick Reference Tables:

Talking CIty of X, files spew from everywhere so, relative paths are relative to the file in question, which is nice. Not getting to into the weeds on this, here's a default folder cheat sheet.

 

Command   Fixed Default Path  Fixed File Name
BindSave:   C:/<RootInstall>/  keybinds.txt
   BuildSave: 

 C:/<RootInstall>/<NameAccount>/Builds/

 build.txt
ChatSave:   C:/<RootInstall>/  chat.txt
   OptionSave:   C:/<RootInstall>/  options.txt*
WDWSave:   C:/<RootInstall>/  wdw.txt

* Keep an eye out for the, "s" that's only half-way-in, a committed relationship with the option command.  Hiding in clumps of commands, optionsSave and option.txt, see you before you see them. 

 

 

 

Command   Unmodified Default Path  With User Generated "data" Folder 
BindSaveFile:   C:/<RootInstall>/piggs*/  C:/<RootInstall>/data/
   BuildSaveFile: 

 C:/<RootInstall>/<NameAccount>/Builds/ 

ChatSaveFile:   C:/<RootInstall>/piggs/

C:/<RootInstall>/data/

   OptionSaveFile:   C:/<RootInstall>/piggs/  C:/<RootInstall>/data/
WDWSaveFile:   C:/<RootInstall>/piggs/ C:/<RootInstall>/data/

*One look inside the /piggs folder, is all it takes to know, it's not ideal. I haven't seen this anywhere so, grain of salt, I think of the data folder as the User Root. Things were encouraged to play with, default here.

**File names must be specified by user or command will error.

 

 

Navigating Relative Paths:

I had said that Relative paths, require two points in order to be defined however, there's a third point to consider. They're commonly restricted within their environment, the installation root.  How that affects us, simply put, the installation root is a brick wall. Indicated as, "CoX", on the graph below, saving to the left of that isn't an option.   

 

Considering the graph below, from the green BUILDS folder, if we wanted to move to the right, (referred to as "down"),  entering a folder name, followed by ,"/" the forward slash moves us 1 step. To go back, (graph-left, "up" when talking to IT), instead of the folder name "../", two periods and a forward slash, takes us back 1 step. From the green BUILDS folder, moving right, we can take as many steps as we squeeze in to a single command but, if we're going the other direction, trying to save to a folder more than 2 steps back and our command errors.  

 

Folder Structure

Puter            
  Path          
    to   stumes    
      CoX   Build1  
        Data    
          Build2  
          Yours  
            Build3
        Screens    
          Build4  
        Account    
          BUILDS  
            Build5
        Build6    
          Build7  

* Unlike a board game, being, "in" a file, is represented as, to the right and one down .

 

With that said, consider exhibit 11.C § 1.61 (1972). I'll go get those commands together.

 

 exhibit 11.C § 1.61 (1972) 

/buildsavefile "../../../CoX/BuildFileName.txt"
/buildsavefile "../../../BuildFileName.txt"
/buildsavefile "../../BuildFileName.txt"

 

Anyways... Below, in the text editor, is our command with the paths to each of the 7 build folders mapped on the graph and, one for saving to the BUILDS folder. On other systems, common path options might be available but only up and down were recognized on my computer. (See notes)

Spoiler

/builldsavefile ../../Costumes/Build1/TheFileSavedIn-1.txt

/builldsavefile ../../data/Build2/TheFileSavedIn-2.txt

/builldsavefile ../../data/Yours/Build3/TheFileSavedIn-3.txt

/builldsavefile ../../screenshots/Build4/TheFileSavedIn-4.txt

/builldsavefile TheFileSavedInBUILDS.txt

/builldsavefile Build5/TheFileSavedIn-5.txt

/builldsavefile ../../Build6/TheFileSavedIn-6.txt

/builldsavefile ../../Build6/Build7/TheFileSavedIn-7.txt

 

*if you've noticed the commands, don't exactly match the name, good eye! It's not a ruse. The table is just, whatever. Without function, I let form rule. The commands are here for easy editing. Parts with real world applications, I wanted to get right. NO GUARANTEES, NO REFUNDS!

 

Commands:

Comparing the binds to the graph, a pattern is probably starting to stand out. Forget what you heard Paula Abdul going on about, it's two steps back.... then, whatever number of steps forward,  if you're navigating to another install root folder. Typically, these commands generate the folders you've specified if they don't already exist.  If that isn't happening, it's possible, your security settings are getting in the way. I'd guess generating folders, the old fashioned way, through your operating system, is probably going to buff that out.  The minor inconvenience isn't worth altering, otherwise, satisfactory security. 

 


 

/BindSave

OnSubmit: 

 Sorts active binds in a specific order*. Generates a fixed form document, resorted in an order I have yet to identify, to its default path.  

      Is Invalid: 

 Shouldn't be possible under normal circumstances. If it happens, default channel, "Error" Reports, "UnableKeybindSave" 

         Is Valid: 

 Default Channel, "System" Reports, " Keybinds saved to C:/<RootInstall>/keybinds.txt"

   Modifiers: 

 N/A

Arguments: 

 N/A

Defaults To:   <System>/<RootInstall>/
      Specify: 

 No

        Name: 

 Keybinds.txt

*(Always the same. Some symbols as symbols and some as alpha, numerical, alpha with symbols as alpha.)

 

keybinds.txt Preview:

Spoiler

' "quickchat"
- "prev_tray"
ALT+- "prev_tray_alt"
/ "show chat$$slashchat"
0 "powexec_slot 10"
CTRL+0 "powexec_alt2slot 10"
ALT+0 "powexec_altslot 10"
1 "powexec_slot 1"
CTRL+1 "powexec_alt2slot 1"
SHIFT+1 "team_select 1"
ALT+1 "powexec_altslot 1"
2 "powexec_slot 2"
CTRL+2 "powexec_alt2slot 2"
SHIFT+2 "team_select 2"
ALT+2 "powexec_altslot 2"
3 "powexec_slot 3"
CTRL+3 "powexec_alt2slot 3"
SHIFT+3 "team_select 3"
ALT+3 "powexec_altslot 3"
4 "powexec_slot 4"
CTRL+4 "powexec_alt2slot 4"
SHIFT+4 "team_select 4"
ALT+4 "powexec_altslot 4"

 

Link: Current Copy available through the wiki


 

/BuildSave

  OnSubmit:   Generates a fixed-format document illustrating the active builds powers, level selected and enhancements added, to the default path.
    Is Invalid:   Shouldn't be possible under normal circumstances. If it happens, Default channel, "Error" Reports, "UnableBuildSave" 
      Is Valid:   Default Channel, "System" Reports, "BuildSaved"
  Modifiers:   N/A
Arguments:   N/A
Defaults To:   <System>/<RootInstall>/<NameAccount>/Builds/
      Specify:   No.
        Name:   build.txt

 

build.txt Preview:

Spoiler

qwy: Level 50 Natural Class_Controller

Character Profile:
------------------
Level 1: Inherent Inherent Brawl
	Attuned_Pounding_Slugfest_D (1)
Level 1: Inherent Inherent prestige_generic_Sprintp
	EMPTY
Level 1: Inherent Inherent prestige_BestBuy_Sprintp
	EMPTY
Level 1: Inherent Inherent prestige_EB_Sprintp
	EMPTY
Level 1: Inherent Inherent prestige_Gamestop_Sprintp
	EMPTY
Level 1: Inherent Inherent prestige_DVD_Glidep
	EMPTY
Level 1: Inherent Inherent Sprint
	Attuned_Celerity_C (1)

 


 

/ChatSave
  OnSubmit:   Generates a fixed-format* text document of all chat and window settings, to the default path. 
      Is Invalid:   Shouldn't be possible under normal circumstances. If it happens, default channel, "Error" Reports, "UnableChatSave" 
         Is Valid:   Default Channel, "System" Reports, " Chat file saved to C:/<RootInstall>/chat.txt"
   Modifiers:   N/A
Arguments:   N/A
Defaults To:   <System>/<RootInstall>/
      Specify:   No
        Name:   chat.txt

*(Appears to be a mix of binary and CoH specific. Not easily edited.)

 

chat.txt Preview:

Spoiler

2 16297 0
4 8 15 0.518853
64 0 112 0.000000
256 0 384 0.000000
0 0 0 0.000000
0 0 0 0.000000
269424 2271232 "Global" 0 1 10 1
67108864 688128 "Help" 0 1 26 1
48 0 "NPC" 0 1 0 0

 


 

/OptionSave
  OnSubmit:   Generates a simple fixed-format* list of a few menu options and some "remember" checkboxes encountered during standard play.   
      Is Invalid:   Shouldn't be possible under normal circumstances. If it happens, default channel, "Error" Reports, "UnableOptionSave" 
         Is Valid:   Default Channel, "System" Reports, " Options saved to C:/<RootInstall>/options.txt"
   Modifiers:   N/A
Arguments:   N/A
Defaults To:   <System>/<RootInstall>/
      Specify:   No
        Name:   options.txt

*(Appears to be a mix of binary and CoH specific. Very easily edited.)

 

options.txt Preview:

Spoiler

MouseSpeed 1.000000
SpeedTurn 3.000000
MouseInvert 1
ChatFade 0
Chat1Fade 0
Chat2Fade 0
Chat3Fade 0
Chat4Fade 0
CompassFade 0
UseToolTips 1
AllowProfanity 1
ShowBallons 1
DeclineGifts 0
DeclineGiftsFromTeammates 0
PromptTeleportFromTeammates 1
ShowPets 1
HideContactIcons 0
ShowAllStoreBoosts 0

 

Link: Current Default Structure available through the wiki


 

/wdwSave
  OnSubmit:   Generates a fixed-format* text document of most interface windows and some menu settings.  
      Is Invalid:   Shouldn't be possible under normal circumstances. If it happens, default channel, "Error" Reports, "UnableWdwSave" 
         Is Valid:   Default Channel, "System" Reports, " Windows saved to C:/<RootInstall>/wdw.txt"
   Modifiers:   N/A
Arguments:   N/A
Defaults To:   <System>/<RootInstall>/
      Specify:   No
        Name:   wdw.txt

*(text variant of a table with repeating columns for each window line. The columns take a mix of binary, numerical values and RGB color. Not all options and settings are available and some shown are not valid) 

 

Very easily edited.)

 

wdw.txt Preview:

Spoiler

Revision 2
status 1920 0 330 65 1.000000 2b94ffff d9 0 2
target 0 0 236 66 1.000000 2b94ffff d9 0 2
tray 1920 1080 440 150 1.000000 2b94ffff d9 0 2
tray1 0 100 450 50 1.000000 2b94ffff d9 0 4
tray2 50 200 450 50 1.000000 2b94ffff d9 0 4
tray3 100 300 450 50 1.000000 2b94ffff d9 0 4
tray4 150 400 450 50 1.000000 2b94ffff d9 0 4
tray5 200 500 450 50 1.000000 2b94ffff d9 0 4
tray6 250 600 450 50 1.000000 2b94ffff d9 0 4
tray7 300 700 450 50 1.000000 2b94ff4d 41 0 4
tray8 350 800 450 50 1.000000 2b94ff4d 41 0 4
compass 960 0 280 62 1.000000 2b94ffff d9 0 2
chat 0 1080 420 200 1.000000 2b94ffff d9 0 2

 

Link: Current Default Structure available through the wiki


 

Prospects for keeping options on, or near, your person:

Souvenir macros to help illustrate options, right for you, more than literal function. A little editing will go far.

Spoiler

Macro
/macroimage Inspiration_Recall_Lvl_1 "I got my self a forty" "bindloadfile ../data/I'm a bind file from that macro from that thing..txt"
/macroimage Inspiration_science_breakthru_Lvl_3 "I got myself a shorty" "chatloadfile ../data/chat &more macro saver thing.txt$$optionloadfile ../data/options &more save style.txt$$wdwloadfile ../data/and I'm the windows file.txt"

/macroimage Inspiration_Team_Rez_Lvl_4 "Capture Soul" "buildsavefile ../I get to go in the account folder. My mom says I'm important.txt"
/macroimage Inspiration_LevelShift_Lvl_4 "I'm about to go and stick it" "bindsavefile ../data/I'm a bind file from that macro from that thing..txt"
/macroimage Inspiration_Eden_Trial "said I'm about to go and stick it" "chatsavefile ../data/chat &more macro saver thing.txt$$optionsavefile ../data/options &more save style.txt$$wdwsavefile ../data/and I'm the windows file.txt"

Popmenus:
Option "S&ave chat as," "show chat$$beginchat /chatsavefile ../data/ "
Option "TIMMEH saves !!!" "bindsavefile ../data/YourSubFolder/TIMMEH/TIMMEH-time.txt"
Option "Makin Macro" <&macroimage Inspiration_Team_Rez_Lvl_4 "Capture Soul" "buildsavefile ../../This/is/Serious.txt"&>

Custom.window
Button "S&ave options as," "show chat$$beginchat /optionsavefile ../data/ "
Button "TIMMEH renewed" "bindloadfile ../data/YourSubFolder/TIMMEH/TIMMEH-time.txt"
Button "Macro saver" <&macroimage Inspiration_Eden_Trial "said I'm about to go and stick it" "chatsavefile ../data/chat &more macro saver thing.txt$$optionsavefile ../data/options &more save style.txt$$wdwsavefile ../data/and I'm the windows file.txt&>

 


 

What was the deal with the exhibit thing? Weird...

As mentioned, the default buildsave folder, from the install root, is two deep, <NameAccount>/Builds/. Therefore, (2) back steps back, ../../ is as far back as allowed. The first path is the bad boy of the bunch, going three steps back but, moving back up to the root. It would work however, technically, it escapes the root folder for a billionth of a second and should get slapped down for it. The second example would fail and, the third follows all the rules. SP, ultimately, it was just a dumb path joke. 

 


 

FInal thought on permissions vs bug:

Not being a security guy, or even a strong computer guy. All I can do it speculate but considering the following two points, I'm not confident it's a bug.

- The account folder may have additional restrictions the user generated data folder does not.

- Build Absolute path error, mimics all file errors attempting to escape install root via relative

 

 

Known permission errors on files from data root matches absolute path error  on build

 


 

Test Samples:

There's nothing crazy but, the flexibility with extensions was unexpected. 

The pearls
Passed - saves to <RootInstall>/data/			-	/bindsavefile test.txt
Passed - saves to <RootInstall>/<NameAccount>/Builds/	-	/buildsavefile test.txt
Passed - saves to <RootInstall>/data/			-	/chatsavefile test.txt
Passed - saves to <RootInstall>/data/			-	/optionsavefile test.txt
Passed - saves to <RootInstall>/data/			-	/wdwsavefile test.txt
Passed - Saves to <RootInstall>/data/			-	/wdwsavefile ./test.txt

Passed - Loads from <RootInstall>/data/			-	/bindloadfile test.txt
Passed - Loads from <RootInstall>/data/			-	/chatloadfile test.txt
Passed - Loads from <RootInstall>/data/			-	/optionloadfile test.txt
Passed - Loads from <RootInstall>/data/			-	/wdwloadfile test.txt


Interesting
Passed - Saves to <RootInstall>/data/			-	/bindsavefile test
Passed - Saves to <RootInstall>/<NameAccount>/Builds/	-	/buildsavefile test
Passed - Saves to <RootInstall>/data/			-	/chatsavefile test
Passed - Saves to <RootInstall>/data/			-	/optionsavefile test
Passed - Saves to <RootInstall>/data/			-	/wdwsavefile test

Passed - Loads from <RootInstall>/data/			-	/bindloadfile test.b
Passed - Loads from <RootInstall>/data/			-	/chatloadfile test.c
Passed - Loads from <RootInstall>/data/			-	/optionloadfile test.o
Passed - Loads from <RootInstall>/data/			-	/wdwloadfile test.w
---
Passed - Saves to <RootInstall>/data/			-	/bindsavefile test.b
Passed - Saves to <RootInstall>/<NameAccount>/Builds/	-	/buildsavefile test.qwy
Passed - Saves to <RootInstall>/data/			-	/chatsavefile test.c
Passed - Saves to <RootInstall>/data/			-	/optionsavefile test.o
Passed - Saves to <RootInstall>/data/			-	/wdwsavefile test.w

Passed - Loads from <RootInstall>/data/			-	/bindloadfile test.b
Passed - Loads from <RootInstall>/data/			-	/chatloadfile test.c
Passed - Loads from <RootInstall>/data/			-	/optionloadfile test.o
Passed - Loads from <RootInstall>/data/			-	/wdwloadfile test.w
---
Passed - Generate folders, Saves to <RootInstall>/data/test/test/test/ 	-	/optionsavefile test/test\test/test.txt
Passed - Loads from <RootInstall>/data/test/test/test/ 			-	/optionloadfile test\test/test\test.txt
---
Passed - Generate folders, saves to <RootInstall>/New/	-	/chatsavefile ../..\New/test.txt
Passed - Loads from  <RootInstall>/New/			-	/chatloadfile ..\../New\test.txt
---
Passed - Generate folder, saves to <System>/test/	-	/chatsavefile c:/test/adobe.pdf
Passed - Loads from  <System>/test/			-	/chatloadfile c:/test\adobe.pdf
---
Passed - Saves to <RootInstall>/Costumes/		-	/bindsavefile ../Costumes/ms.xls
Passed - Loads from  <RootInstall>/Costumes/		-	/bindloadfile ..\Costumes/ms.xls
---


  
The fails
Error - buildsavefile  
Error - /buildsavefile . 
Error - /optionsavefile ./ 
Error - /chatsavefile /. 
Error - /wdwsavefile ../../../test.txt
Error - /bindsavefile ../../../test/test.txt
Error - /buildsavefile C:/coh/test.txt
Error - /buildsavefile C:\coh\test.txt
Error - /buildsavefile C:/<PathToWritePermissionsForUnknownUser>/test.txt
-Control
Passed - /optionsavefile C:/coh/test.txt
Passed - /bindsavefile C:\coh\test1.txt
Passed - /wdwsavefile C:/coh\test1.txt
Passed - /chatsavefile C:/<PathToWritePermissionsForUnknownUser>/test.txt
Passed - /chatloadfile C:/coh/test.txt
Passed - /optionloadfile C:\coh\test1.txt
Passed - /wdwloadfile C:/coh\test1.txt
Passed - /bindloadfile C:/<PathToWritePermissionsForUnknownUser>/test.txt

- Buildsavefile as an Absolute path is an absolute no.

- Only buildsavefile has an issue surrounding Absolute. All others are good to go. 

- Client accepts and converts backslashes to forward, as part of a path 

- Error reports and rejects attempts to escape folder via relative path.  Nothing escapes. Not nobody. Not no how. 
- No issues navigating installation folder via relative path or, generating new folders within

- No logic test of file extension. Saves and loads viable files without extension or even, made up extensions.  
- No logic test to preserve existing files. Older instances always lost. 
 


 

It's a Wrap!

Anyways... Hope this proves useful.

Edited by qwy
formatting, editing and spelling.

Guides

MMPetMouseExpanded MM Numpad Controls | Chain Attack Assitant | Load/SaveFile - Relative Paths | KeyBindReset - Basics Of Going Global.

SGMusic.mnu - Popmenu Audio Player for your SG Base

See my profile for some of my other projects.  

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...