[SCR / SCR util] PropMONGLER (r3: 10-04-30) - browse and edit persistent variables
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- Posts: 209
- Joined: Sat, 19. Jan 08, 01:04
[SCR / SCR util] PropMONGLER (r3: 10-04-30) - browse and edit persistent variables
ACHTUNG! WARNING! DISCLAIMER!
This can probably screw up your game if used improperly. If you're not familiar with a variable please don't delete or change it. Do not whine to the author of a script if you break it with PropMONGLER, unless you are the author and talk to yourself. If you start talking to yourself as the result of using PropMONGLER, please contact a licensed physician.
OOC BLURB
PropMONGLER is a tool to browse and edit both global and local variables. It is capable of looking into nested arrays.
This is intended for development use, though it can be used to tweak certain third party scripts, perhaps. Please note that while I have tested it and it works for me, there may be unforseen bugs. The last 20 edits are backed up in the global 'ad.PropMONGLER.backup.
Also note that a good portion of this was written with the assumption of sanity in X3 scripting, however I have since discovered that not only is an array automatically a reference object, but the arrays returned by 'get global / get local' are refs to persistent data. Again, I have tested to ensure that the script behaves according to such odd rules.
IC BLURB
"Split say spoon not exist!"
USAGE
Copy script and t file, run script from script editor. Once it's been executed once it will also appear on the Community Config Menu, if installed. (If you don't know how to run a script from the script editor, do not use.)
Please let me know if you find this useful, and if you have advice on ways to improve, tell me!
http://fnord.to/x3/propmongler-r3.zip
[ external image ]
[ external image ]
[ external image ]
TODO
Creating gvars/lvars.
Copying, deleting, repositioning, and adding subarrays.
Rewrite, as I'm not pleased with the chaotic code structure that was the result of discoveries while writing this. :lol:
CHANGELOG
r2: allows one to call this from within a script for debugging, passing it an array as argument.
r3:
Feature: Insert/remove array members.
Feature: Menu for player owned items.
Feature: Task listing / termination on objects.
Bugfix: Copying a var that's an array now creates a clone, instead of copying the variable (which was a ref).
This can probably screw up your game if used improperly. If you're not familiar with a variable please don't delete or change it. Do not whine to the author of a script if you break it with PropMONGLER, unless you are the author and talk to yourself. If you start talking to yourself as the result of using PropMONGLER, please contact a licensed physician.
OOC BLURB
PropMONGLER is a tool to browse and edit both global and local variables. It is capable of looking into nested arrays.
This is intended for development use, though it can be used to tweak certain third party scripts, perhaps. Please note that while I have tested it and it works for me, there may be unforseen bugs. The last 20 edits are backed up in the global 'ad.PropMONGLER.backup.
Also note that a good portion of this was written with the assumption of sanity in X3 scripting, however I have since discovered that not only is an array automatically a reference object, but the arrays returned by 'get global / get local' are refs to persistent data. Again, I have tested to ensure that the script behaves according to such odd rules.
IC BLURB
"Split say spoon not exist!"
USAGE
Copy script and t file, run script from script editor. Once it's been executed once it will also appear on the Community Config Menu, if installed. (If you don't know how to run a script from the script editor, do not use.)
Please let me know if you find this useful, and if you have advice on ways to improve, tell me!
http://fnord.to/x3/propmongler-r3.zip
[ external image ]
[ external image ]
[ external image ]
TODO
Creating gvars/lvars.
Copying, deleting, repositioning, and adding subarrays.
Rewrite, as I'm not pleased with the chaotic code structure that was the result of discoveries while writing this. :lol:
CHANGELOG
r2: allows one to call this from within a script for debugging, passing it an array as argument.
r3:
Feature: Insert/remove array members.
Feature: Menu for player owned items.
Feature: Task listing / termination on objects.
Bugfix: Copying a var that's an array now creates a clone, instead of copying the variable (which was a ref).
Last edited by AtomicDryad on Fri, 30. Apr 10, 23:55, edited 5 times in total.
-
- Posts: 2255
- Joined: Mon, 31. Oct 05, 08:44
-
- Posts: 2255
- Joined: Mon, 31. Oct 05, 08:44
This utility should be added to the tutorial & resources sticky. Honestly this is without a doubt one of the most useful scripts/utilities that anyone whose scripts use global/local variable could have.
I just wish I'd thought of it first!
Please, please, please try this utility and don't let it slip under the radar. Trust me you will love it.
LA
I just wish I'd thought of it first!
Please, please, please try this utility and don't let it slip under the radar. Trust me you will love it.
LA
-
- Posts: 209
- Joined: Sat, 19. Jan 08, 01:04
Thanks
R2: No array adding/reordering/etc yet, but now it can be used inside a script for debugging as so:
[ external image ]

R2: No array adding/reordering/etc yet, but now it can be used inside a script for debugging as so:
[ external image ]
-
- Posts: 2033
- Joined: Wed, 29. Jun 05, 01:45

I had an idea like this once (Thou I was possibly over zealous in what I wanted from it, and I was overwhelemed so I gave up the idea)
Just an idea, add some kind of 'variable explorer' option, which could essential act like a windows explorer sort of thing, but for a variable (of array type). So it could open up a menu with a tree view of the elements in the array.
-
- Posts: 209
- Joined: Sat, 19. Jan 08, 01:04
Well, it basically acts like a filemanager already (objects are drives, variables are directories, variables with arrays are subdirectories), though it's more like MC than explorer. A tree view seems feasable, I may add it some time.s9ilent wrote:
Just an idea, add some kind of 'variable explorer' option, which could essential act like a windows explorer sort of thing, but for a variable (of array type). So it could open up a menu with a tree view of the elements in the array.
-
- Posts: 209
- Joined: Sat, 19. Jan 08, 01:04
-
- Posts: 2255
- Joined: Mon, 31. Oct 05, 08:44
-
- Posts: 851
- Joined: Fri, 13. Jun 08, 13:14
Re: [SCR / SCR util] PropMONGLER (r3: 10-04-30) - browse and edit persistent variables
darn useful.Please let me know if you find this useful,
But I only found this from links in others threads. Maybe request for this to be added to S&M library and Tutorials/Resources?
Maybe add a logging feature? For example, one useful feature would be to loop through all ships and write to a log file all local variables that follow a certain root/pattern. E.g. write to log fille all that begin with plugin.X.Y.*. This could enable nice checking that a local variable setting etc is configured correctly for a wide variety of particular instantiations and circumstances.and if you have advice on ways to improve, tell me!
edit: and likewise, being able to nuke variables (either local for a given object, global, or local for all objects) according to a root would be nice.
-
- Posts: 2993
- Joined: Sun, 25. Dec 05, 10:42
-
- Posts: 2255
- Joined: Mon, 31. Oct 05, 08:44
Try this:Jack08 wrote:The download link is broken, is anyone able to upload this somewhere?
propmongler
LA
-
- Posts: 2993
- Joined: Sun, 25. Dec 05, 10:42
Tyvm LogainLogain Abler wrote:Try this:Jack08 wrote:The download link is broken, is anyone able to upload this somewhere?
propmongler
LA
-
- Posts: 6
- Joined: Thu, 16. Apr 09, 23:33
Re: [SCR / SCR util] PropMONGLER (r3: 10-04-30) - browse and edit persistent variables
What if you already talk to yourself?AtomicDryad wrote: If you start talking to yourself as the result of using PropMONGLER, please contact a licensed physician.

Very useful anyway. Thanks.
-
- Posts: 1962
- Joined: Tue, 8. Jan 08, 18:19
I reuploaded this script and made it a setup-only script, which automatically adds a hotkey. There is no uninstall script though...
http://www.file-upload.net/download-398 ... R.zip.html
Greetings,
ScRaT
http://www.file-upload.net/download-398 ... R.zip.html
Greetings,
ScRaT