Changing Characters for new ones

  • Hay guys is it possible to create new 3d characters to re-place the once in the bar and ship dealers or would this create issues with the animations when they walk in?

  • yes i did mean entirely new models. why is it not possible at the mo? doent the character models work the same way the ships do or is it the animation parts that would have problems?


    If you could give me as much information as possible Id like to look into it, youv got me intrigued now that it has not been done?

  • Characters use a different file format, made up of head, hands, and a body, check out the /data/characters/ folder, there are ini files to define which mesh files are used, and which body parts are assembled to make stock characters. The bodies heads and hands subfolders contain the actual meshes, .dfm files.


    These can be opened with a utf editor, so you can take a look inside at the format, or exported to xml using the 'utf-xml' project applets. However, general consensus seems to be 'wtf' as to what to do with the stuff in there.


    Some parts are easy enough, the materials definitions and texture maps for example, other bits are rather more complex...


    Crack this little secret and release a milkshape import/export plugin or max/gmax import/export script and you'll be an International Freelancer Hero Hall Of Famer...

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...

  • yeah will have a look at it. the site I get a few of my models from does body parts, e.g. volcun heads and star fleet bodys and they all come with textures. the problem I have is they are in poser format so iv gota convert them to 3DS first, textures souldnt be a problem so ill have a good look at it and see what I can do.


    To be safe ill just try to replace trent and keep the file names the same throughout that way I shouldnt have as much trouble with ini files later on.

  • I assume OP's way is using a CMP instead of the usual one. A CMP won't stand in an animation through the Thorn file, so you have to place it as a prop. What I don't get is how to make it selectable as an NPC standing in the bar.
    Animating a CMP is possible and can be activated through the Thorn.


    As in for you Spuder, you can build the character out of bodyparts and export to CMP, placing it as a prop in the Thorn script.
    Another option is to retexture the original bodies using UTF editor or XML Project. If you want alien heads, use them as props, or more specifically, as masks or head-props.

  • I was thinking about that... a vanilla fl bald head, with a 'ferrengi head' hat, or a klingon 'cornish pasty on your forehead' hat...

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...

  • ok ok, so let me get this stright cus im not a programer im just learning to mod in freelancer with tools youv all made.


    If im reading this right you are saying that I can create a CMP head and put that into the heads file e.g. replace trents head with my vulcan head and it will show up in the game, however the animation part wont work?


    Q1: what are the orig files extensions for body parts?
    Q2: do you have to some how de-activate animations or will it just show the old head?
    Q3: what scale does the head need to be to fit on right?


    Which file is trents head lol?(no worries found it)

  • This may seem as a silly question, iv looked at the head file and once again there is loads of small parts just to make the head. if I created a completely new head and textured it. added it as a CMP file the same way as you would a ship and then added it to the ini files and changed trents head to the new one do you think this would work?


    is there a reason that microsoft made each body part with a million peaces e.g. lips, eyes, mouth? wouldnt it have been easier to create the whole head and then added 1 texture to it?


    As for the animation I can see why it doesnt include what you add, i may be wrong but they look like the were created within the 3d software and compressed into files. if so does this mean that everything in the ani wont change e.g. backgrounds as if this is the case maybe it would be easier to create new animations over time based on your game layout.


    I may be plucking at strews or just talking a load of BS but Im sure you will get what im trying to get at and hopefully explain it all to me lol

  • You didn't understand it at all.



    look, a CMP can't replace a DFM, therefore you can't put in the costum bodyparts under a regular entry.



    What you should do is this: Build the whole body using some 3D program, and then export it to CMP. You can create a new folder to contain those bodies. Open PetalDB.INI (located at Freelancer/Data) and add it like this: "prop = nickname, file's location".
    Then, you'll have to add the prop to the Thorn file of the scene (THN script). Find some tutorial that might help you.


    This way would be good for dealers. For bar characters it would be better to retexture existing bodies in DFM format as I told you already. Juts find a fitting form, and place the costum texture on it. Remember to make sure the particles of the costum texture (pants, shirt, slaves...) fit the particles in the original one.

  • I havn't looked too closely at chars, so this is just off the top of my head, you understand...


    There is a separate folder for the animations, which come in two flavours, male and female, each set is based around a standard skeleton rig for the gender in question...


    The bodies etc, have multiple parts, presumable for defining bending zones for the joints, maybe some form of vertex weight mapping like sims2, maybe just simple mesh bend zones, say a spherical falloff, like some versions of poser or truespace, maybe some wierd combo, maybe something else...


    A typical body only uses 3 texture maps/materials, but these are assigned to multiple groups, it's kinda tedious altering tex names when cloning body meshes, and I havn't done it in a while, but in addition to the multiple mesh groups, there is what seems to be a complex 'skeleton info' section as well, this will presumably match up with the default skeleton used to create the anims, so any male anim should be applicable to any standard male body. Basically, dfm files are NOT just renamed cmp's. The actual mesh format may be the same vmesh thng used in cmp's and 3db's, I havn't bothered to check as yet, maybe somebody else knows, but cmp's and dfm's are not the same, dfm's seem to use features from both cmp's (extra nodes to define stuff like joints) and 3db's (built in texture libraries) with mad stuff all of their own...


    What Poly is talking about when he mentions using cmp's or 3db's is making STATIC 'alien guy' statues, and putting them in your bars instead of animated vanilla characters .

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...

  • I understud and didnt mean simple leave it as CMP. i ment create a new CMP and put it in a completely new DFM file with your textures. edit the ini files to include the new DFM body part and then replace Pi_Pirate5_head with the new DFM to replace trents head with the new one?

  • editing the ini's to use a new dfm is a piece of cake, cloning an existing dfm to add a new reskinned one, is tedious but doable, making a new dfm from scratch is the hard (never been done before) part, the dfm mesh format isn't just a cmp with a different file extension, nobody is really sure what all the bits in there actually do, as yet, except digital anvil who aint saying...


    Thats the bit that would make the first person to do it a "FL Modding Hall of Famer". Gonna involve taking an existing dfm literally to pieces and comparing mesh formats etc with cmp's/3db's, trying to figure how to group the mesh, how the mesh bending system (so the knees flex etc) works, talking a LOt of very experimental work.


    Game is 8 years old and this still hasn't been cracked, unlike most other FL formats, so don't expect this to take a few days...

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...

  • kk so basicly the reason they did so many small parts is for the ani e.g. the movement, so if I try to change it to 1 object like the ships it will break the ani or just not work at all. im gona have to figure it out now that know one has been able to do it and I also want to change them when im finishing my mod off as the models I have look mint, no blocky square bits or anything

  • Now your getting the idea, in one of your pm's you mentioned poser models, do you use poser/ds ? if so, open up a poser .cr2 file in a text editor, and you'll see how the meshes are chopped up into groups, with a set of code for each part that defines how it links to the other parts, and how it should bend when you change the pose of the figure.


    You also find a similar system in jedi knight 3 (academy) or the quake series (in most 3d games involving humanoid figures in fact), sometimes the mesh it's slf is chopped into bits to attach to a skeleton, sometimes its a single mesh, depends on how old the game is amd what system they use.

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...

  • Its not only the animation. I tried it once, and seems like the bodyparts have special hardpoints so they can mount up on the body itself, or its all depending on the animation.
    anyway, the best way to get new characters is retexturing the original.

  • Yeah there is some kind of 'hardpointing' in there too, for prop attachments, probably in the 'skeleton' section, thats why all the character accessory props come in male/female flavours, to match the variations in position on the two different skeletal rigs.


    EDIT: Just opened a dfm since its been a while since I looked in one, theres a short hard pointsd list in a hardpoints section, for basic prop attachments, a parts list, multi nested but similar to a cmp, the face groups bit off the root is totaly unlike cmp/3db formats, looks like there are embedded mesh data in there in a mad binary format including bone names and bone weights, for kinematics, along with uv data again in some mad binary format, this seems to replace the standard vmesh data of a cmp/3db.


    So, the material lib, texture lib, parts, and cmpnd sections are pretty normal, the hardpoints section is NOT normal, the skeleton section is almost empty, and the multilevel section is just insane, like somebody translated part of a vmesh format, might be worth checking the 'multilevel/mesh0/group0/' and geometry sections against the source code for a cmp/3db exporter plugin, seems the group0 group1 etc sections define the material groups just like the ones we use in cmp exports from milkshape, with a material name (not crc checksums or hex codes, plain text), and a list of triangle index numbers to which that material is applied, while the geometry section is an alternate format of vmesh, maybe if an export plugin c coder looked at this, it might actually be possible to write a milkshape exporter for it, so you could export a 'dummy cmp' and then export the dfm mesh format from the dummy and import it into a cloned dfm with utf editor...



    All those bottom level nodes are full of data, boneweight and bone are just 3 col arrays, for vertex weight mapping and vertex to skeleton bone assignment, that is which 'virtual body part' left thigh, right foot etc a particular vertex is attached to and how much it should deform from its position when the body part is posed.


    Point bone count, another array, but who knows what it does, doesnt seem to match the number of verts at all... Points_bone_first, who knows, mad binary stuff..


    [EDIT2]: Lightbulb time... array of xyz coordinates for the start points of the 'bones' in the skeleton, that is, center or rotation for each bone, left thigh pivot point, left shin pivot point, left foot pivot point etc., similar to the format used in poser (a rigging system even older than Freelancer) [/edit2]


    Points is just a standard vertex list, with xyz coords, so points_bone_count *might* be vertex winding order to define the tris... *might* not, point_indices & uv0_indices looks more like triangle definition lists in fact.


    The vertex_normals bit worries me, not sure if milkshape uses vert-normals, or if it only supports surface normals, vert normals allows you to make curved polygons instead of flat ones, a high end (3ds max) kind of mesh smoothing.


    And thats just one mesh entry, there are 6, lods? Anyone ever seen characters use lods?


    Icky format...

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...

    Edited 2 times, last by AestheticDemon ().

  • kk think im getting it. no i dont actually use poser it just what the models are created in which im using but ill look into what ya said.


    (polarbear) I know it would be easier to just re-texture the models in the game but i want my mod to look as perfect as possible and just drawing the star fleet badge on makes it look alittle bland where as new models have a 3d badge which make them stand out alot more.


    If we can all figure sumit out that works for everyone then even the people who love freelancer have the ability to update their game to todays graphics. being stuck 8years bk may be an easy option but more fun and furfilling if you create or realise how to change it to today.

  • kk think im getting it. no i dont actually use poser it just what the models are created in which im using but ill look into what ya said.


    Click the 'website' button under my forum avatar on this post, that will take you to my deviant art gallery, look for the 'poser freebies' subsection on the left, ignore the swords n spears etc, try the light sabre or the bullwhip, those are simple meshes, rigged as posable characters for poser, they have cr2 files to define how the obj file is loaded and set up a 'skeleton' for posing it, simple skeletons not too hard to get the gist, if you're that interested... lol

    AestheticDemon


    Terror Trooper #666


    Give a man a fire and he's warm for a day...
    Set a man on fire and he's warm for the rest of his life...