Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. The Criminal Enterprises
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

*DO NOT* SHARE MEDIA OR LINKS TO LEAKED COPYRIGHTED MATERIAL. Discussion is allowed.

[Solved] Scripted YMap and YBN loading problem.


LeeC22
 Share

Recommended Posts

So I have ended up back doing stuff in GTAV (not something I wanted to do) and have a problem I just can't solve.

 

I wanted to convert an addon map so that I could switch it on and off with a script. The problem is that no matter what I have tried, the static collision loads by default and only disappears if I load and then unload the YMap.

 

The YMap flags are set to 3, which causes the main YMap to work by script, so that seems fine. Codwalker suggested a flags setting of 2 but I don't consider that a 100% reliable source of info, I have tried 1 and 3 based on Dekurvinator's website but the end result was the same.

 

I have added the MapDataGroups to the _manifest.ymf as follows, that's based on the info on Dekurvinator's website.

 

  <MapDataGroups>
    <Item>
      <Name>dousojin_touge</Name>
      <Bounds>
        <Item>dousojin_touge_col</Item>
      </Bounds>
      <Flags/>
      <WeatherTypes/>
      <HoursOnOff value="0"/>
    </Item>
  </MapDataGroups>

 

The addon pack currently has two folders, a dousojin_touge.rpf and a dousojin_touge_metadata.rpf. I have tried various combinations of files/folders and have even tried putting everything into one folder in the way some of the Cayo Perico island data is done.

 

Content.xml is as follows:

Spoiler
<?xml version="1.0" encoding="utf-8"?>
<CDataFileMgr__ContentsOfDataFileXml>
	<disabledFiles />
	<includedXmlFiles />
	<includedDataFiles />
	<dataFiles>
		<Item>
			<filename>dlc_dousojin_touge:/%PLATFORM%/levels/gta5/dousojin_touge.rpf</filename>
			<fileType>RPF_FILE</fileType>
			<overlay value="false" />
			<disabled value="true" />
			<persistent value="true" />
		</Item>
		<Item>
			<filename>dlc_dousojin_touge:/%PLATFORM%/levels/gta5/dousojin_touge_metadata.rpf</filename>
			<fileType>RPF_FILE</fileType>
			<loadCompletely value="true"/>
			<overlay value="false" />
			<disabled value="true" />
			<persistent value="true" />
			<contents>CONTENTS_DLC_MAP_DATA</contents>
		</Item>
	</dataFiles>
	<contentChangeSets>
		<Item>
			<changeSetName>CCS_dousojin_touge_NG_STREAMING_MAP</changeSetName>
			<filesToEnable>
				<Item>dlc_dousojin_touge:/%PLATFORM%/levels/gta5/dousojin_touge.rpf</Item>
				<Item>dlc_dousojin_touge:/%PLATFORM%/levels/gta5/dousojin_touge_metadata.rpf</Item>
			</filesToEnable>
			<executionConditions>
				<activeChangesetConditions>
				</activeChangesetConditions>
				<genericConditions>$level=MO_JIM_L11</genericConditions>
			</executionConditions>
		</Item>
	</contentChangeSets>
	<patchFiles />
</CDataFileMgr__ContentsOfDataFileXml>

 

 

along with the setup.xml

 

Spoiler
<?xml version="1.0" encoding="utf-8"?>
<SSetupData>
	<deviceName>dlc_dousojin_touge</deviceName>
	<datFile>content.xml</datFile>
	<timeStamp>2021/10/15 22:39:59</timeStamp>
	<nameHash>dousojin_touge</nameHash>
	<contentChangeSets />
	<contentChangeSetGroups>
		<Item>
			<NameHash>GROUP_EARLY_ON</NameHash>
			<ContentChangeSets>
				<Item>CCS_dousojin_touge_NG_INIT</Item>
			</ContentChangeSets>
		</Item>
		<Item>
			<NameHash>GROUP_UPDATE_STREAMING</NameHash>
			<ContentChangeSets>
				<Item>CCS_dousojin_touge_NG_STREAMING</Item>
				<Item>CCS_dousojin_touge_NG_STREAMING_MAP</Item>
			</ContentChangeSets>
		</Item>
		<Item>
			<NameHash>GROUP_UPDATE_TEXT</NameHash>
			<ContentChangeSets>
				<Item>CCS_dousojin_touge_NG_TEXT</Item>
			</ContentChangeSets>
		</Item>
	</contentChangeSetGroups>
	<startupScript />
	<scriptCallstackSize value="0" />
	<type>EXTRACONTENT_LEVEL_PACK</type>
	<order value="52" />
	<minorOrder value="0" />
	<isLevelPack value="true" />
	<dependencyPackHash />
	<requiredVersion />
	<subPackCount value="0" />
</SSetupData>

 

 

Changing the settings in content.xml seemed to have no effect on what was happening in-game.

 

I also tried removing the static collision to make sure that there was no embedded collisions causing the problem and I fell through the map, so that seems okay.

 

This is a simple addon, it's a single YMap, a single YBN, a single YTYP and the collection of YDR & YTD files. But I just can't stop this static collision from loading. It must be possible because Cayo Perico exists and it's probably something blatantly obvious... but maps are not my thing and I just can't see where the error is.

 

Can anyone see the problem, or know what causes this problem?

 

Here's a short video with a more visual representation of the problem. You can see that there is no visible map but the collision is there when I land. Once I have loaded and unloaded the map, the helicopter can fall because the collision has gone.

 

 

Edited by LeeC22
Link to comment
Share on other sites

Hmmm, I think I have solved this.

 

I originally had the <contentFlags> in the YMap set to 2 because the objects were LOD objects, I had also tried it with 0 and 1 and neither had worked. Setting the <contentFlags> to 3 however, seems to have done the job.

 

According to the info on Dekurvinator's website, that would indicate that the flags in operation are:

 

<contentFlags value="1"/> in #map drawables without collision
<contentFlags value="2"/> LOD

 

With those flag settings, I was able to fly to the location in the above video and drop straight down without hitting the collision. When I then loaded the map, I was able to land on the ground.

 

So to summarise, in the YMap I have these settings:

 

  <flags value="3"/>
  <contentFlags value="3"/>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.