Allow relative port mapping in generic
This is not for requesting support for new games/applications
To do this you should go to https://github.com/CubeCoders/AMPTemplates and first attempt to build a configuration yourself - otherwise you can request a template from this repo.
Feature Request
Feature Information:
A number of games (eg Arma, Unturned and Pavlov) configure ports that are relative to the first server port that is set. So Arma say starts on port 2302, and then it assigns or reserves the next four ports above that as well. Unturned assigns the next port after the first port. Pavlov assigns the port that is 400 ports above the first port.
In these cases normally the first port only is able to be set expressly for the server. The server doesn't need to have the other ports set in the config because it assigns them automatically.
This can cause issues with AMP's port allocation in generic. While the default template ports may be set in the kvp correctly, those ports are not necessarily assigned to a server when it is created, depending on other ports already assigned by AMP to other servers. So the relativity of the ports might be broken, and AMP's config not reflect the actual server port assignment.
It would help in these scenarios if the template ports could be assigned relatively - eg App.ApplicationPort2={{$ApplicationPort1}}+1. And then AMP's logic would work so that it finds the first available set of ports that meet the criteria.
I confirm:
- [x] that I have searched for an existing feature request matching the description.
So, part of this is already in AMP and you can start adjusting your configurations.
If you use the new 'ports' system - each PortRequirement object has a ChildPorts field, which contains more PortRequirement objects.
{
"Protocol": "TCP",
"Port": 25565,
"Name": "Main Port",
...
ChildPorts: [
{
"Protocol", "UDP",
"Port": 25565,
"Offset": 100,
"Name": "Query Port",
"Description": "Always 100 higher than Main Port",
}
],
}
@IceOfWraith @Greelan ^
I don't even want to know how long that's been available but undocumented. Lol
Thanks for providing that!
Note to myself: Empyrion needs added to this list.
That's just messed up
Given I am clearly a masochist, I tried this. Didn't work. In the form described, the child port is not assigned at all. I thought maybe it needed the Ref as well - no difference. So I thought maybe it still needs the port as a primary entry, as well as listed as a child port - the port is then assigned, but the relative allocation does not happen.
The actual functionality isn't implemented - AMP just has the ability to understand that data structure. Hence saying that "Part of this" is in AMP, but not all of it xD
I'd rather not implement stuff on my end that isn't implemented on yours. It sounds like a recipe for trouble.
I agree. Testing is an important step of the process.
I'm bumping this from LTS for now because it needs to be de-prioritised to allow for more important bug fixes to take those time slots.
This is addressed in the coming release. I'm going to keep this open as a tracker so we can get the games all updated listed above.