Go to file
2018-02-25 00:57:47 +11:00
CodeWalker.Core Created CodeWalker.Core 2018-02-24 22:52:58 +11:00
CodeWalker.WinForms Created CodeWalker.Core 2018-02-24 22:52:58 +11:00
Forms Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
GameFiles Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
icons R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Project Relocated RPF binary search to BinarySearchForm. Added undo operations for audio placements. Removed RPF Browser tools menu entry (it's now obsolete). Renamed MainForm to MenuForm. 2017-12-24 22:49:04 +11:00
Properties Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
Rendering Reverted Unknown_2Ch in DrawableModel, added the info as comment 2018-01-04 18:01:18 +01:00
Resources Created CodeWalker.Core 2018-02-24 22:52:58 +11:00
Shaders R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Toolbar R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Utils Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
World Created CodeWalker.Core 2018-02-24 22:52:58 +11:00
.gitattributes R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
.gitignore R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
AboutForm.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
AboutForm.Designer.cs Menyoo import to ymap, Scenario accel grid ExtendedRange bits 2017-09-25 03:45:30 +10:00
AboutForm.resx Added self to credits :) 2018-02-21 01:24:01 -08:00
App.config Added GTA V folder check to main entry point in Program.cs, improved folder selection dialog 2018-02-21 00:27:01 -08:00
BinarySearchForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
BinarySearchForm.Designer.cs Relocated RPF binary search to BinarySearchForm. Added undo operations for audio placements. Removed RPF Browser tools menu entry (it's now obsolete). Renamed MainForm to MenuForm. 2017-12-24 22:49:04 +11:00
BinarySearchForm.resx Relocated RPF binary search to BinarySearchForm. Added undo operations for audio placements. Removed RPF Browser tools menu entry (it's now obsolete). Renamed MainForm to MenuForm. 2017-12-24 22:49:04 +11:00
BrowseForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
BrowseForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
BrowseForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
CodeWalker Explorer.cmd Renamed .bat to .cmd to match modern naming guidelines, added batch file to initiate Menu mode 2018-02-20 23:56:06 -08:00
CodeWalker Menu.cmd Renamed .bat to .cmd to match modern naming guidelines, added batch file to initiate Menu mode 2018-02-20 23:56:06 -08:00
CodeWalker.csproj Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
CodeWalker.sln Created CodeWalker.Core 2018-02-24 22:52:58 +11:00
ExploreForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
ExploreForm.Designer.cs Restored accidentally edited files 2018-02-20 23:30:30 -08:00
ExploreForm.resx Restored accidentally edited files 2018-02-20 23:30:30 -08:00
ExtractKeysForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
ExtractKeysForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
ExtractKeysForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
ExtractRawForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
ExtractRawForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
ExtractRawForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
ExtractScriptsForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
ExtractScriptsForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
ExtractScriptsForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
ExtractShadersForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
ExtractShadersForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
ExtractShadersForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
ExtractTexForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
ExtractTexForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
ExtractTexForm.resx Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
JenkGenForm.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
JenkGenForm.Designer.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
JenkGenForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
JenkIndForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
JenkIndForm.Designer.cs JenkInd export strings function 2017-12-15 00:07:26 +11:00
JenkIndForm.resx JenkInd export strings function 2017-12-15 00:07:26 +11:00
KeyBindForm.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
KeyBindForm.Designer.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
KeyBindForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
MapForm.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
MapForm.Designer.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
MapForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Materials.txt R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
MenuForm.cs Relocated RPF binary search to BinarySearchForm. Added undo operations for audio placements. Removed RPF Browser tools menu entry (it's now obsolete). Renamed MainForm to MenuForm. 2017-12-24 22:49:04 +11:00
MenuForm.Designer.cs Relocated RPF binary search to BinarySearchForm. Added undo operations for audio placements. Removed RPF Browser tools menu entry (it's now obsolete). Renamed MainForm to MenuForm. 2017-12-24 22:49:04 +11:00
MenuForm.resx Relocated RPF binary search to BinarySearchForm. Added undo operations for audio placements. Removed RPF Browser tools menu entry (it's now obsolete). Renamed MainForm to MenuForm. 2017-12-24 22:49:04 +11:00
Notice.txt R28. 2017-12-24 23:36:18 +11:00
packages.config R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Program.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
ProjectForm.cs Hide GTAV map project option now hides collision meshes, Occlusion ymaps added to main grid 2018-01-02 08:26:56 +11:00
ProjectForm.Designer.cs Import scenario chain CSV, PathBVH overflow bug fix. 2017-09-30 23:58:00 +10:00
ProjectForm.resx R26_dev8 - PopZone display, Project manifest XML 2017-09-22 17:50:26 +10:00
Readme_Src.txt R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Readme.txt R28. 2017-12-24 23:36:18 +11:00
SelectFolderForm.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
SelectFolderForm.Designer.cs Added GTA V folder check to main entry point in Program.cs, improved folder selection dialog 2018-02-21 00:27:01 -08:00
SelectFolderForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
Settings.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
SettingsForm.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
SettingsForm.Designer.cs Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
SettingsForm.resx Switched everything to new GTAFolder class and removed all direct references to Settings.Default.GTAFolder 2018-02-21 01:12:17 -08:00
TextInputForm.cs Import scenario chain CSV, PathBVH overflow bug fix. 2017-09-30 23:58:00 +10:00
TextInputForm.Designer.cs Import scenario chain CSV, PathBVH overflow bug fix. 2017-09-30 23:58:00 +10:00
TextInputForm.resx Import scenario chain CSV, PathBVH overflow bug fix. 2017-09-30 23:58:00 +10:00
Todo.txt RPF Explorer Edit mode - auto change archive encryption type when editing, import/export raw child RPFs 2018-01-11 12:10:03 +11:00
WorldForm.cs Merging GTAFolder changes 2018-02-25 00:57:47 +11:00
WorldForm.Designer.cs Refactored rendering and input code, added show skeletons option to WorldForm 2018-01-02 07:52:54 +11:00
WorldForm.resx Refactored rendering and input code, added show skeletons option to WorldForm 2018-01-02 07:52:54 +11:00
WorldInfoForm.cs Render and select audio zones (box shapes only, no spheres yet) 2017-12-22 07:26:04 +11:00
WorldInfoForm.Designer.cs Render and select audio zones (box shapes only, no spheres yet) 2017-12-22 07:26:04 +11:00
WorldInfoForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
WorldSearchForm.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
WorldSearchForm.Designer.cs R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00
WorldSearchForm.resx R26_dev8 - First public commit 2017-09-21 20:33:05 +10:00

CodeWalker by dexyfex
----------------------

This program is for viewing the contents of GTAV RPF archives.


Requirements:
--------------
- PC version of GTAV
- DirectX 11 and Shader Model 4.0 capable graphics
- Windows 7 and above, x64 processor
- 4GB RAM (8+ recommended)
- .NET framework 4.5 or newer (download from Microsoft..?)



Using the app:
---------------
On first startup, the app will prompt to browse for the GTAV game folder. If you have the Steam version installed
in the default location (C:\Program Files (x86)\Steam\SteamApps\common\Grand Theft Auto V), then this step will
be skipped automatically.

The World View will load by default. It will take a while to load.
Use the WASD keys to move the camera. Hold shift to move faster.
Drag the left mouse button to rotate the view.
Use the mouse wheel to zoom in/out, and change the base movement speed. (Zoom in = slower motion)
XBox controller input is also supported.
The Toolbox can be shown by clicking the "<<" button in the top right-hand corner of the screen.
T opens the main toolbar.

First-person mode can be activated with the P key, or by pressing the Start button on the XBox controller.
While in first-person mode, the left mouse button (or right trigger) will fire an egg.

Entities can be selected (with the right mouse button) by enabling the option on the Selection tab in the 
toolbox. The details of the selected entity, its archetype, and its drawable can be explored in the relevant
sub-tabs. (This option can also be activated with the arrow button on the toolbar)

When an entity is selected, E will switch to edit mode (or alternatively, edit mode can be activated by 
switching the Widget mode to anything other than Default). When in edit mode, Q will exit edit mode, W toggles 
the  position widget, E toggles rotation, and R toggles scale. Also when in edit mode, movement is still WSAD, 
but only while you're holding the left mouse button down, and not interacting with the widget.

Ctrl-Z and Ctrl-Y will Undo and Redo entity transformation (position/rotation/scale) actions.

The Project Window allows a CodeWalker project to be created (.cwproj), and files added to it. Editing 
entities while the Project Window is open will add the entity's .ymap to the current project. Ymap files can then 
be saved to disk, for use in a map mod. New ymap files can also be created, and entities can be added and removed.
Also supported for editing are .ynd files (traffic paths), trains .dat files (train tracks), and scenarios (.ymt).
(A full tutorial on making map mods is out of the scope of this readme.)

A full explanation of all the tools in this application is still on the to-do list!
The user is currently left to explore the options at their own peril.
Note some options may cause CodeWalker to crash, or otherwise stop working properly. Restart the program if this
happens!
Also note that this program is a constant work in progress, so bugs and crashes are to be expected.
Some parts of the world do not yet render correctly, but expect updates in the future to fix these issues.


Menu mode:
----------
The app can also be started with a main menu instead of loading the world view. This can be useful for situations
where the world view is not needed, and the world loading can be avoided.
To activate the menu mode, run CodeWalker with the 'menu' command line argument, e.g:
CodeWalker.exe menu


Explorer mode:
--------------
The app can be started with the 'explorer' command line argument. This displays an interface much like OpenIV,
with a Windows-Explorer style interface for browsing the game's .rpf archives. Double-click on files to open them.
Viewers for most file types are available, but hex view will be shown as a fallback.
To activate the explorer mode, run the command:
CodeWalker.exe explorer
Alternatively, run the CodeWalker Explorer batch file in the program's directory.


Main Toolbar:
-------------
The main toolbar is used to access most of the editing features in CodeWalker. Shortcuts for new, open and
create files are provided. The selection mode can be changed with the "pointer" button. Move, rotate and
scale buttons provide access to the different editing widget modes.
Other shortcuts on the toolbar include buttons to open the Selection Info window, and the Project window.
See the tooltips on the toolbar items for hints.


Project Window:
---------------
The project window is the starting point for editing files in CodeWalker. Project files can be created,
and files can be added to them. It is recommended to create and save a project file before adding files
to be edited and saved.
The tree view displays the files in the current project, and their contents.


YMAP editing:
-------------
New YMAP files can be created via the project window, and existing ymap files can be edited.
To edit an existing single player YMAP, first change codewalker DLC level to patchday2ng, and enable DLC.
Open the toolbar, and enable Entity selection mode. Enable the Move widget with the toolbar Move button.
Open the project window with the toolbar button. Changes made while the project window is open are
automatically added to the project.
Select an entity to edit by right clicking when the entity is moused over, and its bounding box shown in
white. Move, rotate and/or scale the selected entity with the widget. When the first change is made, the
entity's YMAP will be added to the current project. If no project is open, a new one will be created.
The edited YMAP file can be saved to the drive using the File menu in the project window.
After saving the file, it needs to be added into the mods folder. Using OpenIV, find the existing YMAP
file using the search function (note: the correct path for the edited YMAP can be found in the selection
info window in CodeWalker, when an entity is selected, look for YMap>RpfFileEntry in the selection info
property grid). Replace the edited YMAP into a copy of the correct archive in the /mods folder.
Newly created YMAPs can be added to DLC archives in the same manner.


Traffic Paths (YND) editing:
----------------------------
[TODO - write this!]


Train Tracks editing:
---------------------
[TODO - write this!]


Scenario Regions (YMT) editing:
-------------------------------
[TODO: write this!]
See https://youtu.be/U0nrVL44Fb4 - Scenario Editing Tutorial



Regarding game files: (FYI)
----------------------------

The PC GTAV world is stored in the RPF archives in many different file formats. As expected, some formats are
used for storing rendering-related content, for example the textures and 3d models, while other formats are used
for storing game and engine related data.

The main formats when it comes to rendering GTAV content are:

.ytd - Texture Dictionary - Stores texture data in a DirectX format convenient for loading to the GPU. 
.ydr - Drawable - Contains a single asset's 3d model. Can contain a Texture Dictionary, and up to 4 LODs of a model.
.ydd - Drawable Dictionary - A collection of Drawables packed into a single file.
.yft - Fragment - Contains a Drawable, along with other metadata for example physics data.


The content Assets are pieced together to create the GTAV world via MapTypes (Archetypes) and MapData
(Entity placements). At a high level, Archeypes define objects that are placeable, and Entities define
where those objects are placed to make up the world. The collision mesh data for the world is stored in Bounds 
files.
The formats for these are:

.ytyp - MapTypes - Contains a group of MapTypes (Archetypes), each defining an object that could be placed.
.ymap - MapData - Contains placements of Archetypes, each defining an Entity in the world.
.ybn - Bounds - Contains collision mesh / bounding data for pieces of the world.


The EntityData contained within the MapData (.ymap) files forms the LOD hierarchy. This heierarchy is arranged
such that the lowest detail version of the world, at the root of the hierarchy, is represented by a small number
of large models that can all be rendered simultaneously to draw the world at a great distance. The next branch
in the hierarchy splits each of these large models into a group of smaller objects, each represented in a higher
detail than the previous level. This pattern is continued for up to 6 levels of detail. When rendering the world,
the correct level of detail for each branch in the hierarchy needs to be determined, as obviously the highest
detail objects cannot all be rendered at once due to limited computing resources.

In CodeWalker, This is done by recursing the LOD tree from the roots, checking how far away from the camera the 
node's Entity is. If it is below a certain value, then the current level is used, otherwise it moves to the
next higher level, depending on the LOD distance setting.
(In the Ymap view, the highest LOD, ORPHANHD, is not rendered by default. The ORPHANHD entities can often be
manually renderd by specifying the correct _strm_ ymap file for the area in question in the ymap text box. The 
_strm ymap name can often be found by mouse-selecting a high detail object in the area and noting what ymap the
Entity is contained in, in the selection details panel.)