Those of you who don't use Lobbies, How do you Launch Spring?

Those of you who don't use Lobbies, How do you Launch Spring?

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

Post Reply
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

Hello,
I have been thinking about Lobbies and Launching Spring. I stumbled upon this wiki page https://springrts.com/wiki/Script.txt. I was wondering if there are people who manually create a Script.txt and Launch Spring using it. Do you do this? Do you have tools that generate a Script.txt? I'm interested in the less conventional ways to launch Spring


Thanks
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by abma »

Xello wrote:Do you have tools that generate a Script.txt?
springlobby singleplayer tab "generates" script.txt or in multiplayer, host a game. when you start the game, springlobby will create the file script.txt which passes it as parameter to spring.

you can just copy that file and use it to launch spring again.

what do you want to do? whats the goal?
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

abma wrote:What do you want to do? whats the goal?
I don't have a vision. I have a pain point. The last couple of times I had attempted to play Springs the lobby and lobby servers have gotten in my way. I am wondering if there is an effective way to host/join a multiplayer game by just by distributing the engine, game, and map, without the lobby.

Now, I don't want this to be a discussion about Spring Lobby, or other Lobbies. I see plenty of them already. I (personally) think they are all doing good work and they are catering to the average player. It's just that I am at a level (I believe) that creating the script.txt by hand and manually distributing the files might be easier for me and my friends.

My only idea is to manually create the script.txt file or generated it from Spring Lobby and make changes. But I was wondering if others have come to this conclusion and maybe come up with their own hacky solutions.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by abma »

Xello wrote:I have a pain point. The last couple of times I had attempted to play Springs the lobby and lobby servers have gotten in my way.
can you be more specific? for me it sounds these issues should be solved and creating script.txt by hand would be just a very hacky workarround which requires a lot of time, too.

creating script.txt by hand is very uncommon, especially when it comes to multiplayer as you have to care about ips / ports / usernames and passwords.

some scripts exist:
https://github.com/spring/spring/blob/d ... prepare.sh
https://github.com/spring/spring/blob/d ... -client.sh

but i don't think they are very useful for setting up custom games.
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

abma wrote:Can you be more specific? for me it sounds these issues should be solved and creating script.txt by hand would be just a very hacky workarround which requires a lot of time, too.
I can, but the issues are mostly my fault and dumb luck. Once, the tag downloader server was down. On another occasion I couldn't get the sys admin to open up the firewall for the lobby client. I attempted to grab and run uberserver. But for some reason this crashed the Spring Lobby right before launching the game. These issues happened over the past year or so.

I feel like I could have saved time, had I known how to craft a script.txt for the server and my friends. In any case, I don't think any of this is anyone's problem but mine.

Edit:
Thanks for the links!
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by gajop »

I would advise against creating script.txt-s by hand for MP. It's a rather complicated, error-prone process, which should only be done for testing/developing, error reproducibility and automation. You also can't get use of existing dedicated servers meaning all the pain of hosting (including opening correct ports) will fall to you.

Most Spring games with multiplayer can be found in the lobby*, so I'd advise playing like that. It might not be possible to password-protect your games though, I haven't checked.

To at least slightly help you out with your question, keep in mind that script.txt needs only be generated for the server. Clients can just connect using a spring URL, something akin to:

Code: Select all

spring "spring://$USERNAME:$PASSWORD@$IP:$PORT"
ZK uses a different server though.
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

Thanks gajop, That is good to know
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

@gajop

Question for you, If you use that spring:// url. How does one setup the script.txt to host bots on a clients computer? Is it possible?
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by zwzsg »

I have written C code and Lua code to generate script.txt, but they were for single player.
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

zwzsg wrote:I have written C code and Lua code to generate script.txt, but they were for single player.
Would you mind sharing?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by gajop »

Xello wrote:@gajop

Question for you, If you use that spring:// url. How does one setup the script.txt to host bots on a clients computer? Is it possible?
I don't think it is. URLs are supposed to be simple enough to just connect to a host with a given username and password, but not do more than that.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7049
Joined: 16 Nov 2004, 13:08

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by zwzsg »

Xello wrote:Would you mind sharing?
It's mostly in KP.

The Lua is inside the mod archive:
/LuaUI/Widgets/kp_spring_direct_launch.lua
/LuaRules/Gadgets/libs/FillModSpecific.lua
/LuaRules/Gadgets/libs/ColorConversion.lua
/LuaRules/Gadgets/libs/GenerateGame.lua
/LuaRules/Gadgets/libs/WriteScript.lua

The C is in /KP_Sources/Kernel_Panic_Launcher_Project.zip (you have to tick something about getting that in the installer). It's very old and probably not portable though.
8611z
Posts: 169
Joined: 08 Jul 2015, 20:20

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by 8611z »

Xello wrote:But for some reason this crashed the Spring Lobby right before launching the game.
For a while I had similiar problem
Luckily before springlobby would crash/hang it had already written the startscript file. So I could use that to join the game. (Drag & drop the script.txt onto spring.exe or make .bat file) Bit silly but worked.
(Depending on install there might be several script.txt or _script.txt , look at date of file to see which is current one.)
How does one setup the script.txt to host bots on a clients computer? Is it possible?
If this was possible then every player could connect with his own altered script.txt and add lots of bots to his team or give himself more startresources or whatever.
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

I have a prof of concept here:
https://github.com/hansonry/SpringScript

This makes generating script.txt files a bit easier. It needs to go though a couple of iterations, but I got a LAN game working.
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Funkencool »

How does one setup the script.txt to host bots on a clients computer? Is it possible?
If this was possible then every player could connect with his own altered script.txt and add lots of bots to his team or give himself more startresources or whatever.
Maybe this is the wrong interruption of his question but I imagine, since bots are hosted on at least one of the clients (rather than the server), he's looking for specifying which client's cpu does the actual work ? Sorry if I'm way off in my train of thought but in the lobbies I thought I remember each client has the choice of adding an AI, regardless of where the single script.txt is hosted.
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

Funkencool wrote:Maybe this is the wrong interruption of his question but I imagine, since bots are hosted on at least one of the clients (rather than the server), he's looking for specifying which client's cpu does the actual work ? Sorry if I'm way off in my train of thought but in the lobbies I thought I remember each client has the choice of adding an AI, regardless of where the single script.txt is hosted.
Yup, you got it. I think I figured it out though.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by PicassoCT »

You can put spring on a usb-drive. Then you shield the usb-drive. Then you put it into a coil gun. And then you launch spring, into orbit.

The stars, unending space, this are the adventures, of the spaceship spring.
User avatar
Xello
Posts: 29
Joined: 12 Jun 2009, 19:01

Re: Those of you who don't use Lobbies, How do you Launch Spring?

Post by Xello »

PicassoCT wrote:You can put spring on a usb-drive. Then you shield the usb-drive. Then you put it into a coil gun. And then you launch spring, into orbit.
This took me longer to get, than I'd like to admit :)
Post Reply

Return to “General Discussion”