A Nights Haunting: Source

A Nights Haunting: Source

Not enough ratings
Using Steamcmd to Upload content to Steam Workshop
By dr.N0
In this guide i will show you how to currently Upload content built for A Nights Haunting: Source to the A Nights Haunting: Source Steam Workshop.
   
Award
Favorite
Favorited
Unfavorite
Establishing Steamcmd
The first step to getting started is by downloading a solid copy of the steamcmd file system if you have not already done so at some point in the past and or cannot find it.

Copies are official a.f through Valves developer wikipedia
https://developer.valvesoftware.com/wiki/SteamCMD

Once thats downloaded, unpack the archive and drop the contents where ever, i did the desktop for this tutorial.

You will be left with a single Steamcmd folder with a single Steamcmd bootstrapper executable file, you will want to run this - a steam console command window will pop up and prep the initial steamcmd file system, then
Close it by typing in quit and restart the steamcmd program.

With a fresh build ready to log into your ready to prepare your files for upload.
Packing your contents to Upload
Now that Steamcmd is ran to build its standing place file system and shutdown to restart with a fresh window its time to get our files.

For this tutorial i took the materials folders vgui contents packing sprays that are used in A Nights Haunting: Source, that would have been found in
C:\Program Files (x86)\Steam\steamapps\common\A Nights Haunting Source\anhsource\materials\vgui\logos

After copying the entire materials folder, and deleting everything except for the contents needed for the workshop package i moved them into a folder called Steamworkshop on the desktop.

Now with Steamcmd on the desktop and the Steamworkshop package contents also on the desktop in the steamworkshop folder following this file path
C:\Users\l0psi\Desktop\steamworkshop\universal\materials\vgui\logos


Now were ready to take the contents to the Steamcmd.
Setting up your Descriptor File
So now with our contents copied over and packed formally for feeding the steamcmd to process to the steam workshop were ready to make the file we need for the steamcmd to understand what to do to upload the content.

This file is called a .vdf it can be named however and i like it placed in the subfolder steamworkshop before the folder calling my steamworkshop contents folder which in this tutorial is called universal. and starts with packing the materials folder.
You can simply use notepad to create the file but be certain to save the file as under all files and NOT a .txt file. I used desc.vdf as my descriptor file name and buld for this tutorial.

Copy and Paste this code below into your new notepad .txt file and Save it as the desc.vdf file First.
- for goodness sake, just go back delete the .txt thats saved leaving only the .vdf and reopen the .vdf to edit its conditions to suit your own.

"workshopitem" { "appid" "3418380" "publishedfileid" "" "contentfolder" "C:\\Users\\l0psi\\Desktop\\steamworkshop\\universal\\" "previewfile" "C:\\Users\\l0psi\\Desktop\\smmm.jpg" "visibility" "0" "title" "Official Sprays Pack" "description" "This is the official set of sprays for A Nights Haunting: Source." "changenote" "Initial Release." }

Youll notice the workshop tagging at the top creating its functioned contents below

"appid" is currently set to the steam appid written by valve for A Nights Haunting: Source. Tactically this can be changed to other games under steam appid that bare workshops and the same process could ensue the same results for those games as well.

"publishedfileid" is the published steamworkshop pages id to which your package is going to be born into on the official steamworkshop page for the app if supplied.
*You will want to initially leave this blank as so in the code snippet.*
You dont have a publishedfileid yet because your just now uploading the content therefore it doesnt exist yet. but well get to that.

"contentfolder" is where your your going to label your contents file path for Steamcmd to find and ship into the steam workshop. You can locate your formally packed contents folder and copy the address as text to make life ALOT easier lol. its important to have this syntax correct and its important to have the \\ back slashes in between folders though I DO BELIEVE this DIFFERS from other platforms and approachs like MAC Linux maybe even other steam platforms like the deck etc.

"previewfile" is the location of your preview image you wish to use for the workshop item. This can be .jpg or .png as ive used both and size i dont think is picky but obviously bigger clearer pictures are best.

"visibility" is important as it is what initially the content releases as. "0" is set for "Public" release.
"title" a simple quick label for the page name of your mod.
"description" for the body text of the mod to descibe your contents etc.
"changenote" which can be used to label mod package versions etc.

After changing the contentfolder script location and changing the previewfile script location, title and description for Your contents. resave the file as the .vdf to save your changes.

Now your ready to Launch Steamcmd and upload your contents!
Running Steamcmd to Upload Workshop Contents
Now that we have Steamcmd prepped and ready to go to login.
Our contents formally packed into a folder system ready to upload into steam workshop and into the mod/game its for.
And our written descriptor.vdf file were ready to upload.

Go ahead and log in to the Steam command via the command line
login [space] mysteamusername [space] mysteampassword [enter]
You should be prompt to enter 2 factor authentication now.
Use your steam app on your phone to confirm your login and grant access to the steam workshop.
Once logged in use the command
workshop_build_item
and follow with the file path to your steamworkshop items folder to find your descriptor.vdf file.
workshop_build_item C:\Users\l0psi\Desktop\steamworkshop\desc.vdf
It should follow with
Preparing update... Preparing content... Uploading content... Uploading preview image... Commiting update...Success. Steam>

Your content should be visible under your profile in the Steam platform or on the games workshop if successfully uploaded and released to be publicly visible.


If it happens to fail and you get an error like
Uploading content...ERROR! Failed to update workshop item (File Not Found).
then check your syntax. You should notice that now your descriptor.vdf file has been utilized your .vdf file should now have a "publishedfileid" going from "" blank to something like "309247039".

Go ahead and try the upload again now that you check your configurations and have a labelled "publishedfileid".

If the issue still persists and you find yourself unable to figure it out. i can say make sure your using a solid Steamcmd download. Steamcmd runs from alot of this and starts alot of things. If you didnt download it like suggested above you may be using a wrong one. I learned this lastnight using my steamworks sdk content builder steamcmd to do it leaving me to errors every time.

and then theres always plan B.
Plan B
If you cant seem to get Steamcmd to work with your folders and files to upload the content to the Steam workshop you can always try this elite user interface program created by Running with Rifles.

It offers companionship to the steamcmd and can assist with setting up the build to upload to the steam workshop.
The tool can be found here
SteamWUT[www.runningwithrifles.com]
This is the tool i used to upload the Plunderbread model found here
Steam workshop
and this tutorial process is what i did to upload the Official Sprays content found here
Steam workshop
Foot notes
This is a very official archaic process to uploading content to the Steam workshops.
Most games/mods have in game built features and panels allowing assistance in these game specific content uploading processes, however currently A Nights Haunting: Source does not support these in game approaches leaving currently these 2 options to doing so as the best options for now until further development!

Feel free to reach out to your games local workshop forums for assistance uploading or even contact me if needed!
*official documentations on the workshop process can be found here
https://partner.steamgames.com/doc/features/workshop/implementation?l=finnish&language=english#SteamCmd