Arconir 0 Posted March 23 Blood type is randomly generated after each death. This is the "BloodTypes::GenerateBloodType()" function. If I override this, I can set it to constant, but I can't access the player's 44-character ID here. How can you change this in the "StartingEquipSetup" function, where you have the missing ID? I would like to link it to a player, because according to the history of my server, the new characters are clones. I would read the fixed configurations from a JSON file. Thanks for the help! Share this post Link to post Share on other sites
Sid Debian 132 Posted March 23 1 hour ago, Arconir said: Blood type is randomly generated after each death. This is the "BloodTypes::GenerateBloodType()" function. If I override this, I can set it to constant, but I can't access the player's 44-character ID here. How can you change this in the "StartingEquipSetup" function, where you have the missing ID? I would like to link it to a player, because according to the history of my server, the new characters are clones. I would read the fixed configurations from a JSON file. Thanks for the help! No mate. I think that shall be setted through the Player instance class. Like "PlayerBase" or 9ne of the children from that class. The idea is redefine Player's blood type ind intend to save it inside the database (players.db). Players.db contains all character unit information even blood type. But I think that might be the problem coz you could switch it when player is not online. In that state data is totally insecure, but we have another problem still no one knows how to debinarize the ByteStream that's stored in data field of Players.db (it's SQLite3 database) and second problem is the server generating the PlayerBase dynamic class (yeah it's dynamic coz it coul be changed on each server start because you can override fields of PlayerBase Instalnce). But yeah there's 3rd method it's call Server's shtt ffked up - you can override default return value of blood type to a fixed blood type but it would be applied for all units. So it's kinda funny stuff, really. It has lots of way how to kick that class and solve your problem 🙂 Share this post Link to post Share on other sites
Arconir 0 Posted March 24 10 hours ago, Sid Debian said: Nem haver. Szerintem ezt a Player példányosztályon keresztül kell beállítani. Mint a "PlayerBase" vagy az osztályból 9 gyerek. Az ötlet az, hogy újradefiniáljuk a játékos vércsoportját, és el kívánjuk menteni az adatbázisba (players.db). A Players.db tartalmazza az összes karakteregység-információt, még a vércsoportot is. De azt hiszem, ez lehet a probléma, mert akkor válthat, amikor a játékos nincs online. Ebben az állapotban az adatok teljesen bizonytalanok, de van egy másik probléma, még mindig senki sem tudja, hogyan debinarizálja a Players.db (ez az SQLite3 adatbázis) adatmezőjében tárolt ByteStream, a második probléma pedig a PlayerBase dinamikus osztályt generáló szerver (igen, ez az dinamikus, mivel minden szerverindításkor módosítható, mert felülbírálhatja a PlayerBase telepítés mezőit). De igen, van 3. módszer, ez a szerver shtt ffked felhívása – felülírhatja a vércsoport alapértelmezett visszatérési értékét egy rögzített vércsoportra, de ez minden egységre vonatkozik. Szóval tényleg vicces dolog. Számos módja van annak, hogyan rúgd fel az osztályt és oldd meg a problémádat 🙂 Thanks! Yes. I've already looked through the class hierarchy. A solution could be to override everything up to the generator function and pass the player's ID. Well, I would avoid that. 😄 Somehow, I should be able to dynamically update the blood type of the player's data in the "player" parameter when I set up the equipment. Share this post Link to post Share on other sites
Sid Debian 132 Posted March 24 3 hours ago, Arconir said: Thanks! Yes. I've already looked through the class hierarchy. A solution could be to override everything up to the generator function and pass the player's ID. Well, I would avoid that. 😄 Somehow, I should be able to dynamically update the blood type of the player's data in the "player" parameter when I set up the equipment. It's not a dynamic. You need to override the Game().CreatePlayer(Playeraidentity, Entity). But you have the insurance of PlayerBase (PlayerBase.Cast(playerEntity)). If you'll try to play with that I guess you could override the Blood Type. Root of PlayerBase has variable: int m_BloodType; Then PlayerBase.c line 2069 (DayZ\dta\scripts.pbo) PlayerBase.c 6718: int GetBloodType() PlayerBase.c 6723: void SetBloodType(int blood_type) So after updating the PlayerBase instance of class call method: PlayerBase.SetSyncDirty() - for sync client data with srv amd check how it's going. I'm not intented and interested in making your job instead yourself. Share this post Link to post Share on other sites