FAForever Forums
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Login
    The current pre-release of the client ("pioneer" in the version) is only compatible to itself. So you can only play with other testers. Please be aware!

    How to change the player names through a mod

    Scheduled Pinned Locked Moved Modding & Tools
    3 Posts 3 Posters 418 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      Complex
      last edited by

      I had an idea for a mod that makes players anonymous to each other by randomizing their colors and names. I was able to randomly select a color without too much difficulty (although I am unsure if the colors are the same between players), but changing the names of players has been difficult.

      I found a setting that hides player's names already built into FAF called options.options_show_player_names. I used a mod to force it to 'off', but this breaks the chat. This seems to affect only PostprocessArmiesTable in /lua/ui/override/ArmiesTable.lua and PostprocessClients in /lua/ui/override/SessionClients.lua. However, when a chat message is sent, the engine has the sender as your original name, which causes GetArmyData in /lua/ui/game/chat.lua to be unable to find the correct army data and the chat message is ignored.

      The ideal time to change the names of all the players would be just as the lobby is launched, but I am not sure that mods are loaded at this point. Alternately, if I can find a way to add some extra information to the army tables that can tie each player's original name back to them, that could also work.

      If anyone has any ideas on how to get this to work, please let me know.

      1 Reply Last reply Reply Quote 0
      • JipJ Offline
        Jip
        last edited by

        I've also looked into this, to allow players to play the game without knowing who they're playing with or against. But I'm afraid that certain parts of the UI are hardcoded as you found out yourself too. The game option will likely be removed again, as it may need to be enforced in the lobby instead.

        I do not have the time at this moment to investigate it further, but feel free to create a development environment and toy around, see what the behavior is.

        A work of art is never finished, merely abandoned

        1 Reply Last reply Reply Quote 0
        • Brutus5000B Offline
          Brutus5000 FAF Server Admin
          last edited by

          If you want it for yourself, go for it. But for others it's always easy to figure out who plays/played via client, ice adapter debug view or replay information

          He said, "I've been to the year 3000
          Not much has changed, but they live underwater
          And your great-great-great-granddaughter
          Is playin' FAF, playin' FAF"

          1 Reply Last reply Reply Quote 0
          • First post
            Last post