Skip to content

Commit facd1a0

Browse files
docs: some README changes (dexyfex#158)
frontend changes; nothing editorial... yet! Co-authored-by: Douth <[email protected]>
1 parent 911fe4e commit facd1a0

File tree

1 file changed

+38
-130
lines changed

1 file changed

+38
-130
lines changed

README.md

Lines changed: 38 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -1,166 +1,74 @@
1-
2-
# CodeWalker by dexyfex
3-
----------------------
4-
5-
# This program is for viewing the contents of GTAV RPF archives.
6-
7-
8-
# Requirements:
9-
--------------
10-
- PC version of GTAV
11-
- DirectX 11 and Shader Model 4.0 capable graphics
12-
- Windows 7 and above, x64 processor
13-
- 4GB RAM (8+ recommended)
14-
- .NET framework 4.5 or newer (download from [Microsoft](https://www.microsoft.com/net/download/thank-you/net471))
15-
16-
17-
18-
# Using the app:
19-
---------------
20-
On first startup, the app will prompt to browse for the GTAV game folder. If you have the Steam version installed
1+
<div align="center">
2+
<h1>CodeWalker by dexyfex</h1>
3+
This program is for viewing the contents of GTAV RPF archives.
4+
</div>
5+
6+
## Requirements:
7+
- PC version of GTA:V;
8+
- 4GB RAM (8+ recommended);
9+
- Windows 7 and above, x64 processor;
10+
- .NET framework 4.5 or newer from [Microsoft](https://www.microsoft.com/net/download/thank-you/net471);
11+
- DirectX 11 and Shader Model 4.0 capable graphics.
12+
13+
# App Usage:
14+
On first startup, the app will prompt to browse for the GTA:V game folder. If you have the Steam version installed
2115
in the default location `(C:\Program Files (x86)\Steam\SteamApps\common\Grand Theft Auto V)`, then this step will be skipped automatically.
2216

23-
The World View will load by default. It will take a while to load.
24-
Use the WASD keys to move the camera. Hold shift to move faster.
25-
Drag the left mouse button to rotate the view.
26-
Use the mouse wheel to zoom in/out, and change the base movement speed. (Zoom in = slower motion)
27-
Xbox controller input is also supported.
28-
The Toolbox can be shown by clicking the `<<` button in the top right-hand corner of the screen.
29-
`T` opens the main toolbar.
30-
31-
First-person mode can be activated with the P key, or by pressing the Start button on the XBox controller.
32-
While in first-person mode, the left mouse button (or right trigger) will fire an egg.
33-
34-
Entities can be selected (with the right mouse button) by enabling the option on the Selection tab in the
35-
toolbox. The details of the selected entity, its archetype, and its drawable can be explored in the relevant
36-
sub-tabs. (This option can also be activated with the arrow button on the toolbar).
37-
38-
When an entity is selected, `E` will switch to edit mode (or alternatively, edit mode can be activated by
39-
switching the Widget mode to anything other than Default). When in edit mode, `Q` will exit edit mode, `W` toggles
40-
the position widget, E toggles rotation, and R toggles scale. Also when in edit mode, movement is still WSAD,
41-
but only while you're holding the left mouse button down, and not interacting with the widget.
17+
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.
4218

43-
`Ctrl-Z` and `Ctrl-Y` will Undo and Redo entity transformation (position/rotation/scale) actions.
19+
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.
4420

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

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

25+
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.)
5826

59-
# Menu mode:
60-
----------
61-
The app can also be started with a main menu instead of loading the world view. This can be useful for situations
62-
where the world view is not needed, and the world loading can be avoided.
63-
To activate the menu mode, run CodeWalker with the 'menu' command line argument, e.g:
64-
CodeWalker.exe menu
27+
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.
6528

29+
# Menu Mode:
30+
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
31+
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.
6632

67-
# Explorer mode:
68-
--------------
69-
The app can be started with the `'explorer'` command line argument. This displays an interface much like OpenIV,
70-
with a Windows-Explorer style interface for browsing the game's .rpf archives. Double-click on files to open them.
71-
Viewers for most file types are available, but hex view will be shown as a fallback.
72-
To activate the explorer mode, run the command:
73-
CodeWalker.exe explorer
74-
Alternatively, run the CodeWalker Explorer batch file in the program's directory.
75-
33+
# Explorer Mode:
34+
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.
7635

7736
# Main Toolbar:
78-
-------------
79-
The main toolbar is used to access most of the editing features in CodeWalker. Shortcuts for new, open and
80-
create files are provided. The selection mode can be changed with the "pointer" button. Move, rotate and
81-
scale buttons provide access to the different editing widget modes.
82-
Other shortcuts on the toolbar include buttons to open the Selection Info window, and the Project window.
83-
See the tooltips on the toolbar items for hints.
84-
37+
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.
8538

8639
# Project Window:
87-
---------------
88-
The project window is the starting point for editing files in CodeWalker. Project files can be created,
89-
and files can be added to them. It is recommended to create and save a project file before adding files
90-
to be edited and saved.
91-
The tree view displays the files in the current project, and their contents.
92-
93-
94-
# YMAP editing:
95-
-------------
96-
New `YMAP` files can be created via the project window, and existing `YMAP` files can be edited.
97-
To edit an existing single player `YMAP`, first change codewalker DLC level to `patchday2ng`, and enable DLC.
98-
Open the toolbar, and enable Entity selection mode. Enable the Move widget with the toolbar Move button.
99-
Open the project window with the toolbar button. Changes made while the project window is open are
100-
automatically added to the project.
101-
Select an entity to edit by right clicking when the entity is moused over, and its bounding box shown in
102-
white. Move, rotate and/or scale the selected entity with the widget. When the first change is made, the
103-
entity's `YMAP` will be added to the current project. If no project is open, a new one will be created.
104-
The edited `YMAP` file can be saved to the drive using the File menu in the project window.
105-
After saving the file, it needs to be added into the mods folder. Using OpenIV, find the existing `YMAP`
106-
file using the search function (note: the correct path for the edited `YMAP` can be found in the selection
107-
info window in CodeWalker, when an entity is selected, look for `YMap`>`RpfFileEntry` in the selection info
108-
property grid). Replace the edited `YMAP` into a copy of the correct archive in the /mods folder.
109-
Newly created YMAPs can be added to DLC archives in the same manner.
110-
111-
112-
# Traffic Paths (YND) editing:
113-
----------------------------
114-
[TODO - write this!]
40+
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.
11541

42+
# YMAP Editing:
43+
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.
11644

117-
# Train Tracks editing:
118-
---------------------
45+
# Train Tracks Editing:
11946
[TODO - write this!]
12047

48+
# (YND) Traffic Paths Editing:
49+
[TODO - write this!]
12150

122-
# Scenario Regions (YMT) editing:
123-
-------------------------------
124-
[TODO: write this!]
51+
# (YMT) Scenario Regions Editing:
52+
[TODO: write this!] <br>
12553
See https://youtu.be/U0nrVL44Fb4 - Scenario Editing Tutorial
12654

127-
128-
12955
# Regarding game files: (FYI)
130-
----------------------------
13156

132-
The PC GTAV world is stored in the `RPF` archives in many different file formats. As expected, some formats are
133-
used for storing rendering-related content, for example the textures and 3d models, while other formats are used
134-
for storing game and engine related data.
57+
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.
13558

13659
The main formats when it comes to rendering GTAV content are:
137-
13860
`.ytd` - Texture Dictionary - Stores texture data in a DirectX format convenient for loading to the GPU.
13961
`.ydr` - Drawable - Contains a single asset's 3d model. Can contain a Texture Dictionary, and up to 4 LODs of a model.
14062
`.ydd` - Drawable Dictionary - A collection of Drawables packed into a single file.
14163
`.yft` - Fragment - Contains a Drawable, along with other metadata for example physics data.
14264

65+
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.
14366

144-
The content Assets are pieced together to create the GTAV world via MapTypes (Archetypes) and MapData
145-
(Entity placements). At a high level, Archeypes define objects that are placeable, and Entities define
146-
where those objects are placed to make up the world. The collision mesh data for the world is stored in Bounds
147-
files.
14867
### The formats for these are:
149-
15068
`.ytyp` - MapTypes - Contains a group of MapTypes (Archetypes), each defining an object that could be placed.
15169
`.ymap` - MapData - Contains placements of Archetypes, each defining an Entity in the world.
15270
`.ybn` - Bounds - Contains collision mesh / bounding data for pieces of the world.
15371

72+
The EntityData contained within the MapData (`.ymap`) files forms the LOD hierarchy. This hierarchy 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.
15473

155-
The EntityData contained within the MapData (`.ymap`) files forms the LOD hierarchy. This hierarchy is arranged
156-
such that the lowest detail version of the world, at the root of the hierarchy, is represented by a small number
157-
of large models that can all be rendered simultaneously to draw the world at a great distance. The next branch
158-
in the hierarchy splits each of these large models into a group of smaller objects, each represented in a higher
159-
detail than the previous level. This pattern is continued for up to 6 levels of detail. When rendering the world,
160-
the correct level of detail for each branch in the hierarchy needs to be determined, as obviously the highest
161-
detail objects cannot all be rendered at once due to limited computing resources.
162-
163-
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
164-
next higher level, depending on the LOD distance setting.
165-
(In the Ymap view, the highest LOD, ORPHANHD, is not rendered by default. The ORPHANHD entities can often be manually rendered 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.)
166-
74+
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 rendered 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.)

0 commit comments

Comments
 (0)