subsidiaries & contracts

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

gagarin
Engineer
Engineer
Posts: 57
Joined: 26 Feb 2006 18:52
Location: Berlin, Germany

subsidiaries & contracts

Post by gagarin »

Hi

In this thread I will post the patches for a rewrite of the subsidiaries patch and on the same code basis a contracts patch.

There is a svn-sevre to download the patches at
svn://svn.gagarin-soft.de/openttd_shared

Please post suggestions and bug reports here. I you want to help me please pm me and I may grant you write access to the subversion repository

I added two diffs

Edit:
Trunk diff r11293 fixed a typo, you can now buy aircrafts in shared hangars, added provisions for depot-owners
chrisin_r11174 + shared tracks against trunk r11174
Attachments
chrisin.diff
chrisin + shared against trunk r11174
(528.83 KiB) Downloaded 517 times
trunk.diff
patch against trunk r11293
(38.74 KiB) Downloaded 445 times
Last edited by gagarin on 19 Oct 2007 12:37, edited 4 times in total.
Rafagd
Engineer
Engineer
Posts: 36
Joined: 01 Oct 2007 15:30

Re: subsidiaries & contracts

Post by Rafagd »

I'm a completely n00b on these SVN things, so what are the commands to aply the patch?

(Linux console-based svn...)
(deleted text)

Nevermind. I just found it... =x


---------------------------------------
Just to avoid double post:

I'm trying to make a diff to add portuguese/brazilian portuguese versions to those enable/disable patches.


--------------------------------------

Here he go...

USE AT YOUR OWN RISK. I'M A NOOB IN THAT DIFF THING.
Attachments
portuguese-test.diff
Diff-file for revision 11197. This diff need the trunk.diff above applied.
(22.33 KiB) Downloaded 447 times
Last edited by Rafagd on 04 Oct 2007 01:53, edited 1 time in total.
Snuk the Great
Engineer
Engineer
Posts: 63
Joined: 26 Aug 2005 15:12

Re: subsidiaries & contracts

Post by Snuk the Great »

I have a problem with the compilation of this diff on the newest revision AND on r11184. It compiles fine, but then when start the game, it exits a second later. I don't get any error and it does not generate any crash related data, so I am not of much help there. Just thought you should know.

There is an error in your diff when applied on r11184. It seems you upped the savegame version one in your version of saveload.cpp before you created the diff. According to my revision 11184, it should be "extern const uint16 SAVEGAME_VERSION = 78;" to "extern const uint16 SAVEGAME_VERSION = 79;" and in yours it changes extern const uint16 SAVEGAME_VERSION = 79; to "extern const uint16 SAVEGAME_VERSION = 80;". It doesn't do this in the latest revision.

Hope this helps you a bit, and show you I am very interested ;).
Snuk the Great
Rafagd
Engineer
Engineer
Posts: 36
Joined: 01 Oct 2007 15:30

Re: subsidiaries & contracts

Post by Rafagd »

I had the same problem, and it was a libsdl missing.

Have you checked if you have libsdl installed on your system?

-----------------------------

Anyone can help me to put a button on the rail gui? <o>

-----------------------------

I can put a button there, but i did not have an art for the toll-port button. I was thinking of a couple of dollars...

Anyway, with that trunk.diff, trains from other company can enter in your line, and get money from your stations. (tested with "control other companies cheat")

I'll try to make they can only enter in your line if they pass through a toll-port.

---------------------
Last diff from today. Here is the button on the rail gui. I'm still thinking how to do the button show/hide on enabling/disabling patches...
Attachments
tollport.diff
Diff with the toll-port button. I still need to implement the toll-port.
(32.92 KiB) Downloaded 400 times
Snuk the Great
Engineer
Engineer
Posts: 63
Joined: 26 Aug 2005 15:12

Re: subsidiaries & contracts

Post by Snuk the Great »

Rafagd wrote:I had the same problem, and it was a libsdl missing.

Have you checked if you have libsdl installed on your system?
Well, I found that I had it installed, but I did not have it configured. So now it compiles with SDL, but it still crashes. I think I am doing something wrong, but I just can't figure it out. I think I will reconfigure my whole mingw installation, because something just isn't right here I guess. But that will be another day.

What I do find odd though, is that normal revisions compile fine, so it can't all be my fault.
Snuk the Great
Rafagd
Engineer
Engineer
Posts: 36
Joined: 01 Oct 2007 15:30

Re: subsidiaries & contracts

Post by Rafagd »

The tollport can be build, but the signs doesn't show up... and he cant differ it from waypoints... I think i'll recode instead of just controlc+controlv+rename the waypoint files...

Anyway, if anyone can fix this before it, would be good... =]

Here is the patch... I think it only depends on the trunk.diff.
Attachments
tollport002.diff
(45.5 KiB) Downloaded 400 times
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Re: subsidiaries & contracts

Post by MeTo »

So, I have tried it and it works, but, one more bug :) This time, ship depots disappear automatically :) But docks are OK....
Snuk the Great
Engineer
Engineer
Posts: 63
Joined: 26 Aug 2005 15:12

Re: subsidiaries & contracts

Post by Snuk the Great »

Well, I finaly figured out why it does not work... And I am far from happy about it. It seems my Windows is melting... On another machine it works just fine. Meh, figured this was about to happen, I experienced some more problems lately, but those seem to magicly disapear when I reboot. Stupid windows...

Now just for the record. The shared tracks patch only makes it possible for trains to drive on someone elses track right? No contracts or money going to the track owner just yet right?

I will test the tollport thing later as well, on my second machine that is. Don't know when I am going to format this one *sigh*.
Snuk the Great
gagarin
Engineer
Engineer
Posts: 57
Joined: 26 Feb 2006 18:52
Location: Berlin, Germany

Re: subsidiaries & contracts

Post by gagarin »

Now just for the record. The shared tracks patch only makes it possible for trains to drive on someone elses track right? No contracts or money going to the track owner just yet right?
Yes
So, I have tried it and it works, but, one more bug :) This time, ship depots disappear automatically :) But docks are OK....
I'll have a look at it

Later this day I will post new versions.
Snuk the Great
Engineer
Engineer
Posts: 63
Joined: 26 Aug 2005 15:12

Re: subsidiaries & contracts

Post by Snuk the Great »

Rafagd wrote:The tollport can be build, but the signs doesn't show up... and he cant differ it from waypoints... I think i'll recode instead of just controlc+controlv+rename the waypoint files...

Anyway, if anyone can fix this before it, would be good... =]

Here is the patch... I think it only depends on the trunk.diff.
I am missing the tollport.h file in your diff, so it wont compile. Just to let you know.
Snuk the Great
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Re: subsidiaries & contracts

Post by MeTo »

Another strange bug :( I can't find out what causes that, but sometimes when saving a game, this error appears :( (it is saved, but it is not possible to load it then). I intentionally wrote "sometimes", because sometimes it is after building some railroad, sometimes after building a railroad station.... and now I can't even save a just loaded game, without any changes on the map :( just strange :(
EDIT : caused by the daylenght patch
Attachments
error.jpg
error.jpg (31.78 KiB) Viewed 20758 times
Last edited by MeTo on 06 Oct 2007 08:37, edited 1 time in total.
Rafagd
Engineer
Engineer
Posts: 36
Joined: 01 Oct 2007 15:30

Re: subsidiaries & contracts

Post by Rafagd »

Hm... Just forget my above patches, i'll recode that. =]

I've tried to duplicate waypoints then write changes on the "copy", but i've failed. XD
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Re: subsidiaries & contracts

Post by l_Blue_l »

I think a better option then useing waypoints as tollports would be to use stations instead. This will mean that a tollport can be more then one track wide.
Rafagd
Engineer
Engineer
Posts: 36
Joined: 01 Oct 2007 15:30

Re: subsidiaries & contracts

Post by Rafagd »

I think there is no need for tollports larger than 1 tile... Anyway, i've never seen such building, i may be wrong.

Anyway:

Tollports (as waypoint-based structure in my current diff) can only be build over last tracks, so another player have to connect his rails on your toll port.

If i change the behavior to be station-like, maybe will ease things... I'll think about that... Thanks.
gagarin
Engineer
Engineer
Posts: 57
Joined: 26 Feb 2006 18:52
Location: Berlin, Germany

Re: subsidiaries & contracts

Post by gagarin »

Tollports should not be greater than one tile, I think.

As for the update, I wanted to post, I encountered some problems with stricter testing for entering other players tracks and have to fix a few thing before I will upload it.
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Re: subsidiaries & contracts

Post by l_Blue_l »

If vehicles have orders to go to tollports to access other peoples networks then i think station would be usefull to allow multiple entrance points.

It is "my" belief that the current waypoints and Depots should be replaced in the game with more advanced Station Types. I have work on solutions for both of these and hope to one day finish them.

So with your patch and my new station types there would be 4 station types in total and they would be:

Station
Waypoint
Depot
Tollport


As all these stations would be stored in the same list it would be necessary to test if it’s the right type of station but once it is implemented it would be fairly easy for each extra station type. If i wasn't studying full time i would help you out on this but atm i can't but possibly in a couple of months time i will be able to help you.

edit: Until i implerment station types i think that waypoints would be the easier option.
User avatar
MeTo
Traffic Manager
Traffic Manager
Posts: 129
Joined: 06 Apr 2003 14:02
Location: UnL; Czech Republic
Contact:

Re: subsidiaries & contracts

Post by MeTo »

I found out that the error I had posted yesterday is not caused by the track sharing patch, but by the daylenght patch. With day = 1 it works well.
EDIT
I have just found another bug in track sharing patch - sharing airports does not work. It is possible to set an order to fly to some airport of another company, but the airplane can't land...
Rafagd
Engineer
Engineer
Posts: 36
Joined: 01 Oct 2007 15:30

Re: subsidiaries & contracts

Post by Rafagd »

l_Blue_l wrote:If vehicles have orders to go to tollports to access other peoples networks then i think station would be usefull to allow multiple entrance points.

It is "my" belief that the current waypoints and Depots should be replaced in the game with more advanced Station Types. I have work on solutions for both of these and hope to one day finish them.

So with your patch and my new station types there would be 4 station types in total and they would be:

Station
Waypoint
Depot
Tollport


As all these stations would be stored in the same list it would be necessary to test if it’s the right type of station but once it is implemented it would be fairly easy for each extra station type. If i wasn't studying full time i would help you out on this but atm i can't but possibly in a couple of months time i will be able to help you.

edit: Until i implerment station types i think that waypoints would be the easier option.
depots i can understand, but why waypoints should be stations? They are just marks on the lines where the train pass through without stopping... o.o


Ps.: WHY SVN isn't add my new files on diff? I have to add manually?
Snuk the Great
Engineer
Engineer
Posts: 63
Joined: 26 Aug 2005 15:12

Re: subsidiaries & contracts

Post by Snuk the Great »

Rafagd wrote:Ps.: WHY SVN isn't add my new files on diff? I have to add manually?
Mine does add new files automatically, but I guess yours doesn't ;).
Snuk the Great
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: subsidiaries & contracts

Post by glx »

Did you use "svn add" ?
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 27 guests