Jump to content
View in the app

A better way to browse. Learn more.

RDR2Mods.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

 

Is it possible to make a nested / "foreign reference" NPC model ymt?

 

Something like:

 

sac_model.ymt

 

<blah>

<outfits>

   [a_f_m_btchillbilly] (existing model ymt)

   [a_f_m_sdchinatown] (existing model ymt)

   [... etc]

</outfits>

</blah>

 

 

My Fallout 4 and Skyrim mods: SAC - LoversLab

 

I dont think so, but you can replace the original one with your modified one (in which you add whatever you would like to add) using lml.

Or am I missing the point?

  • Author
20 minutes ago, HughJanus said:

I dont think so, but you can replace the original one with your modified one (in which you add whatever you would like to add) using lml.

Or am I missing the point?

 

True, and I'm going to share my custom ymts at some point. They can be put in \lml\stream, no need for a replacer xml

 

However, it is extremely difficult to maintain. For instance, let's say you want an ymt which references females from various populations. Any modification you make to any of the populations you want to reference, you will need to replicate in your "master" ymt. This gets very complex, very fast, as you reference more NPC models and you make more modifications to them (as I am frequently doing).

 

Of course, scripting make this easy (after the brutal initial learning curve), do a map (array) 😛 of the populations you want to spawn, then proceed to random spawning from that map. 

 

 

string SAC_return_random_female_model()
{

    std::map<int, char*> female_models;

    female_models[0] = "sac_female";

[...]

    female_models[31] = "a_f_o_waptownfolk_01";

    return female_models[(rand() % female_models.size())];

}

[..]

    char const* mymodel = SAC_return_random_female_model().c_str();

    Ped myPed = spawnPed((MISC::GET_HASH_KEY(mymodel)), vfront.x, vfront.y, vfront.z);

 

(abbreviated)

 

 

There is another weird effect to maintaining a monolithic ymt. Let's say I stack 2 NPC models in one ymt (10 variations each, for the sake of the example). The weird effect is when I spawn from that ymt in-game, the game randomizer will pick a lot of successive outfits from the first model, then switch to the other model and produce a lot of variants from the second one. I don't understand it, but it's a fact. I was able to randomize better by scripting

 

PED::_SET_PED_OUTFIT_PRESET(pedSpawn, (std::rand() % (PED::GET_NUM_META_PED_OUTFITS(pedSpawn) - 1)), false);

 

Useful reference for scripting spawns here: https://www.rdr2mods.com/forums/topic/1296-solved-how-to-spawn-ped-from-c-script-hook/

 

 

 

My Fallout 4 and Skyrim mods: SAC - LoversLab

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.