Question about dedicated server

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
devedse
Engineer
Engineer
Posts: 11
Joined: 15 Mar 2008 16:30

Question about dedicated server

Post by devedse »

Hello everyone, can someone help me a little with setting up a dedicated server.
i searched but i couldn't find the thing i need.

I want to make a server that views itself on the internet page in openttd, but it has to be password protected (lets say pasword is "hello")

if i start it, it has to load the cfg file: c:/ttdsave/online.cfg and the sav file: c:/ttdsave/online.sav

this is my cfg file, maybe something wrong in that to:

Code: Select all

[misc]
display_opt = SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|FULL_DETAIL|WAYPOINTS
news_ticker_sound = true
fullscreen = true
language = dutch.lng
resolution = 1280,800
screenshot_format = bmp
savegame_format = 
rightclick_emulate = false
small_font = 
medium_font = 
large_font = 
small_size = 6
medium_size = 10
large_size = 16
small_aa = false
medium_aa = false
large_aa = false
sprite_cache_size = 4
player_face = 0
transparency_options = 0
transparency_locks = 0

[music]
playlist = 0
music_vol = 100
effect_vol = 100
custom_1 = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
custom_2 = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
playing = true
shuffle = false
extmidi = timidity

[win32]
display_hz = 0
force_full_redraw = false
fullscreen_bpp = 8
window_maximize = false

[gameopt]
diff_custom = 0,0,3,4,500,2,0,0,2,0,3,0,0,0,0,0,0,0                           <- important i think
diff_level = 3
currency = EUR
units = metric
town_name = english
landscape = temperate
snow_line = 56
autosave = monthly
road_side = right

[patches]
vehicle_speed = true
status_long_date = true
show_finances = true
autoscroll = false
reverse_scroll = false
smooth_scroll = false
measure_tooltip = false
errmsg_duration = 5
toolbar_pos = 0
window_snap_radius = 10
invisible_trees = false
population_in_label = true
map_x = 11
map_y = 11
link_terraform_toolbar = false
liveries = 2
prefer_teamchat = false
scrollwheel_scrolling = 0
scrollwheel_multiplier = 5
pause_on_newgame = false
advanced_vehicle_list = 1
timetable_in_ticks = false
loading_indicators = 1
default_rail_type = 4
build_on_slopes = true
autoslope = true
extra_dynamite = false
longbridges = true
signal_side = true
always_small_airport = false
enable_signal_gui = false
drag_signals_density = 1
semaphore_build_before = 1975
town_layout = 1
realistic_acceleration = false
forbid_90_deg = false
mammoth_trains = true
gotodepot = true
roadveh_queue = true
pathfinder_for_trains = 2
pathfinder_for_roadvehs = 2
pathfinder_for_ships = 0
train_income_warn = true
order_review_system = 2
never_expire_vehicles = true
lost_train_warn = true
autorenew = false
autorenew_months = 6
autorenew_money = 100000
always_build_infrastructure = false
max_trains = 5000
max_roadveh = 5000
max_aircraft = 5000
max_ships = 5000
servint_ispercent = false
servint_trains = 800
servint_roadveh = 800
servint_ships = 800
servint_aircraft = 800
no_servicing_if_no_breakdowns = true
wagon_speed_limits = false
disable_elrails = false
freight_trains = 1
timetabling = true
plane_speed = 1
join_stations = true
full_load_any = true
improved_load = false
selectgoods = true
new_nonstop = false
nonuniform_stations = true
station_spread = 20
serviceathelipad = true
modified_catchment = true
gradual_loading = true
road_stop_on_town_road = false
adjacent_stations = true
inflation = false
raw_industry_construction = 0
multiple_industry_per_town = true
same_industry_close = true
bribe = true
exclusive_rights = true
give_money = true
snow_line_height = 7
colored_news_year = 2000
starting_year = 1975
ending_year = 2051
smooth_economy = true
allow_shares = true
town_growth_rate = 4
larger_towns = 1
initial_city_size = 10
mod_road_rebuild = false
ainew_active = false
ai_in_multiplayer = false
ai_disable_veh_train = false
ai_disable_veh_roadveh = false
ai_disable_veh_aircraft = false
ai_disable_veh_ship = false
keep_all_autosave = false
autosave_on_exit = false
max_num_autosaves = 16
bridge_pillars = true
extend_vehicle_life = 0
auto_euro = true
dist_local_authority = 20
wait_oneway_signal = 15
wait_twoway_signal = 41
pf_maxlength = 4096
pf_maxdepth = 48
npf_max_search_nodes = 10000
npf_rail_firstred_penalty = 1000
npf_rail_firstred_exit_penalty = 10000
npf_rail_lastred_penalty = 1000
npf_rail_station_penalty = 100
npf_rail_slope_penalty = 100
npf_rail_curve_penalty = 1
npf_rail_depot_reverse_penalty = 5000
npf_buoy_penalty = 200
npf_water_curve_penalty = 25
npf_road_curve_penalty = 1
npf_crossing_penalty = 300
npf_road_drive_through_penalty = 800
land_generator = 1
oil_refinery_limit = 32
tgen_smoothness = 1
generation_seed = 689120902
tree_placer = 2
heightmap_rotation = 0
se_flat_world_height = 0

[yapf]
disable_node_optimization = false
max_search_nodes = 10000
rail_firstred_twoway_eol = true
rail_firstred_penalty = 1000
rail_firstred_exit_penalty = 10000
rail_lastred_penalty = 1000
rail_lastred_exit_penalty = 10000
rail_station_penalty = 3000
rail_slope_penalty = 200
rail_curve45_penalty = 100
rail_curve90_penalty = 600
rail_depot_reverse_penalty = 5000
rail_crossing_penalty = 300
rail_look_ahead_max_signals = 10
rail_look_ahead_signal_p0 = 500
rail_look_ahead_signal_p1 = -100
rail_look_ahead_signal_p2 = 5
rail_longer_platform_penalty = 800
rail_longer_platform_per_tile_penalty = 0
rail_shorter_platform_penalty = 4000
rail_shorter_platform_per_tile_penalty = 0
road_slope_penalty = 200
road_curve_penalty = 100
road_crossing_penalty = 300
road_stop_penalty = 800

[currency]
rate = 1
separator = "."
to_euro = 0
prefix = ""
suffix = " credits"

[network]
max_join_time = 500                           <- important i think
pause_on_join = true                           <- important i think
server_bind_ip = 0.0.0.0                           <- important i think
server_port = 3979                            <- important i think
server_advertise = true                             <- important i think
lan_internet = 0                            <- important i think
player_name = Devedse                                                   <- important i think
server_password = blahblahblah                               <- important i think
rcon_password = blahblahblah
default_company_pass = blahblahblah                           <- important i think
server_name = Devedse server                           <- important i think
connect_to_ip =                                                              <- important i think
network_id = cc44e97a12c00e803201a125ee666e51                           <- important i think
autoclean_companies = false
autoclean_unprotected = 12
autoclean_protected = 36
max_companies = 8
max_clients = 11
max_spectators = 10
restart_game_year = 0                            <- important i think
min_players = 0
server_lang = ANY
reload_cfg = false

[servers]

[bans]

[newgrf]

[newgrf-static]

[news_display]
arrival_player = off
arrival_other = off
accident = off
company_info = off
openclose = off
economy = off
production_player = off
production_other = off
production_nobody = off
advice = off
new_vehicles = full
acceptance = off
subsidies = off
general = off
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Question about dedicated server

Post by Ammler »

devedse wrote: if i start it, it has to load the cfg file: c:/ttdsave/online.cfg and the sav file: c:/ttdsave/online.sav

Code: Select all


[misc]

[music]

[win32]

[gameopt] 
#not changeable on a running game over the cfg. Saved in the save self.
[patches]
#not changeable on a running game over the cfg. Saved in the save self.
[yapf]

[currency]

[network]
max_join_time = 500                           <- important i think
pause_on_join = true                        #Helpful for big maps
server_bind_ip = 0.0.0.0                   #no need for change
server_port = 3979                            #if you use multiple servers
server_advertise = true                      #true, if it should be listed at servers.openttd.org
lan_internet = 0                            
player_name = Devedse                                               
server_password = blahblahblah                            
rcon_password = blahblahblah   #should be set, else its not possible to use rcon
default_company_pass = blahblahblah                         
server_name = Devedse server                          
connect_to_ip =                                                             
network_id = cc44e97a12c00e803201a125ee666e51                    
autoclean_companies = false
autoclean_unprotected = 12
autoclean_protected = 36
max_companies = 8
max_clients = 11
max_spectators = 10
restart_game_year = 0                       
min_players = 0                                  # set it to 1 or higher for "autopause"
server_lang = ANY
reload_cfg = false

[servers]

[bans]

[newgrf]

[newgrf-static]

[news_display]

Most patch settings can be changed over rcon, rest like difficult settings or grfs over "save local -> change settings -> upload and load at server"

Greets
Ammler
devedse
Engineer
Engineer
Posts: 11
Joined: 15 Mar 2008 16:30

Re: Question about dedicated server

Post by devedse »

thanx very much :) but i still have 1 question :)

whats the code to get the server running?

openttd -D is the standard
but i want the dedicated file loaded from c:/..../ded.cfg (or something)
and the sav file from c:/.../sav.sav

edit:
does it matter when i leave the non used parts in the cfg?


edit2:
autoclean_unprotected = 12 what does this value mean? 12 months?
autoclean_protected = 36 same as above
max_companies = 8 can you set this to 60 or something or is there a max?
max_clients = 11 same as above

and this one, what does happen if it is 0 or 1
lan_internet = 0
User avatar
Ammler
President
President
Posts: 953
Joined: 18 Jun 2006 18:18
Location: Switzerland
Contact:

Re: Question about dedicated server

Post by Ammler »

devedse
Engineer
Engineer
Posts: 11
Joined: 15 Mar 2008 16:30

Re: Question about dedicated server

Post by devedse »

thanx but that won't help for the first question i asked
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: Question about dedicated server

Post by glx »

openttd -D -c config.cfg -g save.sav
devedse
Engineer
Engineer
Posts: 11
Joined: 15 Mar 2008 16:30

Re: Question about dedicated server

Post by devedse »

but would it work with this to? if its not in the same directory:

openttd -D -c c:/ttdsave/config.cfg -g c:/ttdsave/save.sav

or should u put that between ""
devedse
Engineer
Engineer
Posts: 11
Joined: 15 Mar 2008 16:30

Re: Question about dedicated server

Post by devedse »

w/e i got it working now

only 1 weird thing was that it takes much longer then 500 ticks to join to the server so i had to adjust that value
maybe it was because the map was biggest size and much townz etc
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 34 guests