Talk:Pound *KS* (script): Difference between revisions
(→Script Suggestions: responded to suggestions to improve variable use within script) |
|||
(One intermediate revision by one other user not shown) | |||
Line 27: | Line 27: | ||
SETVARIABLE stowShovel wear_shovel |
SETVARIABLE stowShovel wear_shovel |
||
Cheers! - [[User:RY4NPW|padhg]] ([[User talk:RY4NPW|talk]]) 20:35, 13 June 2016 (CDT) |
Cheers! - [[User:RY4NPW|padhg]] ([[User talk:RY4NPW|talk]]) 20:35, 13 June 2016 (CDT)<br /><br /> |
||
::So, I tried the underscore thing in order to save an entire string... that failed. Knowing that you can use entire words as the %VARIABLE opens up a lot more possibilities, though... so... initial setup is now somewhat of a bother. I figure, though, that considering the depth/length of the script itself, taking a few minutes for this kind of initial setup isn't that big of a deal in the grand scheme of things since it'll only rarely change and it'll allow for enough flexibility that basically anyone with any container configuration can then successfully make use of it. Thank you for the suggestions! It's always great to learn something new! |
Latest revision as of 19:01, 26 July 2016
Script Suggestions
Since you asked for feedback/suggestions, I thought I'd mention a few things.
1. Add some usage directions to the top of your script. It makes it so much easier to figure out when people share scripts.
# To use this script, have your instruction book in hand. Turn your book to the desired page and run .pound # Make sure you set the variables "toolContainer" and "hammer" below before the first run!
2. When others need to maintain and/or work with scripts, it is very helpful to have descriptive variable names. It means so much more than A, B, C, etc. It also makes setting variables a lot easier for the user too! Instead of 2 variables, you can suggest users add an underscore. With StormFront you can also use quotes, but quotes are incompatible with Genie.
# Make sure you set the variables below *BEFORE* the first run! SETVARIABLE toolsContainer forger's_belt # this container has your hammer, tongs, rod, bellows, and shovel. SETVARIABLE consumablesContainer "tool chest" # this is the container for consumables such as oil, hilts, cloth padding, etc. SETVARIABLE instructionsContainer backpack # where you keep your logbook and forging instructions
3. There is such a thing as a forging mallet in addition to a forging hammer. Your script would need a minor tweak to support both:
SETVARIABLE hammer ball-peen_mallet # then later PUT pound %itemToForge on anvil with my %hammer
4. As an alternative to above you could also use variables per item... It's more tedious to set up, but it does allow for individual storage of tools. Works especially well for those who have Rebecho altered tool belts to hold extra items, or tools that are worn (shoulder tongs, belt shovels, etc) - padhg (talk) 20:43, 13 June 2016 (CDT)
SETVARIABLE getHammer untie_hammer_on_my_forger's_belt SETVARIABLE stowHammer tie_hammer_to_my_forger's_belt SETVARIABLE getPliers get_tongs_in_my_tool_chest SETVARIABLE stowPliers put_tongs_in_my_tool_chest SETVARIABLE getShovel remove_shovel SETVARIABLE stowShovel wear_shovel
Cheers! - padhg (talk) 20:35, 13 June 2016 (CDT)
- So, I tried the underscore thing in order to save an entire string... that failed. Knowing that you can use entire words as the %VARIABLE opens up a lot more possibilities, though... so... initial setup is now somewhat of a bother. I figure, though, that considering the depth/length of the script itself, taking a few minutes for this kind of initial setup isn't that big of a deal in the grand scheme of things since it'll only rarely change and it'll allow for enough flexibility that basically anyone with any container configuration can then successfully make use of it. Thank you for the suggestions! It's always great to learn something new!