Patch: save company info
Moderator: OpenTTD Developers
Patch: save company info
This patch lets you save and load company info (president/company name, face, company colours).
For those who didn't know: you can set different colours for a lot of stuff. You can make all your planes one colour and trains another colour etc.
version 2: data now saved into openttd.cfg
version 3: updated to trunk (revision 16200)
For those who didn't know: you can set different colours for a lot of stuff. You can make all your planes one colour and trains another colour etc.
version 2: data now saved into openttd.cfg
version 3: updated to trunk (revision 16200)
- Attachments
-
- Suwood Transport, 4th May 1950.png (24.02 KiB) Viewed 12585 times
-
- company_info_v3.patch
- (20.78 KiB) Downloaded 411 times
Last edited by Antdovu on 02 May 2009 18:53, edited 2 times in total.
-
- Chairman
- Posts: 776
- Joined: 20 Jan 2007 12:08
- Location: Germany
Re: Patch: save company info
Very useful indeed. I will certainly use it. More often than not I reuse these settings (most times I use a new company name, but still this patch saves a lot of work).Antdovu wrote:This patch lets you save and load company info (president/company name, face, company colours).
What do you use of the STL? For some STL containers like vector there are replacements in the OpenTTD source code. In a few places set and map are already used, so in general it doesn't seem to be a problem.Antdovu wrote: * Give up using STL if that is a problem.
IMHO, the company info should just go into the normal config file. If you want to have the possibility for multiple company infos I suggest you do it in a similar way as the NewGRF presets (for every NewGRF preset a separate config section called [preset-preset_name] is used).Antdovu wrote: * Adopt a file format similar to current saved games.
I didn't look at the code, yet, but will do at a later time. This is certainly a feature I would love to see in trunk.
Keep up your great work!

"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008
Re: Patch: save company info
This is a feature I was missing. I'm going to try it!
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patch: save company info
Excellent patch! I agree with PhilSophus that the save should go into the config file in the same way you save your favorite face.
Re: Patch: save company info
Updated the patch to save all data to openttd.cfg
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Patch: save company info
can you update this please to R15496 i think there is some probles with the new AI and this patch
For Community Integrated Version http://code.google.com/p/civopenttd/
- CommanderZ
- Tycoon
- Posts: 1872
- Joined: 07 Apr 2008 18:29
- Location: Czech Republic
- Contact:
Re: Patch: save company info
Looks good, I always use the same colour scheme and manager face. The company name is different in each game because of savegames.
EDIT: Eh, it is year old
EDIT: Eh, it is year old

Last edited by CommanderZ on 16 Feb 2009 14:00, edited 1 time in total.
-
- Chief Executive
- Posts: 697
- Joined: 10 Jun 2003 00:19
- Location: Australia
Re: Patch: save company info
Being specific would help.2007Alain2007 wrote:can you update this please to R15496 i think there is some probles with the new AI and this patch
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Patch: save company info
on theres files if i send you a picture for now will you be able to work it out from there
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Patch: save company info
seriously, that is a type of error that you have to learn to deal with by yourself.
from the looks of it, you could get away with just using both code blocks behind each other
from the looks of it, you could get away with just using both code blocks behind each other
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Patch: save company info
like moveing the lines about or dose this miss up patchs
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Patch: save company info
step 1: find out where these values are used
step 2: find out what the code actually does, and what these values represent
step 3: find out what might break if you add something
step 4: do your modification and test it
step 2: find out what the code actually does, and what these values represent
step 3: find out what might break if you add something
step 4: do your modification and test it
-
- Chief Executive
- Posts: 697
- Joined: 10 Jun 2003 00:19
- Location: Australia
Re: Patch: save company info
This is why you need to understand C++ before you can make a patchpack.2007Alain2007 wrote:like moveing the lines about or dose this miss up patchs
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Patch: save company info
lol i am still waiting for my book to be in the libury so i can read up on it and my manger at work says hes got some text books that might help me
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Patch: save company info
there are books online! and this is more basic programming stuff than specific to c/c++
Re: Patch: save company info
Updated to trunk for now (revision 16200)
Re: Patch: save company info
The correct solution would be to get player profiles in before the game begins. Now a Patch that could do that, that'd be genius.
Re: Patch: save company info
could also avoid the amount of people named 'Player' too 

Re: Patch: save company info
I think you really hate 'Player'!
First your Change_Player_Name Script and then you Player's_will_be_kicked Script!
First your Change_Player_Name Script and then you Player's_will_be_kicked Script!

Re: Patch: save company info
Well, if you have 3 people, all of them named "Player", it is hard to tell who is who....
Maybe some feature in core OpenTTD that will remind players to change their name if it is "Player" before they connect to any multiplayer server would help to reduce such cases.
When I made new installation of openttd on new computer, I forgot to change my name too (but you can change it on server with a console command :), so such reminder could be useful ....
Maybe some feature in core OpenTTD that will remind players to change their name if it is "Player" before they connect to any multiplayer server would help to reduce such cases.
When I made new installation of openttd on new computer, I forgot to change my name too (but you can change it on server with a console command :), so such reminder could be useful ....
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Who is online
Users browsing this forum: No registered users and 6 guests