This is a read-only archive of the Mumble forums.

This website archives and makes accessible historical state. It receives no updates or corrections. It is provided only to keep the information accessible as-is, under their old address.

For up-to-date information please refer to the Mumble website and its linked documentation and other resources. For support please refer to one of our other community/support channels.

Jump to content

Battlefield 3 Positional Audio Plugin after 27.04. Patch


amki
 Share

Recommended Posts

Hiho,


my fellow friend bawki and me found the new offsets needed for Battlefield 3.


The new offsets are:


0x239E420 (X?)

0x239E424 (Y? (Height!))

0x239E428 (Z?)


We also found that the orientation is dynamically allocated (near 0x0239D200 and bigger).


Unfortunately we've had some issues understanding the current Battlefield 3 plugin code (https://github.com/mumble-voip/mumble/blob/master/plugins/bf3/bf3.cpp). Especially: is avatar_pos a float[3] containing x,y,z? (That would explain why there are 12byte read via peekProc()).

What should avatar_top and avatar_front contain? Are both needed or will the x,y,z coordinates of your ingame position suffice?


Cheers

amki

Link to comment
Share on other sites

Server IP and port can be found at:

0x02395298 String[26] ip:port


I am still looking for squad/team information, but that could take a while(and a lucky shot ;)), also we currently do not have a new state offset, would be appreciated if golex can contribute how the values looked before the patch.


update:

0x0238CC2C could be sufficient for a state offset,it sometimes glitches to 4, but 1=loading, 2=game, 3=menu.

since it appears as if you used arbitrary offsets for avatar_front and avatar_top I ignored those and made a patch+updated dll, which I will test today(after catching some sleep).


greetings

Link to comment
Share on other sites

We've found that 0x0239D200 CAN be the player's orientation but it can also be the orientation of another player.

I do not yet quite understand how orientation saving works, I guess there has to be a pointer towards the current player's orientation but I've not yet found it :|

Link to comment
Share on other sites

Hey dudes,


Your status offset was correct, nice work on finding that! For future reference, the start of the player orientation data is exactly 108 bytes (0x6C in hex) below that status offset in BF3 memory. The orientation is stored in a couple of memory aligned Vector3's. After finding the position vectors address, the up vector is 0x20 bytes after it, and the forward vector is 0x10 bytes after the up vector.

Link to comment
Share on other sites

Go for it, I don't play BF3 anymore just keep my plugin updated because a decent # of people use it. If you get the offsets before I do shoot me an email so I can just update my plugin using yours, saves me some time! :)

Link to comment
Share on other sites

  • 1 month later...
  • Administrators

You may want to submit it as a pull request on github, for a code review and potential pull.


If I get the diff-code right, you set the identity to the squads ID. However, AFAIK, the identity is meant to be unique (in the context), so not meant for squads but for individuals.

Link to comment
Share on other sites

I will not create a pull request until I can find a valid team state value, it simply does not work without.


As far as I understood the Mumble plugin API, you use the context to distinguish who is on what server, and the identity to put players into groups that belong together: people in the same team and more precise people in the same squad. This allows you to only send positional audio to people in their own team and/or squad. You can already distinguish the player from other players just by him being in mumble, now you can cross reference a list of players by their squad/team.


Context:

which server you are on

Identity:

which group you belong to as in:

- team

- squad

- do you have a special position in game(commander/squad leader?)


Correct me if I overlooked something, also if someone can contribute how I can use the identity/context data server side, that would be awesome. I know the guys from Project Reality(realitymod.com) do it with their modded client+server. I would really like to do the same for BF3.


more info: http://mumble.sourceforge.net/Positional-Audio

Link to comment
Share on other sites

  • Administrators

Context: Your talking context e.g. the context that is common to the people hearing each other positionally; meaning: the game, server and team they are on (so ppl from one team can hear each other). That is, if it is a competitive game where you don’t want to hear others from a positional direction to not get an advantage over not using PA. (So ppl don’t disable it entirely so enemies don't hear them PA.)


The identity is used to uniquely identify you in the game, e.g. a player ID, so the Mumble server can be connected with the game server through scripting. E.g. automatically put a player into a channel based on what team he is on the server.


/e:

Actually, reading the PA wiki page, you are right.

It seems the documented and expected way is to use team in identity and server (etc) in context.

It does not explicitly exclude the team from the context, but only names it for identity …


I wonder if this is the right choice though, as ppl. might want to only be able to hear and be heard by teammates. Making this optional via a setting would be great. Unfortunately, this does not work with the current system of just one context. One would need two plugins then …

Link to comment
Share on other sites

 Share

×
×
  • Create New...