diff --git a/Documentation/Launching.md b/Documentation/Launching.md index 8e7c8e79..19928d40 100644 --- a/Documentation/Launching.md +++ b/Documentation/Launching.md @@ -8,9 +8,9 @@ For development, use the `nuclide` launch script inside the root directory. $ ./nuclide ``` -Running it on its own will mount the game dir `base/`. As that's the default defined inside the file `./default.fmf`. +Running it on its own will mount only the directory `platform/`. As that's the default defined inside the file `./default.fmf`. -You can mount an additional mod over `base/` like so: +You can mount an additional mod over it like so: ``` $ ./nuclide -game some_other_mod @@ -22,10 +22,28 @@ If you wanted to mount multiple game dirs, you could in theory do it like so: $ ./nuclide -game first_mod -game second_mod -game third_mod ``` -And it'll load those directories in order, on top of `base/`. +And it'll load those directories in order. + +However, if you'd like to be very specific in how a game is run/branded/launched +you should really use **FTE Manifest** files. + +Simply plop one into your game directory with the name `manifest.fmf`, then launch +nuclide like so: + +``` +$ ./nuclide first_mod +``` + +and it will load `first_mod/manifest.fmf`. You can supply arguments to it by putting them into the second parameter with quotes like so: + +``` +$ ./nuclide first_mod "-window +set sv_cheats 1" +``` However, we advise you only do this for development. If you want proper multiplayer compatibility (slightly different filesystem mount setups can confuse client-server negotation) please use the built-in **Custom game** menu to ensure maximum compatibility to other clients. +If you are running a dedicated server and have issues with multiple game directories, check the value of the cvar `sv_gamedir` on the server. It is meant to be a semicolon separated list of game directories, if multiple ones are supposed to be mounted. + ## For release... You'll want to compile a custom build of the engine with your branding. diff --git a/default.fmf b/default.fmf index c7c4d410..b3f7f137 100644 --- a/default.fmf +++ b/default.fmf @@ -1,8 +1,6 @@ FTEMANIFEST 1 -GAME base NAME "Nuclide" BASEGAME platform -BASEGAME base // you don't really want to change these RTCBROKER master.frag-net.com:27950 diff --git a/nuclide b/nuclide index db5d33d6..2985ab3c 100755 --- a/nuclide +++ b/nuclide @@ -9,12 +9,24 @@ fi cd "$SRCPATH/bin" +if [ -f ../$1/manifest.fmf ] +then + MANIFEST="-manifest ../$1/manifest.fmf" + SVGAMEDIR=$(cat ../$1/manifest.fmf | grep BASEGAME | awk 'BEGIN { ORS="," } { print $2 } END { print "" }') + SVGAMEDIR=${SVGAMEDIR%,,} + ARGUMENTS="$2 +sv_gamedir \"${SVGAMEDIR}\"" + echo "Arguments: $ARGUMENTS" +else + ARGUMENTS="$*" +fi + + if [ -f "$SRCPATH/bin/fteqw" ]; then if [ -z "$NUCLIDE_GDB" ]; then - ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* + ./fteqw ${ADDITIONAL_ARGS} -basedir ../ ${MANIFEST} ${ARGUMENTS} else gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* fi else printf "Engine is not present, please run build_engine.sh\n" -fi \ No newline at end of file +fi diff --git a/nuclide-ds b/nuclide-ds index 8e6bd334..972bc8bf 100755 --- a/nuclide-ds +++ b/nuclide-ds @@ -1,22 +1,32 @@ -#!/bin/sh +#!/bin/bash set -e -SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )" +SRCPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )" -# We want to keep our library separate if [ -d "$HOME/Library/Games" ] then ADDITIONAL_ARGS="-usehome -homedir ${HOME}/Library/Games/Nuclide" fi - cd "$SRCPATH/bin" -if [ -f "$SRCPATH/bin/fteqw-sv" ]; then +if [ -f ../$1/manifest.fmf ] +then + MANIFEST="-manifest ../$1/manifest.fmf" + SVGAMEDIR=$(cat ../$1/manifest.fmf | grep BASEGAME | awk 'BEGIN { ORS="," } { print $2 } END { print "" }') + SVGAMEDIR=${SVGAMEDIR%,,} + ARGUMENTS="$2 +sv_gamedir \"${SVGAMEDIR}\"" + echo "Arguments: $ARGUMENTS" +else + ARGUMENTS="$*" +fi + + +if [ -f "$SRCPATH/bin/fteqw" ]; then if [ -z "$NUCLIDE_GDB" ]; then - ./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ $* + ./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ ${MANIFEST} ${ARGUMENTS} else - gdb --args ./fteqw ${ADDITIONAL_ARGS} -basedir ../ $* + gdb --args ./fteqw-sv ${ADDITIONAL_ARGS} -basedir ../ $* fi else printf "Engine is not present, please run build_engine.sh\n" -f \ No newline at end of file +fi