Creating a stage with XV2 Stage Creator
Feb 25, 2018 17:56:33 GMT
The Mad Titan, slire, and 1 more like this
Post by eternity on Feb 25, 2018 17:56:33 GMT
XV2 Stage Creator is a tool to add new stages. You can download the tool with the latest version of XV2 Mods Installer.
(The tutorial will use a fictitious stage called "Planet Yardrat", but this stage doesn't exist, so don't search for it)
The mod info tab
Name: this is the name of the mod. This will only appear to users in install, but not in game.
Author: self explanatory...
Version: the version of your mod. The installer supports mod updates.
GUID: this non-editable field is a unique identifier for the mod. When you open the program, it generates a random one. Whenever you update a mod, you should open your old package file, and you will see how the guid remains the same. As soon as the guid remains the same, the installer will recognize it as same mod.
Stage name: this is the actual name of the stage that will appear on the game. Languages in XV2 Stage Creator work like in XV2 Chara Creator, english is mandatory (and used as wildcard if X language doesn't have text).
The files tab
Stage files: this is the directory containing your stage files. The only mandatory file is a file called (code).map, where (code) is the one defined in the Def tab.
Optional files are: a file called (code)_QST.map, a file called (eve)_EVE.map (where eve is the one defined in the Def tab), a file called (eve)_CMB.map, a file called (code).nav (nav files are optional, the game will always try to load one, but a lot of original stages are missing them).
If your "Dir" in the Def tab points to a custom location, you should have a file called (Dir)/(Dir).spm (e.g. a file called ETyrd.spm inside a folder called ETyrd). If the game fails to load a spm file, it will enter in the infamous infinite loading screen.
As for nsk, emm, emb, etc, those can be whenever you want: those are loaded using the paths indicated in the .map file, so make sure that your .map file paths points to the correct location.
You will usually want to put them in the same place where you put your spm. Of course, your .map file can load original game files, or have a mix between loading original files and your own files, whatever.
As you have probably guessed, the installer will install the files here in data/stage/.
Precaution: you cannot have file paths that match original game files in stage files. (e.g. not replacing any original file here)
Environment: this is... well, those .emb files located in data/lighting/environment. They are emb files with a single VERY small dds file that somehow looks like a miniature of the stage. To be honest, I don't notice any difference when using an emb file or another, but the game needs this, so either use the copy button to copy a existing one or select your own emb file.
Select portrait: this is the small portrait that appear in the stage selection menu. This is a 240x84 dds file. Game uses DX1 format and no mip maps for this image, you should use those settings too, but neither the creator nor the installer enforce that. Please note that the game "eats" the borders of the image in the selection, so don't bother having many details in the borders.
Notice: the original stage portraits are located within the same dds file (all together) in STAGESELE.iggytex, which doesn't allow to add many new dds files.
For that reason, the new stages portraits will be stored in stage02.emb by the installer, by prepending the "ICO" string to the name. The custom stagesele installed by the installer is already prepared to load original stage icons in its original location, while loading new stages portraits from stage02.
Quest portrait: this is the portrait that appear in quests. This is a 768x192 dds file. Game uses DX5 format and no mip maps, you should use those settings too. This file is the "half" of the select background described below. You probably want to generate first the select background, and then downscale the image to 768x192 to generate the quest portrait, which is what original devs seem to have done.
Select background: this is the background that appear in the stage selection, along with the stage name. this is a 1536x384 dds file, game uses DX5 with no mip maps, you should use those settings too. Have in mind that the game "eats" the borders of this image.
Additional data: this is an optional directory with optional files. It works exactly like the additional data of characters, skills and costumes. Usually, the only reasonable use I can think of right now for this, is for custom stage sound effects.
The Def tab
Code: this is the unique game identifier for your stage. It must be 5-letter, and only alphanumeric characters are allowed. You don't necesarily have to follow it, but a proposed recomendation to avoid stage collision is like this: use the first two characters in capital letters for an abreviation of the modder name, and the remaining three letters in lower case for an abreviation of the stage name.
The game will load the mandatory .map file, and the optional _QST.map file from what you use as code. The code is also used as filenames for the images stored in stage01.emb and stage02.emb
Forbiden stage codes: those that start with "ICO" or "X2M", as those have special purposes by the creator/installer, or those that conflict with original stage.
Dir: despite this is called "Dir", this technically just tells the game where to load the spm file. The game will load the .spm file from (Dir)/(Dir).spm; in the example, from ETyrd/ETyrd.spm. If you don't need a custom spm, you can use a valid value of another stage (for example BFnmc, to load the BFnmc/BFnmc.spm file).
Just be ware, that some of the lobby stages have uncommon paths for their .spm, so you cannot use those (if you need to use a spm based on those, you will have to copy their .spm files in your stage files, and have dir point to the apropiated location).
Str4: the purpose of Str4 is currently unknown, but the game stages usually have this value match either Dir or Code.
Eve: the game will load the optional eve.map file from (eve)_EVE.map, except if eve is "template", then it will load template.map. The _EVE.map contains the start positions for the versus mode (more on that in the section "Customizing stage start positions").
1.09+: Since 1.09, the game will also use this try to load another optional file called (eve)_CMB.map.
BGM Cue ID: this is the cue id of the default bgm for the stage. You can obtain the cue id of particular songs by loading the file /data/sound/BGM/CAR_BGM.acb with Audio Cue Editor.
Optionally, you can include your own bgm by using the "Set custom bgm" button. (Your track must already be converted to .hca format).
SE: this is the path of the stage sound effects. The path is relative from "data/sound", and without the .acb/.awb extension. You can use a existing value or use your own file. When using your own file, use the Additional data directory to include the file, and then make sure that the value here points to the proper location.
The gates:
Each stage can have a total of 9 gates to another stages, gates are used in quests. You can disable all of them if you don't need them.
Name: this is the name of the gate object in the .map file. This is not a randomish name, this name should be an object of the .map file. Leave this empty to disable the gate.
Target stage: this is the id of the target stage. Please note that currently linking to another custom stage is not desirable, because id can be different in different installations (in the future a mean to link a custom stage here may be provided). For disabled gates, use the value -1.
U_0C: unknown, use always 0, all game gates use that value.
U_10: unknown, use always 1, all game gates use that value.
The slots tab
Add this stage to slots: if checked (default), the stage will be added to slots. Disable it if for whatever reason you don't want the stage to be selected, but still installed and accesible to quests.
Add this stage to local mode slots: the installer/patcher keep the slots for local mode separated from the regular ones. Check this if you want your stage to be added to the local mode slots too. Please, verify that your stage is playable in local mode before deciding to use this box in the final version of your mod.
The patch tab
The patch tab contains special purpose patches for specific situations.
Override far clip: if your base .map file is not based on NLBY.map (Conton City), leave this alone with the value of 0 (a value of 0 means the patch is not done).
Otherwise, if you are working on a Conton City clone or whatever based on NLBY.map, use the value 80000 (this is not a random value, it is referenced by the exe), or the sky will not be visible.
Customizing stage start positions
This optional section will talk about customizing the start positions for versus mode. (For quests, the game uses specific objects in the _QST.map file, but I won't talk about those here).
To customize the start positions, you need to modify the _EVE.map file. Use olganix XenoXmlConverter for this.
The game expects a _EVE.map file to have the following objects:
VS_INIT_POS_A_0
VS_INIT_POS_A_1
VS_INIT_POS_A_2
VS_INIT_POS_A_3
VS_INIT_POS_A_4
VS_INIT_POS_A_5
VS_INIT_POS_A_6
which define the positions of a max of 6 characters for team "A" (in 3x3 versus, only up to VS_INIT_POS_A2 would be used).
And
VS_INIT_POS_B_0
VS_INIT_POS_B_1
VS_INIT_POS_B_2
VS_INIT_POS_B_3
VS_INIT_POS_B_4
VS_INIT_POS_B_5
VS_INIT_POS_B_6
for team B
For local mode, the game will use instead LOCAL_VS_INIT_POS_1P and LOCAL_VS_INIT_POS_2P.
(in the eventuality that these values are not found, the game will use default values defined in the exe).
To customize the start positions, you must tweak the last transform matrix in the object (the one near </Object> tag closure).
The last line of the matrix is the X, Y, Z coordinates, where Y is the height.
You can customize those directly, in most case you want the characters from each team to be separated by aproximately 20 units.
You also want them to face each other, and for that you will need to customize the remaining values of the matrix.
I will propose here a very simplistic aproach that requires no math, but it requires characters from both team to have either the same Z and diferent X, or same X and different Z.
Case of same Z and different X. For example, you want to have a member of team A at (98, 0, 40), and the equivalent member of team B at (118, 0, 40).
You can use these matrix:
Matrix 1:
(0, 0, -1)
(0, 1, 0)
(1, 0, 0)
(x, y, z)
Matrix 2:
(0, 0, 1)
(0, 1, 0)
(-1, 0, 0)
(x, y, z)
You would use Matrix 1 for the team with smaller value of X, and Matrix 2 for the other. (the matrix would be the same for all members of same team, except for the position).
Case of same X and different Z. For example, you want to have a member of team A at (98, 0, 40), and the equivalent member of team B at (98, 0, 60).
This is mostly like before but use these matrix instead:
Matrix 3:
(1, 0, 0)
(0, 1, 0)
(0, 0, 1)
(x, y, z)
Matrix 4:
(-1, 0, 0)
(0, 1, 0)
(0, 0, -1)
(x, y, z)
Use Matrix 3 for the team with smaller Z value, and Matrix 4 for the other.
(The tutorial will use a fictitious stage called "Planet Yardrat", but this stage doesn't exist, so don't search for it)
The mod info tab
Name: this is the name of the mod. This will only appear to users in install, but not in game.
Author: self explanatory...
Version: the version of your mod. The installer supports mod updates.
GUID: this non-editable field is a unique identifier for the mod. When you open the program, it generates a random one. Whenever you update a mod, you should open your old package file, and you will see how the guid remains the same. As soon as the guid remains the same, the installer will recognize it as same mod.
Stage name: this is the actual name of the stage that will appear on the game. Languages in XV2 Stage Creator work like in XV2 Chara Creator, english is mandatory (and used as wildcard if X language doesn't have text).
The files tab
Stage files: this is the directory containing your stage files. The only mandatory file is a file called (code).map, where (code) is the one defined in the Def tab.
Optional files are: a file called (code)_QST.map, a file called (eve)_EVE.map (where eve is the one defined in the Def tab), a file called (eve)_CMB.map, a file called (code).nav (nav files are optional, the game will always try to load one, but a lot of original stages are missing them).
If your "Dir" in the Def tab points to a custom location, you should have a file called (Dir)/(Dir).spm (e.g. a file called ETyrd.spm inside a folder called ETyrd). If the game fails to load a spm file, it will enter in the infamous infinite loading screen.
As for nsk, emm, emb, etc, those can be whenever you want: those are loaded using the paths indicated in the .map file, so make sure that your .map file paths points to the correct location.
You will usually want to put them in the same place where you put your spm. Of course, your .map file can load original game files, or have a mix between loading original files and your own files, whatever.
As you have probably guessed, the installer will install the files here in data/stage/.
Precaution: you cannot have file paths that match original game files in stage files. (e.g. not replacing any original file here)
Environment: this is... well, those .emb files located in data/lighting/environment. They are emb files with a single VERY small dds file that somehow looks like a miniature of the stage. To be honest, I don't notice any difference when using an emb file or another, but the game needs this, so either use the copy button to copy a existing one or select your own emb file.
Select portrait: this is the small portrait that appear in the stage selection menu. This is a 240x84 dds file. Game uses DX1 format and no mip maps for this image, you should use those settings too, but neither the creator nor the installer enforce that. Please note that the game "eats" the borders of the image in the selection, so don't bother having many details in the borders.
Notice: the original stage portraits are located within the same dds file (all together) in STAGESELE.iggytex, which doesn't allow to add many new dds files.
For that reason, the new stages portraits will be stored in stage02.emb by the installer, by prepending the "ICO" string to the name. The custom stagesele installed by the installer is already prepared to load original stage icons in its original location, while loading new stages portraits from stage02.
Quest portrait: this is the portrait that appear in quests. This is a 768x192 dds file. Game uses DX5 format and no mip maps, you should use those settings too. This file is the "half" of the select background described below. You probably want to generate first the select background, and then downscale the image to 768x192 to generate the quest portrait, which is what original devs seem to have done.
Select background: this is the background that appear in the stage selection, along with the stage name. this is a 1536x384 dds file, game uses DX5 with no mip maps, you should use those settings too. Have in mind that the game "eats" the borders of this image.
Additional data: this is an optional directory with optional files. It works exactly like the additional data of characters, skills and costumes. Usually, the only reasonable use I can think of right now for this, is for custom stage sound effects.
The Def tab
Code: this is the unique game identifier for your stage. It must be 5-letter, and only alphanumeric characters are allowed. You don't necesarily have to follow it, but a proposed recomendation to avoid stage collision is like this: use the first two characters in capital letters for an abreviation of the modder name, and the remaining three letters in lower case for an abreviation of the stage name.
The game will load the mandatory .map file, and the optional _QST.map file from what you use as code. The code is also used as filenames for the images stored in stage01.emb and stage02.emb
Forbiden stage codes: those that start with "ICO" or "X2M", as those have special purposes by the creator/installer, or those that conflict with original stage.
Dir: despite this is called "Dir", this technically just tells the game where to load the spm file. The game will load the .spm file from (Dir)/(Dir).spm; in the example, from ETyrd/ETyrd.spm. If you don't need a custom spm, you can use a valid value of another stage (for example BFnmc, to load the BFnmc/BFnmc.spm file).
Just be ware, that some of the lobby stages have uncommon paths for their .spm, so you cannot use those (if you need to use a spm based on those, you will have to copy their .spm files in your stage files, and have dir point to the apropiated location).
Str4: the purpose of Str4 is currently unknown, but the game stages usually have this value match either Dir or Code.
Eve: the game will load the optional eve.map file from (eve)_EVE.map, except if eve is "template", then it will load template.map. The _EVE.map contains the start positions for the versus mode (more on that in the section "Customizing stage start positions").
1.09+: Since 1.09, the game will also use this try to load another optional file called (eve)_CMB.map.
F6: this is a float number, whose purpose is currently unkown. Most original stages use the value of 200, but not all of them.
Unk5: This is an integer number, whose purpose is currently unknown, and which was added by game version 1.11. In vanilla stages, the value was 0 in all stages except Archipelago and Beach, where the value was 1. The fact that those are the two biggest playable stage may be related or unrelated with this value.
BGM Cue ID: this is the cue id of the default bgm for the stage. You can obtain the cue id of particular songs by loading the file /data/sound/BGM/CAR_BGM.acb with Audio Cue Editor.
Optionally, you can include your own bgm by using the "Set custom bgm" button. (Your track must already be converted to .hca format).
SE: this is the path of the stage sound effects. The path is relative from "data/sound", and without the .acb/.awb extension. You can use a existing value or use your own file. When using your own file, use the Additional data directory to include the file, and then make sure that the value here points to the proper location.
The gates:
Each stage can have a total of 9 gates to another stages, gates are used in quests. You can disable all of them if you don't need them.
Name: this is the name of the gate object in the .map file. This is not a randomish name, this name should be an object of the .map file. Leave this empty to disable the gate.
Target stage: this is the id of the target stage. Please note that currently linking to another custom stage is not desirable, because id can be different in different installations (in the future a mean to link a custom stage here may be provided). For disabled gates, use the value -1.
U_0C: unknown, use always 0, all game gates use that value.
U_10: unknown, use always 1, all game gates use that value.
The slots tab
Add this stage to slots: if checked (default), the stage will be added to slots. Disable it if for whatever reason you don't want the stage to be selected, but still installed and accesible to quests.
Add this stage to local mode slots: the installer/patcher keep the slots for local mode separated from the regular ones. Check this if you want your stage to be added to the local mode slots too. Please, verify that your stage is playable in local mode before deciding to use this box in the final version of your mod.
The patch tab
The patch tab contains special purpose patches for specific situations.
Override far clip: if your base .map file is not based on NLBY.map (Conton City), leave this alone with the value of 0 (a value of 0 means the patch is not done).
Otherwise, if you are working on a Conton City clone or whatever based on NLBY.map, use the value 80000 (this is not a random value, it is referenced by the exe), or the sky will not be visible.
Vfx tab
The vfx tab is totally optional (leave fields empty to not use it). They allow to set visual efects for your stage. You can either a) use existing eepk files (like in the example above) or b) Use your own eepk. In that case, include the eepk in the "additional data" and put the path (relative to data/vfx) in the fields.
Stage have two kinds of vfx, BG and stage. You can use one of them, both, or none.
Customizing stage start positions
This optional section will talk about customizing the start positions for versus mode. (For quests, the game uses specific objects in the _QST.map file, but I won't talk about those here).
To customize the start positions, you need to modify the _EVE.map file. Use olganix XenoXmlConverter for this.
The game expects a _EVE.map file to have the following objects:
VS_INIT_POS_A_0
VS_INIT_POS_A_1
VS_INIT_POS_A_2
VS_INIT_POS_A_3
VS_INIT_POS_A_4
VS_INIT_POS_A_5
VS_INIT_POS_A_6
which define the positions of a max of 6 characters for team "A" (in 3x3 versus, only up to VS_INIT_POS_A2 would be used).
And
VS_INIT_POS_B_0
VS_INIT_POS_B_1
VS_INIT_POS_B_2
VS_INIT_POS_B_3
VS_INIT_POS_B_4
VS_INIT_POS_B_5
VS_INIT_POS_B_6
for team B
For local mode, the game will use instead LOCAL_VS_INIT_POS_1P and LOCAL_VS_INIT_POS_2P.
(in the eventuality that these values are not found, the game will use default values defined in the exe).
To customize the start positions, you must tweak the last transform matrix in the object (the one near </Object> tag closure).
The last line of the matrix is the X, Y, Z coordinates, where Y is the height.
You can customize those directly, in most case you want the characters from each team to be separated by aproximately 20 units.
You also want them to face each other, and for that you will need to customize the remaining values of the matrix.
I will propose here a very simplistic aproach that requires no math, but it requires characters from both team to have either the same Z and diferent X, or same X and different Z.
Case of same Z and different X. For example, you want to have a member of team A at (98, 0, 40), and the equivalent member of team B at (118, 0, 40).
You can use these matrix:
Matrix 1:
(0, 0, -1)
(0, 1, 0)
(1, 0, 0)
(x, y, z)
Matrix 2:
(0, 0, 1)
(0, 1, 0)
(-1, 0, 0)
(x, y, z)
You would use Matrix 1 for the team with smaller value of X, and Matrix 2 for the other. (the matrix would be the same for all members of same team, except for the position).
Case of same X and different Z. For example, you want to have a member of team A at (98, 0, 40), and the equivalent member of team B at (98, 0, 60).
This is mostly like before but use these matrix instead:
Matrix 3:
(1, 0, 0)
(0, 1, 0)
(0, 0, 1)
(x, y, z)
Matrix 4:
(-1, 0, 0)
(0, 1, 0)
(0, 0, -1)
(x, y, z)
Use Matrix 3 for the team with smaller Z value, and Matrix 4 for the other.