Recent Topics

Ads

Working on new Addon: GuildRosterExport - Need Advice

Here you can post addons, or anything related to addons.
Forum rules
Before posting on this forum, be sure to read the Terms of Use
User avatar
foghladha
Posts: 86
Contact:

Working on new Addon: GuildRosterExport - Need Advice

Post#1 » Fri Feb 09, 2018 10:14 pm

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?
Foghladha
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter

Ads
User avatar
sullemunk
Addon Developer
Posts: 1213

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#2 » Sat Feb 10, 2018 9:53 am

here you go:

https://www.dropbox.com/s/uwidfxvgogz0v ... 0.zip?dl=0

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
Image
Image Ethreal   Image Corque   Image Urgiz   Image Loxley   Image Chilli   Image Maduza

User avatar
foghladha
Posts: 86
Contact:

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#3 » Sat Feb 10, 2018 5:15 pm

Thanks! Its an awesome head start!
Foghladha
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter

User avatar
Glorian
Posts: 4980

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#4 » Sat Feb 10, 2018 9:17 pm

Great. Will check it out.

User avatar
sullemunk
Addon Developer
Posts: 1213

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#5 » Sat Feb 10, 2018 9:48 pm

how do you want/need the output format to be?
Image
Image Ethreal   Image Corque   Image Urgiz   Image Loxley   Image Chilli   Image Maduza

User avatar
ragafury
Posts: 684

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#6 » Sat Feb 10, 2018 11:36 pm

is it possible to make a 2nd command for extended data? (class,level, title, special etc.) seperated by " ; " for easy excel import?

thanks!
--- inactive ---
---guildless---

User avatar
sullemunk
Addon Developer
Posts: 1213

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#7 » Sun Feb 11, 2018 12:07 am

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)


https://www.dropbox.com/s/rsf8mxbmpdqxh ... 1.zip?dl=0
Image
Image Ethreal   Image Corque   Image Urgiz   Image Loxley   Image Chilli   Image Maduza

User avatar
Glorian
Posts: 4980

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#8 » Sun Feb 11, 2018 12:44 am

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.

Ads
User avatar
ragafury
Posts: 684

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#9 » Sun Feb 11, 2018 1:07 am

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").

only handy for bigger grps, but still handy.

https://i.imgur.com/1Zlx2LX.png

yes, I know, godtier visualisation.

Thanks again!
--- inactive ---
---guildless---

User avatar
foghladha
Posts: 86
Contact:

Re: Working on new Addon: GuildRosterExport - Need Advice

Post#10 » Sun Feb 11, 2018 9:10 am

I've made some upgrades to the mod on my end to export even more data.

My Modified Version GExport.lua:
---------------------------------------------------
function GExport.Export(input)

GuildMember = GetGuildMemberData()
TextLogDestroy("Export")
TextLogCreate("Export", 300)
TextLogSetEnabled("Export", true)
LogDisplaySetShowTimestamp("Export", false)
LogDisplaySetShowLogName("Export", false)
TextLogSetIncrementalSaving("Export", true, L"logs/export.txt")

nisse = "|"..tostring(GameData.Guild.m_GuildID).."|"..tostring(GameData.Guild.m_GuildName).."|"..tostring(GameData.Guild.m_GuildRank).."|"..tostring(GameData.Guild.m_GuildRenown).."|"..tostring(GameData.Guild.m_GuildExpCurrent).."|"..tostring(GameData.Guild.m_GuildExpNeeded).."\n"

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

---------------------------------------------------

I was wondering if anyone new a way to pull the current renown and exp of each player in the roster.
Foghladha
Founder & Activities Director
Gaiscioch Social Gaming Community
Discord | Twitch | YouTube | Twitter

Who is online

Users browsing this forum: Corander and 66 guests