When you run inside MCP with deobfuscated code you can't use mods which are linked against the obfuscated classes. The simplest solution is to just use retroguard to deobfuscate the Macros .jar file as well and you should then find that it works as expected.
Ran MCP with a minecraft.jar with your mod. Got about 138 errors.
Not in the short term as that is a big change, and I'm not really sure how it would work. There's no way to know in advance if a parameter is needed and the compiler doesn't have any awareness of the macro's execution. I may try to figure out a way of having late-accessed parameters which aren't inserted until macro execution but at the moment it's just far to big a change to table.
Sorry about that, it's not a "no" but it's definitely a "not any time soon" as it involves a major change to the mod's parser as a whole.
Yeah, I kind of figured, but I thought that I might as well get it out there. No worries
Also: A few more suggestions. You should add the ability to play sounds, both normal minecraft noises and custom sounds that could be placed in a resources/mods/macros folder or something. Also, $$u does not work on players with nicknames (in the ~Name format on the server I play on). If you added a nicknames.txt folder or something of the sort for servers, with the players nickname and his actual name, and have that override the $$u names, that would be awesome.
There was one other thing too, but I can't remember what it was. I'll edit this post if I remember it.
would i be able to change the f keys for the debug and views, i have a laptop with predetermined functions which makes it hard to use those
You can send the function key events using a macro on another key, for example if you wanted to have "switch view" on the X key, bind the X key to this macro:
$${PRESS(F5)}$$
That pumps the raw key event into the LWJGL event buffer to simulate you pressing the F5 key.
Yeah, I kind of figured, but I thought that I might as well get it out there. No worries
Indeed, and I'd like to get to this point but I'd need to introduce a new syntax for essentially pre-processed conditionals, or some kind of hint that the macro should be compiled BEFORE parameters are replaced and since this is a pretty big change it will realistically have to wait.
Also: A few more suggestions. You should add the ability to play sounds, both normal minecraft noises and custom sounds that could be placed in a resources/mods/macros folder or something. Also, $$u does not work on players with nicknames (in the ~Name format on the server I play on). If you added a nicknames.txt folder or something of the sort for servers, with the players nickname and his actual name, and have that override the $$u names, that would be awesome.
The sounds thing I think would be really useful with events so I'll look into that. The nicknames thing has come up before so I'll see what I can come up with. I dislike forcing people to go into editing text files to achieve stuff though so I'd probably have it mapped in-game through a UI. For example display a list of all players on the server and allow the user to just type in a "real" name for those who have nicknames to create the mapping.
This is not possible for version 0.8.5 but maybe mumfrey will add something that will help with that in a later release
Almost certainly, I'm looking into adding some string manipulation functionality, specifically for improved handling of onChat. Expect to see this in a future version.
that wouldn't be all that hard to add though. probably only take one if statement.
I think you're possibly underestimating how complex the key injection routines are. LWJGL stores all key events that are the result of a poll() in a Buffer prior to them being read by the game, it also stores the key pressed states in a separate buffer where they can be read by the isPressed() function. The mod actually deconstructs these buffers in order to process them, and then rebuilds them if any changes were made. This allows me to remove specific events from the buffer (for the override functionality) but also inject new events and states as required. As an optimisation, and to reduce the chance of overrunning the buffer I queue any injected key events and only insert one event per tick. Whilst this may seem overly simplistic, the focus with this section of code was to be very simple and manipulate the buffers as little as possible in order to try to keep things both robust and fast.
The simplest way of providing modifier support would be to add support for events which are able to bypass the single-injected-event limit in order to inject their modifiers in the same tick, but I would also need to provide support in the script parser for the key injection commands and have this passed through to the input processor. Whilst this is perfectly achievable, it's not really under the heading of "one if statement" and would also need some extra checks to (for example) prevent it from triggering any of the macros code which depends on the real state of modifier keys for its functionality.
Hope this goes some way to explain the rather short answer, it's a more complex issue than it may at first appear.
I did it, however I'm not sure it is succesfull - does macro mod have any version info inside ?
You can see the version by looking in ModLoader.txt or by enabling the "debug info" inside the game (in macros settings). 0.8.5 is also easy to recognise since it adds events and therefore has the < and > buttons on the binding screen.
Unfortunately it doesnt work - I have still the old version. I copied macro mod ZIP file into "...\.minecraft\mods" directory. There are only 4 other directories: macros, rei_minimap, wd1966, and WorldEditCUI. No any other ZIP file. What am I doing wrong ? :-(
Did you install the mod using a modpack? If so it's likely that it's been installed inside your minecraft jar rather than in mods. In which case you can do a manual removal like this:
Backup your minecraft.jar file in case this goes wrong and you delete the wrong thing
Open your minecraft.jar with WinRAR or 7Zip
Inside the minecraft.jar delete the mod_Macros.class file.
Navigate into the net folder in your minecraft.jar
Delete the eq2online folder
After doing this it's probably advisable to install the mod into minecraft .jar again by dragging the contents of the .zip into the minecraft.jar. After doing this remove the zip file from "mods" to prevent it being loaded twice.
And have those show up with the icon for the item.
Definitely doable then, I could even make it so that you could name the list (for prompting purposes) by writing it like this:
/give $$u $$[Tool[268,272,267,283,276]]
and I think that realistically, if you were to want to have icons then you'd need some kind of type hint in order for the mod to know what icons to display (can't just assume numbers are items). So for a user maybe:
/tp Mumfrey $$[TP To[Dave,Fred,Bob,Steve]u]
It'd be pretty godawful to read but easy to work with and simple to write, like regexps in that respect.
I currently have a metric ****-tonne of real-life stuff going on which will persist until mid april, so I don't really expect to have 0.9 done until realistically the end of april, I'm actually away for 3 out of the 6 weeks between now and then. I may do another point release between now and then with some of these smaller features included though, just so that people aren't waiting so long between updates. The current state of the mod is pretty damn stable though so I'm happy that at least I'm not leaving users with a sub-par release to deal with in the mean time.
I must say, this is just the best mod I've ever used in minecraft!!
Thank you so much for doing such a great work!
I could find everything that I needed in this mod haha.
=)
Yeah, I kind of figured, but I thought that I might as well get it out there. No worries
Also: A few more suggestions. You should add the ability to play sounds, both normal minecraft noises and custom sounds that could be placed in a resources/mods/macros folder or something. Also, $$u does not work on players with nicknames (in the ~Name format on the server I play on). If you added a nicknames.txt folder or something of the sort for servers, with the players nickname and his actual name, and have that override the $$u names, that would be awesome.
There was one other thing too, but I can't remember what it was. I'll edit this post if I remember it.
This is easy
Bind this to R
And Mumfrey can you make "ITEMNAME" so we can make something like:
Macro/Keybind mod Wiki
This is not possible for version 0.8.5 but maybe mumfrey will add something that will help with that in a later release
Hmm, are you thinking of in-macro-defined selectable lists? Because that's definitely do-able. Some grammar like this?
The block ID from coords thing is definitely doable.
You can send the function key events using a macro on another key, for example if you wanted to have "switch view" on the X key, bind the X key to this macro:
That pumps the raw key event into the LWJGL event buffer to simulate you pressing the F5 key.
That's to be expected, I really meant just use retroguard with the MCP config to deobfuscate the jar. You don't need to fully decompile it.
Indeed, and I'd like to get to this point but I'd need to introduce a new syntax for essentially pre-processed conditionals, or some kind of hint that the macro should be compiled BEFORE parameters are replaced and since this is a pretty big change it will realistically have to wait.
The sounds thing I think would be really useful with events so I'll look into that. The nicknames thing has come up before so I'll see what I can come up with. I dislike forcing people to go into editing text files to achieve stuff though so I'd probably have it mapped in-game through a UI. For example display a list of all players on the server and allow the user to just type in a "real" name for those who have nicknames to create the mapping.
Feel free, I'm always open to suggestions and ideas.
Already added for the next version, someone else already asked for this
Almost certainly, I'm looking into adding some string manipulation functionality, specifically for improved handling of onChat. Expect to see this in a future version.
This is not currently possible, you can send the keys themselves but not with other keypresses.
Delete the old .zip file, replace it with the new .zip file. Achieve success.
that wouldn't be all that hard to add though. probably only take one if statement.
I think you're possibly underestimating how complex the key injection routines are. LWJGL stores all key events that are the result of a poll() in a Buffer prior to them being read by the game, it also stores the key pressed states in a separate buffer where they can be read by the isPressed() function. The mod actually deconstructs these buffers in order to process them, and then rebuilds them if any changes were made. This allows me to remove specific events from the buffer (for the override functionality) but also inject new events and states as required. As an optimisation, and to reduce the chance of overrunning the buffer I queue any injected key events and only insert one event per tick. Whilst this may seem overly simplistic, the focus with this section of code was to be very simple and manipulate the buffers as little as possible in order to try to keep things both robust and fast.
The simplest way of providing modifier support would be to add support for events which are able to bypass the single-injected-event limit in order to inject their modifiers in the same tick, but I would also need to provide support in the script parser for the key injection commands and have this passed through to the input processor. Whilst this is perfectly achievable, it's not really under the heading of "one if statement" and would also need some extra checks to (for example) prevent it from triggering any of the macros code which depends on the real state of modifier keys for its functionality.
Hope this goes some way to explain the rather short answer, it's a more complex issue than it may at first appear.
You can see the version by looking in ModLoader.txt or by enabling the "debug info" inside the game (in macros settings). 0.8.5 is also easy to recognise since it adds events and therefore has the < and > buttons on the binding screen.
Edit: Figured it out, it's in the main controls menu, just click the arrow at the bottom.
Did you install the mod using a modpack? If so it's likely that it's been installed inside your minecraft jar rather than in mods. In which case you can do a manual removal like this:
After doing this it's probably advisable to install the mod into minecraft .jar again by dragging the contents of the .zip into the minecraft.jar. After doing this remove the zip file from "mods" to prevent it being loaded twice.
Yes! exactly what I meant. Also for items aswell
And have those show up with the icon for the item.
Also, do you have an eta for the next version?
No problem, I guessed as much when you said that it still loaded the old version even when the .zip file was present.
Definitely doable then, I could even make it so that you could name the list (for prompting purposes) by writing it like this:
and I think that realistically, if you were to want to have icons then you'd need some kind of type hint in order for the mod to know what icons to display (can't just assume numbers are items). So for a user maybe:
It'd be pretty godawful to read but easy to work with and simple to write, like regexps in that respect.
I currently have a metric ****-tonne of real-life stuff going on which will persist until mid april, so I don't really expect to have 0.9 done until realistically the end of april, I'm actually away for 3 out of the 6 weeks between now and then. I may do another point release between now and then with some of these smaller features included though, just so that people aren't waiting so long between updates. The current state of the mod is pretty damn stable though so I'm happy that at least I'm not leaving users with a sub-par release to deal with in the mean time.
So you've opened up the gui and binded an action to a key? if so, what did you make it do?
will this work?
Also, I've created a thread with some macros. I guess sort of a repository of scripts on google code?
http://www.minecraftforum.net/topic/1107415-macro-keybind-mod-scripts/
Thank you so much for doing such a great work!
I could find everything that I needed in this mod haha.
=)
shows me on server 0 but in Single Player the Normal Seed.
Macro/Keybind mod Wiki