[Solved] How to set -showfps w/ GOG linux version?

Ask here if you experience technical problems with X Rebirth.

Moderator: Moderators for English X Forum

Post Reply
spookywatcher
Posts: 192
Joined: Thu, 11. Apr 19, 20:26

[Solved] How to set -showfps w/ GOG linux version?

Post by spookywatcher » Wed, 15. May 19, 17:22

GOG version uses ./start.sh to launch the game. I have worked for two days trying to figure out how to set the -showfps launch option but no avail.

My hours of google foo only came up with another user trying to figure it out (see here: viewtopic.php?p=4590326#p4590326 ) but nothing came of it. I also contacted GOG and their crack team came up with "Did you try ./start.sh -showfps" and "If that doesn't work contact EgoSoft. Obviously it didn't work neither did ./start.sh --showfps

My bet is I need to put it in the ./start.sh and I have tried several ways inside the launch script, but I'm not having any luck.

Code: Select all

#!/bin/bash
# GOG.com (www.gog.com)
# X: Rebirth

# Initialization
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${CURRENT_DIR}"
source support/gog_com.shlib

# Game info
GAME_NAME="$(get_gameinfo 1)"
VERSION="$(get_gameinfo 2)"
VERSION_DEV="$(get_gameinfo 3)"

determine_language() {
	local GameLanguage="${1}"
	echo "Language detected: ${GameLanguage}"

	# restore English first
	for Each in $(find "${CURRENT_DIR}/languages/English" -type f -printf "%P\n" )
    do
    	if [ -e "${CURRENT_DIR}/game/${Each}" ]
    	then
    		rm -f "${CURRENT_DIR}/game/${Each}"
    	fi
        mkdir -p "$(dirname ${CURRENT_DIR}/game/${Each})"
    	ln -s "${CURRENT_DIR}/languages/English/${Each}" "${CURRENT_DIR}/game/${Each}"
    done

    # then link the chosen language
    for Each in $(find "${CURRENT_DIR}/languages/${GameLanguage}" -type f -printf "%P\n" )
    do
    	if [ -e "${CURRENT_DIR}/game/${Each}" ]
    	then
    		rm -f "${CURRENT_DIR}/game/${Each}"
    	fi
        mkdir -p "$(dirname ${CURRENT_DIR}/game/${Each})"
    	ln -s "${CURRENT_DIR}/languages/${GameLanguage}/${Each}" "${CURRENT_DIR}/game/${Each}"
    done
}

set_language() {
	case "$LANG" in 
	*fr_*)
		determine_language "French" ;;
	*de_*)
		determine_language "German" ;;
	*it_*)
		determine_language "Italian" ;;
	*ko_*)
		determine_language "Korean" ;;
	*ru_*)
		determine_language "Russian" ;;
	*zh_CN*|*zh_SG*)
		determine_language "Simplified Chinese" ;;
	*zh_TW*|*zh_HK*)
		determine_language "Traditional Chinese" ;;
	*)
		determine_language "English"
	esac
}

# Actions
run_game() {
 echo "Running ${GAME_NAME}"
 set_language
 cd game
 ./testandlaunch XRebirth
}

default() {
  run_game
}

# Options
define_option "-s" "--start" "start ${GAME_NAME}" "run_game" "$@"

# Defaults
standard_options "$@"
Edit to add solution**

I had a moment of clarity about 4 mins after posting this and within the ./start.sh I put -showfps after ./testandlaunch XRebirth on line 68. I'm old so I cherish these moments of clarity.

Code: Select all

# Actions
run_game() {
 echo "Running ${GAME_NAME}"
 set_language
 cd game
 ./testandlaunch XRebirth -showfps

Post Reply

Return to “X Rebirth - Technical Support”