Autoserver script needed

Discussion related to Turbo Sliders and beta version feedback.

Moderator: Forum Moderators

Post Reply
User avatar
Flexman
Community User Level: 2
Community User Level: 2
Posts: 242
Joined: Wed Nov 03, 2004 12:18 pm
Location: Graz, Austria
Contact:

Autoserver script needed

Post by Flexman » Tue Mar 22, 2016 11:41 pm

Hi!

I would like to start an autoserver, but I'm not sure how it works if you want to chose 15 random tracks once the cup ended.

Does anyone have a script I could use, that has already good settings for timing, etc.?

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: Autoserver script needed

Post by Whiplash » Wed Mar 23, 2016 11:25 am

Flexman wrote:Hi!

I would like to start an autoserver, but I'm not sure how it works if you want to chose 15 random tracks once the cup ended.

Does anyone have a script I could use, that has already good settings for timing, etc.?
Yes, one of the things that are missing in TS is an easy way to set up X number of random tracks from a certain folder to be played next cup. I believe that if you create a dedicated server, T will help you to set that script up. I'm not sure if he can just copy/paste it.

Tijny
Community User Level: 5
Community User Level: 5
Posts: 1514
Joined: Sat Nov 06, 2004 7:59 pm
Location: Netherlands

Re: Autoserver script needed

Post by Tijny » Wed Mar 23, 2016 1:47 pm

Scripts are a pain to set up, and you probably don't need one anyway.

If you do not require anything fancy like multiple simultaneous track packs, you can just place whatever tracks you want in the "tracks" folder (where normally the default tracks are) and use the built-in /tracks /addrnd command whenever the server starts. This can be easily done with a custom source file that you invoke from macros.ini.

User avatar
Flexman
Community User Level: 2
Community User Level: 2
Posts: 242
Joined: Wed Nov 03, 2004 12:18 pm
Location: Graz, Austria
Contact:

Re: Autoserver script needed

Post by Flexman » Wed Mar 23, 2016 2:28 pm

So in the macro.ini i just need to specify commands that will be executed when the server restarts?
Does it restart automatically?

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: Autoserver script needed

Post by Whiplash » Wed Mar 23, 2016 8:34 pm

Flexman wrote:So in the macro.ini i just need to specify commands that will be executed when the server restarts?
Does it restart automatically?
In the macros.ini file you just write the name of source file that you want to be executed, like this:
...
Begin Reg
/generatestats
/autotime /raceend 5
/autotime /raceidle 60
/autotime /car 15
/say Starting a new cup...
/autotime /reg 30
/source flexman
End
...

And create that source file (a text file that ends with .src - it will be flexman.src in this example). Add all the settings (commands) you want for the cup inside of that source, like this:

/info LVP #2 - FULL CONTACT - IRC channel: #LVP2 @ ircnet
/continuousreg 1
/players 20
/ghost 0
/laps 3
/promode 0
/fuel 0
/set forcedamage 0
/fixedcar 1
/car AntiSlider-Hunter
/aifill 0
/tracks /clear
/cmd AddFCTracks 12
/cmd videoclean51928
/cmd tempbans
/order 2
/points 0 25 22 20 18 16 14 13 12 11 10 9 8 7 6 5 4 3 2 1
/autotime cup 25
/set forceracemissiles 0
/startmode 1

/set Drafting 1
/set DraftingMaxDistance 60
/set DraftingCloseDistance 20
/set DraftingMaxAngle 20
/set DraftingViscosityFactor 0.7
/set DraftingGripFactor 0.9
/set DraftingSteeringFactor 0.9
/set DraftingSpeedForMaxEffect 242
/set DraftingSpeedEffectPower 3

User avatar
Whiplash
Community User Level: 5
Community User Level: 5
Posts: 2325
Joined: Sun Apr 19, 2009 4:57 pm
Location: Bosnia

Re: Autoserver script needed

Post by Whiplash » Fri Sep 23, 2016 12:52 am

Flexman wrote:Hi!
I would like to start an autoserver, but I'm not sure how it works if you want to chose 15 random tracks once the cup ended.
Does anyone have a script I could use, that has already good settings for timing, etc.?
Ok, Mike Nike just discovered me that there is already a way to do this thing without any script. To do it, you basically just need to do next steps:
1. Select all the tracks that you want to include in the selection. Or, in the game.ini file, write all the tracks you want to include in selection, like this:

Code: Select all

# Selections

SelectedTrack tracks/download/Southleap_SIC.trk
SelectedTrack tracks/download/Sej_WannaChoose.trk
SelectedTrack tracks/download/Dby-Heavy_metal_parking_lot.trk
SelectedTrack tracks/download/hede-Joker1.trk
SelectedTrack tracks/download/Bastard.trk
SelectedTrack tracks/download/Heil magnam.trk
SelectedTrack tracks/download/k-Iced.trk
SelectedTrack tracks/download/pu_Hitto2.trk
SelectedTrack tracks/download/magzis.trk
SelectedTrack tracks/download/iB_Isisilistone.trk
...
2. In the server, use these commands:
/tracks /clear
/tracks /addrnd 15 (in case you want 15 tracks)

User avatar
Mike Nike
Community User Level: 5
Community User Level: 5
Posts: 1131
Joined: Sat Oct 30, 2004 3:11 pm
Location: Germany
Contact:

Re: Autoserver script needed

Post by Mike Nike » Fri Sep 23, 2016 5:57 pm

Whiplash wrote: Ok, Mike Nike just discovered me that there is already a way to do this thing without any script.
I tried what you said:
1) select nondefault tracks
2) open server
3) /tracks /clear
4) /tracks /addrnd 40

Result: It only selected all the default tracks and also only once (26 tracks or so)

To add random tracks out of a trackpool, i think you might need sourcename.src in folder turbosliders/sources/ with the line "/tracks /addrnd 15" and the corresponding trackfolder turbosliders/tracks/sourcename/ with the trackpool (track1.trk, track2.trk ..) in it.

Post Reply