Adding more avatars

Discuss Player and AI Modelling Here

Moderators: Q-dad~TAG, EXP STAFF, Moderator

Adding more avatars

Postby Xx_jet_xX » 02-11-2007 07:55 PM

Ever want to add your own country? want to add your own avatars to the stock list and not overwrite exhisting?

i figured this out when adding JO avatars to DFX for the Special Ops mod ive been working on.

you will need to modify several files, game.bin, avatars.def and whatever player 3di you are working on. Im using the bin2txt and txt2bin tools to make browsing through the bin file simpler.

game.bin and avatar.def are the most important to add new.

in game.bin find '[Avatars]'

stock avatar name:
Code: Select all
AV_DIV_DELTAFORCE = "Delta Force";


new avatar name:
Code: Select all
AV_DIV_DELTAFORCE1 = "Delta Force 1";


for countries (same area as the character name just further down):

stock country name:
Code: Select all
AV_NAT_UNITEDSTATES = "United States";


new country name:
Code: Select all
AV_NAT_UNITEDSTATES2 = "United States";


Add the new avatar and new country info to the bin file. best to add right under stock for easy referance.

Now for Avatars.def:

this is a bit more complicated to do, and there seems to be a limit on how many avatars you can add to a country, and how many countries you can have in a secton of the avatars.def. everything needs to be in an order, so for nationalities we start with

Code: Select all
nationality  N00  AV_NAT_UNITEDSTATES

next is
Code: Select all
nationality  N01  AV_NAT_UNITEDSTATES2


Notice N00 is N01 fo second? becomes N02 for third and so on....

for the avatars:
Code: Select all
   division  D00  AV_DIV_SEAL skipdemo
   {
      combo   001     JO_HEAD_SEAL            JO_BODY_SEAL_1      JO_ARMS_US_1
   }

next is
Code: Select all
   division  D01  AV_DIV_SEAL2 skipdemo
   {
      combo   001     JO_HEAD_SEAL_CAMO_1     JO_BODY_SEAL_1      JO_ARMS_US_1
   }


like the N00, this one is D00 and does the same way. same for combo, which i deleted for my mod since DFX doesnt let you browse them and i wanted them available. but it works for JO too.

Limits i have found so far are 7 nationalities per section and 16 avatars per nationality. sections are divided by the definitions for the parts of the avatars.

heres a snippet from my avatars.def to show an example of limited:

Code: Select all
nationality  N00  AV_NAT_UNITEDSTATES
{
   alignment   good

   division  D00  AV_DIV_SEAL skipdemo
   {
      combo   001     JO_HEAD_SEAL            JO_BODY_SEAL_1      JO_ARMS_US_1
   }

   division  D01  AV_DIV_SEAL2 skipdemo
   {
      combo   001     JO_HEAD_SEAL_CAMO_1     JO_BODY_SEAL_1      JO_ARMS_US_1
   }

   division  D02  AV_DIV_SEAL3 skipdemo
   {
      combo   001     JO_HEAD_SEAL_CAMO_2     JO_BODY_DELTA_3     JO_ARMS_GREEN_1
   }

   division  D03  AV_DIV_SEAL4 skipdemo
   {
      combo   001     JO_HEAD_SEAL_CAMO_2     JO_BODY_SEAL_2      JO_ARMS_US_1
   }

   division  D04  AV_DIV_SEAL5 skipdemo
   {
      combo   001     JO_HEAD_SEAL            JO_BODY_SEAL_3      JO_ARMS_US_1
   }

   division  D05  AV_DIV_SEALF
   {
      combo   001     JO_HEAD_FEM_CAP   JO_BODY_FEMALE_7   JO_ARMS_GREEN_2
   }

   division  D06  AV_DIV_DELTAFORCE skipdemo
   {
      combo   001     JO_HEAD_DELTA_3         JO_BODY_DELTA_1     JO_ARMS_BLACK
   }

   division  D07  AV_DIV_DELTAFORCE2 skipdemo
   {
      combo   001     JO_HEAD_DELTA_3         JO_BODY_SEAL_2      JO_ARMS_US_
   }

   division  D08  AV_DIV_DELTAFORCE3 skipdemo
   {
      combo   001     JO_HEAD_DELTA_3         JO_BODY_DELTA_3     JO_ARMS_GREEN_1
   }

   division  D09  AV_DIV_DELTAFORCE4 skipdemo
   {
      combo   001     JO_HEAD_DELTA_1         JO_BODY_DELTA_1     JO_ARMS_BLACK
   }

   division  D10  AV_DIV_DELTAFORCE5 skipdemo
   {
      combo   001     JO_HEAD_DELTA_2         JO_BODY_DELTA_2     JO_ARMS_US_2
   }

   division  D11  AV_DIV_DELTAFORCE6 skipdemo
   {
      combo   001     JO_HEAD_DELTA_4         JO_BODY_DELTA_4     JO_ARMS_US_4
   }

   division  D12  AV_DIV_DELTAFORCEF
   {
      combo   001     JO_HEAD_WHIM            JO_BODY_FEMALE_US   JO_ARMS_US_3

   }
   
   division  D13  AV_DIV_FORCERECON
   {
      combo   001     JO_HEAD_FORCERECON_2    JO_BODY_USAFCO      JO_ARMS_OLIVE_2
   }

   division  D14  AV_DIV_FORCERECON2
   {
      combo   001     JO_HEAD_FORCERECON_1    JO_BODY_USAFCO      JO_ARMS_OLIVE_2
   }

   division  D15  AV_DIV_FORCERECON3
   {
      combo   001     JO_HEAD_DELTA_2         JO_BODY_PILOT      JO_ARMS_GREEN_2
   }
   
}

nationality  N01  AV_NAT_UNITEDSTATES2
{
   alignment   good

   division  D00  AV_DIV_RANGER
   {
      combo   001     JO_HEAD_RANGER          JO_BODY_RANGER      JO_ARMS_US_3
   }

   division  D01  AV_DIV_RANGER2
   {
      combo   001     JO_HEAD_RANGER          JO_BODY_RANGER2      JO_ARMS_US_3
   }

   division  D02  AV_DIV_RANGER3
   {
      combo   002     JO_HEAD_RANGER_2        JO_BODY_RANGER      JO_ARMS_US_3
   }

   division  D03  AV_DIV_RANGERF
   {
      combo   001     JO_HEAD_FEMALE_CAP      JO_BODY_FEMALE_US   JO_ARMS_US_3
   }
   
   division  D04  AV_DIV_GREENBERET skipdemo
   {
      combo   001     JO_HEAD_GREENBERET      JO_BODY_GREENBERET   JO_ARMS_US_2
   }

   division  D05  AV_DIV_GREENBERET2 skipdemo
   {
      combo   001     JO_HEAD_RANGER          JO_BODY_GREENBERET   JO_ARMS_US_2
   }

   division  D06  AV_DIV_GREENBERET3 skipdemo
   {
      combo   001     JO_HEAD_RANGER          JO_BODY_GREENBERET2   JO_ARMS_US_2
   }

   division  D07  AV_DIV_USMC skipdemo
   {
      combo   001     JO_HEAD_USMC            JO_BODY_DELTA_2      JO_ARMS_US_2
   }

   division  D08  AV_DIV_USMC2 skipdemo
   {
      combo   001     JO_HEAD_USMC            JO_BODY_USMC_2      JO_ARMS_US_2
   }

   division  D09  AV_DIV_USMCF skipdemo
   {
      combo   001     JO_HEAD_FEMALE_HELMET   JO_BODY_FEMALE_US   JO_ARMS_US_3
   }
   
   division  D10  AV_DIV_SCOUTSNIPER
   {
      combo   001     JO_HEAD_SCOUT           JO_BODY_SCOUT      JO_ARMS_US_2
   }
   
   division  D11  AV_DIV_PILOT skipdemo
   {
      combo   001     JO_HEAD_PILOT           JO_BODY_PILOT      JO_ARMS_GREEN_2
   }
   
   division  D12  AV_DIV_USAFCOMBATOP skipdemo
   {
      combo   001     JO_HEAD_USAFCO          JO_BODY_SEAL_1      JO_ARMS_US_3
   }

   division  D13  AV_DIV_USAFCOMBATOP skipdemo
   {
      combo   001     JO_HEAD_USAFCO          JO_BODY_USAFCO      JO_ARMS_OLIVE_2
   }

   division  D14  AV_DIV_USAFCOMBATOP skipdemo
   {
      combo   001     JO_HEAD_USAFCO          JO_BODY_SEAL_2      JO_ARMS_US_3
   }


}

nationality  N02  AV_NAT_GREATBRITAIN  skipdemo
{
   alignment   good

   division  D00  AV_DIV_ROYALMARINE
   {
      combo   001     JO_HEAD_ROYALMARINE_1   JO_BODY_ROYALMARINE      JO_ARMS_ROYALMARINE
   }

   division  D01  AV_DIV_ROYALMARINE
   {
      combo   001     JO_HEAD_ROYALMARINE_2   JO_BODY_ROYALMARINE      JO_ARMS_ROYALMARINE
   }

   division  D03  AV_DIV_ROYALMARINEF
   {
      combo   001     JO_HEAD_FEMALE_BERET    JO_BODY_FEMALE_UK      JO_ARMS_ROYALMARINE
   }
   
   division  D04  AV_DIV_SAS
   {
      combo   001     JO_HEAD_SAS_1           JO_BODY_SAS_1      JO_ARMS_SAS
   }

   division  D05  AV_DIV_SAS2
   {
      combo   001     JO_HEAD_SAS_1           JO_BODY_SAS_3      JO_ARMS_SAS
   }

   division  D06  AV_DIV_SAS3
   {
      combo   001     JO_HEAD_SAS_2           JO_BODY_SAS_2      JO_ARMS_BARE
   }

   division  D07  AV_DIV_SAS4
   {
      combo   001     JO_HEAD_SAS_2           JO_BODY_SAS_3      JO_ARMS_SAS
   }

   division  D08  AV_DIV_SASF
   {
      combo   001     JO_HEAD_FEMALE_CAP      JO_BODY_FEMALE_UK   JO_ARMS_OLIVE_2

   }

}

nationality  N03  AV_NAT_AUSTRALIA  skipdemo
{
   alignment   good

   division  D00  AV_DIV_SASR
   {
      combo   001     JO_HEAD_SASR_1          JO_BODY_SASR   JO_ARMS_BARE
   }

   division  D01  AV_DIV_SASR2
   {
      combo   001     JO_HEAD_SASR_2          JO_BODY_SASR   JO_ARMS_BARE
   }

   division  D02  AV_DIV_SASRF
   {
      combo   001     JO_HEAD_FEMALE_4        JO_BODY_FEMALE_5   JO_ARMS_BARE
   }

   division  D03  AV_DIV_Barra
   {
      combo   001     JO_HEAD_FEMALE_HELMET3   JO_BODY_FEMALE_8   JO_ARMS_US_3

   }

   division  D04  AV_DIV_SASRF2
   {
      combo   001     JO_HEAD_FEMALE_MASKED        JO_BODY_FEMALE_4   JO_ARMS_ROYALMARINE

   }

   division  D05  AV_DIV_SNIPER
   {
      combo   001     JO_HEAD_SCOUT2           JO_BODY_SCOUT2      JO_ARMS_US_2
   }

   division  D06  AV_DIV_RECON
   {
      combo   001     JO_HEAD_RECON    JO_BODY_RECON_AU      JO_ARMS_OLIVE_2
   }

}

nationality  N04  AV_NAT_INDONESIA  skipdemo
{
   alignment   good

   division  D00  AV_DIV_KOPASSUS
   {
      combo   001     JO_HEAD_KOPASSUS_1      JO_BODY_KOPASSUS   JO_ARMS_BARE
   }

   division  D01  AV_DIV_KOPASSUS2
   {
      combo   002     JO_HEAD_KOPASSUS_2      JO_BODY_KOPASSUS   JO_ARMS_BARE
   }

   division  D02  AV_DIV_KOPASSUS3
   {
      combo   003     JO_HEAD_KOPASSUS_3      JO_BODY_KOPASSUS   JO_ARMS_BARE
   }

}

nationality  N05  AV_NAT_RUSSIA  skipdemo
{
   alignment   good

   division  D00  AV_DIV_SPETSNAZ
   {
      combo   001     JO_HEAD_SPETSNAZ_1      JO_BODY_SPETSNAZ   JO_ARMS_SPETNAZ
   }

   division  D01  AV_DIV_SPETSNAZ2
   {
      combo   001     JO_HEAD_SPETSNAZ_2      JO_BODY_SPETSNAZ   JO_ARMS_SPETNAZ
   }

}


nationality  N06  AV_NAT_GERMANY  skipdemo
{
   alignment   good

   division  D00  AV_DIV_KSK
   {
      combo   001     JO_HEAD_KSK             JO_BODY_KSK      JO_ARMS_KSK
   }

   division  D01  AV_DIV_KSK2
   {
      combo   001     JO_HEAD_COMBAT          JO_BODY_KSK      JO_ARMS_KSK
   }

   division  D02  AV_DIV_KSKF
   {
      combo   001     JO_HEAD_FEMALE_MASKED2    JO_BODY_FEMALE_9        JO_ARMS_ROYALMARINE

   }

}


Now for defining the avatar? there are 3 parts to this, and all three will be above the section where the avatar is listed.

for this one

Code: Select all
   division  D00  AV_DIV_SEAL skipdemo
   {
      combo   001     JO_HEAD_SEAL            JO_BODY_SEAL_1      JO_ARMS_US_1
   }


you need to add head body and arms.

heres an example of each:

Code: Select all
define head      JO_HEAD_SEAL
{
   name      AV_BOONIEHAT
   graphic      Boonie.3di
   camo      0 0 0
   voice      1
   sex         m
}


Code: Select all
define body      JO_BODY_SEAL_1
{
   name      AV_WOODLANDBDU
   graphic      JntOpsB1.3di
   camo      0 0 0
}


Code: Select all
define arms      JO_ARMS_US_1
{
   name      "US Camo -Black Gloves"
   graphic      ArmsG.3di
   camo      0 0 0
}


rename the 3di to the same as you named the modded one, and rename the defnition in both the define and the new character. if you did everything correct you will have a new nationality and new avatars available!
Xx_jet_xX
JET Laggg
 
Posts: 208
Joined: 04-11-2004 08:25 PM

Postby Black Ice » 02-26-2007 08:55 PM

this is excellent! my only request is a description of how to assign textures upon making your avatar.

this will definitely be useful for me. thanks for the guide!
Image
User avatar
Black Ice
loa fan!
 
Posts: 559
Joined: 05-13-2005 03:49 PM

Postby Xx_jet_xX » 02-27-2007 03:09 AM

assigning textures as in the red phbbcode text?

Code: Select all
define head      JO_HEAD_SEAL
{
   name      AV_BOONIEHAT
   graphic      Boonie.3di
[COLOR=red]   camo      0 0 0[/COLOR]
   voice      1
   sex         m
}


Nearest i could figure is the numbers correspond to which in line. honestly for what i did with the new avatars on the SO Mod was a guessing game. I started figuring it out on 1 .3di and then it was different on another.

Oh you can have combos added for each as well, effectivley adding well over 840+ avatars useable (in theory). think the max ive seen for combos was 8 and never tried it because i am modding dfx and not JO. and ive got 105 so far and have yet to reach a limit except for:

Limits i have found so far are 7 nationalities per section and 16 avatars per nationality. sections are divided by the definitions for the parts of the avatars.


oh i have 3 sections and only 1 filled to capacity.

If anyone wants a copy of my avatars.def and did not download the SO Mod ive uploaded to here: Avatars.def. compare that to stock JO and you will get a better idea.

Anyway dont think anyone is going to make 800+ avatars, if thery do well thats a mod in itself! think i made 30?
Xx_jet_xX
JET Laggg
 
Posts: 208
Joined: 04-11-2004 08:25 PM

Postby Black Ice » 02-27-2007 06:01 PM

So the three separate digits on the camo string represent the three different textures for the three pieces that form the body?

I know there's:
-Camouflage + vest
-Gear (boots, pads, belts, etc.)
-Face?

I'm not sure if the face is the third texture.

Am I getting this right? I'm not sure if there's only 3 textures.


On the thought of that many avatars - I would much rather have 3 real models that have fantastic skinning jobs than a bunch of shoddy ones. In terms of texture memory it's also not too excellent an idea, that uses up a lot of RAM.

It's kind of a shame that Novalogic never took advantage of the incredible avatar system they could have had. It wouldn't be hard making a system to mix and match head and body types then assigning camouflage patterns. It would have made selecting a character easier, too.
Image
User avatar
Black Ice
loa fan!
 
Posts: 559
Joined: 05-13-2005 03:49 PM

Postby Xx_jet_xX » 02-27-2007 09:37 PM

the one im showing is just the head. may have 3 or more of each one. face and helmet. when you open the 3di with a hex editor you will see a list of textures. further down is another list.

so each list say has 4 different textures. the numbers would be 0 0 0 for the first texture in each list. 1 1 1 for the second 2 2 2 for the third. the three numbers represent which list so you can mix and match as well, say 2 0 1 or whatever. this is ofcourse my theory on how that works. and seems about right to me. though i can say i had horid luck remembering which one i was working with.

now for each character you need 3 parts. head, body, and arms the arms are what you see in first person pov. head and body are what everyone else sees. you can add a male head to a female body or vice versa if it suits you but thats how the characters are done, head and body are seperate items. so you will need to maybe customize the helmet you pick as well to balance the character.

heres which ones that you change to make the player JO_HEAD_SEAL JO_BODY_SEAL_1 JO_ARMS_US_1
scroll up in the avatars.def and locate these items to find out what 3di they are and what numbers are there for the skin.

for JO you can just do all the skins and add combos that you scroll through when picking your player.

Code: Select all
   division  D00  AV_DIV_SEAL
   {
   combo   001     JO_HEAD_SEAL            JO_BODY_SEAL_1      JO_ARMS_US_1
   combo   002    JO_HEAD_SEAL_CAMO_1     JO_BODY_SEAL_1      JO_ARMS_US_1

   }
Xx_jet_xX
JET Laggg
 
Posts: 208
Joined: 04-11-2004 08:25 PM

Postby Brutus_Maximus » 07-27-2008 12:44 AM

There is ONE major problem that i have run into when adding new characters. If a mapper designs an extensive map that has the maximum number of objects allowed (or even anywhere near the that number), these new character definitions WILL put the map over the map object limit thus WILL cause the map to CRASH.
Brutus_Maximus
Junior Member
 
Posts: 1
Joined: 07-26-2008 02:01 PM

Postby Xx_jet_xX » 07-29-2008 03:29 PM

that is true that the avatars are preloaded into texture memory as well as weapons. So if you add all the JO avatars to DFX then DFX will have the same exact map size limits as JO. the problem you are calling comes when you add alot of new ones to the weapons and avatars like I did with DFX Special Ops.
Image
Give a man a fish and he will eat for a day. Teach him how to fish, and he will sit in a boat and drink beer all day. --George Carlin
Xx_jet_xX
JET Laggg
 
Posts: 208
Joined: 04-11-2004 08:25 PM


Return to Character

Who is online

Users browsing this forum: No registered users and 1 guest

cron