Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lack of understanding #50

Open
andias opened this issue Jul 10, 2014 · 14 comments
Open

lack of understanding #50

andias opened this issue Jul 10, 2014 · 14 comments

Comments

@andias
Copy link

andias commented Jul 10, 2014

Hello sir.
I was wondering if you could help me at all. I once wrote a very simple XML for my dance and id like to know if there is a way to convert it to LUA. I lack the required knowledge to understand LUA for some reason (yet i understand XML). DO you know of a place that has some info for what i need or perhaps if you know what i need could you drop me a message please. Sorry to bother you with such trivia. Thank you kindly in advance.

Andias

@yanosuke
Copy link

Hello Andias,
I've heard of several people about converting an XML to LUA and they seem to have mixed results with it.. Kinematics' scripts are actually quite easy to use.

First off, download his dnc.lua and put in inside your windower->addons->gearswap->data folder.
Second, copy and paste that file in the same folder to make a duplicate. If your character's name is "Andias", you would name this file "andias_DNC_gear.lua". This is the file you will be editing with your own gear.
Third, open up this new 'gear' file. To keep things simple for now, remove everything below the end of the init_gear_sets() function up until the "Select_default_macro_book" function. In Kinematics' most recent version, this means deleting everything below line 366 u to line 629. Deleting these lines will make sure that gearswap uses the functions from the DNC.lua file. So if Kinematics were to update it, you'd have to do nothing on your end.

Finally, look at all those gear sets. Just adjust them to match your own gear as all the names are self-explanatory. You can also adjust the very last portion of the script to make it load your own macros. the first number between () represents the macro pallet, the second the macro book.

Once adjusted, there isn't much left to do. Start up the game and once logged in, gearswap will automatically load your lua whenever you log on or switch to dancer.

This is just the start of it. You can also make some custom macros to make use of the step functions that Kinematics has written. How to use them is explained in the commentary section of the lua. Let me know if you need some more help.

@andias
Copy link
Author

andias commented Jul 10, 2014

thank you for your help, i just have one issue... i only use an engages, acc, eva, various ws sets and i swap in and out bits for ja. how do i basically simplify the gear sets and not screw it all up. All these gear sets are confusing to me... would it help if i sent you my old xml so you can see what i mean and advise me?

On Thursday, 10 July 2014, 10:28, yanosuke notifications@github.com wrote:

Hello Andias,
I've heard of several people about converting an XML to LUA and they seem to have mixed results with it.. Kinematics' scripts are actually quite easy to use.
First off, download his dnc.lua and put in inside your windower->addons->gearswap->data folder.
Second, copy and paste that file in the same folder to make a duplicate. If your character's name is "Andias", you would name this file "andias_DNC_gear.lua". This is the file you will be editing with your own gear.
Third, open up this new 'gear' file. To keep things simple for now, remove everything below the end of the init_gear_sets() function up until the "Select_default_macro_book" function. In Kinematics' most recent version, this means deleting everything below line 366 u to line 629. Deleting these lines will make sure that gearswap uses the functions from the DNC.lua file. So if Kinematics were to update it, you'd have to do nothing on your end.
Finally, look at all those gear sets. Just adjust them to match your own gear as all the names are self-explanatory. You can also adjust the very last portion of the script to make it load your own macros. the first number between () represents the macro pallet, the second the macro book.
Once adjusted, there isn't much left to do. Start up the game and once logged in, gearswap will automatically load your lua whenever you log on or switch to dancer.
This is just the start of it. You can also make some custom macros to make use of the step functions that Kinematics has written. How to use them is explained in the commentary section of the lua. Let me know if you need some more help.

Reply to this email directly or view it on GitHub.

@yanosuke
Copy link

Sure, I can help you with your old file and send you back a new lua. You would still need Kinematics' DNC.lua in the data folder that will not be touched. you can remove any sets that are in the lua that you don't want or need, but I'll take a look at your xml and set it up. It'll give you a good reference for other job files as well.

@andias
Copy link
Author

andias commented Jul 11, 2014

i think i love you. thank you so much, I've given myself a headache trying to work it all out.
https://www.dropbox.com/s/z9y6o6nn69vtb7k/Dnc.xml it's on drop box is that ok?

@yanosuke
Copy link

Ok, I'm heading to bed now and i'll fix you up a personalized dnc lua tomorrow.

@drunkenstyle
Copy link

She said thank you. Had to do some laundry. Sorry about the lateness of the reply.

@andias
Copy link
Author

andias commented Jul 11, 2014

thank you very much

@yanosuke
Copy link

https://www.dropbox.com/s/112vexwzco2uifd/Andias_DNC_gear.lua

Put that in your Windower4->addons->Gearswap->Data folder and make sure you put Kinematics' DNC.lua in there as well.
You should also enable the "Cancel" addon from the addons tab. (not the cancel plugin from the plugin menu). It doesn't have any special gear sets for accuracy or anything, just your tp, WS, and ability stuff that you had in your spellcast file. Kinematic has hardcoded some stuff about curing waltzes that I cannot change for you, but you simply need 1 macro for waltzes. It'll check your or your party member's hp and your tp to see which waltz it would use depending on the situation.

EDIT: Oh yeah, change the "Andias" part of the file name to your character's name.

@andias
Copy link
Author

andias commented Jul 11, 2014

you sir are amazing thank you so much. this is really going to help me understand what i'm missing.

@andias
Copy link
Author

andias commented Jul 11, 2014

would something lie this work as the macro?
if targ then
if player.main_job == 'DNC' then
if missingHP < 40 then
-- not worth curing
add_to_chat(122,'Full HP!')
eventArgs.cancel = true
return
elseif missingHP < 200 then
newWaltz = 'Curing Waltz'
elseif missingHP < 600 then
newWaltz = 'Curing Waltz II'
else
newWaltz = 'Curing Waltz III'
end
elseif player.sub_job == 'DNC' then
if missingHP < 150 then
newWaltz = 'Curing Waltz'
elseif missingHP < 300 then
newWaltz = 'Curing Waltz II'
else
newWaltz = 'Curing Waltz III'
end
else
return
end
end

@yanosuke
Copy link

It's already in it. Though you will not see it in the DNC.lua, it's already coded into one of the includes that the file calls for. Go ahead, jump on DNC and try to cure yourself, you'll see what happens.

@andias
Copy link
Author

andias commented Jul 12, 2014

^.^ i see i see thank you, you have given me my dance back. Thank you

On Friday, 11 July 2014, 20:23, yanosuke notifications@github.com wrote:

It's already in it. Though you will not see it in the DNC.lua, it's already coded into one of the includes that the file calls for. Go ahead, jump on DNC and try to cure yourself, you'll see what happens.

Reply to this email directly or view it on GitHub.

@drunkenstyle
Copy link

Was curious. What do your macros look like for your jobs? Specifically Blue Mage, Samurai and Thief.

@yanosuke
Copy link

Sorry for the late reply. Very late reply.. My macros look very, very simple. Mostly 1 line.
/ja "Hasso" : That's my Hasso macro.
/ws "Tachi: Fudo" is my fudo WS.
/ma "Sleep II" is my sleep macro on SCH.

Gearswap will take care of equipping the gear at the right times as long as you defined which gear to equip in the job specific lua.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants