Jump to content

How to bypass character creation (Multiplayer)


Colin

Recommended Posts

Hi there,

 

First off, long time player, I haven't posted in a very long time and i've never bothered with modding really.... (which I plan to start, I come from a modding Arma 3 etc), so greetings to everyone! :)

 

My question and first plan is.... is it possible to bypass the character creation, obtain the survivor object and programmatically assign traits etc?

 

Kind Regards,

Edited by Colin
fix few missing things
Link to comment
Share on other sites

As for bypass character creation I don't know how to do that but I think you can set player traits programmatically.

 

-- OnCreatePlayer might needs to be hooked to attempt this
-- https://pzwiki.net/wiki/Modding:Lua_Events/OnCreatePlayer

-- First, I haven't try it yet
-- Second, make sure you attempt this on server side for anti-cheat measure.
-- Third, based on the dev's update logs.. Player seems to be able to use their local save so it might be modified. Save their original data in server for simple anti-cheat check
-- You might also need to synchronize the data to the targeted player or all players

-- Need to grab a player instance to do this
-- Get traits
local traits = player:getCharacterTraits()

-- Set true to activate the trait, false to remove it from the player
traits:set("Marksman", true)

-- Done

--[[ Available Trait List
"Obese"
"Athletic"
"Overweight"
"Unfit"
"Emaciated"
"Graceful"
"Clumsy"
"Strong"
"Weak"
"Very Underweight"
"Underweight"
"FastHealer"
"SlowHealer"
"ShortSighted"
"EagleEyed"
"Agoraphobic"
"Claustophobic"
"AdrenalineJunkie"
"Out of Shape"
"HighThirst"
"LowThirst"
"HeartyAppitite"
"LightEater"
"Cowardly"
"Brave"
"Brooding"
"Insomniac"
"NeedsLessSleep"
"NeedsMoreSleep"
"Asthmatic"
"PlaysFootball"
"Jogger"
"NightVision"
"FastLearner"
"SlowLearner"
"Pacifist"
"Feeble"
"Stout"
"ShortTemper"
"Patient"
"Injured"
"Inconspicuous"
"Conspicuous"
"Desensitized"
"NightOwl"
"Hemophobic"
"Burglar"
"KeenHearing"
"Deaf"
"HardOfHearing"
"ThinSkinned"
"ThickSkinned"
"Marksman"
"Outdoorsman"
"Lucky"
"Unlucky"
"Nutritionist"
"Nutritionist2"
"Organized"
"Disorganized"
"Axeman"
"IronGut"
"WeakStomach"
"HeavyDrinker"
"LightDrinker"
"Resilient"
"ProneToIllness"
"SpeedDemon"
"SundayDriver"
"Smoker"
"Hypercondriac"
"Illiterate"
--]]

 

Link to comment
Share on other sites

You can bypass it actually. I already had a look at it. Find 'ISPlayerStatsUI.lua' inside 'game/media/lua/client/ISUI'. It also has information on how to programmatically assign traits and how to send those data on player creation. Try extend the 'ISPlayerStatsUI:setVisible' function. You can probably prevent character creation UI from being displayed by doing that. Look for the right function if it didn't.

Edited by Zeros
missed the word 'from' haha
Link to comment
Share on other sites

1 hour ago, Zeros said:

You can bypass it actually. I already had a look at it. Find 'ISPlayerStatsUI.lua' inside 'game/media/lua/client/ISUI'. It also has information on how to programmatically assign traits and how to send those data on player creation. Try extend the 'ISPlayerStatsUI:setVisible' function. You can probably prevent character creation UI from being displayed by doing that. Look for the right function if it didn't.

 

Oh, great will check it out, thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...