Coming back to this mod from time to time I’m always amazed by the lack of documentation. Fantastically useful...if you’re lucky enough to randomly find the right bit of information.
Thought I’d quickly be able to set up a volume toggle to switch between 0, 50% and 100%, but I can’t even find a variable to test for the master volume. Does this even exist? VOLUME only changes the volume. (from the change list for 0.10.04) RECORDVOLUME, WEATHERVOLUME, BLOCKVOLUME, HOSTILEVOLUME, NEUTRALVOLUME, PLAYERVOLUME, AMBIENTVOLUME only give you the subcategories, not the master volume.
[OK so there is a wiki, but why isn’t it linked in the first post?]
Download the version of the module that matches the current API version of the mod (if you don't know, grab a few of the latest), place them in /macros/modules, and they should be loaded when you start the game (or you will be informed of outdated versions)
Coming back to this mod from time to time I’m always amazed by the lack of documentation. Fantastically useful...if you’re lucky enough to randomly find the right bit of information.
[OK so there is a wiki, but why isn’t it linked in the first post?]
Because that wiki is entirely unofficial i guess and mumfrey cannot guarantee it's accuracy? maybe?
Honestly, the thing about documentation is that if you follow all the change logs and try them out it's pretty easy, but jumping into it from a later date and trying to do something specific without learning the rest isn't so much
The latter is probably why this thread is almost entirely us trying to help new people =P
Oh, about your question, i know it existed, i mapped them out once, but i can't remember
One easyish way would be to use MUSIC and SOUND in parallel, or maybe you already have music turned off?
So I was trying to write a join-warning script, but I am apparently doing it wrong. Can we have a documentation on arrays and stuff? Can we have foreach over array? Can we have error reporting of some sort? Can we have multi-dimensional arrays? Please.
I'd also appreciate if you told me what's wrong with my script, thanks.
So I was trying to write a join-warning script, but I am apparently doing it wrong. Can we have a documentation on arrays and stuff? Can we have foreach over array? Can we have error reporting of some sort? Can we have multi-dimensional arrays? Please.
I'd also appreciate if you told me what's wrong with my script, thanks.
Unlike many other languages, you can NOT nest commands in macros
commands must appear in series, the outermost command is recognised and everything else taken literally (or as variables, if the command expects those)
So the problem would probably be your FOR() loop. which is
FOR(#i, 0, arraysize(&group1[]));
What you should do instead, is either
ArraySize(&group1[],#j)
For(#i,0,%#j%)
Or
ForEach(&group1[],&var)
----
Also i saw you're calling &group1[#i], i believe that should be &group1[%#i%], but if you use the ForEach then that just becomes a &var or %&var% (if you're exploding JOINEDPLAYERS might as well explode &var too to be equal =P)
----
Also split i think expects a string, so you need to mark off the variable there as well
Instead of:
split(",", &people[1], &group1[]);
Try:
Split(",",%&people[1]%,&group1[])
or just
Split(",","dasw1",&group[1])
Multidimensional arrays are not a thing, i don't think
you can't even have mixed arrays (like some string values and some integers and stuff), because every array already has a defined type (note the prefix you give it)
The Meaning of Life, the Universe, and Everything.
Join Date:
11/26/2012
Posts:
53
Member Details
Is there any way to use the RESOURCEPACK / TEXTUREPACK command still? I know it's been taking out but is there a workaround or something else to do the same thing?
Is there any way to use the RESOURCEPACK / TEXTUREPACK command still? I know it's been taking out but is there a workaround or something else to do the same thing?
RESOURCEPACKS is what you want I think, you can give it one or more packs to activate or none to defaultize.
RESOURCEPACKS is what you want I think, you can give it one or more packs to activate or none to defaultize.
Thanks, that worked when I did the following:
$${RESOURCEPACKS(Sphax 128x);}$$
but when I tried the following, it doesn't switch the texture pack. It does do the log message, so the ifcointains works. I want it to switch to a certain texture pack in a certain gamemode on The Hive.
ifcontains(%CHATCLEAN%,"Welcome to Hide and Seek!");
log("%@&prefix% &6Resource pack set to &aSphax 128x&6!");
RESOURCEPACKS("Sphax 128x");
endif;
Is there a place where we can access development builds of Macro/Keybind? If it's posted somewhere and I missed it I apologize, but I'd love to use it and debug as I play.
Hi Mumfrey, I've been using this mod a lot, it's opened up so many possibilities, thanks heaps!
Now, every so often, I run into a bug/minor issue that I think I should mention eventually all at once... but when I get to the forum, I can't think of all of them (no, not that many) so I'll just post things as I find them...
Note: Using Version 0.10.04 for 1.7.2
If using "GUI()" to close/exit an open chest, the chest (always, for me) appears to stay open even though the GUI disappears. Once the chest goes out of sight (or maybe a certain distance away), then it realises, and anything you couldn't 'technically' do while the chest was 'open' (like open your inventory, move items around) gets reverted.
My Example: Open chest with KEY(use), grab items from chest. Use GUI() to exit chest. (Chest looks open). Use GUI(inventory). Move items out of hot-bar into inventory. Use GUI() to close inventory. Walk away until chest 'closes' and suddenly my inventory changes are reverted like I didn't do it...
Note: This was on a multiplayer skyblock server.
Note: I am able to fix this by using PRESS(escape) instead of GUI()
I am using a Mac (so unsure if it's also a Win thing, didn't get around to testing), when I scroll (specifically, using my trackpad, didn't try a mouse) inside text editor files, it works fine. But, in the file editor's list-of-files, scrolling does not work, and neither does the Chat Filter file. For those 2, I have to use the scroll bar.
I have seen this issue raised before (and apparently even fixed in a version), but it still occurs for me. When I get disconnected/kicked/timed-out from a server, and re-join the server, the onJoinGame event does not fire. In my situation, my onJoinGame event continues to run while I play, so when this happens and I re-connect, I see the previous onJoinGame event still running (but not RE-starting / not from 0.0seconds).
This is another one I've seen before, but only with Shears and fishing rods, I think (unless this is different). On the server I play on (untested elsewhere), whatever tool I use (gold sword, diamond pickaxe, etc.) the onItemDurabilityChange event does not fire when using them at all.
This is a question, I found out that FOR loops run at one tick per loop. Why is that? It seems odd that writing the same code out 50 times runs almost instantly, whereas in the FOR loop it can take a second or two... or longer for larger loops... Is it a safety thing?
I know this bug is known, but don't remember how recently. When using LOG(...) anywhere, or MODIFY(...) in the chat filter, any text formatting using the & symbol does not show. The "&_" is hidden, but no formatting actually shows. This does not include TEXTAREA's or LABELS, only the chat stream.
If using "GUI()" to close/exit an open chest, the chest (always, for me) appears to stay open even though the GUI disappears. Once the chest goes out of sight (or maybe a certain distance away), then it realises, and anything you couldn't 'technically' do while the chest was 'open' (like open your inventory, move items around) gets reverted.
My Example: Open chest with KEY(use), grab items from chest. Use GUI() to exit chest. (Chest looks open). Use GUI(inventory). Move items out of hot-bar into inventory. Use GUI() to close inventory. Walk away until chest 'closes' and suddenly my inventory changes are reverted like I didn't do it...
Note: This was on a multiplayer skyblock server.
Note: I am able to fix this by using PRESS(escape) instead of GUI()
Noted, thanks for reporting. I know how to fix that.
I am using a Mac (so unsure if it's also a Win thing, didn't get around to testing), when I scroll (specifically, using my trackpad, didn't try a mouse) inside text editor files, it works fine. But, in the file editor's list-of-files, scrolling does not work, and neither does the Chat Filter file. For those 2, I have to use the scroll bar.
I have seen this issue raised before (and apparently even fixed in a version), but it still occurs for me. When I get disconnected/kicked/timed-out from a server, and re-join the server, the onJoinGame event does not fire. In my situation, my onJoinGame event continues to run while I play, so when this happens and I re-connect, I see the previous onJoinGame event still running (but not RE-starting / not from 0.0seconds).
onJoinGame is handled differently in 1.7.10 so this likely won't be an issue any more.
This is another one I've seen before, but only with Shears and fishing rods, I think (unless this is different). On the server I play on (untested elsewhere), whatever tool I use (gold sword, diamond pickaxe, etc.) the onItemDurabilityChange event does not fire when using them at all.
I've explained this over and over, basically that happens with shears and fishing rods because the durability for those items doesn't change, you actually get a whole new item with lower durability whenever the item takes damage. There's code in there to handle this "special case" for shears and fishing rods. It's likely that a server plugin on the servers in question is doing the same thing for swords/pickaxes. The only way around this is not to rely on the event and just check itemid/damage in a loop.
This is a question, I found out that FOR loops run at one tick per loop. Why is that? It seems odd that writing the same code out 50 times runs almost instantly, whereas in the FOR loop it can take a second or two... or longer for larger loops... Is it a safety thing?
Yes, it's not FOR loops specifically, but a feature in the macro engine. The macro executive pre-empts the script on every stack pop operation (endif, while, loop, next, until) for 1 tick. This is a fixed behaviour so that scripts don't consume too much run time, and is also useful to leverage for things like DO;KEY(use);LOOP where it sends the trigger binding every tick.
You can disable pre-emption for a specific chunk of code by using the UNSAFE ... ENDUNSAFE block which disables script pre-emption entirely aside from a hard-coded time limit (to avoid stuck scripts) and you can tune UNSAFE's behaviour to run a specific number of instructions before yielding, for example UNSAFE(1000) runs 1,000 instructions before yielding for 1 tick. The default is 100, pass in 0 for unlimited.
But just to be clear, it's not loops specifically which yield, but any pop instruction, for example this loop executes in two ticks:
I know this bug is known, but don't remember how recently. When using LOG(...) anywhere, or MODIFY(...) in the chat filter, any text formatting using the & symbol does not show. The "&_" is hidden, but no formatting actually shows. This does not include TEXTAREA's or LABELS, only the chat stream.
I only really focus on multiplayer anyway, if things work in single player I tend to consider it a bonus but this is a primary multiplayer-oriented mod.
The alternative is to write your own crafting procedure using commands such as
GetSlot(item,#var) //looks for item, writes the slot number it is found in to #var
GetSlotID(slot,&item) //looks at slot number <slot>, writes the item id it contains into &item
SlotClick(slot,key,shift) //clicks on the slot, key is "l" for left and "r" for right, shift is true if you want to shift-click, false if not - key and shift are optional, defaults are l and false
This is unlikely to work, but try
Gui(inventory);Wait(4t)
For(#slot,9,44);
SlotClick(%#slot%);Wait(4t)
SlotClick(4);Wait(4t)
SlotClick(0);Wait(4t)
SlotClick(-1);SlotClick(999);Wait(4t) // i can't remember which
Next;
Also, if the server is trying to prevent you from crafting too fast, consider that what you're doing might be considered cheating, ask someone first, make sure!
I got this all installed and working, now can someone please explain to me how to use it ? I am trying to figure out if it even does what I need it to... I have too many mods installed and have run out of keys, is there a way I can use some keys that are already taken by using a modifer key ( Like "Ctrl"). Or maybe have a second keybindings setup ? Then I could switch to the second setup when I needed to use those keys instead of the ones I have already assigned. For instance I could have a second setup for when I am in an Archimede's Ship's Mod ship so I could use its' control even though normally they are conflicting, with a second setup I could could change the conflicting keybinds that i normally need and then when I get out of the ship I could switch back... Is this stuff even possible because not having enough keys is the only reason I got this mod...
any help is appreciated.
Thought I’d quickly be able to set up a volume toggle to switch between 0, 50% and 100%, but I can’t even find a variable to test for the master volume. Does this even exist? VOLUME only changes the volume. (from the change list for 0.10.04) RECORDVOLUME, WEATHERVOLUME, BLOCKVOLUME, HOSTILEVOLUME, NEUTRALVOLUME, PLAYERVOLUME, AMBIENTVOLUME only give you the subcategories, not the master volume.
[OK so there is a wiki, but why isn’t it linked in the first post?]
Download the version of the module that matches the current API version of the mod (if you don't know, grab a few of the latest), place them in /macros/modules, and they should be loaded when you start the game (or you will be informed of outdated versions)
Because that wiki is entirely unofficial i guess and mumfrey cannot guarantee it's accuracy? maybe?
Honestly, the thing about documentation is that if you follow all the change logs and try them out it's pretty easy, but jumping into it from a later date and trying to do something specific without learning the rest isn't so much
The latter is probably why this thread is almost entirely us trying to help new people =P
Oh, about your question, i know it existed, i mapped them out once, but i can't remember
One easyish way would be to use MUSIC and SOUND in parallel, or maybe you already have music turned off?
'Cause tomorrow spring is here
I'd also appreciate if you told me what's wrong with my script, thanks.
Unlike many other languages, you can NOT nest commands in macros
commands must appear in series, the outermost command is recognised and everything else taken literally (or as variables, if the command expects those)
So the problem would probably be your FOR() loop. which is
FOR(#i, 0, arraysize(&group1[]));
What you should do instead, is either
Or
----
Also i saw you're calling &group1[#i], i believe that should be &group1[%#i%], but if you use the ForEach then that just becomes a &var or %&var% (if you're exploding JOINEDPLAYERS might as well explode &var too to be equal =P)
----
Also split i think expects a string, so you need to mark off the variable there as well
Instead of:
split(",", &people[1], &group1[]);
Try:
or just
Multidimensional arrays are not a thing, i don't think
you can't even have mixed arrays (like some string values and some integers and stuff), because every array already has a defined type (note the prefix you give it)
'Cause tomorrow spring is here
RESOURCEPACKS is what you want I think, you can give it one or more packs to activate or none to defaultize.
Thanks, that worked when I did the following: but when I tried the following, it doesn't switch the texture pack. It does do the log message, so the ifcointains works. I want it to switch to a certain texture pack in a certain gamemode on The Hive.
MCP was just released. http://mcp.ocean-labs.de/news.php?extend.14.1
http://www.minecraftforum.net/topic/1868280-172api-liteloader-for-minecraft-172/page__st__1560#entry32453057
Don't reply to them, just hit the report button and then they get removed.
Some don't notice that LiteLoader/Macros are under the same area mostly, and the threads usually don't get checked in tandem.
PC: 2700X | GTX 1080 | 32GB RAM | 2TB SSD + 4TB HDD
Laptop: 2500U | Vega 8 | 8GB RAM | 256GB SSD
...but not mentioned in the OP
so watching this thread closely should be enough (unless it's so secret and in dev. that it goes through some other channels, but as far as i know)
'Cause tomorrow spring is here
So assuming you have no space to receive the sugar, it would go like this for example
$${Do(36);CraftAndWait(sugar,64,true);Loop}$$
'Cause tomorrow spring is here
Now, every so often, I run into a bug/minor issue that I think I should mention eventually all at once... but when I get to the forum, I can't think of all of them (no, not that many) so I'll just post things as I find them...
Note: Using Version 0.10.04 for 1.7.2
Note: This was on a multiplayer skyblock server.
Note: I am able to fix this by using PRESS(escape) instead of GUI()
I think that's enough for now...
Thanks for your hard work!
Noted, thanks for reporting. I know how to fix that.
No idea why that doesn't work, will look into it.
onJoinGame is handled differently in 1.7.10 so this likely won't be an issue any more.
I've explained this over and over, basically that happens with shears and fishing rods because the durability for those items doesn't change, you actually get a whole new item with lower durability whenever the item takes damage. There's code in there to handle this "special case" for shears and fishing rods. It's likely that a server plugin on the servers in question is doing the same thing for swords/pickaxes. The only way around this is not to rely on the event and just check itemid/damage in a loop.
Yes, it's not FOR loops specifically, but a feature in the macro engine. The macro executive pre-empts the script on every stack pop operation (endif, while, loop, next, until) for 1 tick. This is a fixed behaviour so that scripts don't consume too much run time, and is also useful to leverage for things like DO;KEY(use);LOOP where it sends the trigger binding every tick.
You can disable pre-emption for a specific chunk of code by using the UNSAFE ... ENDUNSAFE block which disables script pre-emption entirely aside from a hard-coded time limit (to avoid stuck scripts) and you can tune UNSAFE's behaviour to run a specific number of instructions before yielding, for example UNSAFE(1000) runs 1,000 instructions before yielding for 1 tick. The default is 100, pass in 0 for unlimited.
But just to be clear, it's not loops specifically which yield, but any pop instruction, for example this loop executes in two ticks:
because both ENDIF and LOOP pop an instruction pointer from the stack.
Ok, that's a bug
I only really focus on multiplayer anyway, if things work in single player I tend to consider it a bonus but this is a primary multiplayer-oriented mod.
No problem, thanks for the bug reports.
GetSlot(item,#var) //looks for item, writes the slot number it is found in to #var
GetSlotID(slot,&item) //looks at slot number <slot>, writes the item id it contains into &item
SlotClick(slot,key,shift) //clicks on the slot, key is "l" for left and "r" for right, shift is true if you want to shift-click, false if not - key and shift are optional, defaults are l and false
This is unlikely to work, but try
Also, if the server is trying to prevent you from crafting too fast, consider that what you're doing might be considered cheating, ask someone first, make sure!
'Cause tomorrow spring is here
the focus will be on 1.7.10
no 1.7.9 sorry
you can access 1.7.9 server with 1.7.10