This article relates to the game "Portal 2". Click here for more information.

P2 Multichunk Tool: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Unicodifying, replaced: See Also → See also, [[image: → [[File: (11))
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{portal2}} The '''P2Multichunker''' offers an easy way for your [[portal 2]] mod to pack your assets onto multi-chunked [[vpk]] files.
{{pov}}
::{{Warning|The tool will ''probably'' work for other games aside [[portal 2]] if you change the vpk path and adapt the process, but, since I haven't tested myself I can't 100% guarantee it, feel free to test and please let me know if it works.}}
{{p2 topicon}}
{{portal2}} The '''P2Multichunker''' offers an easy way for a [[Portal 2]] mod to pack the assets onto multi-chunked [[vpk]] files.
::{{Warning|The tool will ''probably'' work for other games aside [[Portal 2]] if the vpk path name be changed and adapt the process, but, since it wasn't tested it can't be 100% guarantee it works.}}


= Installation =
= Installation =
# [https://github.com/gsgouvea91/P2Multichunker Download the executable.]  
# [https://github.com/gsgouvea91/P2Multichunker Download the executable.]  
# Place the executable in your Mod folder
# Place the executable in the Mod folder


[[image:Mod folder.png|400px|.exe inside the mod folder (picture 1)]]
[[File:Mod folder.png|400px|.exe inside the mod folder (picture 1)]]


= How to use =
= How to use =




1. When you first execute the tool, this is what you'll see:
1. When first executing the tool, this is what it will display:


[[image:New_main.JPG|600px|First run)]]
[[File:New_main.JPG|600px|First run)]]


By default in the first execution, the tool will auto-set it's .vpk path to the following defaut path:
By default in the first execution, the tool will auto-set it's .vpk path to the following defaut path:
Line 19: Line 21:
  C:\Program Files (x86)\Steam\steamapps\common\Portal 2\bin
  C:\Program Files (x86)\Steam\steamapps\common\Portal 2\bin


The path is stored on the file <code>data.json</code> that it's created when you first run the tool.
The path is stored on the file <code>data.json</code> that it's created when the tool run for the first time.




Line 25: Line 27:
2. Choose option <code>"2 - Execute P2Multichunker"</code>, the following screen will display:
2. Choose option <code>"2 - Execute P2Multichunker"</code>, the following screen will display:


[[image:generating.png|500px|First run)]]
[[File:generating.png|500px|First run)]]


Do not close the prompt untill the process is done, when it's done, it will require you to press a key and then will bring you back to the main menu.
Do not close the prompt untill the process is done, when it's done, it will require a key to be pressed and then will bring it back to the main menu.






3. Your mod folder must now look like this.
3. The mod folder must now look like this.


[[image:Mod_folder_after.png|400px|First run)]]
[[File:Mod_folder_after.png|400px|First run)]]


If, so, then it's done, your vpk's where successfully generated, the amount of files generated will depend on how many assets you have to pack, you have to delete the vpk's and repeat the process if you want to add new assets to them, so it's best to do this once you near release.
If so then it's done, the vpk's where successfully generated, the amount of files generated will depend on how many assets it will be there to pack, it is necessary to delete the vpk's and repeat the process in order to add new assets to them, so it's best to do this near release.


=Changing the default VPK Path=
=Changing the default VPK Path=


#Choose Option <code>'1 - VPK.exe path'</code>
#Choose Option <code>'1 - VPK.exe path'</code>
#The tool will display your current path and ask to confirm if you really want to change choose <code>'y'</code>:
#The tool will display the current path and ask to confirm the change, choose <code>'y'</code>:
#Insert the new path without the <code>"\vpk.exe"</code> and press enter.
#Insert the new path without the <code>"\vpk.exe"</code> and press enter.
#Done, you successfully changed the path.
#Done,the path was successfully changed.




=Changing the .vpk prefix (experimental)=
=Changing the .vpk prefix (experimental)=
This tool auto-sets itself by default to work with [[Portal 2]] <code>vpk.exe</code>, but, it will probably work with other games too, since i do not know if the naming convention of the .vpk file on other games is the same, I added this function in order for you to be able to change it at your will.
This tool auto-sets itself by default to work with [[Portal 2]] <code>vpk.exe</code>, but, it will probably work with other games too, due the many naming conventions used for Valve Games .VPK's a funcition was added in order for the prefix to be changed as deemed necessary.


1.Choose Option <code>'4-Change .vpk file prefix'</code>, it will be prompted by the current prefix "pak01" that is the default, and a question asking if it will be changed.


1.Choose Option <code>'4-Change .vpk file prefix'</code>, you will be prompted by your current prefix "pak01" that is the default, and a question asking if you want to change it.
[[File:Prf1.JPG|500px|Step 1]]


[[image:Prf1.JPG|500px|Step 1]]


2.Input <code>'y'</code>  , then type the new name the prefix will change to, in this case is 'newPrefix'


2.Input <code>'y'</code> , then type the name you want to change to, in this case is 'newPrefix'
[[File:Prf2.JPG|500px|Step 2]]


[[image:Prf2.JPG|500px|Step 2]]


3.Press enter and the prefix will be updated, now check in option 4 again to see that now it displays the new name 'newPrefix':


3.Press enter and your prefix will be updated, now if you check in option 4 again, <code>'Your current prefix:'</code> now displays your new name:
[[File:Prf3.JPG|500px|Step 3]]


[[image:Prf3.JPG|500px|Step 3]]


4.Now when the program execute again, the .vpk is now named after whatever it was set the prefix to, in this case 'newPrefix'.


4.Now when you execute the program, your .vpk is now named after whatever you set the prefix to, in this case 'newPrefix'.
[[File:Prf4.JPG|300px|Step 4]]
 
[[image:Prf4.JPG|300px|Step 4]]




=Managing extensions (experimental)=
=Managing extensions (experimental)=


Some games have their files (vmt's, vtf's, sounds), separated into several .vpk's groups, so in order to try to expand this tool to work with other games as easily as it does with [[Portal 2]], I included this option, in here you can ADD or REMOVE from the list the extensions the program will scan while building your responsefile.
Some games have their files (vmt's, vtf's, sounds), separated into several .vpk's groups, so in order to try to expand this tool to work with other games as easily as it does with [[Portal 2]], It was included a new option that can either ADD or REMOVE from the list the extensions the program will scan while building the responsefile.




1.Choose Option <code>'5-Manage Extensions'</code>, you will be prompted by your current search parameters, displayed on the very top of the terminal window.
1.Choose Option <code>'5-Manage Extensions'</code>, it will show the current search parameters, displayed on the very top of the terminal window.


[[image:Src1.JPG|500px|Step 1]]
[[File:Src1.JPG|500px|Step 1]]




2. In order to REMOVE an extension from the search, in this case I selected <code>1).vtf</code> so, type the number and press enter, the terminal will display a message pointing the option removed, and the search parameters below will be updated:
2. In order to REMOVE an extension from the search, in this case I selected <code>1).vtf</code> so, type the number and press enter, the terminal will display a message pointing the option removed, and the search parameters below will be updated:


[[image:Src2.JPG|500px|Step 2]]
[[File:Src2.JPG|500px|Step 2]]




3. In order to ADD the extension back, type the number again, in this case <code>1).vtf</code>, and press enter, the terminal will display a message pointing the option added, and the option will appear on the search parameters again on the far right:
3. In order to ADD the extension back, type the number again, in this case <code>1).vtf</code>, and press enter, the terminal will display a message pointing the option added, and the option will appear on the search parameters again on the far right:


[[image:Src3.JPG|500px|Step 3]]
[[File:Src3.JPG|500px|Step 3]]


4. In the event you need a full reset on the search parameters, you can do it by either re-starting the program, or, choosing option  
4. In the event it is needed a full reset on the search parameters, it can be done by either re-starting the program, or, choosing option  
<code>11).RESET SEARCH PARAMETERS</code>.
<code>11).RESET SEARCH PARAMETERS</code>.


= See Also =
= See also =


* [[VPK]]
* [[VPK]]

Latest revision as of 01:48, 7 January 2024

Broom icon.png
This article or section should be converted to third person to conform to wiki standards.

Portal 2 The P2Multichunker offers an easy way for a Portal 2 mod to pack the assets onto multi-chunked vpk files.

Warning.pngWarning:The tool will probably work for other games aside Portal 2 if the vpk path name be changed and adapt the process, but, since it wasn't tested it can't be 100% guarantee it works.

Installation

  1. Download the executable.
  2. Place the executable in the Mod folder

.exe inside the mod folder (picture 1)

How to use

1. When first executing the tool, this is what it will display:

First run)

By default in the first execution, the tool will auto-set it's .vpk path to the following defaut path:

C:\Program Files (x86)\Steam\steamapps\common\Portal 2\bin

The path is stored on the file data.json that it's created when the tool run for the first time.


2. Choose option "2 - Execute P2Multichunker", the following screen will display:

First run)

Do not close the prompt untill the process is done, when it's done, it will require a key to be pressed and then will bring it back to the main menu.


3. The mod folder must now look like this.

First run)

If so then it's done, the vpk's where successfully generated, the amount of files generated will depend on how many assets it will be there to pack, it is necessary to delete the vpk's and repeat the process in order to add new assets to them, so it's best to do this near release.

Changing the default VPK Path

  1. Choose Option '1 - VPK.exe path'
  2. The tool will display the current path and ask to confirm the change, choose 'y':
  3. Insert the new path without the "\vpk.exe" and press enter.
  4. Done,the path was successfully changed.


Changing the .vpk prefix (experimental)

This tool auto-sets itself by default to work with Portal 2 vpk.exe, but, it will probably work with other games too, due the many naming conventions used for Valve Games .VPK's a funcition was added in order for the prefix to be changed as deemed necessary.

1.Choose Option '4-Change .vpk file prefix', it will be prompted by the current prefix "pak01" that is the default, and a question asking if it will be changed.

Step 1


2.Input 'y' , then type the new name the prefix will change to, in this case is 'newPrefix'

Step 2


3.Press enter and the prefix will be updated, now check in option 4 again to see that now it displays the new name 'newPrefix':

Step 3


4.Now when the program execute again, the .vpk is now named after whatever it was set the prefix to, in this case 'newPrefix'.

Step 4


Managing extensions (experimental)

Some games have their files (vmt's, vtf's, sounds), separated into several .vpk's groups, so in order to try to expand this tool to work with other games as easily as it does with Portal 2, It was included a new option that can either ADD or REMOVE from the list the extensions the program will scan while building the responsefile.


1.Choose Option '5-Manage Extensions', it will show the current search parameters, displayed on the very top of the terminal window.

Step 1


2. In order to REMOVE an extension from the search, in this case I selected 1).vtf so, type the number and press enter, the terminal will display a message pointing the option removed, and the search parameters below will be updated:

Step 2


3. In order to ADD the extension back, type the number again, in this case 1).vtf, and press enter, the terminal will display a message pointing the option added, and the option will appear on the search parameters again on the far right:

Step 3

4. In the event it is needed a full reset on the search parameters, it can be done by either re-starting the program, or, choosing option 11).RESET SEARCH PARAMETERS.

See also