Close
Showing results 1 to 9 of 9
  1. #1

    Default Writing gamedata to a file

    ola,

    Does anybody knows a place where i can find some example code of how to write out game data to a file? The output format doesn't really matter. Maybe there is an addon who already does this (that i couldn't find).

    The reason for this is that i want 2 things:
    -write data to a database for detailed statistics I can work with outside the game (no clear idea on what and how yet)
    -make my own assistant that runs outside the game (this app would read the data from this file and give me certain warnings, most likely audio). As far as i know this should not violate the blizzard policy; but any confirmation on this would be cool.

    A simple example for the last one could be a cooldown for fire elemental totem: when the cooldown starts the info is written to a file, my app reads the file and does the math and plays a 'You can now use your fire totem again' song.

    Another thing could be a note function for certain bosses: whenever i target a mob, the name of that mob is written to a file, my app pics it up and plays the notes i made last time.

    Those are 2 things i find useful as we speak. I know there are addons that offer me the same functionality, but i like 1 assistant that i can change myself and that scales with my game progress. In this and 3 months i'll probably have other needs than i have right now. Not to mention that i haven't really thought out all the possibilities.

    I don't have any desire to learn Lua in depth. But i'm familiar enough with other languages to achieve what i want provided I can find a simple way to write game data into a file.

    Anyone some tips on examples?

    cheers
    z
    Everything that is fun in life is either bad for your health, immoral or illegal!

  2. #2

    Default

    My knowledge on this is sketchy at best, but my understanding is that addon LUA files are only written too when you log out.

    I could be completely wrong though
    The Crystal Dawn - Alliance - Khaz'Goroth - US
    Holy Priest (80) : Demonology Warlock (80) : Frost Death Knight (80)
    Protection Paladin (80) : Elemental Shaman (80) : Arcane Mage (80)
    Combat Rogue (80) : Cat Druid (80) : Elemental Shaman (80)

    Restoration Druid (72) : Elemental Shaman (70) : Discipline Priest (67)
    Beast Mastery Hunter (71) : Combat Rogue (74)


  3. #3

    Default

    I don't think it's possible to do this with the WoW API because if such features existed, they could be used for automation, and Blizzard doesn't want that to happen.
    �Author of HotkeyNet and Mojo

  4. #4

    Default

    Quote Originally Posted by Gorkette View Post
    My knowledge on this is sketchy at best, but my understanding is that addon LUA files are only written too when you log out.

    I could be completely wrong though

    This is correct. Further, you don't just write to files, you basically just dump the state of specified variables. This is a bit more limited than writing an arbitrary file but good enough if all you want is data.
    .... The H Team
    Level 80 Orc Warlocks - affliction - that's not rain, it's dots falling from the sky
    Wahid
    Ithnain
    Thalatha
    Arbaa

  5. #5

    Default

    There are ways to do what you want in game. At least the example you give. Spell Alerts, Timers, there are a slew of addon's that track gold and item collection (wowhead, curse addons) As far as I know nothing real time to an external application. Opens up the game to automation in a big way.

  6. #6
    Member Fursphere's Avatar
    Join Date
    Mar 2007
    Location
    Northern California
    Posts
    1026

    Default

    Look at the census mod from warcraftrealms.com
    -Legion of Boom Founder-
    -Retired-

  7. #7

    Default

    Thanks for the replies.

    I found that enabling /combatlog does what i want to a certain extend. It writes the combatlog to /Logs/WoWCombatLog.txt. It doesn't look like it's instant, but there were only a few seconds delay between starting a fight and when the log appeared in the file (output looks like this). I also came across this project, which could save me work at first sight writing the parser and could give me a bunch of extra 'possible' features.

    Even if there is a short delay, that shouldn't be a big issue for the reminder function i want. The log contains timestamps which makes the math easy. For things with longer cooldowns like fire elementals it doesn't have to be on the second.

    Gonna keep an eye on the delay when the data is written to the logfile and will post here.
    Everything that is fun in life is either bad for your health, immoral or illegal!

  8. #8

    Default

    Oh, I thought you wanted real time. I misunderstood you.
    �Author of HotkeyNet and Mojo

  9. #9

    Default

    Yeah that was my first idea. Seems like the delay when the combatlog file gets updated is varying. It updated almost right away when i got back from afk up to 5-6 minutes later on, which will only work for long cool down abilities. For other things i'll need to get used to existing mods/addons. For now i know what to do in my free time with the combat log
    Everything that is fun in life is either bad for your health, immoral or illegal!

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •