
Subsidiaries management (latest build: r7213)
Moderator: OpenTTD Developers
Updated to patch post r4342
- Attachments
-
- subsidiariesr4355.diff
- 4355 diff
- (166.1 KiB) Downloaded 401 times
Added to mini IN @ r4363.Splatman wrote:Updated to patch post r4342

OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
I don´t understand how to get this into the game. It says that I´m missing elrailsw.grf or something like that. Where can I download that? (this is my first nightly thing I downloaded. A friend of mine told me it´s great)Thief^ wrote:New subs build, no fixes (I think), but made to patch against newest nightly/svn. Dunno how well its integrated with elrails, I'd appreciate some testing about that.
EDIT: replace diff with one that includes the subs files in the .vcproj. Doesn't affect the pre-compiled version.
EDIT2: Note that the vc7 version of the project included in this diff is set so in debug mode it builds only the english lang file. Feel free to change it if you speak one of the other languages. The release mode is set to build all subs languages, but not ones with no subs stuff (and not hungarian because it's one line short).
If you speak one of the other languages in openttd but not subs just open the english.txt and translate the subsidiaries section near the end to your language, then post it back here and someone will sort it out.
My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
You need to download the openttd nightly build first, then download this. The nightly is at http://nightly.openttd.org. The nightly is a recent work-in-progress version of openttd, and most mods are based on that, not the previous release build of openttd.
You copy the nightly you download over your regular openttd install, and then copy this mod over that. Although, the latest official release of openttd might be recent enough for you to not need to download the nightly first.
You copy the nightly you download over your regular openttd install, and then copy this mod over that. Although, the latest official release of openttd might be recent enough for you to not need to download the nightly first.
Melt with the Shadows,
Embrace your destiny...
Embrace your destiny...
I got it running now. Thanks 

My Scenarios:
Archipiélago Hermoso (Latest Release: Version 3.2)
Turnpike Falls (Latest Release: Version 0.91)
Hi Splatman & Thief^. Any chance of updating this to r4560+. I am also getting reports of problems with sending and receiving money, but do not know if my integration has broken it. Could you take a look at my integration and let me know??Splatman wrote:Updated to patch post r4342
Also, can you look at the code change for subsidiaries_gui.c around lines 416-446 in my mini IN patch. I was getting a "value too large to be represented in a long" compile error, so modified the value. I then spotted that the original code for "decrease" was checking whether the value was greater than the upper limit after modification. This didnt make sense to me, as it should start large, and reduce! So I have modified that part to check if it has gone negative (requiring a uint temporary variable, and some switching around of checks). Can you have a look and see if it makes sense, or if I am barking up the wrong tree?? !!
Anyway, any help/investigation on this is much appreciated.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
I upgraded the Patch to r5067.
It compiles but is untested.
Edit1:
In Singleplayer you can share Staions/Airports/Harbours/Bus/Truck-Stops and Track,
but you can not build mixed Stations.
Edit 2:
Multiplayer is the same as Singleplayer
Edit 3:
New Patch:
you can now build mixed stations, but they will have the color of the owner of the first station
you can now buy shares of ai-players in multiplayer mode
Added windows-build
Linux and FreeBSD-6.0 Build could be added, too, please ask
It compiles but is untested.
Edit1:
In Singleplayer you can share Staions/Airports/Harbours/Bus/Truck-Stops and Track,
but you can not build mixed Stations.
Edit 2:
Multiplayer is the same as Singleplayer
Edit 3:
New Patch:
you can now build mixed stations, but they will have the color of the owner of the first station
you can now buy shares of ai-players in multiplayer mode
Added windows-build
Linux and FreeBSD-6.0 Build could be added, too, please ask
- Attachments
-
- openttd.zip
- (856.43 KiB) Downloaded 286 times
-
- subsidiariesr5067.diff
- (221.96 KiB) Downloaded 329 times
-
- Engineer
- Posts: 70
- Joined: 24 Apr 2006 21:11
hm which one is working on great subs patch?
unfortunately there is a problem on integrating it into mini_IN of richk67
when some1 want to buy company , server crashes with following:
im looking a while and there seems to be a generally problem with handling the players money or maybe the player generally.
(money error occurs in past revision of mini_IN, on buying company, u lost billions...so may be a reference will loaded into playermoney container?)
i think its a container problem, the mini_IN integrates some patches, may be something is double named. or already used.
is someone there i can talk about it in chat, comparing the code? the code is avail in this thread or i can upload it. hope some subsidiarys developer could help us...
unfortunately there is a problem on integrating it into mini_IN of richk67
when some1 want to buy company , server crashes with following:
Code: Select all
openttd: command.c:524: DoCommandP: Assertion `res == res2' failed.
(money error occurs in past revision of mini_IN, on buying company, u lost billions...so may be a reference will loaded into playermoney container?)
i think its a container problem, the mini_IN integrates some patches, may be something is double named. or already used.
is someone there i can talk about it in chat, comparing the code? the code is avail in this thread or i can upload it. hope some subsidiarys developer could help us...
I think this happens when value of the shares changes while you buy them. So it can happen, that the dryrun du estimate the costs gives an onther vlaue than the real buy.
please add
CMD_SUBSIDIARY_BUY_SHARE_RESPONSE
to
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
(cmd & 0xFF) == CMD_REMOVE_ROAD ||
(cmd & 0xFF) == CMD_REMOVE_LONG_ROAD;
in command.c, arround line 450
so you get
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
(cmd & 0xFF) == CMD_REMOVE_ROAD ||
(cmd & 0xFF) == CMD_REMOVE_LONG_ROAD ||
(cmd & 0xFF) == CMD_SUBSIDIARY_BUY_SHARE_RESPONSE;
this should help
Edit:[\b]
Maybe you ave to add one mor more of those, woo:
CMD_BUY_SHARE_IN_COMPANY = 74,
CMD_SELL_SHARE_IN_COMPANY = 75,
CMD_BUY_COMPANY = 76,
please add
CMD_SUBSIDIARY_BUY_SHARE_RESPONSE
to
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
(cmd & 0xFF) == CMD_REMOVE_ROAD ||
(cmd & 0xFF) == CMD_REMOVE_LONG_ROAD;
in command.c, arround line 450
so you get
notest =
(cmd & 0xFF) == CMD_CLEAR_AREA ||
(cmd & 0xFF) == CMD_CONVERT_RAIL ||
(cmd & 0xFF) == CMD_LEVEL_LAND ||
(cmd & 0xFF) == CMD_REMOVE_ROAD ||
(cmd & 0xFF) == CMD_REMOVE_LONG_ROAD ||
(cmd & 0xFF) == CMD_SUBSIDIARY_BUY_SHARE_RESPONSE;
this should help
Edit:[\b]
Maybe you ave to add one mor more of those, woo:
CMD_BUY_SHARE_IN_COMPANY = 74,
CMD_SELL_SHARE_IN_COMPANY = 75,
CMD_BUY_COMPANY = 76,
-
- Engineer
- Posts: 70
- Joined: 24 Apr 2006 21:11
After I installed the latest patch the game isn't working as it supposed too. The whole game ha started to lag after I installed the latest patch 5067.
Don't know if this helps but here is the openttd file:
[misc]
display_opt = SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|WAYPOINTS
news_display_opt = 2862612480
news_ticker_sound = true
fullscreen = false
language = english.lng
resolution = 1280,721
screenshot_format =
savegame_format =
rightclick_emulate = false
[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 = false
shuffle = false
extmidi = timidity
[win32]
display_hz = 0
force_full_redraw = false
fullscreen_bpp = 8
double_size = false
[gameopt]
diff_custom = 2,2,1,3,300,2,0,2,0,1,2,0,1,0,0,0,0,0
diff_level = 0
currency = GBP
units = metric
town_name = english
landscape = normal
snow_line = 1
autosave = monthly
road_side = right
[patches]
vehicle_speed = true
status_long_date = true
show_finances = true
autoscroll = false
reverse_scroll = false
errmsg_duration = 5
toolbar_pos = 0
window_snap_radius = 10
invisible_trees = false
population_in_label = true
map_x = 8
map_y = 8
link_terraform_toolbar = false
build_on_slopes = true
extra_dynamite = false
longbridges = true
signal_side = true
always_small_airport = false
drag_signals_density = 4
realistic_acceleration = false
forbid_90_deg = false
mammoth_trains = true
gotodepot = true
roadveh_queue = true
new_pathfinding_all = false
train_income_warn = true
order_review_system = 2
never_expire_vehicles = false
lost_train_days = 180
autorenew = false
autorenew_months = 6
autorenew_money = 100000
max_trains = 500
max_roadveh = 500
max_aircraft = 200
max_ships = 300
servint_ispercent = false
servint_trains = 150
servint_roadveh = 150
servint_ships = 360
servint_aircraft = 100
no_servicing_if_no_breakdowns = false
wagon_speed_limits = true
join_stations = true
full_load_any = true
improved_load = false
selectgoods = true
new_nonstop = false
nonuniform_stations = true
station_spread = 12
serviceathelipad = true
modified_catchment = true
inflation = true
build_rawmaterial_ind = false
multiple_industry_per_town = false
same_industry_close = false
bribe = true
snow_line_height = 7
colored_news_date = 2000
starting_date = 1950
ending_date = 2051
smooth_economy = true
allow_shares = true
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
subsidiaries = true
allow_track_removal = true
shared_stations_tax = 10
shared_tracks_tax_subsidiary = 6
shared_stations_pickuptax_subsidiary = 20
shared_tracks = false
shared_tracks_tax_others = 12
shared_stations = false
shared_stations_tax_others = 20
shared_stations_pickuptax_others = 40
years_of_protection = 0
shared_depots = false
[yapf]
ship_use_yapf = false
road_use_yapf = true
rail_use_yapf = true
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_shorter_platform_penalty = 4000
[currency]
rate = 1
separator = "."
to_euro = 0
prefix = ""
suffix = " credits"
[network]
max_join_time = 500
pause_on_join = true
server_bind_ip = 0.0.0.0
server_port = 3979
server_advertise = false
lan_internet = 0
player_name =
server_password =
rcon_password =
server_name =
connect_to_ip =
network_id = 16a2b554b4bfda4d7a978c56f758afaf
autoclean_companies = false
autoclean_unprotected = 12
autoclean_protected = 36
restart_game_date = 0
[servers]
[newgrf]
CARGOSETW.GRF
dbsetw.GRF
planesetw_459.GRF
NEWSHIPSW.GRF
newofficebuilding.GRF
LongBusesw.GRF
sbahnwa167.GRF
ScaniaTrucksw.GRF
harbourw_456.GRF
newstatsw.GRF
[bans]
The whole savefile is to large to upload.
/Martin!
Don't know if this helps but here is the openttd file:
[misc]
display_opt = SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION|WAYPOINTS
news_display_opt = 2862612480
news_ticker_sound = true
fullscreen = false
language = english.lng
resolution = 1280,721
screenshot_format =
savegame_format =
rightclick_emulate = false
[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 = false
shuffle = false
extmidi = timidity
[win32]
display_hz = 0
force_full_redraw = false
fullscreen_bpp = 8
double_size = false
[gameopt]
diff_custom = 2,2,1,3,300,2,0,2,0,1,2,0,1,0,0,0,0,0
diff_level = 0
currency = GBP
units = metric
town_name = english
landscape = normal
snow_line = 1
autosave = monthly
road_side = right
[patches]
vehicle_speed = true
status_long_date = true
show_finances = true
autoscroll = false
reverse_scroll = false
errmsg_duration = 5
toolbar_pos = 0
window_snap_radius = 10
invisible_trees = false
population_in_label = true
map_x = 8
map_y = 8
link_terraform_toolbar = false
build_on_slopes = true
extra_dynamite = false
longbridges = true
signal_side = true
always_small_airport = false
drag_signals_density = 4
realistic_acceleration = false
forbid_90_deg = false
mammoth_trains = true
gotodepot = true
roadveh_queue = true
new_pathfinding_all = false
train_income_warn = true
order_review_system = 2
never_expire_vehicles = false
lost_train_days = 180
autorenew = false
autorenew_months = 6
autorenew_money = 100000
max_trains = 500
max_roadveh = 500
max_aircraft = 200
max_ships = 300
servint_ispercent = false
servint_trains = 150
servint_roadveh = 150
servint_ships = 360
servint_aircraft = 100
no_servicing_if_no_breakdowns = false
wagon_speed_limits = true
join_stations = true
full_load_any = true
improved_load = false
selectgoods = true
new_nonstop = false
nonuniform_stations = true
station_spread = 12
serviceathelipad = true
modified_catchment = true
inflation = true
build_rawmaterial_ind = false
multiple_industry_per_town = false
same_industry_close = false
bribe = true
snow_line_height = 7
colored_news_date = 2000
starting_date = 1950
ending_date = 2051
smooth_economy = true
allow_shares = true
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
subsidiaries = true
allow_track_removal = true
shared_stations_tax = 10
shared_tracks_tax_subsidiary = 6
shared_stations_pickuptax_subsidiary = 20
shared_tracks = false
shared_tracks_tax_others = 12
shared_stations = false
shared_stations_tax_others = 20
shared_stations_pickuptax_others = 40
years_of_protection = 0
shared_depots = false
[yapf]
ship_use_yapf = false
road_use_yapf = true
rail_use_yapf = true
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_shorter_platform_penalty = 4000
[currency]
rate = 1
separator = "."
to_euro = 0
prefix = ""
suffix = " credits"
[network]
max_join_time = 500
pause_on_join = true
server_bind_ip = 0.0.0.0
server_port = 3979
server_advertise = false
lan_internet = 0
player_name =
server_password =
rcon_password =
server_name =
connect_to_ip =
network_id = 16a2b554b4bfda4d7a978c56f758afaf
autoclean_companies = false
autoclean_unprotected = 12
autoclean_protected = 36
restart_game_date = 0
[servers]
[newgrf]
CARGOSETW.GRF
dbsetw.GRF
planesetw_459.GRF
NEWSHIPSW.GRF
newofficebuilding.GRF
LongBusesw.GRF
sbahnwa167.GRF
ScaniaTrucksw.GRF
harbourw_456.GRF
newstatsw.GRF
[bans]
The whole savefile is to large to upload.
/Martin!
- StopRightThere
- Chief Executive
- Posts: 761
- Joined: 18 Dec 2005 20:10
- Location: United Kingdom
Are you sure the game isn't just using too much CPU power for the computer to handle?
Bye Bye OpenBVE 
Official TT-Hot young ginger Doctor Who assistant FanClub
Formerly known as AdditionalData

Official TT-Hot young ginger Doctor Who assistant FanClub
Formerly known as AdditionalData
@MartinA
Did you try to play OpenTTD without the patch?
Maybe its something with the game not with the patch.
@all
I've updated the Patch to r5166 and added yapf-support
Did you try to play OpenTTD without the patch?
Maybe its something with the game not with the patch.
@all
I've updated the Patch to r5166 and added yapf-support
- Attachments
-
- subsidiaries_r5166.diff
- (214.6 KiB) Downloaded 308 times
Who is online
Users browsing this forum: No registered users and 14 guests