CubeCoders / AMPTemplates

For the AMP community to share Generic Module templates.
86 stars 260 forks source link

Add Stay In Tarkov Template #760

Closed dzlockhead closed 3 months ago

dzlockhead commented 4 months ago

Added SIT Templates. Tested and working on Linux, other users reported working on Windows. Thank you for assistance from Ice, Greelan and Daniel.

dzlockhead commented 3 months ago

This should be ready for review.

Greelan commented 3 months ago

@dzlockhead I've added my recommended changes. Let me know what you think.

Couple of other matters:

dzlockhead commented 3 months ago

@Greelan

Possibly they should be TCP only but the devs did not specify on their requirements page. I figured both was the safest. Let me attempt to clarify. I wasn't quite sure of how to word it. Do you mean the fetch URL? What do you mean by they are hardwired?

dzlockhead commented 3 months ago

@Greelan Added some additional commits, but why delete the SIT Extra files deletion step?

Greelan commented 3 months ago

@Greelan Added some additional commits, but why delete the SIT Extra files deletion step?

Because DeleteAfterExtract in the SIT download stage does the job xD

Greelan commented 3 months ago

@Greelan

Possibly they should be TCP only but the devs did not specify on their requirements page. I figured both was the safest. Let me attempt to clarify. I wasn't quite sure of how to word it. Do you mean the fetch URL? What do you mean by they are hardwired?

Re the ports, I only see them listening on TCP.

Re the versions, I mean you only allow limited specific versions to be downloaded, even though many more are available, especially for SIT.

dzlockhead commented 3 months ago

@Greelan Possibly they should be TCP only but the devs did not specify on their requirements page. I figured both was the safest. Let me attempt to clarify. I wasn't quite sure of how to word it. Do you mean the fetch URL? What do you mean by they are hardwired?

Re the ports, I only see them listening on TCP.

Re the versions, I mean you only allow limited specific versions to be downloaded, even though many more are available, especially for SIT.

I'm not sure how to set it up to allow previous versions. Is there a way to make FetchURL work with that? The issue is that their file hosting is not standard. I figured I'd be able to use a variable but since they moved the most recent 3.8.1 on to a different site. For example 3.8.1 is SPT-3.8.1-29197-d3ac83e.7z BUT they moved it to a different site. No longer on custom gitea 3.8.0 is RELEASE-SPT-3.8.0-29197-2dd4d91.7z on custom Gitea 3.7.5 is RELEASE-SPT-3.7.5-26535.zip on custom Gitea

PS as I typed this out: In testing, I MAY be able to make it work. That new custom site has links that seem to work when using other versions. Hidden, but it works. In any case though, is it worth allowing older versions do you think?

Will also take a look at SIT to see if there's a way to make it work since it does use Github

Greelan commented 3 months ago

No idea whether it needed to include older versions, since I have never played this game xD

SIT should be easier as you could potentially use FetchURLFromJQ and the GH API to always get the latest, and potentially older versions as specified by the user

Greelan commented 3 months ago

BTW,what's the purpose in having the start/wait/stop update stages?

dzlockhead commented 3 months ago

There are some config files that are generated on first time startup that need to exist for the port configs to work right. I don't believe they are all created when extracting.

On Sun, May 12, 2024, 10:18 PM Greelan @.***> wrote:

BTW,what's the purpose in having the start/wait/stop update stages?

— Reply to this email directly, view it on GitHub https://github.com/CubeCoders/AMPTemplates/pull/760#issuecomment-2106516365, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE3Z6XOAK7SOHU5VQKGDVY3ZCAPIPAVCNFSM6AAAAABHHGVUMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBWGUYTMMZWGU . You are receiving this because you were mentioned.Message ID: @.***>

Greelan commented 3 months ago

One of those crappy downloads, huh?

This is a bit problematic though, as if you have two servers, one on default, presumably the first-time startup of the second server will fail due to conflicting ports? Usually in these situations the template should supply its own version of the needed configs so that the ports are set correctly from the outset.

dzlockhead commented 3 months ago

One of those crappy downloads, huh?

This is a bit problematic though, as if you have two servers, one on default, presumably the first-time startup of the second server will fail due to conflicting ports? Usually in these situations the template should supply its own version of the needed configs so that the ports are set correctly from the outset.

So I did test this. It still succeeds in setting up the server. It will just say the port is already bound, but when the user goes to fire up the server for the first time for actual use, it works right. My concern about supplying my own is what if the devs add fields to it later? Now I'm supplying an out of date file.

Greelan commented 3 months ago

OK that's probably OK then. Tho you will likely have unnecessary support queries xD

I suspect since SIT generates these files that any new additions would likely be added on start up. You could test this by removing lines and then run the server.

dzlockhead commented 3 months ago

@Greelan I absolutely believe you are correct. Hopefully not too many support queries haha. I just tested the versioning that I investigated after you made me question just how it works and now it works even happier. Unfortunately though, SPT has released 3 new versions since I started this and SIT hasn't updated but their devs say soon! But the server does start up with SPT 3.8.3 with SIT 3.8.0 but I won't provide any support if that breaks. Not meant to work that way lol.

dzlockhead commented 3 months ago

Added versioning for SIT. Now pulls from Github.

Greelan commented 3 months ago

Why not go the route that is done for other templates - eg for dotnet or node or BepInEx or a range of others - that have a text field for manually entering the version number? Means the template doesn't have to be updated every time there is a new release

dzlockhead commented 3 months ago

That's true, but I'll defer to you on this, can users be trusted to spell it right and not make mistakes? I figured emum would cause less mistakes than a free form field.

On Tue, May 14, 2024, 5:39 PM Greelan @.***> wrote:

Why not go the route that is done for other templates - eg for dotnet or node or BepInEx or a range of others - that have a text field for manually entering the version number? Means the template doesn't have to be updated every time there is a new release

— Reply to this email directly, view it on GitHub https://github.com/CubeCoders/AMPTemplates/pull/760#issuecomment-2111183405, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE3Z6XORLYSI3DB3YQ3VVDDZCKABVAVCNFSM6AAAAABHHGVUMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJRGE4DGNBQGU . You are receiving this because you were mentioned.Message ID: @.***>

Greelan commented 3 months ago

Sure but with a link and instructions it shouldn't be hard. Many templates have this. Otherwise, will you stick around to update the template every couple of days? XD

dzlockhead commented 3 months ago

Sure but with a link and instructions it shouldn't be hard. Many templates have this. Otherwise, will you stick around to update the template every couple of days? XD

I was planning on it, I'll try the text fields but I think that will be too confusing for users.

Greelan commented 3 months ago

Sure but with a link and instructions it shouldn't be hard. Many templates have this. Otherwise, will you stick around to update the template every couple of days? XD

I was planning on it, I'll try the text fields but I think that will be too confusing for users.

Having now looked at their version list and how a user would need to find out the download links for SPT, I'm inclined to agree. I will do a final pass of the template later today and it can then be merged based on the current approach

dzlockhead commented 3 months ago

Thanks Greelan, I had prototyped the instructions for a text field. To say they were confusing would be an understatement. Even I found it a bit hard to understand my own instructions. If anyone pings me as SIT or SPT have updates, I will update as necessary, but mostly focusing on SIT. They just released a prerelease but it's not on Github yet.

On Wed, May 15, 2024 at 4:26 PM Greelan @.***> wrote:

Sure but with a link and instructions it shouldn't be hard. Many templates have this. Otherwise, will you stick around to update the template every couple of days? XD

I was planning on it, I'll try the text fields but I think that will be too confusing for users.

Having now looked at their version list and how a user would need to find out the download links for SPT, I'm inclined to agree. I will do a final pass of the template later today and it can then be merged based on the current approach

— Reply to this email directly, view it on GitHub https://github.com/CubeCoders/AMPTemplates/pull/760#issuecomment-2113397230, or unsubscribe https://github.com/notifications/unsubscribe-auth/BE3Z6XOZ2VF7GDIY3RHZCOLZCPAI5AVCNFSM6AAAAABHHGVUMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJTGM4TOMRTGA . You are receiving this because you were mentioned.Message ID: @.***>