Spawn ID in eqlogs

Need help running MacroQuest2? Ask your questions about how to get things to work on your computer.

Moderator: MacroQuest Developers

Xdev
orc pawn
orc pawn
Posts: 11
Joined: Tue Mar 01, 2005 5:25 am

Spawn ID in eqlogs

Post by Xdev » Tue Mar 01, 2005 6:27 am

Is there a way to control the eq log ?

For example:
1. i want to add near each mob / player name the sapwn ID.
2. i want to add to the log the spawn entries.


something like:
[Sun Feb 27 23:32:31 2005] Spawn: A spider (sid: 34)
[Sun Feb 27 23:32:35 2005] A spider (sid: 34) hits Nukeme (sid: 12) for 112 points of damage.
[Sun Feb 27 23:32:41 2005] A spider (sid: 34) stares at the ground quietly.
[Sun Feb 27 23:32:46 2005] Despawn: A spider (sid: 34)

Grumpy
a hill giant
a hill giant
Posts: 167
Joined: Sun Nov 10, 2002 4:22 pm

Yes and No

Post by Grumpy » Tue Mar 01, 2005 8:31 am

I'm not going to give you a detailed answer, because I don't know, but:

It's theoretically possible to do almost anything, the main question is, "is it worth the trouble?"

You can hook any function in EQ (that's what all those offsets in eqgame.h are about) and replace it with new code in MQ2 (that's pretty much what MQ2 is all about).. That said...

Chances are, the function in EQ that writes lines of text to the log file is really simple, in fact, it's probably functionally equivalent to the code in MQ2 that handles the /mqlog function. Accept a string, open a file, append the string to the file, close the file, easy stuff.. The problem is, that string doesn't have an references to the data that created the string, so "A spider hits Nukeme for 112 points of damage." doesn't have any references to either "A spider" or "Nukeme", it's just text. So you couldn't just lookup "A spider" and "Nukeme" and add the spawn IDs.

You'd have to go back one more step in the code, to every function in EQ that might write a log entry that contains a spawn name, and change every reference to the "Spawn->Name" to "Spawn->Name (sid: Spawn->ID)", so that it would write your logs for you. This would require a new offset for every function you have to do this for (assuming that the offset is not already required for something in MQ2). Lots and lots of work every patch.

Alternately, you could just hook the function that returns a spawn's name, ad add a little snippet of code that adds the spawn's ID to the name that is returned. This solution however, would most likely break several bits of EQ, and would make every place that now displays a Spawn's name (like floating over every PC's or NPC's head in game, or in all the chat EQ sends to you). And would be VERY detectable (like if you do a /report or /etition in game).

In short, yes, you could do this, but it would likely be vastly more trouble than it was worth.

I could be wrong, if so, one of the devs will likely straighten me out.

User avatar
ieatacid
Developer
Developer
Posts: 2727
Joined: Wed Sep 03, 2003 7:44 pm

Post by ieatacid » Tue Mar 01, 2005 8:50 am

Or just use MQ2Chat -- everything that would normally go to MQ2ChatWnd will go to your log file.

Xdev
orc pawn
orc pawn
Posts: 11
Joined: Tue Mar 01, 2005 5:25 am

Post by Xdev » Tue Mar 01, 2005 7:58 pm

Yeah, like i thought...

Is there any way to get most of the information that go to the logs via the MQ2 API and make alternate log ?

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Tue Mar 01, 2005 10:59 pm

Of course.

Make a plugin, and in OnWriteChatColor, log to file.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Xdev
orc pawn
orc pawn
Posts: 11
Joined: Tue Mar 01, 2005 5:25 am

Post by Xdev » Thu Mar 03, 2005 7:20 pm

Is there any way to get melee battel spam other then parse on OnWriteChatColor ?
I can not get the spawn id of the pc / npc that did the dmg by parsing this....

i can look for the spawn with that name... but it will be just a guess if more then one spawn with the same name.

Any ideas ?

Xdev
orc pawn
orc pawn
Posts: 11
Joined: Tue Mar 01, 2005 5:25 am

Post by Xdev » Sat Mar 05, 2005 11:48 am

/bump

Anyway to get battlespam callbacks with attacker spawn id, action, dmg and the spawn id that was attacked ?

Zeus
a hill giant
a hill giant
Posts: 180
Joined: Wed Feb 19, 2003 10:03 am
Contact:

Post by Zeus » Sat Mar 05, 2005 5:58 pm

Parse chat and write to an output file the info in the format you want.

Xdev
orc pawn
orc pawn
Posts: 11
Joined: Tue Mar 01, 2005 5:25 am

Post by Xdev » Sat Mar 05, 2005 7:35 pm

Zeus wrote:Parse chat and write to an output file the info in the format you want.
I can't do that... if i have NPCs with SAME name, how do i get to know which spawn id they really are ??

Lax
We're not worthy!
We're not worthy!
Posts: 3524
Joined: Thu Oct 17, 2002 1:01 pm
Location: ISBoxer
Contact:

Post by Lax » Sun Mar 06, 2005 1:18 am

You cant. To do that, you have to handle packets or the functions that process them to log to chat.
Lax Lacks
Master of MQ2 Disaster
Purveyor of premium, EULA-safe MMORPG Multiboxing Software
* Multiboxing with ISBoxer: Quick Start Video
* EQPlayNice, WinEQ 2.0

Xdev
orc pawn
orc pawn
Posts: 11
Joined: Tue Mar 01, 2005 5:25 am

Post by Xdev » Sun Mar 06, 2005 2:31 am

Lax wrote:You cant. To do that, you have to handle packets or the functions that process them to log to chat.
Yeah, i understand that, but is it something that is already covered in the MQ2 API ?

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Sun Mar 06, 2005 6:27 am

Considering it is Lax who said you can't, I'm pretty sure that means that there is not a built in function to sniff packets.

I could be wrong, but I doubt it as sniffing packets would be heading into the realm of active hacks.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

mqnewbie
a hill giant
a hill giant
Posts: 193
Joined: Sat May 22, 2004 1:29 am

Post by mqnewbie » Sun Mar 06, 2005 3:18 pm

Sniffing packets wouldn't be, it's just lookin.
Altering them would be however.

xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Spawn ID in eqlogs

Post by xyilla » Thu Apr 17, 2025 7:58 pm


xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Spawn ID in eqlogs

Post by xyilla » Thu Apr 17, 2025 7:59 pm