Author Topic: TrailMyx's Next Generation File System (TM_NGFS)  (Read 58279 times)

0 Members and 1 Guest are viewing this topic.

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: My new filesystem - first look
« Reply #105 on: August 06, 2010, 12:50:31 PM »
0
Ok, so here is the latest. Of course I can't test anything LOL for a few more hours LOL.

Code: [Select]
sub Setup
   gosub TM_NGFS_DoesSaveExist XIIxMining
   If #RESULT
      {
      display yesno It looks like you've used this script before. Would you like to use the settings saved from your last session?
      if #dispres = yes
         {
         gosub TM_NGFS_InitializeScript XIIxMining
         gosub TM_NGFS_LoadVariables XIIxMining
         gosub LoadTracking ;starts the tracking menu and loads with counter vars
         return
         }
      }

   gosub TM_NGFS_InitializeScript XIIxMining
   gosub TM_NGFS_RegisterVariables XIIxMining std std RunebookID SecureID OreBagID StoneBagID BlkRkBadID JewelBagID ToTinker ToBank
   gosub TM_NGFS_RegisterVariables XIIxMining std std TravelMethod SecureGmpName SecureGmpSize
   gosub TM_NGFS_RegisterVariables XIIxMining std std IronCnt DullCnt ShadCnt CoppCnt BronCnt GoldCnt AgapCnt VeriCnt ValoCnt EcruCnt
   gosub TM_NGFS_RegisterVariables XIIxMining std std FireCnt BlueCnt PerfCnt DarkCnt BlacCnt CrysCnt SandCnt DiamCnt RubyCnt StarCnt
   gosub TM_NGFS_RegisterVariables XIIxMining std std SappCnt CitrCnt EmerCnt AmbeCnt TourCnt AmetCnt IronStnCnt DullStnCnt ShadStnCnt
   gosub TM_NGFS_RegisterVariables XIIxMining std std CoppStnCnt BronStnCnt GoldStnCnt AgapStnCnt VeriStnCnt ValoStnCnt

   gosub Display_M_Setup ;starts the Setup menu
   gosub LoadDefaults
   
   <DO A BUNCH OF STUFF TO THE VARS WITH SETUP MENU, ETC>

   gosub TM_NGFS_SaveVariables XIIxMining
   gosub LoadTracking ;starts the tracking menu and loads with counter vars
Return
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: My new filesystem - first look
« Reply #106 on: August 07, 2010, 04:48:20 AM »
0
Okie, good news is that I seem to be fine now. I manually deleted all associated registry values and started over using a rebuilt wrapper that manages the variable value resets, etc. I also pulled the coordinate tracking variables out and left those as persistent's but just for now while I work on the problem. I don't know if they were causing me issues or not but I doubt it so re-adding them later should be easy.

Incidentally, as a result, I am no longer testing the "Delete" function ;)

Anyhoo, so far so good. I pulled the reg value and pasted it in Notepad++ so I could take a look at the save and it looks great!

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: My new filesystem - first look
« Reply #107 on: August 09, 2010, 02:17:30 AM »
0
Just an observation, not an issue with the subs...

I noticed that simply Initializing a new variable set will make the return value of "DoesSaveExist" #TRUE even if it contains no values. My use of the "DoesSaveExist" sub above is great as long as the initial script setup was completed successfully during the last session. If something happened where it was cancelled even without setting up a single thing the "DoesSaveExist" sub returns #TRUE.

With this in mind I simply changed the wrapper a little bit to accomodate an "%Initialized" variable value that is set to #FALSE unless the script was successfully configured:

Code: [Select]
sub Setup
   gosub TM_NGFS_DoesSaveExist XIIxMining
   If #RESULT
      {
      gosub TM_NGFS_InitializeScript XIIxMining
      gosub TM_NGFS_LoadVariables XIIxMining
      if %Initialized = #TRUE
         {
         display yesno It looks like you've used this script before. Would you like to use the settings saved from your last session?
         if #dispres = yes
         return
         }
      }

   gosub TM_NGFS_RegisterVariables XIIxMining std std RunebookID SecureID OreBagID StoneBagID BlkRkBagID JewelBagID ToTinker ToBank
   gosub TM_NGFS_RegisterVariables XIIxMining std std TravelMethod SecureGmpName SecureGmpSize Initialized
   gosub TM_NGFS_RegisterVariables XIIxMining std std IronCnt DullCnt ShadCnt CoppCnt BronCnt GoldCnt AgapCnt VeriCnt ValoCnt EcruCnt
   gosub TM_NGFS_RegisterVariables XIIxMining std std FireCnt BlueCnt PerfCnt DarkCnt BlacCnt CrysCnt SandCnt DiamCnt RubyCnt StarCnt
   gosub TM_NGFS_RegisterVariables XIIxMining std std SappCnt CitrCnt EmerCnt AmbeCnt TourCnt AmetCnt IronStnCnt DullStnCnt ShadStnCnt
   gosub TM_NGFS_RegisterVariables XIIxMining std std CoppStnCnt BronStnCnt GoldStnCnt AgapStnCnt VeriStnCnt ValoStnCnt

   set %initialized #FALSE
   gosub Display_M_Setup
   gosub LoadDefaults
   gosub TM_NGFS_SaveVariables XIIxMining

   <SET A BUNCH OF STUFF>

   set %Initialized #TRUE
   gosub TM_NGFS_SaveVariables XIIxMining
return

Just thought I'd throw that out there in case someone finds it useful.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: My new filesystem - first look
« Reply #108 on: August 09, 2010, 10:01:42 AM »
0
Yup, when you "Initialize" you are actually creating a spot in the filesystem to store stuff.  At that point, the FS doesn't care what you've put in there.  That's to prevent the possible overwrite of WHATEVER might be in there.

Anyhow, I'm glad you finally got it working.  It should have been easier, but for some reason it was difficult.  dunno what happened.  You wouldn't happen to have your dumps of the errant registry information?  If something got corrupted, it might be helpful to see what was up so I might be able to prevent it next time.

But I like what you did with the initialization flag.  That's a great idea and probably something I'll adopt as well. 
« Last Edit: August 09, 2010, 10:08:32 AM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #109 on: December 26, 2010, 10:18:13 PM »
0
I've had this lurking in the Elite section for a while and kinda forgot to release it.  A couple of the Elites have done some scripts based on these tools, and enclosed in this thread are some of their discoveries and sample work.  I've moved it to a public section for all to enjoy.
« Last Edit: December 26, 2010, 10:22:20 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #110 on: March 21, 2011, 06:53:35 PM »
0
getting ready to incorporate this in my new script.  from what i've tested it should do everything i need!

thanks a bunch :)

i suppose i should still also use your other file system to save variables to file for transfering rails/settings between computers/players.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #111 on: March 21, 2011, 07:09:53 PM »
0
I do plan on adding a way to save sets to a file through the NGFS manager script.  I just haven't played much with this in a while.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #112 on: March 23, 2011, 01:03:25 PM »
0
I'm kinda confused I guess.

I ran a test to save a local namespace "goodgame" with variables a/b/c set to aa/bb/cc.  Saved them on one character, checked your ngfs_viewer and see them.  I noticed that they are automatically saved by charid _ shard.

Does that mean I can't save a bunch of variables on one character, and then load them up on another?

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #113 on: March 23, 2011, 01:12:27 PM »
0
You can save them as a generic set I believe.  It's been a while since I've played with these, but the generic set was meant to let scripts share data.  I'll have to look this evening to see if I have any sample code for that.  Sorry, at work right now.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #114 on: March 23, 2011, 01:21:01 PM »
0
Ok, look at adding a second argument to the initialization:

Code: [Select]
;--------------------------------------------------------------------
;---------------------  Base User Functions -------------------------
;--------------------------------------------------------------------
; TM_NGFS_InitializeScript
; %1 - ScriptName
; %2 = (opt) generic : add this tag to create a generic (non-character relative data set)

And then look at this little bit of test code:

Code: [Select]
    gosub TM_NGFS_InitializeScript new_script2 generic
    gosub TM_NGFS_DoesSaveExist new_script2 generic
    if #RESULT = #TRUE
      display ok new_script2 generic save exists
    stop

So if you initialize it as "generic", then it will address the data as generic.  Therefore instead of using #CHARID, _ , name, it will use "generic" , _ , name.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #115 on: March 23, 2011, 01:27:47 PM »
0
oh wow.  i see.

i saw in a screenshot the generic after i posted this, but couldnt figure it out.

thanks.  lol

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #116 on: March 23, 2011, 01:29:58 PM »
0
There isn't a real override right now to explicitly request data saved from one char and transfer it to another.  I was planning on adding that feature to the file system viewer program.  Just never got around to it since hardly anyone uses these subs.

Actually, I kinda figured that wasn't a good idea from script level because I didn't want scripters overwriting people's existing saved sets..
« Last Edit: March 23, 2011, 01:32:41 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline OMGBurgers

  • Hero Member
  • *
  • Posts: 800
  • Activity:
    0%
  • Reputation Power: 7
  • OMGBurgers has no influence.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #117 on: March 23, 2011, 02:23:59 PM »
0
well this should work perfect for me.
i've got a bunch of character specific variables based on their desktop setup because of some pixel scanning, but ill also have some variables that all characters should be able to access, like monster database, rails, rules, etc.
i think these subs will help very nicely.  the only thing now that's keeping me from using them, is converting the junk i wrote earlier, to use the namespaces like Twinkle McNugget showed me...  since namespaces are new, i'm having quite the time figuring out when to push/pop and all.  a lot of trial and error but i finally got it to start from the main namespace, then to another, then another, and restore back to the main as it finishes each one.  i think i shall re-read your post.  i just reread the easyuo ones, but they arn't all that great. lol.  sorry for the OT babble ;p

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #118 on: March 23, 2011, 02:33:21 PM »
0
Well don't forget you can use these subs to store/retrieve the %vars also.  I think it's documented in there somewhere.  I'll hunt for some sample code tonight.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's Next Generation File System (TM_NGFS)
« Reply #119 on: March 23, 2011, 02:39:54 PM »
0
There it is:

Code: [Select]
gosub TM_RegisterVariable std std newvar  ; denotes a %var

Right when you register.
Please read the ScriptUO site RULES
Come play RIFT with me!