Project Zomboid

Project Zomboid

Avatar offline [MP/SP]
This topic has been locked
AuD  [developer] 8 Feb, 2023 @ 8:56am
How to add new avatar to the list
I will explain how to add more avatars to the list of choices.
In the mod files, in the media/scripts folder, you will have 4 Example.txt.BAK files, the items/models/textures/icons will need specific names to declare them correctly and work, and thus be taken into account by my code therefore they are automatically added to the list of choices.

There are two main list categories, vanilla and server, the vanilla category will be useful to me personally, in order to extend the list in future updates, and the server part is reserved for server owners, in order to compose their own list , on his side.

if you know the domain of lua, and you are comfortable with it, you can even create other categories because some submenus have a global variable, look at my script and see.

Each items/models/textures/icons need a coded name to be recognized by the script, and their numbering from 1 to infinity, this is what you will have to be rigorous about and follow this coding.

below, you will find the same examples as those visible in the mod files (media/script).
I advise you to browse the mod files, in order to familiarize yourself with them, visit the "scripts" and "textures" folders
Last edited by AuD; 8 Feb, 2023 @ 9:05am
< >
Showing 1-6 of 6 comments
AuD  [developer] 8 Feb, 2023 @ 8:56am 
Je vais vous expliquer comment ajouter plus d'avatars à la liste des choix.
Dans les fichiers du mod, dans le dossier media/scripts, vous aurez 4 fichiers Example.txt.BAK, les items/models/textures/icons auront besoin de noms spécifiques pour les déclarer correctement et fonctionner, et ainsi être pris en compte par mon code donc qu'ils sont automatiquement ajoutés à la liste des choix.

Il existe deux catégories principale de liste, vanille et serveur, la catégorie vanille me sera utile personnellement, afin d'allonger la liste dans les futures mises à jour, et la partie serveur est réservée au propriétaires de serveur, afin de composer sa propre liste, de son côté.

si vous le connaissez le domaine du lua, et que vous petes à l'aise avec cela, vous pourrez même créer d'autres catégories car certains sous-menus ont une variable globale, regardez mon script et voyez.

Chaque items/models/textures/icons ont besoin d'un nom codé pour être reconnus par le script, et leur numérotation de 1 à l'infini, c'est ce sur quoi vous devrez être rigoureux et suivre ce codage.

ci dessous, vous trouverez les même exemples que ceux visible dans les fichiers du mod (media/script).
Je vous conseille de parcourir les fichiers du mod, afin de vous familiariser avec eux, visitez les dossiers "scripts" et "textures"
Last edited by AuD; 8 Feb, 2023 @ 9:05am
AuD  [developer] 8 Feb, 2023 @ 8:57am 
--------------------------------------------------
this code corresponds to the subcategory "Female", you will have to follow this coding for the names of the items/models/textures/icons.
you must number starting with 1, without skipping numbers.

ce code correspond à la sous-catégorie "Femme", vous devrez suivre ce codage pour les noms des items/models/textures/icons.
vous devez numéroter en commençant par 1, sans sauter de numéros.

item : BaseAvatar_a_cF1
----------------------------
icon : AvatarIcon_cF1
model : AvatarModel_cF1
texture : AvatarTexture_cF1
--------------------------------------------------

module AvatarMOD {

imports
{
Base
}

item BaseAvatar_a_cF1
{
DisplayCategory = Corpse,
Weight = 5,
Type = Normal,
RequiresEquippedBothHands = true,
DisplayName = BaseAvatar_a_cF1,
Tags = AvatarMOD,

Icon = AvatarIcon_cF1,
WorldStaticModel = AvatarModel_cF1,
}
model AvatarModel_cF1
{
mesh = WorldItems/AvatarProp3D,
texture = WorldItems/AvatarTexture_cF1,
scale = 0.13,
}
}
Last edited by AuD; 10 Jan, 2024 @ 1:18am
AuD  [developer] 8 Feb, 2023 @ 8:57am 
--------------------------------------------------
Categorie "Male" / "Homme"

item : BaseAvatar_a_cM1
--------------------------
icon : AvatarIcon_cM1
model : AvatarModel_cM1
texture : AvatarTexture_cM1
--------------------------------------------------


module AvatarMOD {

imports
{
Base
}

item BaseAvatar_a_cM1
{
DisplayCategory = Corpse,
Weight = 5,
Type = Normal,
RequiresEquippedBothHands = true,
DisplayName = BaseAvatar_a_cM1,
Tags = AvatarMOD,

Icon = AvatarIcon_cM1,
WorldStaticModel = AvatarModel_cM1,
}
model AvatarModel_cM1
{
mesh = WorldItems/AvatarProp3D,
texture = WorldItems/AvatarTexture_cM1,
scale = 0.13,
}
}
Last edited by AuD; 10 Jan, 2024 @ 1:18am
AuD  [developer] 8 Feb, 2023 @ 8:57am 
--------------------------------------------------
Categorie "Special"

item : BaseAvatar_a_cS1
----------------------------
icon : AvatarIcon_cS1
model : AvatarModel_cS1
texture : AvatarTexture_cS1
--------------------------------------------------

module AvatarMOD {

imports
{
Base
}

item BaseAvatar_a_cS1
{
DisplayCategory = Corpse,
Weight = 5,
Type = Normal,
RequiresEquippedBothHands = true,
DisplayName = BaseAvatar_a_cS1,
Tags = AvatarMOD,

Icon = AvatarIcon_cS1,
WorldStaticModel = AvatarModel_cS1,
}
model AvatarModel_cS1
{
mesh = WorldItems/AvatarProp3D,
texture = WorldItems/AvatarTexture_cS1,
scale = 0.13,
}
}
Last edited by AuD; 10 Jan, 2024 @ 1:18am
AuD  [developer] 8 Feb, 2023 @ 8:58am 
--------------------------------------------------
Categorie "avatar affilied to name account"

As in the previous version, you can add avatars affiliated with the account name, the avatar assigned to a user account name will be unique and personal to it, the code is a little different but remains the same logic.
unlike the others category there will be no numbering to follow.

Comme dans la version précédente, vous pouvez ajouter des avatars affiliés au nom de compte, l'avatar attribué à un nom de compte utilisateur sera unique et personnel à celui-ci, le codage est un peu différent mais reste dans la même logique.
contrairement aux autres catégories, il n'y aura pas de numérotation à suivre.

--------------------------------------------------
item : AccountName_a
-------------------------------
icon : AvatarIcon_AccountName
model : AvatarModel_AccountName
texture : AvatarTexture_AccountName
--------------------------------------------------


module AvatarMOD {

imports
{
Base
}

item AccountName_a
{
DisplayCategory = Corpse,
Weight = 5,
Type = Normal,
RequiresEquippedBothHands = true,
DisplayName = AccountName,
Tags = AvatarMOD,

Icon = AvatarIcon_AccountName,
WorldStaticModel = AvatarModel_AccountName,
}
model AvatarModel_AccountName
{
mesh = WorldItems/AvatarProp3D,
texture = WorldItems/AvatarTexture_AccountName,
scale = 0.13,
}
}
Last edited by AuD; 10 Jan, 2024 @ 1:18am
AuD  [developer] 10 Jan, 2024 @ 6:39am 
Tutorial Avatar Offline - Create your personal avatar texture

https://www.youtube.com/watch?v=SnzQBQm062E
Last edited by AuD; 10 Jan, 2024 @ 6:40am
< >
Showing 1-6 of 6 comments
Per page: 1530 50