I think that the Mac OSX keybindings for the apostrophe are messed up, as the apostrophe is detected as "NONE"
I think you're right, it seems like LWJGL keyboard input under Mac has some random issues. All I can recommend is changing the key to something else and hopefully that should cure the issue.
How would you devise a script for holding down the mouse1 button?
I've tried $${keydown(mouse1)}$$ with attack,button1 and none work :|
I need to have a sift through the code but in the current version I don't think that's possible. Minecraft has two different types of binding (both managed through the same class but handled differently), those which use a key up, key down pattern and those which just look for single key presses. Attack is the latter type and I think it gets retriggered by the mouse each tick.
The single key press type can be triggered with the key script command to send a single press, but sending a keydown won't achieve much as Minecraft doesn't use that information. In 0.6 you may fare better as you could put the key command in a loop and make it work that way. There is of course nothing stopping you filling a file with
I would appreciate it if you made a version with only the vanilla keybind mod (SHIFT+TAB).
That's certainly something I'd be willing to do if people are interested in the base feature set but don't want all the extra functionality. Could I ask whether you'd want a "vanilla" version because of the reduced payload or just because you prefer a less cluttered interface?
The reason I ask is that to achieve a less cluttered interface I can just add some configuration options to turn stuff off. The other would basically require creating a stripped-down version of the mod as a separate entity, which isn't impossible but by the same token isn't as straightforward as it might sound :smile.gif:
If I've completely misunderstood and you just want the ability to use <SHIFT>+<TAB> back, then you can set that in the Minecraft "Controls" screen.
Love the mod, helps me out a ton with a big almost year old warp list, moderation duties, etc. One thing I guess I'd love to ask for is some sort of alias or nickname for at least town names/arguments, a lot of my large personal builds are a jumble of letters and a number or two that I can sort out in my head easy enough, but blends in when I'm looking at a list of a dozen or so names with the same prefix.
Also, maybe I'm not going about this the right way, but the town lists stay the same for different servers I connect to, specifically a actual server, and a test one we use for addons before going live. Can't really find a way to have two separate lists for the servers, just keyconfigs.
Another thing is that with world edit, if I try and do something along the lines of "//replace $$item" or whatever the argument list name is, that works fine, but another subset of that function for world edit is "//replace 0 1" which replaces air with dirt, but trying to allow for two arguments of the same time in a macro doesn't seem to prompt for a second one.
One last thing, I recently got world edit selection enabled on my server for use with hawk eye and love it, only problem is I keep the set grid pos at mouse position key bound to numpad 1 and 2, which normally are for other mod functions. Since you can now rebind the left and right mouse click buttons, would it be possible to add a mouse hud to the config pane so I could possible bind alt-left click let's say to set a coordinate and alt-right click to the other one?
Oh, and I assume that it's a limitation of minecraft that I can't bind thumb based mouse buttons for the time being without having to go into the mouse software and make them a sort of macro.
Probably the best addon I've yet to use since improved chat has kinda fell by the wayside of maintenance, doing a awesome job here!
Rollback Post to RevisionRollBack
"They asked me how well I understood theoretical physics. I told them I had a theoretical degree in physics. They said welcome aboard."
Love the mod, helps me out a ton with a big almost year old warp list, moderation duties, etc. One thing I guess I'd love to ask for is some sort of alias or nickname for at least town names/arguments, a lot of my large personal builds are a jumble of letters and a number or two that I can sort out in my head easy enough, but blends in when I'm looking at a list of a dozen or so names with the same prefix.
Yeah definitely, although I may not be able to get this in 0.6 as I'm close to release and want to make sure the current feature set is properly complete. But I will definitely add this is a future revision. Another handy tip which might help in the short term is that you can edit the towns.png as you like to provide custom icons, I find this helps a lot with finding things at a glance.
Also, maybe I'm not going about this the right way, but the town lists stay the same for different servers I connect to, specifically a actual server, and a test one we use for addons before going live. Can't really find a way to have two separate lists for the servers, just keyconfigs.
No you're absolutely right there currently isn't a way to switch the town lists with the config, and I'll admit I had noticed this before. This isn't hard to do so I'll put in an option to do so.
Another thing is that with world edit, if I try and do something along the lines of "//replace $$item" or whatever the argument list name is, that works fine, but another subset of that function for world edit is "//replace 0 1" which replaces air with dirt, but trying to allow for two arguments of the same time in a macro doesn't seem to prompt for a second one.
Replacing multiple parameters with different values is possible to support but currently not supported and here's why: The macros themselves are incrementally compiled as the player provides values for the arguments. It's fully supported to include a file or even a preset string which itself contains parameters and at the point of prompting for these parameter values it's not really feasible to display the current compiled state of the macro so the player knows where the prompted parameter will go (yikes, did that make any sense?). Um, anyway yes you can prompt for the parameters in turn but if substituting left-to-right then with a simple macro it's easy to see where the values go, but in a complex one it may be utterly confusing.
There may be some way around the usability issues, and it may hinge on for example tagging the parameters as they're compiled so they're always prompted in some kind of logical order. Other than that, would a suitable compromise being to add a configuration option (only in the config file) to enable one-by-one replacement for specific types of param? This way those who want the extra functionality and are willing to accept the possibility that it might get confusing can still have it, but it's disabled in general?
One last thing, I recently got world edit selection enabled on my server for use with hawk eye and love it, only problem is I keep the set grid pos at mouse position key bound to numpad 1 and 2, which normally are for other mod functions. Since you can now rebind the left and right mouse click buttons, would it be possible to add a mouse hud to the config pane so I could possible bind alt-left click let's say to set a coordinate and alt-right click to the other one?
Yes that's do-able, again will probably have to wait till after 0.6 though as it's a nontrivial modification.
Oh, and I assume that it's a limitation of minecraft that I can't bind thumb based mouse buttons for the time being without having to go into the mouse software and make them a sort of macro.
Of LWJGL actually yes, for some bizarre reason LWJGL's mouse access functions report the correct number of buttons for most mouses yet won't let you actually get events for those buttons :sad.gif:
Also an ability to bind a key + another key? (So like X+Z=/tp $$f whereas X=/tp $$u) That would, also, Be great =P
Someone actually asked for this before, and as I mentioned to them it's actually a fairly surmountable technical issue but gets quite knotty when trying to think of how to provide a sensible user interface to achieve it! With 0.6 however you can emulate this by binding a key down event to a switch config command, and the key release to another, then putting your alternate functionality in the other config (if that makes sense).
Yeah definitely, although I may not be able to get this in 0.6 as I'm close to release and want to make sure the current feature set is properly complete. But I will definitely add this is a future revision. Another handy tip which might help in the short term is that you can edit the towns.png as you like to provide custom icons, I find this helps a lot with finding things at a glance.
No you're absolutely right there currently isn't a way to switch the town lists with the config, and I'll admit I had noticed this before. This isn't hard to do so I'll put in an option to do so.
Replacing multiple parameters with different values is possible to support but currently not supported and here's why: The macros themselves are incrementally compiled as the player provides values for the arguments. It's fully supported to include a file or even a preset string which itself contains parameters and at the point of prompting for these parameter values it's not really feasible to display the current compiled state of the macro so the player knows where the prompted parameter will go (yikes, did that make any sense?). Um, anyway yes you can prompt for the parameters in turn but if substituting left-to-right then with a simple macro it's easy to see where the values go, but in a complex one it may be utterly confusing.
There may be some way around the usability issues, and it may hinge on for example tagging the parameters as they're compiled so they're always prompted in some kind of logical order. Other than that, would a suitable compromise being to add a configuration option (only in the config file) to enable one-by-one replacement for specific types of param? This way those who want the extra functionality and are willing to accept the possibility that it might get confusing can still have it, but it's disabled in general?
Yes that's do-able, again will probably have to wait till after 0.6 though as it's a nontrivial modification.
Of LWJGL actually yes, for some bizarre reason LWJGL's mouse access functions report the correct number of buttons for most mouses yet won't let you actually get events for those buttons :sad.gif:
Thanks, I'm hoping the new features in 0.6 are going to give people something to get excited about as well :smile.gif:
Yes, that's really easy.
Someone actually asked for this before, and as I mentioned to them it's actually a fairly surmountable technical issue but gets quite knotty when trying to think of how to provide a sensible user interface to achieve it! With 0.6 however you can emulate this by binding a key down event to a switch config command, and the key release to another, then putting your alternate functionality in the other config (if that makes sense).
That's the idea! Glad you like it :biggrin.gif:
Thanks :smile.gif:
Your proposed solution to the problem I was having with two different values for essentially the same parameter in world edit is acceptable, the more functionality I can get out of using mod in the end, the better.
Rollback Post to RevisionRollBack
"They asked me how well I understood theoretical physics. I told them I had a theoretical degree in physics. They said welcome aboard."
Your proposed solution to the problem I was having with two different values for essentially the same parameter in world edit is acceptable, the more functionality I can get out of using mod in the end, the better.
Ok, I've added some compiler directives which can be configured in macros.txt to support this. Also added a tiny animation when prompting for consecutive parameters of the same type because otherwise it got very hard to tell what was going on (eg. nothing would actually change visually). I still think it's confusing but if you need the function then it now exists.
Warp support the same way its for homes please??? =)
Thanks a lot.
The most AWESOME plugin I saw so far. Im still very amazed about it OMG so usefull and powerfull for admins =)
Added warps, just need to do some icons :smile.gif:
Hoping to release 0.6 by tomorrow or early next week so all the new functions will be available. Here's a little snippet of the new keybind type available in the new version:
Ok, I've added some compiler directives which can be configured in macros.txt to support this. Also added a tiny animation when prompting for consecutive parameters of the same type because otherwise it got very hard to tell what was going on (eg. nothing would actually change visually). I still think it's confusing but if you need the function then it now exists.
Added warps, just need to do some icons :smile.gif:
Hoping to release 0.6 by tomorrow or early next week so all the new functions will be available. Here's a little snippet of the new keybind type available in the new version:
Before I go through the effort of trying to write a script or something for this, Hawekeye Commands is it possible to, with this mod to write something that would prompt for the various parameters listed there, in various combinations? Like, if I wanted to do a general area search I'd just do a small radius search with "/hawkeye r:15 t:1d a:explosion," I could have this script/macro able to do something along those lines, but not be chained to be done always in that order of radius, time and action, or even all of those if I wanted to do just a radius and time search. At the moment it's a lot of parameters that can currently work with this mod, but always have to be there in that order.
Long question short, is it possible to have the order of various arguments change based on the end keystroke? My idea is like I said above /hawkeye parameters but say... I press enter and it quits prompting me for the next variable and processes the command. It'd be something that I think would be a very big tool to help out new moderators and users of hawkeye quickly find what they need without having to have a big command listing webpage open.
EDIT: Thought of a better way to put it, are 'sub-parameters' possible? As in, I could have something like $$actions and clicking a button on that would prompt for a radius, then another would be various actions, then if I wanted to, click return and process actions hawkeye/bightbrother actions or if not, it would keep prompting for parameters until it runs out.
I didnt fully understood what you want, but me even without scripting already manage to do a macro in-game for world guard regions and it was so awesome when I saw it work =)
What I did was in the ky I selected "P" added this:
/region define $$[name] | /region serpriority $$[name] $$[priority] | /region setparent $$[name] $$[parent]
And what it does is: (If I have a selection done ofc)
Asks me for a name, a priority and a parent. But does that only once, for example in the $$[name] you have it 3 times, but the mod knows that is always the same name.
And then I press enter in the end and it does all 3 commands at once XD
When I saw that happening I said to my self: I will never stop using this mod XD
It's posts like this that make me want to keep developing this mod!
I tried to use the home thing as warps but it didnt work. I mean the auto detection thing. Problably if I would do it manual maybe it would, not sure.
You can set the command it sends to fetch homes but warps a slightly different so I added a new parser/discoverer anyway. Obviously there are like over 9,000 "warp" mods out there but I test everything with Bukkit Essentials since they're the most prevailent. Warps now works on $$w with shiny auto-discovery.
I don't understand how the mod works. It seems to be installed but I can't find a way to open the config. My sneak key is lshift and I tried all keys I have in my keyboard with shift but no luck. I also tried binding sneak to j but still no luck.
I have following in log, could it be related?
java.lang.NoSuchFieldException: charWidth
at java.lang.Class.getDeclaredField(Unknown Source)
at ModLoader.setPrivateValue(ModLoader.java:1561)
at net.eq2online.src.AbstractionLayer.SetPrivateValue(AbstractionLayer.j
ava:84)
at net.eq2online.src.FixedWidthFontRenderer.<init>(FixedWidthFontRendere
r.java:104)
at mod_Macros.<init>(mod_Macros.java:242)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
rce)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at ModLoader.addMod(ModLoader.java:275)
at ModLoader.readFromModFolder(ModLoader.java:1179)
at ModLoader.init(ModLoader.java:824)
at ModLoader.AddAllRenderers(ModLoader.java:186)
at aam.<init>(aam.java:61)
at aam.<clinit>(aam.java:10)
at net.minecraft.client.Minecraft.a(SourceFile:259)
at net.minecraft.client.Minecraft.run(SourceFile:629)
at java.lang.Thread.run(Unknown Source)
Error setting superclass font data
Mod Loaded: mod_Macros 0.5.6
for you for posting the log. That error is fine, it's a bug in 0.5 but it's wrapped in a try block and doesn't hurt anything. Most likely you've run into a bug I've had people report a few times but not gotten to the bottom of whereby the mod thinks it's in single player mode. Try setting singleplayerenable=1 in the macros.txt and see if it fixes the issue. Alternatively try a different key for the macro activate function and try that in combination with sneak.
I've altered the way that singleplayer/multiplayer detection is done in 0.6 in an effort to work around whatever is causing this.
<Insert some kind of eloquently worded praise here>
I have a few suggestions/bug reports:
Some way to send the literal text "|" or "$$h" and the like (Perhaps '\')
A list of coordinates be added like the home (and soon warp) list, for to-coordinate teleportation
Loops and conditional statements for the scripting
Some kind of icon pixel art designer thingy, to design our own icons
A way to take a screenshot and use it as an icon
And finally, I use zombe's modpack for flying and such. and I've come across two issues. The first is that zombe's mods display a little message underneath the "Minecraft Beta 1.8.1" tag, and it draws over top of all the macro dialogs. The second, is the zombe's mod sets up a whole bunch of keybinds, since there isn't really a good way to detect the keybinds involved, could some kind of "mark this key as reserved" functionality be added? (Setting the macro to '|' does do this, but it feels kludgey :tongue.gif:)
Edit: Something to make the item selection more manageable, perhaps a searchbox? Or a compacted gridview? Maybe sort it alphabetically.
Loops and conditional statements for the scripting
Looping is already added to 0.6, however conditionals aren't going to be implemented yet until I a) decide what actual conditional conditions to conditionally condition on and :cool.gif: am totally sure that the new stack push/pop functions which support looping are fully and reliably rock solid, just to avoid layering complexity which might make troubleshooting harder. I fully plan to add conditionals at some point however.
And finally, I use zombe's modpack for flying and such. and I've come across two issues. The first is that zombe's mods display a little message underneath the "Minecraft Beta 1.8.1" tag, and it draws over top of all the macro dialogs.
Not sure how I can fix this other than maybe drawing my own dialogues with a higher z value. I'll have to look into it. It seems a little inconsiderate of the author of Zombe's mod to draw stuff with a higher z order than a GUI screen.
The second, is the zombe's mod sets up a whole bunch of keybinds, since there isn't really a good way to detect the keybinds involved, could some kind of "mark this key as reserved" functionality be added? (Setting the macro to '|' does do this, but it feels kludgey :tongue.gif:)
I've tried it with singleplayerenable 1 & 0, different keys for sneak and macro activate etc. with no luck. Is there a chat command to open the window perhaps? :tongue.gif: Or some kind of example file how the macros in macros.txt look like so I could try them out without the gui?
I'm interested in this mod because I need copy/paste/etc. binds for Worldedit and Autohotkey scripts don't seem to work in 1.8 anymore.
That's strange indeed, have you got any other mods which might be conflicting? The mod keyboard hook actually works through the same interface used to hoist the main GUI so if you can't get the combo to work then it's unlikely that individual macros will work either, though of course you're welcome to try:
The macros.txt follows a pretty simple format, albeit not one readily conducive to being edited unfortunately. The macro definitions all look like this
Macro[<lwjgl_keycode>].<property_name>=<value>
So a simple keybind for, say "P", which has keycode 25 would be:
Macro[25].Macro=This is an example macro
That's basically all you need to initially bind a key, the other lines just store the parameter history and macro flags. Hope this helps.
Just out of interest, when you go into the "Controls" menu, do you see the custom, paginated screen or the original Minecraft one which ends up with keys underneath the "Done" button?
Looping is already added to 0.6, however conditionals aren't going to be implemented yet until I a) decide what actual conditional conditions to conditionally condition on and :cool.gif: am totally sure that the new stack push/pop functions which support looping are fully and reliably rock solid, just to avoid layering complexity which might make troubleshooting harder. I fully plan to add conditionals at some point however.
For some conditions, might I suggest:
Health/hunger/xp/level values
Inventory contents (this one might be a bit awkward, perhaps a "getitems(slot) and getslot(item, [count])" would help)
The currently selected item
Ping
Recent chat messages (also kind of awkward)
Keys being held down
The macro causing the script to be executed (based on the key, or some id)
The selected configuration
The current server
The current player (for people sharing computers)
Oh! Also a few more suggestions:
Some way to select data values (for wool and whatnot)
Set the player's icon (for $$u) to either some representation of their skin, or just their face
Adjust the behaviour of the selection dialogues (or anything with a scrollbar really) when using the mouse wheel to be equivalent to dragging the scrollbar instead of moving between items. (This would probably make the item dialogue a little less tedious). As it turns out, it looks like scrolling actually selects the next/previous item, which is probably a bug
Inventory contents (this one might be a bit awkward, perhaps a "getitems(slot) and getslot(item, [count])" would help)
The currently selected item
Ping
Recent chat messages (also kind of awkward)
Keys being held down
The macro causing the script to be executed (based on the key, or some id)
The selected configuration
The current server
The current player (for people sharing computers)
Holy crap, +1 Internets for you. I agree that recent chat messages might be a little... precarious shall we say. But the inventory thing wouldn't be too unmanagable, especially if you say just restricted it to the "hot bar" 9 slots, which is what most people will want I guess. All the others seem totally valid.
The bonus of course with conditionals is the ability to write more general-purpose scripts, the things you have suggested would certainly add a whole dimension of new capability in that arena. Thanks for your suggestions and keep them coming.
Oh! Also a few more suggestions:
Some way to select data values (for wool and whatnot)
Set the player's icon (for $$u) to either some representation of their skin, or just their face
The data value thing can be done, although that tends to balloon and I'm not sure if there's a way to detect what the combinations are, I'll have to look into it.
wrt the player icon thing, I actually had this working for friends ages ago but various issues made it a bit unmanagable. I tried caching the files on disk but this just made it worse. That was before the $$u though so I'm tempted to dig up the code and see how it fares this time, since there's a good chance some of the skins will be in memory already.
Adjust the behaviour of the selection dialogues (or anything with a scrollbar really) when using the mouse wheel to be equivalent to dragging the scrollbar instead of moving between items. (This would probably make the item dialogue a little less tedious)
You're probably right but (personally) I like using mouse wheel to scroll through the entries :biggrin.gif: :biggrin.gif: .... Okay I'll put in an option in the future :wink.gif:
As it turns out, it looks like scrolling actually selects the next/previous item, which is probably a bug
Yes it's a bug and happens if you double-click an entry in a list, then later the same list is shown and you scroll the mouse wheel it "registers" the double-click event again. I have fixed this already :smile.gif:
The bonus of course with conditionals is the ability to write more general-purpose scripts, the things you have suggested would certainly add a whole dimension of new capability in that arena. Thanks for your suggestions and keep them coming.
If you insist :tongue.gif:
As a condition: The movement state of the player (standing, running, jumping, sprinting), the current time (in game and wall clock time) and for 1.9 any effects affecting the player
As a suggestion: A way to delete/rename scripts/files (and perhaps a dedicated directory for the files)
And this is mostly scripting stuff but:
Variables, functions, math (:tongue.gif:), importing other scripts, and perhaps some additional events to trigger macros: like onHealthChange or onHungerChange (although that might be stepping a bit out of the scope of the plugin). But if you plan on implementing all that you may just want to use an already existing scripting language (lua, jython, jruby, groovy)
Edit: Just read through the thread in full, and spotted this:
Replacing multiple parameters with different values is possible to support but currently not supported and here's why: The macros themselves are incrementally compiled as the player provides values for the arguments. It's fully supported to include a file or even a preset string which itself contains parameters and at the point of prompting for these parameter values it's not really feasible to display the current compiled state of the macro so the player knows where the prompted parameter will go (yikes, did that make any sense?). Um, anyway yes you can prompt for the parameters in turn but if substituting left-to-right then with a simple macro it's easy to see where the values go, but in a complex one it may be utterly confusing.
There may be some way around the usability issues, and it may hinge on for example tagging the parameters as they're compiled so they're always prompted in some kind of logical order. Other than that, would a suitable compromise being to add a configuration option (only in the config file) to enable one-by-one replacement for specific types of param? This way those who want the extra functionality and are willing to accept the possibility that it might get confusing can still have it, but it's disabled in general?
Could you perhaps allow for $$i[name] (and $$u[name] and etc) for multiple items, so for a WorldEdit /replace command you would set up the macro to be
//replace $i[replacee] $[replacer]
Edit2: Just came up with another idea/suggestion/thing: some kind of variable/state stuff that persists. For example, I want a macro to toggle godmode (where the commands to enable and disable are /god and /ungod respectively) I would use a "state variable" to store my godmode state, so the script would look something like
As a condition: The movement state of the player (standing, running, jumping, sprinting), the current time (in game and wall clock time) and for 1.9 any effects affecting the player
All good suggestions, I'm adding all these to my list now :smile.gif:
As a suggestion: A way to delete/rename scripts/files (and perhaps a dedicated directory for the files)
For 0.6 I've opted for a directory under the "mods" directory (I've seen other mods that do this and it seems logical) and upgrading from 0.5 to 0.6 will move the list files into this directory. Obviously scripts will have to be moved manually, and the folder can be configured in macros.txt. Deleting and renaming is certainly possible so I'll add that to the wish list.
And this is mostly scripting stuff but:
Variables, functions, math (:tongue.gif:), importing other scripts, and perhaps some additional events to trigger macros: like onHealthChange or onHungerChange (although that might be stepping a bit out of the scope of the plugin). But if you plan on implementing all that you may just want to use an already existing scripting language (lua, jython, jruby, groovy)
I'm trying to keep a tight reign on myself with scripting, and I have a few key goals: 1) Keep the base syntax simple; I want to balance power against making this accessible to people who maybe wouldn't normally be comfortable with scripting. This means making scripts quite forgiving in terms of their parsing: the current behaviour allows script entries to be separated with semicolons, pipes, or newlines (in files), functions which don't require parameters can be entered without an empty (), and parameters only need to be wrapped in quotes if there are commas in them. 2) Stay within the core mandate of the mod and just push that to be as good as possible, this is about making keybinds and allowing people to automate things they can already do. There are plenty of mods which add new stuff to the game and I don't want to stray into that territory, I've always felt that feature creep is one of the biggest problems with software, and as a full time developer I've seen the effects it can have. 3) Keep the scripting stable and lightweight and don't create a whole engine-within-an-engine scenario with something big and unweildy, this doesn't really help anyone at the end of the day. Sorry don't mean to sound negative but I just wanted to be unambiguous about where I'm heading.
With that in mind: Variables: yes, but probably limited to flags to support toggles, and preset global variables that essentially substitute things like player's name, status, time, etc. Functions: No, however the macro parser is extensible so people with a little java knowledge can write their own functions anyway and put them in their game. Maths: probably not. Importing other scripts: is already possible, just use $$<filename.txt>. Includes are processed first when compiling macros. Additional events: again probably not, although when conditionals are added you could simulate this with loops. But this strays away from the core mechanic of the mod. With that said, I do have some other ideas which might make this quite possible, although not in the way you think. Watch this space. :wink.gif:
Could you perhaps allow for $$i[name] (and $$u[name] and etc) for multiple items, so for a WorldEdit /replace command you would set up the macro to be
//replace $i[replacee] $[replacer]
I'm considering overhauling the macro processor itself as the compile stages are getting a bit tangled. In the longer run I'd like to increase the focus on named params (as these are handled in a much more extensible way) but specify additional directives within them so you could specify a type in the named param, eg. $$[name] is a generic named param but maybe specify $$[name:i] for a named item param.
Edit2: Just came up with another idea/suggestion/thing: some kind of variable/state stuff that persists. For example, I want a macro to toggle godmode (where the commands to enable and disable are /god and /ungod respectively) I would use a "state variable" to store my godmode state, so the script would look something like
Yep, this is essentially what I was mentioning above with "flag" variables. These could be stored on the template and used to build toggles. Since they'd be the only type of user-accessible variable the syntax could be simplified:
We can basically infer that anything inside an IF that isn't an expression is a flag name, and likewise anything inside set or unset is too. This is just an example but gives you an idea of how the conditionals are likely to work.
Thanks for your ideas though, please don't think I don't appreciate your suggestions and ideas. I'm just trying to be really careful with the scripting part to keep it accessible and also quite forgiving, sorry if I sound a bit dismissive.
I would also be very happy of having a simple settings-layout for using with the $$<>-placeholder to allow me to have a customlist similar to those for villages, items etc. so if i have for example WorlEdit and use $$<mobspawn.txt> as bind on L i would have an html-like (or any other way i dont care, but as i dont know much of java as im not in the moddingor programming-scene i just use it to show what i mean) tag put in a txt-file called mob.txt containing a list of commands and my predefined names for those commands and pausing the txt-execution until my input like any other list does, maybe looking like:
mobspawn.txt:
/me spawns some Mobs now
/spawnmob $$<mob.txt>
/me spawned those Mobs
then i would save allways writing those mobnames and it would just look pretty nice too, same would be applyable to regions, common chat messages etc.
You can do this, sort of, if you're happy to re-task the preset text lists as your lists. If you insert a parameter followed by a number from 0 to 9 you will get a list box prompt for the number and you could assign each list to a different task. Sorry if this doesn't do what you need but give it a try :smile.gif:
Another thing I was thinking was a possibility in the list to have it shown a name for a hidden thing. Basically the same way you do the HTML links.
Like Link text And just shows "Link text" but goes to the URL
Yes this is an excellent idea fielded by a few people now, I will definitely put this in 0.7.
Note: I think I found a bug. The mods I have instaled this time are Mod Loader, Optifine, and Macro key
I accidentaly marked both macro key mod keys to the same. And the game crashed and would load into the map/server. only the menu. the key I used was RShift. But it can be a minecraft problem, since Im using 32bits and it crashes easily.
Hope it helps.
I've tried to replicate this in the current version and it doesn't seem to cause a crash, would you like to try it with 0.6 and see if it's still happening?
I've tried $${keydown(mouse1)}$$ with attack,button1 and none work :|
I think you're right, it seems like LWJGL keyboard input under Mac has some random issues. All I can recommend is changing the key to something else and hopefully that should cure the issue.
I need to have a sift through the code but in the current version I don't think that's possible. Minecraft has two different types of binding (both managed through the same class but handled differently), those which use a key up, key down pattern and those which just look for single key presses. Attack is the latter type and I think it gets retriggered by the mouse each tick.
The single key press type can be triggered with the key script command to send a single press, but sending a keydown won't achieve much as Minecraft doesn't use that information. In 0.6 you may fare better as you could put the key command in a loop and make it work that way. There is of course nothing stopping you filling a file with
repeated many times.
That's certainly something I'd be willing to do if people are interested in the base feature set but don't want all the extra functionality. Could I ask whether you'd want a "vanilla" version because of the reduced payload or just because you prefer a less cluttered interface?
The reason I ask is that to achieve a less cluttered interface I can just add some configuration options to turn stuff off. The other would basically require creating a stripped-down version of the mod as a separate entity, which isn't impossible but by the same token isn't as straightforward as it might sound :smile.gif:
If I've completely misunderstood and you just want the ability to use <SHIFT>+<TAB> back, then you can set that in the Minecraft "Controls" screen.
I can dig that, I realise in the name of keeping it easy to use it's become a bit cluttered in places. I'll add an option to slim it down a bit.
Er, yes?
Also, maybe I'm not going about this the right way, but the town lists stay the same for different servers I connect to, specifically a actual server, and a test one we use for addons before going live. Can't really find a way to have two separate lists for the servers, just keyconfigs.
Another thing is that with world edit, if I try and do something along the lines of "//replace $$item" or whatever the argument list name is, that works fine, but another subset of that function for world edit is "//replace 0 1" which replaces air with dirt, but trying to allow for two arguments of the same time in a macro doesn't seem to prompt for a second one.
One last thing, I recently got world edit selection enabled on my server for use with hawk eye and love it, only problem is I keep the set grid pos at mouse position key bound to numpad 1 and 2, which normally are for other mod functions. Since you can now rebind the left and right mouse click buttons, would it be possible to add a mouse hud to the config pane so I could possible bind alt-left click let's say to set a coordinate and alt-right click to the other one?
Oh, and I assume that it's a limitation of minecraft that I can't bind thumb based mouse buttons for the time being without having to go into the mouse software and make them a sort of macro.
Probably the best addon I've yet to use since improved chat has kinda fell by the wayside of maintenance, doing a awesome job here!
Yeah definitely, although I may not be able to get this in 0.6 as I'm close to release and want to make sure the current feature set is properly complete. But I will definitely add this is a future revision. Another handy tip which might help in the short term is that you can edit the towns.png as you like to provide custom icons, I find this helps a lot with finding things at a glance.
No you're absolutely right there currently isn't a way to switch the town lists with the config, and I'll admit I had noticed this before. This isn't hard to do so I'll put in an option to do so.
Replacing multiple parameters with different values is possible to support but currently not supported and here's why: The macros themselves are incrementally compiled as the player provides values for the arguments. It's fully supported to include a file or even a preset string which itself contains parameters and at the point of prompting for these parameter values it's not really feasible to display the current compiled state of the macro so the player knows where the prompted parameter will go (yikes, did that make any sense?). Um, anyway yes you can prompt for the parameters in turn but if substituting left-to-right then with a simple macro it's easy to see where the values go, but in a complex one it may be utterly confusing.
There may be some way around the usability issues, and it may hinge on for example tagging the parameters as they're compiled so they're always prompted in some kind of logical order. Other than that, would a suitable compromise being to add a configuration option (only in the config file) to enable one-by-one replacement for specific types of param? This way those who want the extra functionality and are willing to accept the possibility that it might get confusing can still have it, but it's disabled in general?
Yes that's do-able, again will probably have to wait till after 0.6 though as it's a nontrivial modification.
Of LWJGL actually yes, for some bizarre reason LWJGL's mouse access functions report the correct number of buttons for most mouses yet won't let you actually get events for those buttons :sad.gif:
Thanks, I'm hoping the new features in 0.6 are going to give people something to get excited about as well :smile.gif:
Yes, that's really easy.
Someone actually asked for this before, and as I mentioned to them it's actually a fairly surmountable technical issue but gets quite knotty when trying to think of how to provide a sensible user interface to achieve it! With 0.6 however you can emulate this by binding a key down event to a switch config command, and the key release to another, then putting your alternate functionality in the other config (if that makes sense).
That's the idea! Glad you like it :biggrin.gif:
Thanks :smile.gif:
Your proposed solution to the problem I was having with two different values for essentially the same parameter in world edit is acceptable, the more functionality I can get out of using mod in the end, the better.
Ok, I've added some compiler directives which can be configured in macros.txt to support this. Also added a tiny animation when prompting for consecutive parameters of the same type because otherwise it got very hard to tell what was going on (eg. nothing would actually change visually). I still think it's confusing but if you need the function then it now exists.
Added warps, just need to do some icons :smile.gif:
Hoping to release 0.6 by tomorrow or early next week so all the new functions will be available. Here's a little snippet of the new keybind type available in the new version:
Before I go through the effort of trying to write a script or something for this, Hawekeye Commands is it possible to, with this mod to write something that would prompt for the various parameters listed there, in various combinations? Like, if I wanted to do a general area search I'd just do a small radius search with "/hawkeye r:15 t:1d a:explosion," I could have this script/macro able to do something along those lines, but not be chained to be done always in that order of radius, time and action, or even all of those if I wanted to do just a radius and time search. At the moment it's a lot of parameters that can currently work with this mod, but always have to be there in that order.
Long question short, is it possible to have the order of various arguments change based on the end keystroke? My idea is like I said above /hawkeye parameters but say... I press enter and it quits prompting me for the next variable and processes the command. It'd be something that I think would be a very big tool to help out new moderators and users of hawkeye quickly find what they need without having to have a big command listing webpage open.
EDIT: Thought of a better way to put it, are 'sub-parameters' possible? As in, I could have something like $$actions and clicking a button on that would prompt for a radius, then another would be various actions, then if I wanted to, click return and process actions hawkeye/bightbrother actions or if not, it would keep prompting for parameters until it runs out.
It's posts like this that make me want to keep developing this mod!
You can set the command it sends to fetch homes but warps a slightly different so I added a new parser/discoverer anyway. Obviously there are like over 9,000 "warp" mods out there but I test everything with Bukkit Essentials since they're the most prevailent. Warps now works on $$w with shiny auto-discovery.
And indeed thank you, the fact that people appreciate the mod makes it worth doing :smile.gif:
for you for posting the log. That error is fine, it's a bug in 0.5 but it's wrapped in a try block and doesn't hurt anything. Most likely you've run into a bug I've had people report a few times but not gotten to the bottom of whereby the mod thinks it's in single player mode. Try setting singleplayerenable=1 in the macros.txt and see if it fixes the issue. Alternatively try a different key for the macro activate function and try that in combination with sneak.
I've altered the way that singleplayer/multiplayer detection is done in 0.6 in an effort to work around whatever is causing this.
If it's still broken let me know.
I have a few suggestions/bug reports:
Some way to send the literal text "|" or "$$h" and the like (Perhaps '\')
A list of coordinates be added like the home (and soon warp) list, for to-coordinate teleportation
Loops and conditional statements for the scripting
Some kind of icon pixel art designer thingy, to design our own icons
A way to take a screenshot and use it as an icon
And finally, I use zombe's modpack for flying and such. and I've come across two issues. The first is that zombe's mods display a little message underneath the "Minecraft Beta 1.8.1" tag, and it draws over top of all the macro dialogs. The second, is the zombe's mod sets up a whole bunch of keybinds, since there isn't really a good way to detect the keybinds involved, could some kind of "mark this key as reserved" functionality be added? (Setting the macro to '|' does do this, but it feels kludgey :tongue.gif:)
Edit: Something to make the item selection more manageable, perhaps a searchbox? Or a compacted gridview? Maybe sort it alphabetically.
Capital idea, I'll do that.
Already added to 0.6
Looping is already added to 0.6, however conditionals aren't going to be implemented yet until I a) decide what actual conditional conditions to conditionally condition on and :cool.gif: am totally sure that the new stack push/pop functions which support looping are fully and reliably rock solid, just to avoid layering complexity which might make troubleshooting harder. I fully plan to add conditionals at some point however.
Both of these are damn good ideas and I've added them to the feature wish-list.
Not sure how I can fix this other than maybe drawing my own dialogues with a higher z value. I'll have to look into it. It seems a little inconsiderate of the author of Zombe's mod to draw stuff with a higher z order than a GUI screen.
Already added to 0.6.
Agreed, the item selection does kind of suck, I'll look to improving it.
That's strange indeed, have you got any other mods which might be conflicting? The mod keyboard hook actually works through the same interface used to hoist the main GUI so if you can't get the combo to work then it's unlikely that individual macros will work either, though of course you're welcome to try:
The macros.txt follows a pretty simple format, albeit not one readily conducive to being edited unfortunately. The macro definitions all look like this
So a simple keybind for, say "P", which has keycode 25 would be:
That's basically all you need to initially bind a key, the other lines just store the parameter history and macro flags. Hope this helps.
Just out of interest, when you go into the "Controls" menu, do you see the custom, paginated screen or the original Minecraft one which ends up with keys underneath the "Done" button?
For some conditions, might I suggest:
Oh! Also a few more suggestions:
Some way to select data values (for wool and whatnot)
Set the player's icon (for $$u) to either some representation of their skin, or just their face
Adjust the behaviour of the selection dialogues (or anything with a scrollbar really) when using the mouse wheel to be equivalent to dragging the scrollbar instead of moving between items. (This would probably make the item dialogue a little less tedious). As it turns out, it looks like scrolling actually selects the next/previous item, which is probably a bug
Holy crap, +1 Internets for you. I agree that recent chat messages might be a little... precarious shall we say. But the inventory thing wouldn't be too unmanagable, especially if you say just restricted it to the "hot bar" 9 slots, which is what most people will want I guess. All the others seem totally valid.
The bonus of course with conditionals is the ability to write more general-purpose scripts, the things you have suggested would certainly add a whole dimension of new capability in that arena. Thanks for your suggestions and keep them coming.
The data value thing can be done, although that tends to balloon and I'm not sure if there's a way to detect what the combinations are, I'll have to look into it.
wrt the player icon thing, I actually had this working for friends ages ago but various issues made it a bit unmanagable. I tried caching the files on disk but this just made it worse. That was before the $$u though so I'm tempted to dig up the code and see how it fares this time, since there's a good chance some of the skins will be in memory already.
You're probably right but (personally) I like using mouse wheel to scroll through the entries :biggrin.gif: :biggrin.gif: .... Okay I'll put in an option in the future :wink.gif:
EDIT: Ninja'd trying to reply!
Yes it's a bug and happens if you double-click an entry in a list, then later the same list is shown and you scroll the mouse wheel it "registers" the double-click event again. I have fixed this already :smile.gif:
If you insist :tongue.gif:
As a condition: The movement state of the player (standing, running, jumping, sprinting), the current time (in game and wall clock time) and for 1.9 any effects affecting the player
As a suggestion: A way to delete/rename scripts/files (and perhaps a dedicated directory for the files)
And this is mostly scripting stuff but:
Variables, functions, math (:tongue.gif:), importing other scripts, and perhaps some additional events to trigger macros: like onHealthChange or onHungerChange (although that might be stepping a bit out of the scope of the plugin). But if you plan on implementing all that you may just want to use an already existing scripting language (lua, jython, jruby, groovy)
Edit: Just read through the thread in full, and spotted this:
Could you perhaps allow for $$i[name] (and $$u[name] and etc) for multiple items, so for a WorldEdit /replace command you would set up the macro to be
Edit2: Just came up with another idea/suggestion/thing: some kind of variable/state stuff that persists. For example, I want a macro to toggle godmode (where the commands to enable and disable are /god and /ungod respectively) I would use a "state variable" to store my godmode state, so the script would look something like
and would be bound to, for example, the G key
All good suggestions, I'm adding all these to my list now :smile.gif:
For 0.6 I've opted for a directory under the "mods" directory (I've seen other mods that do this and it seems logical) and upgrading from 0.5 to 0.6 will move the list files into this directory. Obviously scripts will have to be moved manually, and the folder can be configured in macros.txt. Deleting and renaming is certainly possible so I'll add that to the wish list.
I'm trying to keep a tight reign on myself with scripting, and I have a few key goals: 1) Keep the base syntax simple; I want to balance power against making this accessible to people who maybe wouldn't normally be comfortable with scripting. This means making scripts quite forgiving in terms of their parsing: the current behaviour allows script entries to be separated with semicolons, pipes, or newlines (in files), functions which don't require parameters can be entered without an empty (), and parameters only need to be wrapped in quotes if there are commas in them. 2) Stay within the core mandate of the mod and just push that to be as good as possible, this is about making keybinds and allowing people to automate things they can already do. There are plenty of mods which add new stuff to the game and I don't want to stray into that territory, I've always felt that feature creep is one of the biggest problems with software, and as a full time developer I've seen the effects it can have. 3) Keep the scripting stable and lightweight and don't create a whole engine-within-an-engine scenario with something big and unweildy, this doesn't really help anyone at the end of the day. Sorry don't mean to sound negative but I just wanted to be unambiguous about where I'm heading.
With that in mind:
Variables: yes, but probably limited to flags to support toggles, and preset global variables that essentially substitute things like player's name, status, time, etc.
Functions: No, however the macro parser is extensible so people with a little java knowledge can write their own functions anyway and put them in their game.
Maths: probably not.
Importing other scripts: is already possible, just use $$<filename.txt>. Includes are processed first when compiling macros.
Additional events: again probably not, although when conditionals are added you could simulate this with loops. But this strays away from the core mechanic of the mod. With that said, I do have some other ideas which might make this quite possible, although not in the way you think. Watch this space. :wink.gif:
I'm considering overhauling the macro processor itself as the compile stages are getting a bit tangled. In the longer run I'd like to increase the focus on named params (as these are handled in a much more extensible way) but specify additional directives within them so you could specify a type in the named param, eg. $$[name] is a generic named param but maybe specify $$[name:i] for a named item param.
Yep, this is essentially what I was mentioning above with "flag" variables. These could be stored on the template and used to build toggles. Since they'd be the only type of user-accessible variable the syntax could be simplified:
We can basically infer that anything inside an IF that isn't an expression is a flag name, and likewise anything inside set or unset is too. This is just an example but gives you an idea of how the conditionals are likely to work.
Thanks for your ideas though, please don't think I don't appreciate your suggestions and ideas. I'm just trying to be really careful with the scripting part to keep it accessible and also quite forgiving, sorry if I sound a bit dismissive.
You can do this, sort of, if you're happy to re-task the preset text lists as your lists. If you insert a parameter followed by a number from 0 to 9 you will get a list box prompt for the number and you could assign each list to a different task. Sorry if this doesn't do what you need but give it a try :smile.gif:
Why would I be? If you can't find a function it probably means my documention is just crap, which to be fair it is :biggrin.gif:
Already added in 0.6, I've just finished updating the original post so check it out and let me know what you think!
Yes this is an excellent idea fielded by a few people now, I will definitely put this in 0.7.
I've tried to replicate this in the current version and it doesn't seem to cause a crash, would you like to try it with 0.6 and see if it's still happening?