First, this will generally not give you correct values, assuming you're swapping in stat gear for the waltz, since there's no way to see the effects of the stat changes from precast gear before you execute the waltz (even if the stats updated instantly, which they don't).
Second, if you wrote it so that you just hardcoded the relevant stat values, you also need to account for the difference in HP between your curing set and your normal set. If your curing set has less HP, then trying to target an exact cure will waste some of it.
Third, you have to consider the threshold of changing from one waltz tier to the next. If Curing Waltz II cures 400, and Curing Waltz III cures 800, and you're 401 HP below max, which one do you use? The way you've presented it, you use a given cure up until you need strictly more HP cured than it can provide, and then you change to the next higher cure. That tends to be horribly inefficient.
For my own version of auto-selecting waltzes (in my Mote-Utility file, if you're interested), I use a given waltz up until about 50% more than the amount I expect it to cure (so Waltz II for up to 600 HP, Waltz III for up to 1100 HP, etc) so that using a given waltz will tend to at least be 75% efficient. Thus, I don't care about figuring out the exact amount a given waltz will cure since I'm not aiming for an exact match anyway; my target thresholds are just round numbers that I selected myself.
As for the cure spell calculations, you can find them here: https://www.bg-wiki.com/bg/Cure_Formula
This doesn't work.
The Lua gets loaded fine, but it doesn't work.
If I try to use a WS which is not among the mapped ones within my sets it gives me an error "attempting to index field '?' (a nil value)"
This doesn't work either, the lua doesn't get loaded, says it expects a "then" in the first line of your code (but THERE is a 'then'! what does GS mean?!)
My full WS code precast
Spoiler: show
--1 and --2 are the two lines I added, but on the first one it says there's a "then" missing.
I also found an error within Gearswap resources.
The Jig category currently includes only Spectral Jig and Chocobo Jig, but not the recently added Chocobo Jig II.
Should I be the one to correct it locally, or does Byrth have to correct it on the next addon update?
The error is that sets.precast.WS[spell.english] doesn't exist (ie: you don't have any set for that weaponskill), so that when you try to index deeper, with [WeaponskillMode], you're effectively trying to get the value of nil[WeaponskillMode], which is a syntax error.
Rather than:
Test:Code:if sets.precast.WS[spell.english][WeaponskillMode] then equip(sets.precast.WS[spell.english][WeaponskillMode]) end
Of course this also assumes that, if you have a weaponskill defined, you have also defined -all- possible WeaponskillModes as well. It would be safer to write it like this:Code:if sets.precast.WS[spell.english] then equip(sets.precast.WS[spell.english][WeaponskillMode]) end
Although there are various tricks to simplify it, such as:Code:if sets.precast.WS[spell.english] then if sets.precast.WS[spell.english][WeaponskillMode] then equip(sets.precast.WS[spell.english][WeaponskillMode]) else equip(sets.precast.WS[spell.english]) end end
Code:if sets.precast.WS[spell.english] then equip(sets.precast.WS[spell.english][WeaponskillMode] or sets.precast.WS[spell.english]) end
That means you missed the (incorrect) trailing close parenthesis in the example. //if sets.precast.WS[spell.english][WeaponskillMode]) then// should be //if sets.precast.WS[spell.english][WeaponskillMode] then//.Originally Posted by Sechs
This is an interesting problem.
Chocobo Jig II simply doesn't exist at all in libs/res/abilities.lua, though it does exist in libs/resources/abilities.lua. Why we now have two separate directories for resources, I'm not sure, but it appears to be pulling from the /res/ directory now, which is new.
Further, everything from index 381 (Chocobo Jig II) to index 400 is completely different between the two files. Need to add this to the Windower issues tracker.
I tried something similar when I was writing a file. You can't pass a conditional statement to the equip() function, but you can make a dummy variable prior to the function call. i.e. _=sets.precast.ws.... or {} ... equip(_)This doesn't work.Yeah you can, for instance, you can also do this this way....
Code:
if spell.type == 'WeaponSkill' then
equip(sets.precast.WS[spell.english][WeaponSkillMode] or {})
end
There's a stray end parentheses after WeaponskillMode.This doesn't work eitherOriginally Posted by Raelia
Code:
if sets.precast.WS[spell.english][WeaponskillMode]) then
equip(sets.precast.WS[spell.english][WeaponskillMode])
end
there are limitations as to what gearswap can do but i could get as close as posible
thats a good idea but all this is actualy a way for me to learn more about lua(its more of an exparamental idea) i might never use it other then to give me an aproximet value of what its going to heal
this is what i have so far:
http://pastebin.com/bAVjyaXd
but there are things i dont know
1. how to always round down
2. what to put in to the ?? ware the page you posted just says Hard Cap:
3. ho to figure out when to change the Power Floor but i guessed as you can see in my link
Using mote's GS, why am I unable to simply copy/paste the adoulin rule found in the SAM lua onto my MNK one?
If I put adoulin after engage. and before .AM3 for instance, I get errors on the selfmapping lines 420 and 392 (these may vary very slightly from where they appear in the stock selfmappings file because i delete some of the add to chats)
.Adoulin at the end of the set doesn't create an error obviously but it also doesn't work.
Because you didn't look at the function at the bottom of the sam file, get_combat_form() where the value is determined? Or in the two places that that function is called: job_setup() and job_update()?
Edit: Though the mnk file also has the same function and function calls; it just doesn't have anything specifying that Adoulin is a possible combat form (it only uses Footwork as a form).
See, this is why you need to finish an indepth gearswap guide so you can teach a man to fish rather than ask stupid questions.
Edit: I had added the rule at the bottom where the value is determined and I made sure it was called in update but it still returns as a nil value for some reason.
Check the "Mote gearswap docs.txt" file on my github for details on how my gearswap files work (note: it's not a general gearswap guide). It's a bit out of date, though, with certain specific details (general logic is still the same); I need to update that.
I'm getting an error for Gearswap.
Lua error (unknown 1) - ...ram files (x86)/Windower4//addons/libs/resources.lua:74: attempt to concatenate field 'windower_path' (a nil value)
restarting windower doesnt correct it
getting fixed
1. math.floor rounds down from .0 to .4 but at .5 to .9 it rounds up i need it to always round down
2. so whats the value for rate at cap there is no number to use
(cure 1 at cap) Power Floor=600 Rate=Hard Cap: HP Floor=65
Base = floor( (Power - Power Floor) ÷ Rate ) + HP Floor
3. so if power is 99 for cure 1 i would use Power Floor=125 Rate=15 HP Floor=40
-EDIT-
for 1 i was wrong math.floor does not round up
http://wiki.roblox.com/index.php/Fun...ons#math.floor
I've been updating to GS and my mule doesn't have Ghorn but does have Terp. Maybe someone can point out if i'm missing it but Mot's brd.lua file seems to only be viable for ghorn bards. What can I change/add to use +3 instruments?
What you're describing is math.round(). math.floor() simply truncates the decimal portion of the integer.
The fifth scaling rate for Cure 1, above the fourth power cap of 200, is 20. Thus, for every 20 power above 200 you gain +1 HP cured, until you reach the next cap -- 600. Above 600 power, it doesn't matter how much power you add, the total amount cured doesn't change.
There is not "value for rate at cap", because such a question is nonsensical. 'Rate' implies change. When you're at the final cap, there is no more change.
Looking back at your lua code, I also see that you're completely misunderstanding how the scaling functions work. They describe a piece-wise function, not a single multiplier for the current power value.
Suppose you have 99 power from stats, and are casting Cure:
Minimum amount cured is 10. (You will always cure for at least 10 HP, regardless of power.)
Minimum power is 0. Not relevant here, but anything below the minimum power is ignored, and you just cure for the minimum amount.
The first soft cap is at 20 power. We have at least 20 power, so we can use the full scale in this section, which has a rate value of 4.
20 power, at 4 power per HP, gives +5 HP cured. We now have a total of 15 HP cured.
The next soft cap is at 40 power. It describes the rate of change between 20 power and 40 power, at a rate of 4/3 (+3 HP for every 4 power gained).
Since we have over 40 power, we can use the full amount of this section, which comprises 20 power (40 for the second cap - 20 for the first cap). 20 / (4/3) = 15, so we gain another 15 HP cured.
The next cap is at 125 power. We have 99 power, so this is the last section we need to consider.
The scaling rate of the third section is 8.5. Our current power (99) is 59 above the previous soft cap of 40. Thus the amount gained in this section is (59/8.5) = 6.941, truncated to 6, for +6 HP.
Total amount cured: 10 (base) + 5 (first soft cap) + 15 (second soft cap) + 6 (third section) = 36 HP.
In this section of the sets:
Add the relevant instruments to the various song type sets.Code:-- Gear to enhance certain classes of songs. No instruments added here since Gjallarhorn is being used. sets.midcast.Ballad = {legs="Aoidos' Rhing. +2"} sets.midcast.Lullaby = {hands="Brioso Cuffs"} sets.midcast.Madrigal = {head="Aoidos' Calot +2"} sets.midcast.March = {hands="Aoidos' Manchettes +2"} sets.midcast.Minuet = {body="Aoidos' Hongreline +2"} sets.midcast.Minne = {} sets.midcast.Carol = {head="Aoidos' Calot +2", body="Aoidos' Hongreline +2",hands="Aoidos' Manchettes +2", legs="Aoidos' Rhing. +2",feet="Aoidos' Cothrn. +2"} sets.midcast["Sentinel's Scherzo"] = {feet="Aoidos' Cothrn. +2"} sets.midcast['Magic Finale'] = {neck="Wind Torque",waist="Corvax Sash",legs="Aoidos' Rhing. +2"} sets.midcast.Mazurka = {range=info.DaurdablaInstrument}