Announcement

Collapse
No announcement yet.

How to set blueprint craeted game mode trough command line ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Old post, but i just struggled with this and wanted to help out others in the future. I built my my project, made a shortcut to my game's exe, and changed the shortcut's target to include parameters.

    Note this is 1 big long line to start a dedicated server:
    "C:\PerforceWorkspace\WorldOfPursuits\Saved\StagedBuilds\WindowsServer\WorldOfPursuitsServer.exe /Game/Maps/TestLevel?game=/Game/Blueprints/GameModes/WorldOfPursuitsRaceGameMode.WorldOfPursuitsRaceGameMode_C -game -log -nosteam -port=7778"

    Explanation:
    • My project is named "WorldOfPursuits" (Check it out at http://ThumperGames.com), so replace it with your project name
    • /Game/Maps/TestLevel is the folder path to my level. Its /Content/Maps/TestLevel tho in the editor. I think the Content path is replaced with Game when packaged (Im not sure)
    • ?game=/Game/Blueprints/GameModes/WorldOfPursuitsRaceGameMode.WorldOfPursuitsRaceGameMode_C -game is needed to override the default game mode. I have a BP game mode called "WorldOfPursuitsRaceGameMode" the "WorldOfPursuitsRaceGameMode_C" is something genereacted i think when packaging. Its needed so youll need SomethingGameMode.SomethingGameMode_C if you want to override to a BP game mode like me
    • -log is to start the log on launch. You want this or you wont know if the server is running or not. Its headless meaning you'll only find it in task manager otherwise)
    • -nosteam is because i don't use steam in my project
    • -port=7778 is whatever port you want to run the server on (I think UE4 default is 7777)
    Hope this helps! You can also run a Client or WindowsNoEditor build this way

    Leave a comment:


  • replied
    This would be really handy. I assume it's still impossible to do? Did you get anywhere with this or request it as a feature?

    Leave a comment:


  • How to set blueprint craeted game mode trough command line ?

    I'm using OpenLevel node, to load new level, and I'm trying to pass game mode option like that:

    Code:
    ?game=/Script/BoxCrusher.ChallengeGameMode -game
    But doesn't work. And I also tried there variants:

    Code:
    ?game=/Script/BoxCrusher.ChallengeGameMode_C -game
    Code:
    ?game=/Script/BoxCrusher.ChallengeGameMode
    Code:
    ?game=/Script/BoxCrusher.ChallengeGameMode_C
    Code:
    ?game=BoxCrusher.ChallengeGameMode -game
    Code:
    ?game=ChallengeGameMode -game
    Code:
    ?game=ChallengeGameMode_C -game
    Code:
    ?game=ChallengeGameMode -game
    With and without -game, but nothing works. Any ideas ?
Working...
X