Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Dartanlla/OWS into main
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreDartStudios committed Nov 10, 2023
2 parents 27cbf86 + 566303d commit 14170e9
Show file tree
Hide file tree
Showing 39 changed files with 73 additions and 84 deletions.
6 changes: 3 additions & 3 deletions docs/getting-started/ue5.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
layout: default
title: Unreal Engine 5.3
title: Unreal Engine 5.3.1
parent: OWS Starter Project
grand_parent: Getting Started
nav_order: 1
---

# OWS Starter Project for Unreal Engine 5.3
# OWS Starter Project for Unreal Engine 5.3.1
Follow these instructions if you want to setup the OWS Starter Project for Unreal Engine 5. Before you are able to setup this project you need to finish the [Docker Setup](docker-setup) and [Database setup](setup-database) sections.

## Download the project

Click on the button below to download the Open World Starter project.

[Download OpenWorldStarterDockerUE5.zip - 20230909 Release - UE 5.3](https://drive.google.com/file/d/1qAGpcHTiznUOjkZcscpqyTipcbrvd38Y/view?usp=sharing){: .btn .btn-blue .mr-4}
[Download OpenWorldStarterDockerUE5.zip - 20231026 Release - UE 5.3.1](https://drive.google.com/file/d/1wbI8rk7PEvW1WPHCCbFT0N2kvpa92xO-/view?usp=sharing){: .btn .btn-blue .mr-4}

## Initial setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@
#include "GameplayTagContainer.h"
#include "GameplayTagsModule.h"
#include "OWSAttributeSet.h"
#include "OWSAdvancedProjectile.h"
//#include "OWSGameplayAbility.h"
#include "Runtime/Engine/Classes/GameFramework/PlayerState.h"

class AOWSAdvancedProjectile;

#define CONSTRUCT_CLASS(Class, Name) Class* Name = NewObject<Class>(GetTransientPackage(), FName(TEXT(#Name)))

FName AOWSCharacterWithAbilities::AbilitySystemComponentName(TEXT("AbilitySystem"));
Expand Down
1 change: 1 addition & 0 deletions src/OWSCharacterPersistence/OWSCharacterPersistence.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OWSData\OWSData.csproj" />
<ProjectReference Include="..\OWSShared\OWSShared.csproj" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/OWSCharacterPersistence/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void ConfigureServices(IServiceCollection services)
c.IncludeXmlComments(filePath);
});

services.Configure<OWSData.Models.StorageOptions>(Configuration.GetSection(OWSData.Models.StorageOptions.SectionName));
services.Configure<OWSShared.Options.StorageOptions>(Configuration.GetSection(OWSShared.Options.StorageOptions.SectionName));
services.Configure<OWSShared.Options.APIPathOptions>(Configuration.GetSection(OWSShared.Options.APIPathOptions.SectionName));
services.Configure<OWSShared.Options.RabbitMQOptions>(Configuration.GetSection(OWSShared.Options.RabbitMQOptions.SectionName));

Expand Down
4 changes: 4 additions & 0 deletions src/OWSData/OWSData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
<PackageReference Include="System.Data.SqlClient" Version="4.8.5" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OWSShared\OWSShared.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.InMemory
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using OWSData.Models.Composites;
using OWSData.Models.Tables;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MSSQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Data;
using System.Data.SqlClient;
using System.Threading.Tasks;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MSSQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using System.Data.SqlClient;
using System.Text;
using System.Threading.Tasks;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MSSQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using OWSData.Models.Tables;
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MSSQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using OWSData.Repositories.Implementations.MongoDB.Models;
using Microsoft.Extensions.Configuration;
using System.Threading.Tasks;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MongoDB
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.Models.Tables;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MySQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.Models.Tables;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MySQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using OWSData.Models.StoredProcs;
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MySQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSData.Models.Tables;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.MySQL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.Models.Tables;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.Postgres
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.Models.Tables;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.Postgres
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using OWSData.Models.StoredProcs;
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.Postgres
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using OWSData.Repositories.Interfaces;
using OWSData.SQL;
using OWSData.Models.Tables;
using OWSShared.Options;

namespace OWSData.Repositories.Implementations.Postgres
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using OWSShared.Options;

namespace OWSData.Repositories.Interfaces
{
Expand Down
1 change: 1 addition & 0 deletions src/OWSGlobalData/OWSGlobalData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OWSData\OWSData.csproj" />
<ProjectReference Include="..\OWSShared\OWSShared.csproj" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/OWSGlobalData/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void ConfigureServices(IServiceCollection services)
c.IncludeXmlComments(filePath);
});

services.Configure<OWSData.Models.StorageOptions>(Configuration.GetSection(OWSData.Models.StorageOptions.SectionName));
services.Configure<OWSShared.Options.StorageOptions>(Configuration.GetSection(OWSShared.Options.StorageOptions.SectionName));
services.Configure<OWSShared.Options.APIPathOptions>(Configuration.GetSection(OWSShared.Options.APIPathOptions.SectionName));
services.Configure<OWSShared.Options.RabbitMQOptions>(Configuration.GetSection(OWSShared.Options.RabbitMQOptions.SectionName));

Expand Down
1 change: 0 additions & 1 deletion src/OWSInstanceLauncher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using OWSShared.Objects;
using Serilog;

namespace OWSInstanceLauncher
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using OWSData.Models;
using OWSData.Models.StoredProcs;
using OWSData.Repositories.Interfaces;
using OWSShared.Interfaces;
using OWSShared.Messages;
using OWSShared.RequestPayloads;
using OWSShared.Options;
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Text.Json;
using Serilog;
using MongoDB.Driver.Linq;

namespace OWSShared.Objects
namespace OWSInstanceLauncher.Services
{
public class ServerLauncherHealthMonitoring : IServerHealthMonitoringJob
{
Expand All @@ -25,7 +22,7 @@ public class ServerLauncherHealthMonitoring : IServerHealthMonitoringJob
private readonly IZoneServerProcessesRepository _zoneServerProcessesRepository;
private readonly IOWSInstanceLauncherDataRepository _owsInstanceLauncherDataRepository;

public ServerLauncherHealthMonitoring(IOptions<OWSInstanceLauncherOptions> OWSInstanceLauncherOptions, IHttpClientFactory httpClientFactory, IZoneServerProcessesRepository zoneServerProcessesRepository,
public ServerLauncherHealthMonitoring(IOptions<OWSInstanceLauncherOptions> OWSInstanceLauncherOptions, IHttpClientFactory httpClientFactory, IZoneServerProcessesRepository zoneServerProcessesRepository,
IOWSInstanceLauncherDataRepository owsInstanceLauncherDataRepository)
{
_OWSInstanceLauncherOptions = OWSInstanceLauncherOptions;
Expand Down Expand Up @@ -80,7 +77,7 @@ private List<GetZoneInstancesForWorldServer> GetZoneInstancesForWorldServer(int
}
};

var shutDownInstanceLauncherRequest = new StringContent(JsonConvert.SerializeObject(worldServerIDRequestPayload), Encoding.UTF8, "application/json");
var shutDownInstanceLauncherRequest = new StringContent(JsonSerializer.Serialize(worldServerIDRequestPayload), Encoding.UTF8, "application/json");

var responseMessageTask = instanceManagementHttpClient.PostAsync("api/Instance/GetZoneInstancesForWorldServer", shutDownInstanceLauncherRequest);
var responseMessage = responseMessageTask.Result;
Expand All @@ -89,9 +86,9 @@ private List<GetZoneInstancesForWorldServer> GetZoneInstancesForWorldServer(int
{
var responseContentAsync = responseMessage.Content.ReadAsStringAsync();
string responseContentString = responseContentAsync.Result;
output = JsonConvert.DeserializeObject<List<GetZoneInstancesForWorldServer>>(responseContentString);
}
else
output = JsonSerializer.Deserialize<List<GetZoneInstancesForWorldServer>>(responseContentString);
}
else
{
output = new List<GetZoneInstancesForWorldServer>();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using OWSData.Models;
using OWSData.Repositories.Interfaces;
using OWSShared.Interfaces;
Expand All @@ -10,15 +9,13 @@
using RabbitMQ.Client;
using RabbitMQ.Client.Events;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
using System.Text;
using System.Threading;
using System.Text.Json;
using System.Threading.Tasks;
using Serilog;

namespace OWSShared.Objects
namespace OWSInstanceLauncher.Services
{
public class ServerLauncherMQListener : IInstanceLauncherJob //BackgroundService
{
Expand Down Expand Up @@ -254,10 +251,10 @@ private void HandleServerSpinUpMessage(Guid customerGUID, int worldServerID, int
//string PathToDedicatedServer = "E:\\Program Files\\Epic Games\\UE_4.25\\Engine\\Binaries\\Win64\\UE4Editor.exe";
//string ServerArguments = "\"C:\\OWS\\OpenWorldStarterPlugin\\OpenWorldStarter.uproject\" {0}?listen -server -log -nosteam -messaging -port={1}";

string serverArguments = (_owsInstanceLauncherOptions.Value.IsServerEditor ? "\"" + _owsInstanceLauncherOptions.Value.PathToUProject + "\" ": "")
string serverArguments = (_owsInstanceLauncherOptions.Value.IsServerEditor ? "\"" + _owsInstanceLauncherOptions.Value.PathToUProject + "\" " : "")
+ "{0}?listen -server "
+ (_owsInstanceLauncherOptions.Value.UseServerLog ? "-log " : "")
+ (_owsInstanceLauncherOptions.Value.UseNoSteam ? "-nosteam " : "")
+ (_owsInstanceLauncherOptions.Value.UseServerLog ? "-log " : "")
+ (_owsInstanceLauncherOptions.Value.UseNoSteam ? "-nosteam " : "")
+ "-port={1} "
+ "-zoneinstanceid={2}";

Expand All @@ -276,7 +273,8 @@ private void HandleServerSpinUpMessage(Guid customerGUID, int worldServerID, int
proc.Start();
//proc.WaitForInputIdle();

_zoneServerProcessesRepository.AddZoneServerProcess(new ZoneServerProcess {
_zoneServerProcessesRepository.AddZoneServerProcess(new ZoneServerProcess
{
ZoneInstanceId = zoneInstanceID,
MapName = mapName,
Port = port,
Expand Down Expand Up @@ -350,7 +348,7 @@ private int RegisterInstanceLauncherRequest()
}
};

var RegisterLauncherPayloadRequest = new StringContent(JsonConvert.SerializeObject(RegisterLauncherPayload), Encoding.UTF8, "application/json");
var RegisterLauncherPayloadRequest = new StringContent(JsonSerializer.Serialize(RegisterLauncherPayload), Encoding.UTF8, "application/json");

var responseMessageAsync = instanceManagementHttpClient.PostAsync("api/Instance/RegisterLauncher", RegisterLauncherPayloadRequest);
var responseMessage = responseMessageAsync.Result;
Expand Down Expand Up @@ -431,7 +429,7 @@ private async Task ShutDownInstanceLauncherRequest(int worldServerId)
}
};

var shutDownInstanceLauncherRequest = new StringContent(JsonConvert.SerializeObject(worldServerIDRequestPayload), Encoding.UTF8, "application/json");
var shutDownInstanceLauncherRequest = new StringContent(JsonSerializer.Serialize(worldServerIDRequestPayload), Encoding.UTF8, "application/json");

var request = new HttpRequestMessage()
{
Expand All @@ -450,16 +448,16 @@ private async Task UpdateZoneServerStatusReady(int zoneInstanceID)
{
var instanceManagementHttpClient = _httpClientFactory.CreateClient("OWSInstanceManagement");

var setZoneInstanceStatusRequestPayload = new
{
var setZoneInstanceStatusRequestPayload = new
{
request = new SetZoneInstanceStatusRequestPayload
{
ZoneInstanceID = zoneInstanceID,
InstanceStatus = 2 //Ready
}
};

var setZoneInstanceStatusRequest = new StringContent(JsonConvert.SerializeObject(setZoneInstanceStatusRequestPayload), Encoding.UTF8, "application/json");
var setZoneInstanceStatusRequest = new StringContent(JsonSerializer.Serialize(setZoneInstanceStatusRequestPayload), Encoding.UTF8, "application/json");

var responseMessage = await instanceManagementHttpClient.PostAsync("api/Instance/SetZoneInstanceStatus", setZoneInstanceStatusRequest);

Expand Down
7 changes: 7 additions & 0 deletions src/OWSInstanceLauncher/Services/ServerLauncherShutDown.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace OWSInstanceLauncher.Services
{
public class ServerLauncherShutDown
{

}
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
using Microsoft.Extensions.Hosting;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using SimpleInjector;
using SimpleInjector.Lifestyles;

namespace OWSShared.Objects

namespace OWSInstanceLauncher.Services
{
public class TimedHostedService<TService> : IHostedService, IDisposable
where TService : class
public class TimedHostedService<TService> : IHostedService, IDisposable where TService : class
{
private readonly SimpleInjector.Container container;
private readonly Settings settings;
Expand Down Expand Up @@ -98,4 +93,4 @@ public Settings(TimeSpan interval, bool runOnce, Action<TService> action, Action
}
}
}
}
}
Loading

0 comments on commit 14170e9

Please sign in to comment.