Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Jan 16, 2019 11:14 am

All times are UTC




Post new topic  Reply to topic  [ 29 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Patch: save company info
PostPosted: Wed Nov 12, 2008 2:02 am 
Offline
Engineer
Engineer

Joined: Wed May 28, 2008 7:54 pm
Posts: 19
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)


Attachments:
Suwood Transport, 4th May 1950.png
Suwood Transport, 4th May 1950.png [ 24.02 KiB | Viewed 7642 times ]
company_info_v3.patch [20.78 KiB]
Downloaded 200 times


Last edited by Antdovu on Sat May 02, 2009 6:53 pm, edited 2 times in total.
Top
   
PostPosted: Wed Nov 12, 2008 11:49 am 
Offline
Chairman
Chairman

Joined: Sat Jan 20, 2007 12:08 pm
Posts: 776
Location: Germany
Antdovu wrote:
This patch lets you save and load company info (president/company name, face, company colours).

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:
* Give up using STL if that is a problem.

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:
* Adopt a file format similar to current saved games.

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).

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! :D

_________________
"The bigger the island of our knowledge, the longer the shore of our ignorance" - John A. Wheeler, Physicist, 1911-2008


Top
   
PostPosted: Thu Nov 13, 2008 9:09 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1034
Location: Spain
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.


Top
   
PostPosted: Sat Nov 15, 2008 8:50 pm 
Offline
Engineer
Engineer

Joined: Sun Oct 26, 2008 6:26 pm
Posts: 15
Excellent patch! I agree with PhilSophus that the save should go into the config file in the same way you save your favorite face.


Top
   
PostPosted: Mon Nov 17, 2008 1:40 am 
Offline
Engineer
Engineer

Joined: Wed May 28, 2008 7:54 pm
Posts: 19
Updated the patch to save all data to openttd.cfg


Top
   
PostPosted: Mon Feb 16, 2009 1:14 pm 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 11, 2007 12:06 pm
Posts: 658
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/


Top
   
PostPosted: Mon Feb 16, 2009 1:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 07, 2008 6:29 pm
Posts: 1872
Location: Czech Republic
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 :oops:


Last edited by CommanderZ on Mon Feb 16, 2009 2:00 pm, edited 1 time in total.

Top
   
PostPosted: Mon Feb 16, 2009 1:41 pm 
Offline
Chief Executive
Chief Executive

Joined: Tue Jun 10, 2003 12:19 am
Posts: 697
Location: Australia
2007Alain2007 wrote:
can you update this please to R15496 i think there is some probles with the new AI and this patch

Being specific would help.


Top
   
PostPosted: Mon Feb 16, 2009 2:07 pm 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 11, 2007 12:06 pm
Posts: 658
on theres files if i send you a picture for now will you be able to work it out from there


Attachments:
New Bitmap Image.png [108.56 KiB]
Downloaded 156 times

_________________
For Community Integrated Version http://code.google.com/p/civopenttd/
Top
   
PostPosted: Mon Feb 16, 2009 2:11 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7260
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

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Mon Feb 16, 2009 2:15 pm 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 11, 2007 12:06 pm
Posts: 658
like moveing the lines about or dose this miss up patchs

_________________
For Community Integrated Version http://code.google.com/p/civopenttd/


Top
   
PostPosted: Mon Feb 16, 2009 2:34 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7260
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

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Feb 17, 2009 1:41 am 
Offline
Chief Executive
Chief Executive

Joined: Tue Jun 10, 2003 12:19 am
Posts: 697
Location: Australia
2007Alain2007 wrote:
like moveing the lines about or dose this miss up patchs

This is why you need to understand C++ before you can make a patchpack.


Top
   
PostPosted: Tue Feb 17, 2009 1:45 am 
Offline
Chief Executive
Chief Executive

Joined: Sun Nov 11, 2007 12:06 pm
Posts: 658
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/


Top
   
PostPosted: Tue Feb 17, 2009 9:18 am 
Offline
Tycoon
Tycoon

Joined: Wed Feb 14, 2007 5:48 pm
Posts: 1053
there are books online! and this is more basic programming stuff than specific to c/c++


Top
   
PostPosted: Sat May 02, 2009 6:54 pm 
Offline
Engineer
Engineer

Joined: Wed May 28, 2008 7:54 pm
Posts: 19
Updated to trunk for now (revision 16200)


Top
   
PostPosted: Mon May 04, 2009 12:37 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Sun Apr 26, 2009 11:45 am
Posts: 164
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.


Top
   
PostPosted: Mon May 04, 2009 8:00 am 
Offline
Tycoon
Tycoon

Joined: Wed Feb 14, 2007 5:48 pm
Posts: 1053
could also avoid the amount of people named 'Player' too :-P


Top
   
PostPosted: Mon May 04, 2009 2:18 pm 
Offline
Transport Coordinator
Transport Coordinator

Joined: Sat Jan 03, 2009 5:55 pm
Posts: 301
I think you really hate 'Player'!
First your Change_Player_Name Script and then you Player's_will_be_kicked Script! :mrgreen:


Top
   
PostPosted: Mon May 04, 2009 2:47 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Wed Jun 06, 2007 9:07 pm
Posts: 1710
Location: Czech Republic
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 ....

_________________
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)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 29 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: Gliptal and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.