• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Bug - /face heading fix

Dear MQ2 Deities. I would like to address an issue, and provide the fix.

First the annoyance. Then it's all unicorns and rainbows.

The simplest case to reproduce:
1) /face heading 0 - this points you due North
2) /echo ${Me.Heading.Degrees} to see. It should return 360.00
3) /face heading 360.00 - works fine. This is aka 0.00.
3) /face heading 20. It should turn you 20 degrees to the right. But it doesn't.
4) /echo ${Me.Heading.Degrees} will now show you 340.00 (which is correct - degrees increase clockwise)
5) /face heading 340.00 - whoa whiskey-tango-foxtrot! it spun you around to the other 340.00.

The code converts the degrees float into a range from 0-512, which I presume is how eq stores it.

A value of 0 or 512 corresponds to 0 or 360 degrees.
128 corresponds to 90 deg
256 to 180 deg
384 to 270 deg.

The conversion would be:

1) Degrees mod 360
2) Degrees * 1.422222...and so on.

Old and Busted - Line 2365 MQ2Commands.cpp
C++:
gFaceAngle = Heading / 0.703125f;
if (gFaceAngle >= 512.0f) gFaceAngle -= 512.0f;
if (gFaceAngle<0.0f) gFaceAngle += 512.0f;

New Hotness
C++:
gFaceAngle = Heading % 360.0f;
gFaceAngle *= 1.422222f;

AN
 
Had a chance to look at this. Not going to make any changes, as the gFaceAngle is expecting 512 unit circles, not 360 degrees. Your change can potentially break existing code.

There is a reason your numbers aren't matching. You're inputing 512 "eq" units and converting it to degrees in the output.

Perhaps what we want is a /face command that accepts degrees.
 
Had a chance to look at this. Not going to make any changes, as the gFaceAngle is expecting 512 unit circles, not 360 degrees. Your change can potentially break existing code.

There is a reason your numbers aren't matching. You're inputing 512 "eq" units and converting it to degrees in the output.

Perhaps what we want is a /face command that accepts degrees.
you can /face heading # (which you know and was mentioned before)

would that be different ?
 
To be clear, this is entirely just a matter of convention. The current code is correct in that conventional heading convention dictates that positive heading values indicate "to the west" and negative heading values indicate "to the east" -- where negative is equivalent to greater than 180.

EDIT: I'm wrong about the convention for the definition of "heading", I was thinking of direction angle (which is measured counterclockwise from positive x). But the point here is that you're wanting to change the convention for something that has existed for a while, which is potentially breaking.
 
Last edited:
Bug - /face heading fix

Users who are viewing this thread

Back
Top
Cart