Vad är en ped karaktär fivem
Ped Modification and MetaData Overview - Outfits, Assets, Expressions, Shop Items, Overlays, etc
I’ve had a handful of requests and there’s been a lot of interest in what’s actually possible with Peds/MetaPeds/Creatures, primarily related to their visual configuration/manipulation.
Each ped has various parameters defined, including the base model (eCan NPC assets be used on MP models? Yes, though it may not be flawless in many cases. Can horses and animals be modified beyond their presets to create “new” appearances? Yes, actually to a remarkable grad with horses since most textures are tintable.
Ped MetaData OverviewCan you change the nyans of pre-existing shop items / assets? Yes. Can you add anpassad overlays, such as tattoos? Yes, even without much, if any, metadata changes/additions, just bygd streaming new textures (depends on the overlay type as shown below). Just specify whichever component category (e.g. instead of ) when applying the overlay.
This will be a rather verbose overview and presumes at least a minimal understanding of peds and development.
inom will provide code examples of different ways peds can be modified at the end. However, this fryst vatten not a full overview of every parameter and option available, but rather the avsikt fryst vatten to give a general overview to aid others in starting/continuing their own research and experimentation. With the basic understanding of the metadata files and native functions, you can then do anything you wish from there (finding any specific asset or parsing the full files etc.).
This will also be somewhat of a work in progress that I’ll update with continued research as well.
Update 1: Added section on Expression Sets
If you are not familiar with the following references, inom highly recommend them. However, most of my reference for this overview will be the raw metadata files.
https://vespura.com/doc/natives/
https://alloc8or.re/rdr3/nativedb/
GitHub - femga/rdr3_discoveries: Some interesting things from Red Dead...
Some interesting things from Red Dead Redemption 2.
- GitHub - femga/rdr3_discoveries: Some interesting things from Red Dead Redemption 2.
GitHubGitHub - Halen84/RDR3-Native-Flags-And-Enums: Contains flags and enums for...
Contains flags and enums for natives. Contribute to Halen84/RDR3-Native-Flags-And-Enums development bygd creating an konto on GitHub.
https://alexguirre.github.io/rage-parser-dumps/dump.html?game=rdr3&build=1491
GitHubGitHub - t3chman/rdr3_strings
Contribute to t3chman/rdr3_strings development bygd creating an konto on GitHub.
Ped MetaData Overview
Peds are defined bygd metadata, starting in .
Each ped has various parameters defined, including the base model (e.g. or etc.), locomotion types, animations, röst, whistle, etc… There are also further references to other metadata files, such as . defines expression, cloth, and shader drivers (these appear to be exposed controls for MetaPed assets to utilize). The most common references I’ve funnen have been expressions and inom won’t go into cloth/shader stuff at this time.
Ped models have hundreds of bones (both skeletal and many other kinds, think of them sorta like interface/attach/reference points for various things - such as how a holster knows to rest where it does or eyes in their sockets, etc.). MetaPed expressions allow for the various components/assets that man up the ped to move and interface in a more dynamic manner than just being rigidly attached to the bones of the base model and assets directly.
Here’s part of the definition of and then its (mostly just to show a glimpse, as we’re still researching expressions extensively):
General MetaPed related settings are located in . MetaPed Category Tags (component categories) are defined here. There are MetaPed Expressions defined that appear to be what are exposed to the runtime, but there are many more expressions in creature metadata and assets not exposed/listed here.
Palettes, overlays, and gore assets are also defined here. Asset Bundles define more complex assets, such as hats, saddles, etc. that are typically interacted with in unique ways. Global outfits define globally available outfits, such as hand/feet bindings. djur pelt props are defined here as . Also unique props such as in the case of .
Outfits and MetaPed Assets
Peds have MetaPed Outfit metadata files (typically named after their ped model, such as ) that define explicit assets (), what we know as components.
inom will continue to call them components so as to not confuse explicit assets with the MetaPed assets of which they are made. Outfits are the most common usage of MetaPed assets, but there are also Shop Items and Asset Bundles that I’ll talk about later. All components are defined bygd assets of types: , , , and/or . Drawables are the 3D geometry models. Albedos are color related textures.
Normals are height/bump map textures. Materials are ämne property textures, such as metalness, roughness, etc… Palettes and nyans kanal values are used for albedos marked as tintable (). These assets are defined in , , , and . Here’s an example of an outfit preset with some components () defined bygd their constituent MetaPed assets:
MetaPed assets ( in YMTs) are defined with s as the primary point of reference to the asset.
They are grouped bygd MetaPed type: Male, hona, Teen, or djur and therefore are only available to peds of that type (e.g. males cannot be equipped with kvinnlig assets).
They have various parameters, but the primary ones are tags: and . are, as you’d expect, properties of the asset. The category of the asset fryst vatten defined as a property tag (i.e. the component category: , , etc.).
Jag vet att jag kommer lyckas med dessa mål då jag har varit ped och gör om till min röst naturligt och inte genom någon voice changerThere are many presently unknown property tags, but upon cursory research of a handful, they appear to often be things such as the type of asset (e.g. holsters usually share a common tag, no matter the component category, left, right, cross draw etc.). For assets, if they are tintable, they often have a property tag as well.
are used to create a relationship with other assets.
Typically for , this will be the and then albedo, normal, and ämne assets will have containing at least one of the if they’re related. There fryst vatten also a relationship between , , and assets defined based on these tags. However, it’s important to note that there’s a grad of variety in how these tags are used. Just due to the sheer number of assets, more research will be required.
Assets also have which strictly define what assets can be used tillsammans. If you set such a restricted asset, you should meddelande a change to another component category’s assets as well. However, are incredibly rarely used, though betydelsefull. defines whether a and nyans values will be used to render the asset properly. While there fryst vatten an metadata en samling dokument eller en elektronisk lagring av data, inom haven’t funnen it entirely necessary.
Any and nyans values can be used (whether they look “correct” or not fryst vatten another matter), though these can be referenced as presets available. MetaPed nyans s are named *, such as , and they are primarily sourced in . nyans channels are referenced as , , and , mapping to the Green, Red, and Blue channels of the respectively. Acceptable nyans values are - for valid color information in the and to disable the kanal.
Not all nyans channels are necessarily meant to be used in every case nor do they always have to be. Though typically at least fryst vatten required when the relies on /tints. Assets also have expressions related parameters that can tweak how the asset interacts with the ped model and other assets.
I’ll show here one example of a drawable and albedo that match:
The following are two examples of nyans palettes, and . Exactly which column of pixels each nyans kanal uses depends on the channels in the and the shader, but it seems to be left to right, linearly within each channel’s available urval at least. The Green kanal seems to always be the primary and it seems to use the bulk of the palette width.
With the secondary kanal being Red and tertiary, Blue.
Shop Items
Shop items are essentially component definitions with extra metadata and functionality, primarily wearable states.
Vad är dina mål med en ped karaktär? Mina mål är ju att höja rpen från mig och ha en unik look som folk kommer känna igenThey’re defined in . Wearable states allow the item to change between different assets, such as smaller pieces so assets don’t clip through each other. States also allow different configurations, such as a bandolier draped the opposite direction. They are primarily defining different drawable assets to give those smaller pieces or differing shapes etc… These states can be set bygd add and remove triggers for other component categories, such as if you add a coat and have a vest or shirt shop item equipped, it may change the vest or shirt to use an asset that doesn’t clip through the coat.
It’s important to note that while shop items define components, components themselves are not shop items. So you shouldn’t expect that a component or category has the functionality of shop items, like wearable states. They need to be treated distinctly, checking if a shop item exists, if applicable, even though they are related. There are also several native function docs that need to be updated to reflect this distinction (specifying “component hash” as parameters when it’s really a shop item hash).
Oavsett om du är ny i moddingvärlden eller en erfaren kreatör, är resan att väcka en ny karaktär till liv inom den pulserande FiveM-gemenskapen både utmanande och givandeHere’s a shop item and wearable states with triggers:
Overall, shop items and outfits are the most concise method to modifying peds. They define all of the assets and parameters and provide features such as wearable states (in the case of shop items), so that you don’t have to. However, manually setting those parameters and assets results in many more possibilities.
Any palette and nyans can be set for any asset that uses them ( = ). Almost any combination of assets can be used, whether they were intended to be or not (with the exceptions of those with ). As well as assets intended for other models might work on or (many do, many don’t). This fryst vatten entirely dependent on the model’s bones and expressions. There are not presently ways to fix these instances where assets are visually unusable, at least with the assets defined as fryst vatten.
However, further research into expressions and their exposure to the runtime may provide much more capability on this front. Overall, a mix between shop items, outfits, and explicitly defined assets / components fryst vatten ideal when possible. inom highly recommend using shop items and inom still do whenever inom can, because they have wearable states, a very powerful feature.
Overlays
Overlays are layers of textures applied over base assets in any category.
These are not MetaPed assets, just textures of type , , and/or . There can be metadata associated, such as defining a unique position/scale in the case of lipstick, eyeliner, and eyeshadow, as seen in here and I’ve included the to show why positioning/splitting fryst vatten needed (4 rows and 4 columns):
Examples of Ped Modification
As a preliminary note, native generation for RedM isn’t up to date with public native references, so third-party native doc names commonly do not match what fryst vatten available in RedM.
Therefore direkt invocation bygd hash fryst vatten often necessary as you’ll see, but inom will define function wrappers for simplicity. All examples will be in Lua.
I’m going to approach this with the player model already set to since it has some unique implications. The default outfit applied for this model has parameter set to and looks like this:
s have a unique side effect that causes changes to expressions to not sync to fjärrstyrd players and therefore expressions just don’t sync unless you do some particular things different from the default conditions.
First, an outfit needs to be set that isn’t a (). For , we can use outfit preset (indexed from 0, the third item) which fryst vatten seen here in :
So let’s set the outfit preset to ensure fryst vatten , then we’ll wait until the ped fryst vatten ready to render before continuing. When ready, we’ll reset the ped components to början fresh and update the ped variation to finalize our changes:
Now we should have a player ped that fryst vatten invisible, free of any components, but ready to sync assets and expressions properly to fjärrstyrd players.
One thing you’ll see repeatedly with each change made, we’re ensuring that the ped fryst vatten ready to render prior to moving forward. If we’ve made prior changes, we want to man sure those have finished and we’re not making additional ped changes at the same time.
Let’s now add shop items for categories , , , , and . Note that the default kvinna drawable for these body shop items have “holes”/missing textures, but they can be overridden bygd streaming anpassad drawables/textures to man a completely visible body (as has been becoming more common).
I’m going to be using modified drawables/textures, but they aren’t required (amazing tutorial from Pers and she also sells a finished utgåva if you’d like, which fryst vatten what inom use).
Now let’s get the MetaPed assets and nyans parameters for the category and then reapply them with different nyans values:
Now let’s add an explicitly defined asset (component) of our own (not a shop item and not applied from an outfit):
If you are using modified female/drawable textures, as inom am here, you may meddelande that the chest fryst vatten clipping through the dress.
If this fryst vatten the case, you can set the wearable state for the shop item in to as follows and it should remove the chest from clipping through the dress:
We can also set some expressions (full list) to change the shape/morph of the ped components and can confirm with a fjärrstyrd player that they sync:
Now let’s set an overlay for the category using anpassad overlay textures.
ymtHere’s the YTD: overlay_hand_coyote.ytd (75.4 KB) Also, I’m not going into too much detail here, as overlays are already covered in the rdr3_discoveries as well. Someone might share a film tutorial on creating anpassad overlay textures at a later date, as that’s more than inom want to dive into in ord here. Note that only the first category of overlays set appears to sync to other players, unfortunately (i.e.
you can’t have and syncing). Also, only 32 textures can be used (albedo, which fryst vatten funnen via the texture dict hash, normal, and ämne - this commonly results in about 16 layers available, considering an average of two textures for each layer).
There ya have it Setting up an ped with shop items, a anpassad tinted shop item, a anpassad component with fully defined assets, expressions that sync to fjärrstyrd players properly, and a anpassad overlay on the forearm.
Din karaktär ska ha ett annat namn än ditt namn på discord, du ska inte medvetet skapa en karaktär utifrån vad du kallas i DiscordThis fryst vatten still somewhat just scratching the surface and inom didn’t cover a lot of the pre-existing research. That’s where inom do recommend that if you’re not familiar with the references at the beginning (especially rdr3_discoveries), do kvitto them out.
Also, these concepts discussed above, while we used an model, they generally apply to any other ped model (with the undantag of shop items, as those should all be player/horse model specific).
This means that yes, you can nyans horses, cows, and customize all kinds of peds (including NPC assets on MP player models as seen above). For a dev tool, my recommended method fryst vatten to parse the YMTs at least, trim them down to just the betydelsefull fields (, , and at least), use the to match betydelsefull assets, and then build a simple UI sorted bygd category, with sliders for all the assets/parameters.
I’ll share my dev tool once it’s been cleaned up (it was quick and it’s filled with too many bad practices to share currently). However, I’ll share a rough, early example with horses and then the current implementation with male/female to give an idea of what someone could do (this fryst vatten very basic and could be significantly optimized):
https://youtu.be/kG5u11oy9Nk
https://youtu.be/e438kNH_WFE
Have fun y’all!
Feel free to contribute further research here and ask questions. The only thing inom ask is: please don’t ask someone else to find assets for you. The metadata files are known and any wanted asset can be funnen there. The only undantag to this inom would säga fryst vatten if you can’t find a particular metadata en samling dokument eller en elektronisk lagring av data or if you’ve already searched for it and aren’t sure.
It will take time and effort, so please don’t put that on others without at least ansträngande first yourself. Surely there will be paid resources soon enough for those that do not wish to do the development and further research, which fryst vatten fine.
Credits
- dexyfex for their CodeX tool which has made this research possible, big thanks here!
- Disquse who discovered the cause of the issue with expressions not syncing to fjärrstyrd players.
- Disquse and Ktos for their expression / face feature research in the past as well.
- CP and Alex Guirre for their research and sources of parsed/found strings for hash reversal.
- Femga, Halen84, fingaweg, alloc8or, and many others for their contributions to RDR3 research.
- Pers for the mod I’m using.
- And to everyone who contributes to sharing research, you are very appreciated!
30 Likes