Streaming / overriding scenario ymt

The codewalker discord has some info on it, but I wasn’t able to get it to work, and can’t ask because I don’t have the right perms for it.

^^ no no, on the codewalker discord, Deyfex (codewalker dev) refers us to the fivem forum since they do not provide specific fivem support…

From all I can tell, .ymap .ybn and .ytyp are the only files that get streamed in the mapping, I cannot find anything that loads a scenario .ymt file into FiveM, then again I could be looking past it as I’m tired but would like to be proven wrong.

I’m looking in the wrong place, more digging.

Edit:
So I believe there is some things that are not understood. The data pointers are for .meta files not the ymt files, this would allow you to make your own version of the WORLD_HUMAN_AA_COFFEE scenario for example, as in the scenarios.meta file this is stated and the animations required for that scenario, this alone has interested me as that means you can write an animation queue and call it via a single name.

As for the .ymt files from codewalker, I don’t know if FiveM is loading them but they should be given everything else I’ve looked into for .ymt files, is it a case that its a name for name replacement? Or is there a way in FiveM for us to know if the file has been loaded?

Example of the WORLD_HUMAN_AA_COFFEE scenario from scenarios.meta;

  <Item type="CScenarioPlayAnimsInfo">
      <Name>WORLD_HUMAN_AA_COFFEE</Name>
      <PropName />
      <Models ref="NULL" />
      <BlockedModels ref="NULL" />
      <SpawnProbability value="1.000000" />
      <SpawnInterval value="0" />
      <SpawnHistoryRange value="50.000000" />
      <MaxNoInRange value="0" />
      <PropEndOfLifeTimeoutMS value="60000" />
      <Range value="0.000000" />
      <SpawnPropIntroDict />
      <SpawnPropIntroAnim />
      <StationaryReactHash>CODE_HUMAN_COWER</StationaryReactHash>
      <SpawnPropOffset x="0.000000" y="0.000000" z="0.000000" />
      <SpawnPropRotation x="0.000000" y="0.000000" z="0.000000" w="0.000000" />
      <TimeTilPedLeaves value="-1.000000" />
      <ChanceOfRunningTowards value="0.000000" />
      <Flags>AllowConversations BlockGestures ChangeToSafeTypeOnResume DontSpawnInRain DontTimeoutUntilIdleFinishes DoSimpleBlendoutForEvents EnableKinematicPhysicsForPed NavmeshBlocking QuickExitsFromHassling SpawnMalePedsOnly</Flags>
      <Condition type="CScenarioConditionRaining">
        <Result>False</Result>
      </Condition>
      <ConditionalAnimsGroup>
        <Name>WORLD_HUMAN_AA_COFFEE</Name>
        <ConditionalAnims>
          <Item>
            <Name>WORLD_HUMAN_AA_COFFEE</Name>
            <PropSet>COFFEECUPS</PropSet>
            <Flags />
            <Probability value="100.000000" />
            <SpecialConditionProbability value="0.000000" />
            <SpecialCondition type="NULL" />
            <NextIdleTime value="2.000000" />
            <ChanceOfSpawningWithAnything value="1.000000" />
            <BlendInDelta value="8.000000" />
            <BlendOutDelta value="-8.000000" />
            <GestureClipSetId />
            <VFXData />
            <VFXCullRange value="25.000000" />
            <TransitionInfo type="NULL" />
            <Conditions>
              <Item type="CScenarioConditionIsMale">
                <Result>True</Result>
              </Item>
              <Item type="CScenarioConditionHasProp">
                <Result>True</Result>
                <PropSet>COFFEECUPS</PropSet>
              </Item>
            </Conditions>
            <LowLodBaseAnim />
            <BaseAnims>
              <Item type="CConditionalClipSet">
                <ClipSet>[email protected][email protected]</ClipSet>
                <AssociatedSpeech />
                <Conditions />
                <ActionFlags />
              </Item>
            </BaseAnims>
            <Enters />
            <Exits />
            <Variations>
              <Item type="CConditionalClipSet">
                <ClipSet>[email protected][email protected]_A</ClipSet>
                <AssociatedSpeech />
                <Conditions />
                <ActionFlags />
              </Item>
            </Variations>
            <Reactions />
            <PanicBaseAnims />
            <PanicIntros />
            <PanicOutros />
            <PanicVariations />
            <PanicExits />
          </Item>
        </ConditionalAnims>
      </ConditionalAnimsGroup>
      <CameraNameHash />
      <IntroBlendInDuration value="0.500000" />
      <OutroBlendInDuration value="0.500000" />
      <OutroBlendOutDuration value="0.250000" />
      <ImmediateExitBlendOutDuration value="0.500000" />
      <PanicExitBlendInDuration value="0.125000" />
      <PedCapusleOffset x="0.000000" y="0.000000" z="0.000000" />
      <PedCapsuleRadiusOverride value="-1.000000" />
      <ReassessGroundExitThreshold value="-1.000000" />
      <FallExitThreshold value="-1.000000" />
      <eLookAtImportance>MEDIUM</eLookAtImportance>
      <SeatedOffset x="0.000000" y="0.000000" z="0.000000" />
      <WanderScenarioToUseAfter />
    </Item>

You can stream .xml .ydr .ymt files too.

Yes, we got that. The thing is trying to find out if we can stream scenario pointers that you can create in CodeWalker, each test so far has failed.

Probably as you’re doing it wrongly?

I’ve no clue what you’ve tried since but if there hasn’t been any progress from yous since @bob74’s reply from 2018, obviously that doesn’t work:

--data_file 'SCENARIO_INFO_FILE' 'countryside_ne.ymt'                     -- ScenarioInfoMounter
--data_file 'SCENARIO_POINTS_PSO_FILE' 'countryside_ne.ymt'               -- ScenarioPointMounter
--data_file 'FIVEM_LOVES_YOU_A01627E3E5FC490A' 'countryside_ne.ymt'       -- ScenarioInfoMounter
--data_file 'FIVEM_LOVES_YOU_399915A5EEB45A2B' 'countryside_ne.ymt'       -- ScenarioPointMounter
--data_file 'FIVEM_LOVES_YOU_A9E8B9F6EEB35186' 'countryside_ne.ymt'       -- ScenarioPointMounter
--data_file 'FIVEM_LOVES_YOU_DB4D236636684A3F' 'countryside_ne.ymt'       -- ScenarioPointMounter

This is not how such files get registered!

Scenario files are referenced from a scenario point manifest as such:

  <Item type="CScenarioPointRegionDef">
   <Name>platform:/levels/gta5/scenario/countryside_ne</Name>
   <AABB>
    <min x="577.9417" y="-2190.842" z="1.645161" />
    <max x="2970.658" y="6642.504" z="355.7393" />
   </AABB>
  </Item>

which explains why they do nothing if ‘just’ registered as file or dropped in stream/.

However, what should work is registering a replacement scenario point manifest:

  1. take sp_manifest.#mt from update:/%platform%/levels/gta5/ from 1604 if you use it! if you use the 2189 one on 1604 you’ll crash with ERR_STR_PACK_2 as island scenarios don’t exist!, (contents of, as XML)
  2. specify it as data file:
    file 'sp_manifest.ymt'
    -- SCENARIO_POINTS_FILE may work, too
    data_file 'SCENARIO_POINTS_OVERRIDE_FILE' 'sp_manifest.ymt'
    
  3. edit it:
    <Item type="CScenarioPointRegionDef">
      <Name>compcache:/test_ymt/countryside_ne</Name> <!-- apparently VFSRagePackfile doesn't support RSC registration, so we use `compcache` instead of `resources` here -->
      <AABB>
       <min x="577.9417" y="-2190.842" z="1.645161" />
       <max x="2970.658" y="6642.504" z="355.7393" />
      </AABB>
    </Item>
    
  4. make sure file 'countryside_ne.ymt' is in your resource’s stream/ folder
  5. yay!
1 Like

This helps greatly as I know nothing more than “haha got ymt file from codewalker it no work, me dumb dumb” and also this topic is all the information I had to go on. With your reply this will now improve, and hopefully can be added to the documents.

So, I don’t know if i’m looking in the wrong place but I can only find ‘sp_manifest.ymt’ in ‘update/update.rpf/x64/levels/gta5/’ which won’t export to XML using OpenVI, so I guess there is another location I should be looking at other than the source files of GTA? as of my last stuff I’m working with b2189 to keep it simple also, as too many IPLs were the core of the issue, and I know I’m not being great but beyond C#, digging through GTA’s files is new ground for me.

CodeWalker’s RPF explorer view.

Thank you, I’ve pulled that file out as XML, edited it and added the code as you’ve stated and I got the error you warned about (ERR_STR_PACK_2), the client is FiveM* (b2189) (Canary) but when loading the resouce, I get that error.

Example repo dumped here to see if I’m being a complete idiot as I suspect I am. Line: 1006 is where I’ve added the xml line, the min/max is copied from the same scenario in the file.

It pretty much dumps 3 NPCs in Sandy Shores airfield, typical yoga test;
image

I guess your resource isn’t called “test_ymt”?

OOOOOOHHHHHHHHHHHHHHHHHHHHH

facepalm moment, so sorry, 00:43AM…

Edit;
deterministic_bubble you’re a legend, thank you very much

For those revisiting this and are still interested, the github link I posted earlier is a working resource for loading a custom scenario.

2 Likes

Thanks! :heart_eyes:

Game keeps crashing when I enter my localhost server. Could You tell me what version of artifacts are You using?

Build 2189, latest server files and remember to change line 6 in the sp_manifest.ymt file to match the resource folder name if you change it.

1 Like

Okay it’s working fine now, thanks. But I have other issue. After editing scenario (just add few new points and set flag to high priority) other peds which I didn’t touch seems to be freezed or something like that. They’re just staying in this weird position. Do you have idea what could be wrong?

I’ve not played around with them enough to notice anything like this, I mainly used them to tweak the scenarios already in the game.

Yeah I get it. But even when I just delete one point or change ped model it’s the same situation (in existing scenario). I tried to create new custom scenario file and it’s working correctly but peds near this area disappeared. Am I doing something wrong? Guess You don’t have this problem.

Are you just adding new points in a new scenario? or adding points to a pre-existing scenario region? (i.e. click a scenario, add to project), as I only used the latter, and didn’t see this issue.

Both. When I’m making new scenario then stream it, all working fine but it seems to exsting scenario (at same location) not working properly. If I’m adding new points to already existing scenario then some peds are frozen.