logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Hide Gamespy account

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support
View previous topic :: View next topic  
Author Message
metagamer



Joined: 30 Nov 2014
Posts: 17

PostPosted: Wed Feb 10, 2016 21:42    Post subject: Hide Gamespy account Reply with quote

Hello everybody,

I want to know if there exists some plugin that is able to activate/deactivate the possibility to see the gamespy account of a player in game.
This could be really useful for masked/hidden thief or killer that do not want to show their identity.

I already implemented a new system of "Dynamic Names" based on nwnx_names but it is still weak if account name is visibile Smile

I checked nwnx_events and nwnx_chat and nwnx_visibility but no body of them is doing this job.

If it does not exist, can somebody drive me how to make this extension? (maybe for nwnx_chat)
Back to top
View user's profile Send private message Visit poster's website
Baaleos



Joined: 02 Sep 2007
Posts: 816

PostPosted: Thu Feb 11, 2016 17:45    Post subject: Reply with quote

nwnx_fixes allows you to disable the playerlist.

It means no players will be able to see any other players in the player invite screen, or in the player list on the join screen.

With nwnx_chat - you could potentially hook the chat event, before the message is delivered, and replace the senders name with something like ??????.
If it takes an object ID, you could change the object ID to an NPC's or objects. Thats basically how the /vent command works.
Back to top
View user's profile Send private message
metagamer



Joined: 30 Nov 2014
Posts: 17

PostPosted: Thu Feb 09, 2017 16:21    Post subject: Reply with quote

Baaleos wrote:
nwnx_fixes allows you to disable the playerlist.

It means no players will be able to see any other players in the player invite screen, or in the player list on the join screen.

With nwnx_chat - you could potentially hook the chat event, before the message is delivered, and replace the senders name with something like ??????.
If it takes an object ID, you could change the object ID to an NPC's or objects. Thats basically how the /vent command works.


This is a good way to solve the problem in case we talk about the channel 'tell' (Private Message).

However, let's think about the channel Talk.
I am talking and what I said is appearing on the top of my character.
I could potentially substitute the "speaker" with an invisible object.
I would face 2 problems:
1) what I said appears on the top of the invisible object and not on the top of my character (that looks so bad)
2) If the object is invisibile, I would see the text only on the chat bar.

I notice that when we use "PlayVoice", actually we have the behavior that I would like to have (people can't see my gamespy account with a click on the portrait in the chat bar).

Any ideas?
Another way would be to create a plugin that does it.
The problem is that I do not understand how you guys are able to hook the event.

There is some guides about "How to create NWNX hook?"
Back to top
View user's profile Send private message Visit poster's website
virusman



Joined: 30 Jan 2005
Posts: 1010
Location: Russia

PostPosted: Fri Feb 10, 2017 17:37    Post subject: Reply with quote

The client knows all account names (it receives a list of all logged in characters & their accounts when entering the game & also receives new names+accounts when they join). So you need to modify that data, that way the client will still translate names to PlayerIDs when talking to the server, but the names will not correspond to real account names.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
virusman



Joined: 30 Jan 2005
Posts: 1010
Location: Russia

PostPosted: Fri Feb 10, 2017 17:44    Post subject: Reply with quote

More specifically, you need to hook these two methods:
CNWSMessage::SendServerToPlayerPlayerList_All(CNWSPlayer *)
CNWSMessage::SendServerToPlayerPlayerList_Add(unsigned long, CNWSPlayer *)
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
metagamer



Joined: 30 Nov 2014
Posts: 17

PostPosted: Tue May 09, 2017 11:55    Post subject: Reply with quote

virusman wrote:
More specifically, you need to hook these two methods:
CNWSMessage::SendServerToPlayerPlayerList_All(CNWSPlayer *)
CNWSMessage::SendServerToPlayerPlayerList_Add(unsigned long, CNWSPlayer *)


These functions can be found in Names.

I tried to work with "SendServerToPlayerPlayerList_Add" but there are problems. The player are not considered as PC and it seems to obtain "strange" behavior.

I have seen that in names, the names of all the player is updated.
Then the question is: why can not I update also the account name?

However I am not able to find where to modify it.
Which is the class and the method that allows me to get the account name and modify it?

I have done it for NWNX Auth but the function is hooked too early and I cannot see my players in the list (i enter as AccountX and the list is of AccountY)
Back to top
View user's profile Send private message Visit poster's website
metagamer



Joined: 30 Nov 2014
Posts: 17

PostPosted: Tue May 09, 2017 14:54    Post subject: Reply with quote

metagamer wrote:
virusman wrote:
More specifically, you need to hook these two methods:
CNWSMessage::SendServerToPlayerPlayerList_All(CNWSPlayer *)
CNWSMessage::SendServerToPlayerPlayerList_Add(unsigned long, CNWSPlayer *)


These functions can be found in Names.

I tried to work with "SendServerToPlayerPlayerList_Add" but there are problems. The player are not considered as PC and it seems to obtain "strange" behavior.

I have seen that in names, the names of all the player is updated.
Then the question is: why can not I update also the account name?

However I am not able to find where to modify it.
Which is the class and the method that allows me to get the account name and modify it?

I have done it for NWNX Auth but the function is hooked too early and I cannot see my players in the list (i enter as AccountX and the list is of AccountY)


I am moving forward.

Now I decided to avoid nwnx_names and focus on nwnx_connect to understand how to extract the GameSpay name.
And it works.

Hooking:
void SendServerToPlayerPlayerList_All_Hook(CNWSMessage *pMessage, CNWSPlayer *pPlayer)

I can extract the GetPlayerName of an object.
However, I would like to SET it.

Anyidea about it? I am working with assembly trying to understand how to modify it.

I already made an extension of CExoString class to set manually the variable and it works.
This was working for nwnx_auth. The code was easy:

Code:
void CNetLayerInternal__HandleBNCSMessage_mid_Hook()
{
    asm("leave");
    asm("pusha");

    asm("lea -0x38(%ebp), %eax");
    asm("mov %eax, sCDKey");
    asm("lea -0x28(%ebp), %eax");
    asm("mov %eax, sAccount");

    sAccountFake->Set("test")
...
}


In such way I was able to set the new account by the method Set_Text.

The challenge now is to do the same in nwnx_connect.
It should be something like:

Code:
void SendServerToPlayerPlayerList_All_Hook(CNWSMessage *pMessage, CNWSPlayer *pPlayer)
{
 
    asm("mov $0x0805e980, %eax");
    asm("mov sAccountFake, %eax");
   
    sAccountFake->Set("test") 

}

    NX_HOOK(CNWSMessage__SendServerToPlayerPlayerList_All, 0x080774e4,
            SendServerToPlayerPlayerList_All_Hook, 12);


but of course it doesnt work :/
Back to top
View user's profile Send private message Visit poster's website
metagamer



Joined: 30 Nov 2014
Posts: 17

PostPosted: Sat May 13, 2017 12:39    Post subject: Reply with quote

Glad to say that the aim of this topic has been reached and I extended and fixed nwnx_auth into nwnx_authv2
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Linux technical support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group