Skip to content

Mods introduction

RoboTuan edited this page May 3, 2021 · 11 revisions

Mods

In this section we are going to see how the raw videos of the sequences are created by using the two avaiable mods written in c++. With the ScenarioCreator mod, we can build a scenario that will be recorded with the DatasetAnnotator mod. This work was heavily inspired from JTA-Mods, which aims to create a dataset for pedestrian pose estimation and tracking in urban scenarios. The original mods had to undergo several changes in order to be suitable for the pedestrian re-identification task, but they share the same structure.

Quick start

As stated in the original work, these are the steps needed to directly use the mods with GTAV.

  • Download and install a legal copy of Grand Theft Auto V
  • Download ScriptHook V AND the SDK here.
    • Follow the instructions reported on the web page. Also, follow the instructions of the SDK readme under the section "Runtime asi script reloading"
  • Download the ScenarioCreator Mod: ScenarioCreator.asi
  • Download the DatasetAnnotator Mod: DatasetAnnotator.asi
  • Copy both files ScenarioCreator.asi and DatasetAnnotator.asi in the Grand Theft Auto V game folder.
  • If you installed GTA V using Rockstar's Social Club, you have to change the permissions of the game folder (read, write and execute). If you used Steam, everything should be fine.
  • Run Grand Theft Auto V and select Story Mode. If it is your first start of the game, you have to complete the first mission. Enjoy!
  • The mods will automatically start. Now, by pressing F5 you can use the ScenarioCreator mod to create your own scenarios. By pressing F8 the DatasetAnnotator mod will start recording the scenarios. You can disable the Mods in any time by pressing ctrl+R.
  • Remember to disable the HUD in the display settings of GTA V. Also disable the in-game notifications.

Developer Guide

As stated in the original work, these are the steps needed to modify the mods.

  • Download and install a legal copy of Grand Theft Auto V
  • Clone this repository
  • Download ScriptHook V AND the SDK here http://www.dev-c.com/gtav/scripthookv/. Follow the instructions reported on the web page. Also, follow the instructions of the SDK readme under the section "Runtime asi script reloading"
  • Open the Solution with Visual Studio (we used VS2017, but previous versions should work too) and, for each sub-project, follow these instructions:
    • include the header files to the project by going in Configuration Properties->C/C++->General and set the path to the "inc" directory of the SDK in "Additional Include Directories"
    • include the library to the projects by going to Configuration Properties->Linker->General and set the path that points to the "lib" folder of the SDK in "Additional Library Directories"
    • Also go to: Configuration Properties -> Linker -> Input and set the ScriptHookV.lib file name in Additional Dependencies
    • Go in Build-Events -> Post-Build-Event and, under Command Line type xcopy /Y path/to/asi/file path/to/gta/installation/directory. This is optional but if you don't do so, you will need to copy the two .asi files in the game directory every time you build the mods
    • Under Configuration-Properties -> General change the Target Extension to .asi and Configuration Type to .dll
  • Build the entire solution.
  • If you installed GTA V using Rockstar's Social Club, you have to change the permissions of the game folder (read, write and execute). If you used Steam, everything should be fine.
  • Run Grand Theft Auto V and select Story Mode. If it is your first start of the game, you have to complete the first mission. Enjoy!
  • The mods will automatically start. Now, by pressing F5 you can use the ScenarioCreator mod to create your own scenarios. By pressing F8 the DatasetAnnotator mod will start recording the scenarios. You can disable the Mods in any time by pressing ctrl+R.
  • Remember to disable the HUD in the display settings of GTA V. Also disable the in-game notifications.

In the next sessions we are going to see how to play with each mod, what kind of files they use, create and other relevant aspects of the code.

Clone this wiki locally