Jump to content
Tit4nNL

Launch parameter for setting character model similar to -name= for character name?

Recommended Posts

Hey peeps, been messing with serve files a bit, and got a bit stuck on something.

There is a few lines of code by default but also in a lot of examples I have seen that is

override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName) 
{ 
Entity playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE"); 
Class.CastTo(m_player, playerEnt); 

GetGame().SelectPlayer(identity, m_player); return m_player;

This makes it so the character model is random each time after you die.

For example:

  • You spawn random character
  • You die
  • You exit the game
  • You boot up the game
  • You select character Lewis in menu
  • You spawn as character Lewis
  • You die
  • You hit respawn(So you don't exit the game)
  • You spawn random character

What I did, is simply comment out that whole part (or remove it)

What happens now is:

  • You spawn random character
  • You die
  • You exit the game
  • You boot up the game
  • You select character Lewis in menu
  • You spawn as character Lewis
  • You die
  • You hit respawn(So you don't exit the game)
  • You spawn as character Lewis

The key difference here, is that even after I died, I spawned as character Lewis, because I selected him in the menu before joining the server.

Now the issue is that as long as I never close the game (server doesn't matter), I will always spawn as Lewis.

The only thing that stops me from spawning as Lewis, is if I have closed my DayZ session and rebooted it. If I change my character model in the menu, and respawn, I will always respawn as that character, again, until I close the game down.

TL;DR: The game doesn't seem to save your selected character model when you close down the game, only for your current session.

So one way I was looking for to fix this, is to start up the game with a launch parameter, so that instead of having to go to the char menu every time, I could simply make the game set it itself with a launch parameter. The same works with your character name with -name= and I was hoping if anyone knew of a way to do that to the character model or even the whole preset(model+clothing).

Keep in mind though, I don't want to set a specific model for everyone on the server, I want the server to still treat all clients the same as an un-modded server(apart from the code being commented out).

Or if anyone knows of any other way to somehow save the character preset selection I'll be glad to hear it. 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×