-
Notifications
You must be signed in to change notification settings - Fork 2
Quest Scripts
All script files are inside .dat files. There's only a small number of .dat files active at a time. There are 4 categories that control what files are active:
-
corehap.dat
Always active
Folder:core
- game phases
-
p100
: Route A/B, before the big bang -
p200
: Route A/B, after the big bang -
p300
: Route C
Folders:ph1
,ph2
,ph3
-
- map areas
Examples: City Ruins (r100
+r200
), Resistance Camp (r110
), Factory (r120
), Amusement Park (r130
), ..., The Tower (r500
), Copied City (r501
), ... Folders:st1
(main map areas),st2
(City Ruins, after big bang),st5
(underground) - Side quests
Example:q110
(side quest Lost Girl)
Hacking mini games are also in the same category Folder:quest
All of the files are in data002/012.cpk and data100.cpk for DLCs. You find the (almost) full list of files here.
So, for example if you want to add some NPC or enemies to the factory, you have to edit st1/r120.dat
.
Inside .dat files scripts are further bundled into .pak files. Inside .pak files are then .xml files (also called HAP, Hierarchical Action Program) which will be the main files you look at and edit.
Example hierarchy inside a .dat file:
The 0.xml defines the hierarchy of groups you can see above (You don't have to edit the .xml yourself, that happens in the background). Groups can contain child groups, .xml files or child .pak files. Groups serve 2 purposes: Organizing files and enabling/disabling parts of the hierarchy. For enabling/disabling conditions are used (examples below). Multiple conditions in one group are OR combined, meaning if any one of the conditions is true, the group is active.
Examples of groups:
Group only active after quest q720 is completed | Top most group that is disabled during hacking (inverted with the 0x20 attribute) . This is the root group in most cases. |
---|---|
TODO:
- actions
- enabled, disabled, blocking
- execution order
- commands
- enable, disable reset
- conditions
- areas
- entities
TODO:
- condition types
- blender sync
- cutscene
- scene state
- hash
TODO:
- ScriptActions
- variables
- triggers
- trigger state
- enable, disable, reset
- dialogue + selection