Moving Mod And Source Files: Difference between revisions
m (otherlang2) |
(badly moved multipage) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar|title = Moving Mod And Source Files}} | ||
| | |||
The {{Source|4}} SDK sets up a mod that to be worked on the machine that the wizard ran on. | |||
This setup includes creating configuration setups for the SDK Tool, {{Hammer|4}}, and in {{VS|4}} Visual Studio Solution files. | |||
For any reason you need to move from one to computer to another, it becomes an issue to continue working. | |||
This includes situations of just moving from one machine to the next (such as moving from an academic lab computer to a computer at home) as well as any source control situation. | |||
The goal of this document is to explain each part that needs to move and how to reset the configuration settings to continue working. | The goal of this document is to explain each part that needs to move and how to reset the configuration settings to continue working. | ||
== Set the Working Directory for Your Source Files == | == Set the Working Directory for Your Source Files == | ||
The Create a Mod Wizard will ask you to provide or create a folder location. This folder is your source directory. The SCR directory contains all of the source code for the mod. The other folders created are for the raw and conversion files for maps, models, and textures. These files are the team's work files, and are not given to users whom will play your mod. | The [[Create a Mod]] Wizard will ask you to provide or create a folder location. | ||
This folder is your source directory. The SCR directory contains all of the source code for the mod. | |||
The other folders created are for the raw and conversion files for maps, models, and textures. | |||
These files are the team's work files, and are not given to users whom will play your mod. | |||
This folder can be be moved at will, provided the information below is correct as well. | This folder can be be moved at will, provided the information below is correct as well. | ||
== Set The Game Directory for Your Mod== | |||
The folder that is created under ''...\Steam\steamapps\SourceMods'' for your mod is called the Game directory. | |||
The name of this directory is the name that was supplied during the create a mod wizard. | |||
This is the directory that is shared with other users whom will play your mod. | |||
This directory holds other important directories, such as the ones for DLL and MAPS. | |||
VS will copy the finished client and server DLL's to the following directory. | {{VS|4|nt=0}} will copy the finished client and server DLL's to the following directory. | ||
''...Steam\steamapps\SourceMods\<GAME_DIR_NAME>\bin'' | ''...Steam\steamapps\SourceMods\<GAME_DIR_NAME>\bin'' | ||
Line 25: | Line 40: | ||
''...Steam\steamapps\SourceMods\<GAME_DIR_NAME>\maps'' | ''...Steam\steamapps\SourceMods\<GAME_DIR_NAME>\maps'' | ||
== Configure File Copying in Visual Studio Solution == | |||
{{key|RMB}} > Properties on the Server and Client projects. | |||
You will need to do this for both the Release and the Debug configuration; four times in all. | |||
# Navigate to ''Configuration Properties > Build Events > Post-Build Event''. | |||
# Navigate to ''Configuration Properties > | |||
# Click on ''Command Line'', then click on the ... button that appears on the right. | # Click on ''Command Line'', then click on the ... button that appears on the right. | ||
# Replace the contents of the new dialogue with the first code block below. | # Replace the contents of the new dialogue with the first code block below. | ||
# Click on ''Outputs'' and paste in the second code block below. | # Click on ''Outputs'' and paste in the second code block below. | ||
{{warning|Remember | {{warning|Remember to fill in the actual target destination instead of <YOUR MOD PATH>.}} | ||
{{note|The "<YOUR MOD PATH>" is the path of your ".. | {{note|The "<YOUR MOD PATH>" is the path of your "..\SteamApps\SourceMods\<Your Mod>" directory, and not the directory of your Visual Studio Project.}} | ||
=== Command Line === | === Command Line === | ||
if exist "<YOUR MOD PATH>\bin\ | if exist "<YOUR MOD PATH>\bin\$(TargetFileName)" attrib -r "<YOUR MOD PATH>\bin\$(TargetFileName)" | ||
copy "$(TargetDir)" | copy "$(TargetDir)"$(TargetFileName) "<YOUR MOD PATH>\bin\" | ||
if exist "<YOUR MOD PATH>\bin\ | if exist "<YOUR MOD PATH>\bin\$(TargetName).pdb" attrib -r "<YOUR MOD PATH>\bin\$(TargetName).pdb" | ||
if exist "$(TargetDir)" | if exist "$(TargetDir)"$(TargetName).pdb copy "$(TargetDir)"$(TargetName).pdb "<YOUR MOD PATH>\bin\" | ||
=== Outputs === | === Outputs === | ||
<YOUR MOD PATH>\bin\ | <YOUR MOD PATH>\bin\$(TargetFileName);<YOUR MOD PATH>\bin\$(TargetName).pdb | ||
{{warning|It is possible that you have a corrupted bin file instead a bin folder at your Steam mod path. If this occurs, delete it and recompile or create your mod project again.}} | |||
{{warning|It is possible that you have a corrupted bin file instead a bin folder at | |||
== SDK Tool and Hammer Configurations == | == SDK Tool and Hammer Configurations == | ||
: For | : For {{tOB|4}} Mods, You have access to a ''Edit Game Configurations" in your SDK tool | ||
:: In the Window labled "Current Game Configurations", click on the ''Add'' button. | :: In the Window labled "Current Game Configurations", click on the ''Add'' button. | ||
:: Under ''Name'', Enter in a name that makes sense for your mod. | :: Under ''Name'', Enter in a name that makes sense for your mod. | ||
:: Under ''Directory'', Enter the directory for your game directory under the sourcemods folder in steam, or use the ''Browse'' button to locate it. | :: Under ''Directory'', Enter the directory for your game directory under the sourcemods folder in steam, or use the ''Browse'' button to locate it. | ||
:Hammer then needs to be manually setup. | : {{Hammer|4}} then needs to be manually setup. (Same for {{hammerpp|4}}) | ||
:: Run Hammer and open ''Tools->Options'' | :: Run {{Hammer|3}} and open ''Tools->Options'' | ||
:: Follow the Mod information in the directions on the [[Hammer Manual Configuration]] page. | :: Follow the Mod information in the directions on the [[Hammer Manual Configuration]] page. | ||
[[Category:Modding]] | [[Category:Modding]] |
Latest revision as of 06:07, 14 July 2024
The Source SDK sets up a mod that to be worked on the machine that the wizard ran on.
This setup includes creating configuration setups for the SDK Tool, Hammer, and in
Visual Studio Visual Studio Solution files.
For any reason you need to move from one to computer to another, it becomes an issue to continue working.
This includes situations of just moving from one machine to the next (such as moving from an academic lab computer to a computer at home) as well as any source control situation.
The goal of this document is to explain each part that needs to move and how to reset the configuration settings to continue working.
Set the Working Directory for Your Source Files
The Create a Mod Wizard will ask you to provide or create a folder location.
This folder is your source directory. The SCR directory contains all of the source code for the mod.
The other folders created are for the raw and conversion files for maps, models, and textures.
These files are the team's work files, and are not given to users whom will play your mod.
This folder can be be moved at will, provided the information below is correct as well.
Set The Game Directory for Your Mod
The folder that is created under ...\Steam\steamapps\SourceMods for your mod is called the Game directory.
The name of this directory is the name that was supplied during the create a mod wizard.
This is the directory that is shared with other users whom will play your mod.
This directory holds other important directories, such as the ones for DLL and MAPS.
VS will copy the finished client and server DLL's to the following directory.
...Steam\steamapps\SourceMods\<GAME_DIR_NAME>\bin
The folder to where map bsp files will be copied to will be the following directory.
...Steam\steamapps\SourceMods\<GAME_DIR_NAME>\maps
Configure File Copying in Visual Studio Solution
> Properties on the Server and Client projects.
You will need to do this for both the Release and the Debug configuration; four times in all.
- Navigate to Configuration Properties > Build Events > Post-Build Event.
- Click on Command Line, then click on the ... button that appears on the right.
- Replace the contents of the new dialogue with the first code block below.
- Click on Outputs and paste in the second code block below.


Command Line
if exist "<YOUR MOD PATH>\bin\$(TargetFileName)" attrib -r "<YOUR MOD PATH>\bin\$(TargetFileName)" copy "$(TargetDir)"$(TargetFileName) "<YOUR MOD PATH>\bin\" if exist "<YOUR MOD PATH>\bin\$(TargetName).pdb" attrib -r "<YOUR MOD PATH>\bin\$(TargetName).pdb" if exist "$(TargetDir)"$(TargetName).pdb copy "$(TargetDir)"$(TargetName).pdb "<YOUR MOD PATH>\bin\"
Outputs
<YOUR MOD PATH>\bin\$(TargetFileName);<YOUR MOD PATH>\bin\$(TargetName).pdb

SDK Tool and Hammer Configurations
- For
The Orange Box Mods, You have access to a Edit Game Configurations" in your SDK tool
- In the Window labled "Current Game Configurations", click on the Add button.
- Under Name, Enter in a name that makes sense for your mod.
- Under Directory, Enter the directory for your game directory under the sourcemods folder in steam, or use the Browse button to locate it.
Hammer then needs to be manually setup. (Same for
Hammer++)
- Run Hammer and open Tools->Options
- Follow the Mod information in the directions on the Hammer Manual Configuration page.