Page 1 of 5

subsidiaries & contracts

Posted: 03 Oct 2007 11:50
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

Re: subsidiaries & contracts

Posted: 03 Oct 2007 15:03
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.

Re: subsidiaries & contracts

Posted: 03 Oct 2007 23:48
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 ;).

Re: subsidiaries & contracts

Posted: 03 Oct 2007 23:53
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...

Re: subsidiaries & contracts

Posted: 04 Oct 2007 13:49
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.

Re: subsidiaries & contracts

Posted: 04 Oct 2007 20:11
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.

Re: subsidiaries & contracts

Posted: 05 Oct 2007 11:58
by MeTo
So, I have tried it and it works, but, one more bug :) This time, ship depots disappear automatically :) But docks are OK....

Re: subsidiaries & contracts

Posted: 05 Oct 2007 12:11
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*.

Re: subsidiaries & contracts

Posted: 05 Oct 2007 12:19
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.

Re: subsidiaries & contracts

Posted: 05 Oct 2007 13:52
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.

Re: subsidiaries & contracts

Posted: 05 Oct 2007 15:00
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

Re: subsidiaries & contracts

Posted: 05 Oct 2007 15:39
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

Re: subsidiaries & contracts

Posted: 05 Oct 2007 23:28
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.

Re: subsidiaries & contracts

Posted: 06 Oct 2007 05:50
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.

Re: subsidiaries & contracts

Posted: 06 Oct 2007 07:34
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.

Re: subsidiaries & contracts

Posted: 06 Oct 2007 08:07
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.

Re: subsidiaries & contracts

Posted: 06 Oct 2007 08:37
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...

Re: subsidiaries & contracts

Posted: 06 Oct 2007 12:04
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?

Re: subsidiaries & contracts

Posted: 06 Oct 2007 12:39
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 ;).

Re: subsidiaries & contracts

Posted: 06 Oct 2007 12:45
by glx
Did you use "svn add" ?