Malarious2008-02-21 11:17:28
Some questions for all those with Zmud knowledge!
1) Is it better to use 1/0 variables (with .5 meaning checking) or to use a stringlist for afflictions?
2) Better to use #forall loop (heard this slows zmud down) or many many if statements.
3) Anything that is particular memory heavy? I know lots of buttons can cause a fair drain because they refresh alot (so I heard).
4) Whats the best way to handle wounds and rupture? I know you want to prry and stance by priority weighted to worst places to have wounds on. But then do you count ruptures as a certain weighting? Like head with 1000 wounds and 3 ruptures is more important than that 5000 wounds on your leg?
5) Whats the best way to make a charybdon_scan? Since the affs can vary is it better to ignore it and just try to catch blind/deaf/paralysis off prompt?
6) Trying to set up a good reckless handler too, instead of just scanning and saying I have max all stats I am reckless (since reckless given without damge will always say yes I am reckless) I wanted to do like insomnia or focus mind once or twice, if theres no drop (or its full after an alarm) then it says I am reckless.
May be more to come!
1) Is it better to use 1/0 variables (with .5 meaning checking) or to use a stringlist for afflictions?
2) Better to use #forall loop (heard this slows zmud down) or many many if statements.
3) Anything that is particular memory heavy? I know lots of buttons can cause a fair drain because they refresh alot (so I heard).
4) Whats the best way to handle wounds and rupture? I know you want to prry and stance by priority weighted to worst places to have wounds on. But then do you count ruptures as a certain weighting? Like head with 1000 wounds and 3 ruptures is more important than that 5000 wounds on your leg?
5) Whats the best way to make a charybdon_scan? Since the affs can vary is it better to ignore it and just try to catch blind/deaf/paralysis off prompt?
6) Trying to set up a good reckless handler too, instead of just scanning and saying I have max all stats I am reckless (since reckless given without damge will always say yes I am reckless) I wanted to do like insomnia or focus mind once or twice, if theres no drop (or its full after an alarm) then it says I am reckless.
May be more to come!
Unknown2008-02-21 12:30:59
1. Using string lists can be slow, depending on how you use them. Variables with single values are faster, but they're typically much more difficult to track and maintain. I use simple variables for certain things, string lists for some things, and data record variables for others. It's sort of a matter of personal preference in your design.
2. Many, many #IF statements can be extremely messy and difficult to change. You can get away with loops, if you make them efficient. For example, don't loop through all afflictions you could have, just on the ones you do have. The latter list should be much smaller, right?
3. Buttons with variables tied to them can be particularly slow. It's best to emulate toggle buttons with aliases that change the text and/or color based on a variable, but don't tie the variable to the button state directly.
4. Sounds like a fair method to me, counting ruptures as a certain weighted amount of wounds for the purposes of stancing and parrying.
5. Some of the affs you can try to catch right away on the prompt, as you say. Others you might catch through symptoms (some people force a "fake" action to determine certain afflictions). Or, you could sip allheale or diagnose.
6. Track the attacks that do damage do you and set a flag to check for recklessness on the next prompt. Reset the flag when your RoA (or whatever) blocks the damage. Reset the flag on every prompt, too, of course.
2. Many, many #IF statements can be extremely messy and difficult to change. You can get away with loops, if you make them efficient. For example, don't loop through all afflictions you could have, just on the ones you do have. The latter list should be much smaller, right?
3. Buttons with variables tied to them can be particularly slow. It's best to emulate toggle buttons with aliases that change the text and/or color based on a variable, but don't tie the variable to the button state directly.
4. Sounds like a fair method to me, counting ruptures as a certain weighted amount of wounds for the purposes of stancing and parrying.
5. Some of the affs you can try to catch right away on the prompt, as you say. Others you might catch through symptoms (some people force a "fake" action to determine certain afflictions). Or, you could sip allheale or diagnose.
6. Track the attacks that do damage do you and set a flag to check for recklessness on the next prompt. Reset the flag when your RoA (or whatever) blocks the damage. Reset the flag on every prompt, too, of course.
Malarious2008-02-21 12:50:59
QUOTE(Zarquan @ Feb 21 2008, 07:30 AM) 488421
1. Using string lists can be slow, depending on how you use them. Variables with single values are faster, but they're typically much more difficult to track and maintain. I use simple variables for certain things, string lists for some things, and data record variables for others. It's sort of a matter of personal preference in your design.
Got examples what is better for what kind of things? Like is system mechanics better as string lists because theres few of them?
2. Many, many #IF statements can be extremely messy and difficult to change. You can get away with loops, if you make them efficient. For example, don't loop through all afflictions you could have, just on the ones you do have. The latter list should be much smaller, right?
hmm like.. #forall @myafflictions {#if (%ismember( %i, @... ok no not sure how to finish that.. either #forall or maybe... #loop {@myafflictions} {%val}? Where the value for the affliction is always its primary cure (or primary cure alias as it wouldlikely be, since the alias can check for its own balance) and the key is always the aff name? Or is there a way to get it to compare my affs to a main database that has all the affs and all the cures in a short but working term?
EDIT: What about.. #forall @myafflcitions {#if (%ismember( %i, @herbcure)) {herbscan} etc.
3. Buttons with variables tied to them can be particularly slow. It's best to emulate toggle buttons with aliases that change the text and/or color based on a variable, but don't tie the variable to the button state directly.
Have a good place to read about how to work on buttons? thats outside my current knowledge
5. Some of the affs you can try to catch right away on the prompt, as you say. Others you might catch through symptoms (some people force a "fake" action to determine certain afflictions). Or, you could sip allheale or diagnose.
Will have to work on some checks, most things arent too bad and to focus on what you got could slow things down always using diag
Got examples what is better for what kind of things? Like is system mechanics better as string lists because theres few of them?
2. Many, many #IF statements can be extremely messy and difficult to change. You can get away with loops, if you make them efficient. For example, don't loop through all afflictions you could have, just on the ones you do have. The latter list should be much smaller, right?
hmm like.. #forall @myafflictions {#if (%ismember( %i, @... ok no not sure how to finish that.. either #forall or maybe... #loop {@myafflictions} {%val}? Where the value for the affliction is always its primary cure (or primary cure alias as it wouldlikely be, since the alias can check for its own balance) and the key is always the aff name? Or is there a way to get it to compare my affs to a main database that has all the affs and all the cures in a short but working term?
EDIT: What about.. #forall @myafflcitions {#if (%ismember( %i, @herbcure)) {herbscan} etc.
3. Buttons with variables tied to them can be particularly slow. It's best to emulate toggle buttons with aliases that change the text and/or color based on a variable, but don't tie the variable to the button state directly.
Have a good place to read about how to work on buttons? thats outside my current knowledge
5. Some of the affs you can try to catch right away on the prompt, as you say. Others you might catch through symptoms (some people force a "fake" action to determine certain afflictions). Or, you could sip allheale or diagnose.
Will have to work on some checks, most things arent too bad and to focus on what you got could slow things down always using diag
Oh!
Whats a good way to handle focus mind and allheale in a way they arent used on every affliction but will always fire when the normal cure is unavailable? Like if I have stupidity but pennyroyal is used to focus mind.. would I put that at the end of each of the scans so that like #if (%ismember( stupidity, @myafflictions)) {#if (@herbbalance) {penny} {focus mind}}?
Malarious2008-02-21 13:00:33
Oh and does making your triggers #regex instead of normal #trig speed it up any?
Catarin2008-02-21 13:07:26
This may be an obvious question but...why in the name of all that is holy are you building a system from scratch in Zmud if you're this concerned about performance? Cmud is optimized for speed. And if you're building from scratch anyway you are unlikely to run into the problems you may run into if you try to import a zmud system to it or if you go in with a lot of preconceived notions about how you need to do what you want to do.
Malarious2008-02-21 13:41:15
QUOTE(Catarin @ Feb 21 2008, 08:07 AM) 488427
This may be an obvious question but...why in the name of all that is holy are you building a system from scratch in Zmud if you're this concerned about performance? Cmud is optimized for speed. And if you're building from scratch anyway you are unlikely to run into the problems you may run into if you try to import a zmud system to it or if you go in with a lot of preconceived notions about how you need to do what you want to do.
Not familiar with Cmud, other than I know aliass get harder to use in some random ways (heard you cant just have a %1 you have to * it or something?). Bit more confusing of an interface when I checked it out, not quite as simple looking and matchable to myself. However if my Zmud system goes well, or works well but is slow I will go to Cmud. Cmud actually compiles the triggers after they are used once so its always faster after that doesnt it?
If you could highlight the pros and cons they have for it I would be greatly appreciative? I have used Cmud only a few times, and havent liked it like I like ZMud. I presume you can do all the same stuff if not more, I just wouldnt be as sure how to do it.
Ilyarin2008-02-21 14:22:55
I spent a lot of time flip-flopping between cMUD and zMUD, becaus the latter had a very homey feel to it that was comfortable. However, I can assure you that it is far better to take the plunge and feel out of your depth for a few days, because cMUD is far superior to zMUD in terms of speed and functionality.
Malarious2008-02-21 14:41:39
QUOTE(Ilyarin @ Feb 21 2008, 09:22 AM) 488434
I spent a lot of time flip-flopping between cMUD and zMUD, becaus the latter had a very homey feel to it that was comfortable. However, I can assure you that it is far better to take the plunge and feel out of your depth for a few days, because cMUD is far superior to zMUD in terms of speed and functionality.
Hmmm ok presuming I use Cmud I have
1) Is it better to use #switch, or #forall, or #loop in Cmud? If it precompiles I could see loop and forall being alot faster than in zmud.
2) Other than #switch isnt there another new command or two?
3) What exacty is a Cmud function? Anyone an example of what one looks like?
Catarin2008-02-21 14:48:09
QUOTE(Malarious @ Feb 21 2008, 06:41 AM) 488430
Not familiar with Cmud, other than I know aliass get harder to use in some random ways (heard you cant just have a %1 you have to * it or something?). Bit more confusing of an interface when I checked it out, not quite as simple looking and matchable to myself. However if my Zmud system goes well, or works well but is slow I will go to Cmud. Cmud actually compiles the triggers after they are used once so its always faster after that doesnt it?
If you could highlight the pros and cons they have for it I would be greatly appreciative? I have used Cmud only a few times, and havent liked it like I like ZMud. I presume you can do all the same stuff if not more, I just wouldnt be as sure how to do it.
If you could highlight the pros and cons they have for it I would be greatly appreciative? I have used Cmud only a few times, and havent liked it like I like ZMud. I presume you can do all the same stuff if not more, I just wouldnt be as sure how to do it.
If you are familiar with zmud, cmud is not a huge leap. It does force you to use cleaner syntax and "hacks" that worked in zmud won't work in cmud. The basics are all the same. The settings editor actually is better than zmud's (though there are some lingering bugs with it that can sometimes be annoying). Im not sure what you're referring to with aliases? I don't recall any major difference in how they operate from zmud excepting that you can now use local variables with them for cleaner code. I'd recommend you dive deeper into how Cmud works and how much of a learning curve you would really have rather than just take others' word for it. It really is not that much different than zmud in terms of how the basics work.
The functionality is just flat out better. Events, switch statements, local variables, etc. Very, very useful once you determine how to use them. Expression triggers work far better than they did in zmud. It processes variables (especially string lists and data record variables) far more quickly then in zmud allowing you to have both clean script without sacrificing speed.
You are building a brand new system. You are learning how best to do that anyway. In the short term, Zmud benefits you because it's familiar and comfortable. In the long run, Cmud will benefit you because it's the better platform. If you build a complete system in zmud and then try and move it over to Cmud you are just inviting a major headache and most of the problems that those who try to make the switch encounter.
Unknown2008-02-21 15:01:08
I agree with Ilyarin and Catarin 100%. If you have a license for CMUD, or are considering getting one, you should definitely use it to code your new combat system.
It is many times faster than zMUD when it comes to script execution. For example, string lists and data record variables in zMUD are stored internally as strings, which is highly inefficient (unfortunately, I didn't know that when I wrote all my code, but some things are still lots easier with them). In CMUD, string lists and data record variables are stored as the proper hashtable data structure internally, making them many times faster.
Read the help files and post on the Zuggsoft forums. Start with the page on differences between zMUD and CMUD. You'll learn all about new commands, real functions, local variables, Lua, events, packages, and all that cool stuff that may scare you at first.
It is many times faster than zMUD when it comes to script execution. For example, string lists and data record variables in zMUD are stored internally as strings, which is highly inefficient (unfortunately, I didn't know that when I wrote all my code, but some things are still lots easier with them). In CMUD, string lists and data record variables are stored as the proper hashtable data structure internally, making them many times faster.
Read the help files and post on the Zuggsoft forums. Start with the page on differences between zMUD and CMUD. You'll learn all about new commands, real functions, local variables, Lua, events, packages, and all that cool stuff that may scare you at first.
Catarin2008-02-21 15:01:46
QUOTE(Malarious @ Feb 21 2008, 07:41 AM) 488435
Hmmm ok presuming I use Cmud I have
1) Is it better to use #switch, or #forall, or #loop in Cmud? If it precompiles I could see loop and forall being alot faster than in zmud.
2) Other than #switch isnt there another new command or two?
3) What exacty is a Cmud function? Anyone an example of what one looks like?
1) Is it better to use #switch, or #forall, or #loop in Cmud? If it precompiles I could see loop and forall being alot faster than in zmud.
2) Other than #switch isnt there another new command or two?
3) What exacty is a Cmud function? Anyone an example of what one looks like?
What is better is completely dependent on what you're trying to do. #FORALL and #LOOPDB are both much faster in CMUD then in Zmud due primarily to how Zugg handles string lists and data records in CMUD as opposed to Zmud. As long as you're not using them on something like your prompt, they will not slow you down. (Another nice thing about CMUD is that with the debugger window you can actually *see* how long it is taking various portions of your scripts to run making it easy to identify slow parts). #SWITCH is primarily a replacement for those annoying nested #IF statements.
There are other commands and features that are new to CMUD. I'd recommend taking a look at the "Changes for Zmud Users" section of the help or look at this page.
A CMUD function is much like a function in any other programming language if you're familiar with that. A simple example of a function is this:
CODE
#FUNCTION noEat {#IF (@Anorexia || @SlitThroat || @ThroatLock || @WindPipe) {#RETURN 1} {#RETURN 0}}
Now, let's say you wanted to call this function anytime you wanted to see if you could eat or not. You would just do something like this:
CODE
#IF (@noEat() == 0) {#echo Go ahead and eat!}
Functions don't have to return a value. You can just use them to break up your code into more readable chunks and not repeat things unnecessarily. They can take arguments and such. In that sense they are something like what some used aliases that were only ever called internally for in zmud.
Kharaen2008-02-21 15:15:19
CMUD changes up things a lot (like not being able to use complex alias' as a variable, having to use %params for alias, change in MXP coding..) but it's also a LOT faster. For some reason ZMUD lags me to hell, and I end up dying in slow motion with no jamming on the keys that will stop the process (swarm of any of two mobs, and more, is like instakill.)
Xenthos2008-02-21 15:19:03
QUOTE(Kharaen d @ Feb 21 2008, 10:15 AM) 488445
CMUD changes up things a lot (like not being able to use complex alias' as a variable, having to use %params for alias, change in MXP coding..) but it's also a LOT faster. For some reason ZMUD lags me to hell, and I end up dying in slow motion with no jamming on the keys that will stop the process (swarm of any of two mobs, and more, is like instakill.)
That sounds more like some conflicting trigger issues, or a really bad computer... while zMud does have some speed issues, it doesn't seem to get that bad generally. However, large group fights with a complex system can pretty easily slow it down.
Malarious2008-02-23 20:10:50
Ok going to try it in Cmud >.> and I will ask for help if needed!
Malarious2008-02-23 21:09:59
Oh
For Cmud:
- Are Forall loops still slow? Figure a #forall that calls #swtch alias would make things efficient and readable as it would cover everything easily and quickly, and know what it can cover. #forall runs through all my affs and if I have the bal uses it, since its a switch if if runs into something it can do it shoudl ignore everything after, so it wont run through the whole loop.
- Stringlists easier to handle than normal vars still? Since you can just clear the list to remove all affs, etc. Although %ismember( is a bit more beastly than @variable = 1 but it still would only require the one var, and its easier to check affs and clear the list.
-Rest of the quetions I forgot
For Cmud:
- Are Forall loops still slow? Figure a #forall that calls #swtch alias would make things efficient and readable as it would cover everything easily and quickly, and know what it can cover. #forall runs through all my affs and if I have the bal uses it, since its a switch if if runs into something it can do it shoudl ignore everything after, so it wont run through the whole loop.
- Stringlists easier to handle than normal vars still? Since you can just clear the list to remove all affs, etc. Although %ismember( is a bit more beastly than @variable = 1 but it still would only require the one var, and its easier to check affs and clear the list.
-Rest of the quetions I forgot
Unknown2008-02-23 21:52:03
String lists and data record variables are LOTS faster in CMUD than in zMUD, if you're using 2.18. Version 1.34 was before the advancements, so I don't recommend it, even though others will swear by it.
All scripts will be faster, in general, simply because CMUD actually compiles them all. Compiled scripts will run faster 99% of the time.
All scripts will be faster, in general, simply because CMUD actually compiles them all. Compiled scripts will run faster 99% of the time.
Malarious2008-02-23 22:33:16
So would you suggest #forall leading into #switch? Or try to use a database where th values are the cure types, so if i have the key call value whichw ould check if it has bal and all?
Ex:
#if (%val matches myafflcition) {%key}
so it would call the cure alias which is in the key?
Or shoudl I leave it another way so I can try to handle multiple cure methods?
Ex:
#if (%val matches myafflcition) {%key}
so it would call the cure alias which is in the key?
Or shoudl I leave it another way so I can try to handle multiple cure methods?
Unknown2008-02-24 13:31:47
I use data record variables for tracking afflictions and defenses. I use string lists to prioritize the curing orders. I also use data record variables for looking up the cures, by balance types. You have a copy of Palisade, so you should be able to see how I did it there. It's a similar concept in my CMUD system.
Using #FORALL is good, but you want to try and loop as few times as possible and avoid nesting loops. As I mentioned before, some systems will loop through all possible afflictions (or use #IF or #SWITCH to check every single one) rather than simply looping through the current list of afflictions. The latter will be much, much smaller and therefore the loop is tighter.
Using #FORALL is good, but you want to try and loop as few times as possible and avoid nesting loops. As I mentioned before, some systems will loop through all possible afflictions (or use #IF or #SWITCH to check every single one) rather than simply looping through the current list of afflictions. The latter will be much, much smaller and therefore the loop is tighter.