Skip to content

Commit

Permalink
automatic .vdf generation and upload, Alpha v0.30!
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaPRIME committed Jun 30, 2018
1 parent 91fc06e commit 60cbf94
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 3 deletions.
2 changes: 1 addition & 1 deletion StarTech/_metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version" : "Alpha v0.29",
"version" : "Alpha v0.30",
"friendlyName" : "StarTech",
"name" : "StarTech",
"author" : "zetaPRIME",
Expand Down
21 changes: 21 additions & 0 deletions StarTech/_steam_description
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
~ StardustLib [b]required[/b]! ~
Transmatter networks! Technological advancements like you'd expect in a universe like Starbound's!

This mod is an early WIP; things will be rough around the edges, so bear with us!

Quick primer on Transmatter Networks:
- Craft and place *one* Transmatter Controller per network (any more and things will break!)
- Craft and place any number of Terminals, Storage Buses and Drive Bays and hook them up to the controller via wire
- - Network Relays will allow indirect connection, for distance or tidiness

Terminals provide access to the items in the network
Storage Buses link external storage to the network
- Right-click with a wrench (made at an anvil) to change direction (indicated by the blue highlight)
- Shift+right-click to configure filters and priority
Drive Bays read/write inserted Transmatter Drives to provide compact, portable storage
- Click the button next to a slot to configure that drive's filter/priority

Ingame documentation coming soon; meanwhile, here's a tutorial Kriana wrote up:
https://www.reddit.com/r/starbound/comments/537xox/startech_storage_mod/

Follow development here: https://github.com/zetaPRIME/sb.StardustSuite
2 changes: 1 addition & 1 deletion StardustLib/_metadata
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version" : "Alpha v0.25",
"version" : "Alpha v0.30",
"friendlyName" : "StardustLib",
"name" : "StardustLib",
"author" : "zetaPRIME",
Expand Down
6 changes: 6 additions & 0 deletions StardustLib/_steam_description
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Libraries for various interop, etc.

You probably don't care about this unless you're a modder or use a mod that uses this.

If you're a modder, follow development here:
https://github.com/zetaPRIME/sb.StardustSuite
1 change: 1 addition & 0 deletions StardustTweaks/_metadata
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"description" : "Various tweaks to vanilla mechanics.",
"link" : "steam://url/CommunityFilePage/764903486",
"steamContentId" : "764903486",
"hidden" : true,
"requires" : [ "StardustLib" ]
}
35 changes: 34 additions & 1 deletion build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ while getopts ":s" opt; do
s)
_steamupload=1
_steamuser=$(cat ./steamuser)
sudo true # elevate ahead of time
;;
\?)
echo "Invalid option: -$OPTARG" >&2
Expand Down Expand Up @@ -36,7 +37,39 @@ function pack {
asset_packer ./_release/$1/ ./_release/$1.pak
if [ ! -z "$_steamupload" ] ; then
echo Uploading to Steam...
steamcmd +login $_steamuser +workshop_build_item ./$1.vdf +exit

mkdir -p ./_release/tmp/upload
cp ./_release/$1.pak ./_release/tmp/upload/contents.pak

# gather info from metadata files
local md="./$1/_metadata"
local title=$(jq -r '.friendlyName' $md)
local cid=$(jq -r '.steamContentId' $md)
local version=$(jq -r '.version' $md | sed "s/\\\"/''/g")

# start building the vdf
local vdf="./_release/tmp/.vdf" ; touch $vdf
# get the easy stuff out of the way
printf "\"workshopitem\"{\"appid\"\"211820\"\"publishedfileid\"\"$cid\"\"title\"\"$title\"\"contentfolder\"\"$(realpath ./_release/tmp/upload)\"" >> $vdf
# add preview image if present
if [ -f "./$1/_previewimage" ] ; then printf "\"previewfile\"\"$(reaplath ./$1/_previewimage)\"" >> $vdf ; fi
# handle hidden parameter
if jq -re '.hidden' $md > /dev/null ; then printf "\"visibility\"\"2\"" >> $vdf ; else printf "\"visibility\"\"0\"" >> $vdf ; fi
# description!
if [ -f "./$1/_steam_description" ] ; then
printf "\"description\"\"$(sed "s/\\\"/''/g" ./$1/_steam_description)\"" >> $vdf
else
printf "\"description\"\"$(jq -r '.description' $md | sed "s/\\\"/''/g")\"" >> $vdf
fi
# changelog
printf "\"changenote\"\"[b]$version[/b]\nCheck git releases for more info:\n" >> $vdf
printf "https://github.com/zetaPRIME/sb.StardustSuite/releases" >> $vdf
printf "\"}" >> $vdf # and cap off

# actually upload mod!
sudo steamcmd +login $_steamuser +workshop_build_item $(realpath $vdf) +exit
echo # force newline that steamcmd doesn't print
rm -rf ./_release/tmp
fi
}

Expand Down

0 comments on commit 60cbf94

Please sign in to comment.