Working on new Addon: GuildRosterExport - Need Advice
Posted: Fri Feb 09, 2018 10:14 pm
by foghladha
Greetings Mod Maker Extraordinaires!
I'm a bit of a mod making novice. I've made a few mods in the past that have been loved (GoIgnoreYourself, Unbearable, LetMeSpeak to name a few) but im no expert at LUA or mod making. I'm just a hack that gets lucky when I find pieces of something else that works when I put them together.
The Project
I'm trying to write a mod that a user can type "/dumpguild" and the game will take the data from GetGuildMemberData() and export it into a saved file named "guild.xml", "guild.lua", or even better "guild.json". It should be a fairly simple script but it's been years since i last LUAed and i'm a bit rusty.
Any pros know how i can take GetGuildMemberData() and export it to a text file?
Re: Working on new Addon: GuildRosterExport - Need Advice
use /dumpguild and it'll export the guildlist to a file under "logs/GExport.txt"
thou it will have timestamps (wich is a tradeoff for using the textlog saving), but you can probably make something to sub them out in post
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sat Feb 10, 2018 5:15 pm
by foghladha
Thanks! Its an awesome head start!
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sat Feb 10, 2018 9:17 pm
by Glorian
Great. Will check it out.
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sat Feb 10, 2018 9:48 pm
by sullemunk
how do you want/need the output format to be?
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sat Feb 10, 2018 11:36 pm
by ragafury
is it possible to make a 2nd command for extended data? (class,level, title, special etc.) seperated by " ; " for easy excel import?
thanks!
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sun Feb 11, 2018 12:07 am
by sullemunk
added another command: /dumpguild2 wich will output the guildlist with additional info on each memmber to GExport2.txt, (it also has line breaking but some text editors won't show them; ex: notepad, but wordpad will, aslo if opening it into excel, don't seperate with spacing)
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sun Feb 11, 2018 12:44 am
by Glorian
Very Nice. Got it working and with semicolons seperation in Excel works qite good if you go to excel first and then select Data-Import.
As this might not be possible but Account name would be a great extra information. So I can see what chars each player has at his disposal. But I think this maybe stored in another table. I dont know though.
Re: Working on new Addon: GuildRosterExport - Need Advice
Posted: Sun Feb 11, 2018 1:07 am
by ragafury
that was fast. :O
many thanks. that makes stuff really easy now.
Spoiler:
other question not concerning this addon, but a "feature" I was used to have in WoW for warband / raidmanagement.
Is there a possibility to make something like a "Have a break, have a kit kat addon?"
was always handy in WoW. can broadcast a timer (e.g 5mins), everybody gets a 5 min countdown on his UI, and there was a possibility for ready checks (warband leader requests status, players can check a box or type a command and confirm that they are ready (or not), if they don't "awnser" in ~20 seconds you get a negative feedback, like "afk").
for k in pairs(GuildMember) do
nisse = nisse..""..tostring(GuildMember[k].memberID).."|"..tostring(GuildMember[k].name).."|"..tostring(GuildMember[k].rank).."|"..tostring(GuildMember[k].careerString).."|"..tostring(GuildMember[k].statusNumber).."|"..tostring(GuildMember[k].titleString).."|"..tostring(GuildMember[k].lastLoginNumberYear).."-"..tostring(GuildMember[k].lastLoginNumberMonth).."-"..tostring(GuildMember[k].lastLoginNumberDay).."\n"
end
TextLogAddEntry("Export", 1245, towstring(nisse))
TextLogSaveLog("Export")
TextLogSetIncrementalSaving("Export", false, L"logs/export.txt")
EA_ChatWindow.Print(L"GuildRoster Exported to logs/export.txt")
end