DayZ
389 vurderinger
Dogtags
3
3
2
3
2
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Type: Mod
Filstørrelse:
Offentliggjort:
Opdateret:
13.259 MB
29. nov. 2020 kl. 15:16
9. juni 2024 kl. 21:32
4 ændringsbemærkninger ( vis )

Abonner for at downloade
Dogtags

Beskrivelse
Description
Chernarus can be a very cold and unforgiving land, let's make it a bit more bearable by being able to identify your threats. Survivors are tagged when entering the nation of Chernarus, only their name and the date they were tagged can be viewed, and blood type if you have been tested. Collect the tags of your enemies or of the fallen allies, bring them forth for trade or as trophy pieces.

Features
- Name, tagged date, and blood type (if known by test) are stored on the tag
- Dogtags can only be taken off of dead players
- Hero, bandit, and survivor variants (distinguished by color)
- Dogtags can be view on dead or restrained players
- Survivors are tagged upon character spawn, existing players will also be tagged upon login
- Names on dogtags are updated when changing your name

Configuration
You can configure if and when dogtags can be removed from dead players, with the dogtagsPlaytimeRequired config value in serverDZ.cfg. This is the required time the dead player had to be alive in order for their dogtag to be able to be collected. You can also control if dogtags worn by AI can be removed once dead with dogtagsCanTakeFromAI.

This is NOT necessary to added to your serverDZ.cfg file, only if you wanting to change the behavior of removing dogtags.

PLEASE MAKE SURE YOU ONLY HAVE THE VARIABLE DEFINED ONCE, DO NOT COPY AND PASTE THE ENTIRE CODE BLOCK BELOW AND COMMENT ON WHY YOUR SERVER IS NOT STARTING.


dogtagsPlaytimeRequired = -1; // dogtags can NOT be removed from dead players dogtagsPlaytimeRequired = 0; // dogtags can always be removed from dead players, even fresh spawns dogtagsPlaytimeRequired = 600; // dogtags can only be removed from dead players that have played more than 10 minutes dogtagsCanTakeFromAI = 1; // allow dogtags to be taken off of AI dogtagsCanTakeFromAI = 0; // disallow dogtags to be taken off of AI - default

There's really only one way to configure how tags are spawned currently on the server, you can add this method to your server's init.c file to edit what type of dogtags you're going to be giving your players. There are three dogtag variants, their class names are as follows:
Dogtag_Survivor, Dogtag_Hero, Dogtag_Bandit, Dogtag_Silver, Dogtag_Granite, Dogtag_Cobalt

I'd only edit this if you know what you're doing, or if someone in the community has made a good example to be used freely. This method isn't necessary to add to your init.c as it's already in the base mod and works as functioned below. There are some starter examples in the "Server" folder of the mod, along with the types.xml.

This method is NOT necessary to added to your init.c file, only if you want to change which dogtags spawn on the player when the character is created.

override Dogtag_Base EquipDogtag(PlayerBase player) { if (!player.HasDogtag()) // check if the player has a tag already { // create a new tag is the player doesn't have one int slotId = InventorySlots.GetSlotIdFromString("Dogtag"); return Dogtag_Base.Cast(player.GetInventory().CreateAttachmentEx("Dogtag_Survivor", slotId)); } return null; }

Update player's dogtag based on time played for their specific character, by adding this to your init.c
override void UpdatePlayersStats() { super.UpdatePlayersStats(); array<Man> players = {}; GetGame().GetPlayers(players); for (int i = 0; i < players.Count(); i++) { PlayerBase player; if (!PlayerBase.CastTo(player, players.Get(i))) continue; // update player's dogtag base on time float playtime = player.StatGet("playtime"); if (playtime >= 21600 && playtime < 43200) { player.ReplaceDogtag("Dogtag_Granite"); } else if (playtime >= 43200) { player.ReplaceDogtag("Dogtag_Cobalt"); } } }

Mod Integrations
GraveCross - dogtags spawn on grave crosses, load Dogtags after this mod
DayZ Expansion - dogtags spawn on grave crosses, load Dogtags after this mod
TransferItemsToCrateWhenDying - dogtags spawn on boxes, load Dogtags after this mod


Planned Features
- More modding support and examples
- Additional meta stats for tags (i.e. killed by and death date); configurable
- Better PVE support

Known Issues
- Incompatibilities with other mods that modify Trader's has item check logic and item removal logic

Special Thanks
Levent - modeling and texturing
Cashewsan - model importing and material configuration (original mod idea)
DayZBlackout - getting me the best contact for modeling and texturing
Jacob_Mango - helping solve the UI issue with tooltips
InclementDad - continue

Usage & Terms
This item is NOT authorized (strictly forbidden) for any of these conditions:
- posting on Steam, except under the Steam account officialwardog.
- hosting on any download server other than Dogtags' current workshop download.
- hosting on any launcher for distribution other than Dogtags' current workshop download.
- to be packaged in any form other than Dogtags' current workshop download.
- to create derivative works.

PERMISSION IS NOT GRANTED FOR THIS MOD TO BE INCLUDED IN A "SERVER PACK" or "MOD PACK" or "REPACK".

Use a Collection if you want to include this mod on your server for your users.

Monetization while using this mod is approved.
Copyright 2019-2024 Wardog
All rights reserved

[wrdg.net]
Populære diskussioner Vis alle (15)
20
9. okt. kl. 4:22
Servers using this mod
Sfmplayer
10
16. jan. kl. 21:44
Report issues or crash logs
Sfmplayer
3
15. nov. 2023 kl. 2:51
Crash at server load
Gwart
243 kommentarer
Rapture! 22. sep. kl. 20:33 
Here is a silly question. The AI are spawning dogtags and everything is good in that regard. I am wondering if there is a way to figure out how the AI get their names. Currently, every AI i kill shows up as "Survivor Dogtag [AI]" and I am wondering if there is any documentation on how exactly the dogtag gets the AI name, and whether there might be a way to code a random name generator or a list of names for this. The goal for me is to have AI that when killed show names just like players would, so that players dont "really" know whether theyve killed an ai or a player.
Thanks so much for reading my TED talk. =)
=MrFarmy= 17. sep. kl. 7:06 
else if (playtime >= 43200) - Is this seconds or minutes?
Skullrazor 13. sep. kl. 1:21 
im strugling to add dog tags to my init file
Elite_Joker 3. sep. kl. 18:19 
Heey my Dogtag wont change after a amount of Time but idk why i set up the ini.c with the Time thingy but wont change pls help
Vladick 31. aug. kl. 11:27 
FYI for those of you trying to add dog tags to your Expansion AI, here is how you would set up the AI loadout to make it work:

{
"SlotName": "Dogtag",
"Items": [
{
"ClassName": "Dogtag_Bandit",
"Chance": 1.0,
"Quantity": {
"Min": 0.0,
"Max": 0.0
},
"Health": [
{
"Min": 1.0,
"Max": 1.0,
"Zone": ""
}
],
"InventoryAttachments": [],
"InventoryCargo": [],
"ConstructionPartsBuilt": [],
"Sets": []
}
]
},
Vladick 31. aug. kl. 9:25 
I don't think AI are players in the sense that they use the init.c for anything. The AI are spawned through Expansion AI and as such, they use the Expansion loadouts to determine their gear. I have tried all of the ways to spawn the tags that are listed. They all work for players but not for AI.
xenymbus (abenteuer0leben) 31. aug. kl. 8:37 
the solution is to give every player with playing time a changing dog tag.

since AIs are currently still considered “players,” they may also receive them (not verified).
xenymbus (abenteuer0leben) 31. aug. kl. 8:31 
playtime = you can set this yourself as admin
xenymbus (abenteuer0leben) 31. aug. kl. 8:29 
init.c

override Dogtag_Base EquipDogtag(PlayerBase player)
{
Dogtag_Base tag;
if (!player.HasDogtag()) // check if the player has a tag already
xenymbus (abenteuer0leben) 31. aug. kl. 8:29 
{
// create a new tag is the player doesn't have one
int slotId = InventorySlots.GetSlotIdFromString("Dogtag");
// update player's dogtags base on time
float playtime = player.StatGet("playtime");

// create dog tag based on playtime
if (playtime > 86400 && playtime < 259199)
{
tag = player.GetInventory().CreateAttachmentEx("Dogtag_Silver", slotId);
}
else if (playtime > 259200 && playtime < 604799)
{
tag = player.GetInventory().CreateAttachmentEx("Dogtag_Granite", slotId);
}
else if (playtime > 604800)
{
tag = player.GetInventory().CreateAttachmentEx("Dogtag_Cobalt", slotId);
}
else
{
tag = player.GetInventory().CreateAttachmentEx("Dogtag_Survivor", slotId);
}
}

tag = player.GetDogtag(); // get current tag on player, new or existing
tag.SetNickName(player.GetIdentity().GetName()); // updates player's name
return tag;
}