Page 65 of 69

Re: New map features

Posted: 14 Feb 2018 23:30
by HackaLittleBit
Thanks for testing.

I found a bug and am fixing it now.
Don't send ships to depots.
It mixes up reservations!!

Re: New map features

Posted: 14 Feb 2018 23:39
by wallyweb
HackaLittleBit wrote:Thanks for testing.

I found a bug and am fixing it now.
Don't send ships to depots.
It mixes up reservations!!
Ok. Meanwhile I am trying to resolve a crash while loading a save game. Probably my fault. I may have saved while using the previous binary where the saved game still loads. :roll:

Re: New map features

Posted: 15 Feb 2018 02:06
by HackaLittleBit
wallyweb wrote:Ok. Meanwhile I am trying to resolve a crash while loading a save game. Probably my fault. I may have saved while using the previous binary where the saved game still loads
:cry:
I have been looking at that, I had the same.
Tomorrow I will have another look, but I am not very hopeful.
Try this and see if it loads.
in file /src/saveload/station_sl.cpp

line 634 put "//"
like below

// SLE_VAR(Dock, reserved, SLE_BOOL),

and compile
now you should be able to load that old game.
But you have to revert that in order to use patch correctly. e.g. beeing able to save reservation data.

Below zip wit 3 patches.
1. dock_reservations_26118SL that you have already.

2. Cirdan-clone_26119_Fix depot_rest : This one fixes docks that stayed reserved while going to depot.

3. Cirdan-clone_26120park_on_axis : This one changes parking behaviour for ships at docks. Now they park (most of the time) along the axis.
see foto
axis.png
axis.png (18.71 KiB) Viewed 5163 times
I need a newgrf with lots of docks
Any suggestions?

I also send you pm with my savegame.(new)

Re: New map features

Posted: 15 Feb 2018 03:30
by wallyweb
HackaLittleBit wrote:
wallyweb wrote:Ok. Meanwhile I am trying to resolve a crash while loading a save game. Probably my fault. I may have saved while using the previous binary where the saved game still loads
:cry:
I have been looking at that, I had the same.
Tomorrow I will have another look, but I am not very hopeful.
Try this and see if it loads.
in file /src/saveload/station_sl.cpp

line 634 put "//"
like below

// SLE_VAR(Dock, reserved, SLE_BOOL),

and compile
now you should be able to load that old game.
But you have to revert that in order to use patch correctly. e.g. beeing able to save reservation data.
Except there was no reservation data. I had not yet built any ships. I did find that the previous save would load ok so I am going to add/save in small steps to see what breaks the game.

Ok I've downloaded the patches and the save game. I'll test these tomorrow.
I need a newgrf with lots of docks
Any suggestions?
I'm not sure what you mean. There is only one dock available to a game. A GRF can alter it's graphics but it can't make a set of docks to chose from during a game.
PaulC has a GRF where you set parameters to chose a dock style but once set, all docks are the same.

Re: New map features

Posted: 15 Feb 2018 13:36
by HackaLittleBit
wallyweb wrote:I'm not sure what you mean. There is only one dock available to a game. A GRF can alter it's graphics but it can't make a set of docks to chose from during a game.
PaulC has a GRF where you set parameters to chose a dock style but once set, all docks are the same.
Thanks those docks look nice.
But in between I need a object dock thingy. see photos (3rd one photo shopped)
Maybe you know where to find it. :roll:

Re: New map features

Posted: 15 Feb 2018 15:19
by wallyweb
HackaLittleBit wrote: ...in between I need a object dock thingy.
Ok. I see now what you mean. You can use ISR and/or the ISR/DWE objects GRFs although you might find that MariCo offers a more elegant solution.
MariCo by Michael Blunck
MariCo by Michael Blunck
Dock Test 5.png (115.49 KiB) Viewed 5094 times

Re: New map features

Posted: 15 Feb 2018 16:00
by kamnet
Also, GarryG's AuzObjects, Andythenorth's CHIPS, maybe VAST?

Re: New map features

Posted: 15 Feb 2018 16:17
by wallyweb
kamnet wrote:Also, GarryG's AuzObjects, Andythenorth's CHIPS, maybe VAST?
:bow:
Looks like we have lots of choices. :D
Thanks kamnet.

Re: New map features

Posted: 15 Feb 2018 18:34
by HackaLittleBit
Yohoho and a bottle of rum.....
Now we can start playing!
And let all those non buoy using pirates be hanged from the highest mast!!!!

Thanks wallyweb and kamnet. :wink:

Re: New map features

Posted: 15 Feb 2018 18:47
by TrueSatan
strike that... wally said marico first :)

Re: New map features

Posted: 15 Feb 2018 20:10
by michael blunck
This looks very interesting.

Would it eventually lead to "newharbours"? :P

regards
Michael

Re: New map features

Posted: 15 Feb 2018 21:43
by wallyweb
Test Report #4
OpenTTD-NMF-HALB-5-g30353e06M-Win32.7z
The latest and greatest :D
(5.74 MiB) Downloaded 193 times
The .7z attached below contains:
Dock Test B.sav - a saved game
marico.grf - Thank you Michael :bow:
channels.grf - A set of extra buoys and channel limits as objects. Details are here.
DockTest.zip
Have fun
(466.44 KiB) Downloaded 199 times
Hint: If you want to see the magic behind my channel limits, open the Transparency Options GUI and set objects to transparent. 8)

For the sailors among you, the buoys are as accurate as possible considering having to draw in pixels. :wink:

Observations: For the ships to tie up alongside the docks rather than shoving a bow into a dock, they have to be able to approach the docks at an angle. You will see both effects in the saved game.

Re: New map features

Posted: 15 Feb 2018 22:36
by HackaLittleBit
michael blunck wrote: Would it eventually lead to "newharbours"?
This image was taken from a game fromJuanjo's Branche.
It shows the available tracks in the water.
I use it to illustrate that for me, most of the problems are solved in respect to harbour movement.
I can group the docks together and ships will move to dock when slot is available.
By strategically placing buoy's and object's in the water I can control the way ships behave.
It needs some practise.
But that ehhhh... is called playing I think. :)
Note that those towers simulate docks.
What would be nice is a set of newgrf's that seamlessly integrates dock, quay(object), and station tiles. and.. plain water tiles that are objects (man that would be awesome)

Image
Disclaimer: I hardly have experience with newgrf so correct me if I am wrong.

Regards

P.S I did not have time to play with juano's branche but I will.
I am curious to see how that airport thing of him works.

Re: New map features

Posted: 15 Feb 2018 23:26
by HackaLittleBit
wallyweb wrote: Observations: For the ships to tie up alongside the docks rather than shoving a bow into a dock, they have to be able to approach the docks at an angle. You will see both effects in the saved game.
This line in yapf_ship.cpp did that trick.
Trackdir park_dir = DiagDirToDiagTrackdir(enterdir);
return ((trackdirs & TrackdirToTrackdirBits(park_dir)) != 0) ? park_dir : FindFirstTrackdir(trackdirs);
:mrgreen:

Wallyweb to make your channels.grf work I needed to create a folder _Mystuff and inside that a folder Dev and inside that folder I had to put your graf.

But I see that you got the hang of it. :P

Re: New map features

Posted: 15 Feb 2018 23:51
by wallyweb
HackaLittleBit wrote:Wallyweb to make your channels.grf work I needed to create a folder _Mystuff and inside that a folder Dev and inside that folder I had to put your graf.
Wut? :?
OpenTTD saves the location of a GRF? I did not know that. I organize my GRFs into folders so that I can keep track of who did what. I guess I'm going to have to move them out of the folders and up to the newgrf folder when I need to use them in a game saved for distribution. :P
Yuk!
Thanks for catching that for me.

Did you find the marico grf in the MB folder?

Re: New map features

Posted: 16 Feb 2018 02:57
by HackaLittleBit
wallyweb wrote:Did you find the marico grf in the MB folder?
Yup.

Another bug squash.
When ship went for service dock reservation was not released.
Just put on top of previous patches.

Re: New map features

Posted: 16 Feb 2018 06:41
by michael blunck
HackaLittleBit wrote: What would be nice is a set of newgrf's that seamlessly integrates dock, quay(object), and station tiles. and.. plain water tiles that are objects (man that would be awesome)
That´s exactly what my goals are with MariCo and NewStations, see some pictures over here.

O/c, the age-old problems are/were the limitations with TTD´s ships and docks. Many years ago, Richk67 started work on "new harbours", i.e. a full action0/1/2/3 implementation of docks and a state machine like that for airports. As for that old project, I´m ready today to provide any graphics needed for dock/harbour improvements.

regards
Michael

Re: New map features

Posted: 16 Feb 2018 10:00
by HackaLittleBit
Ok Michael that is stunning.

Worst, now I realize what Cirdan s intending to do with his dockbuoy.
You do not need a very static state machine.
The solution is very simple.
You make with objects or stations your dock environment.
Then in the places (water) where you would like to load/unload you make a DockBuoy.
E voila things would work.(me stupid by not seeing this :oops: )
So I only need to change some things in my patch to make this work.
I need some time to contemplate, but I think it is the right approach.

Thanks

Re: New map features

Posted: 16 Feb 2018 10:52
by michael blunck
HackaLittleBit wrote: You do not need a very static state machine. [...]
Yes, I did understand when following the discussion. Initially, this was the idea behind Richk67´s plans for implementing customizable airports and harbours. Many years ago.

Meanwhile, for building harbours we can get away with a proper implementation of "multiple docks" per station, and a set of objects, showing harbour infrastructure. It´s not even needed to have different graphics for docks (which would require implementing a set of "actions"), but again, we could get away with one single general tile for the dock itself, and leave everything else for a set of objects.

regards
Michael

Re: New map features

Posted: 16 Feb 2018 12:30
by wallyweb
HackaLittleBit wrote:Then in the places (water) where you would like to load/unload you make a DockBuoy.
Under TTDPatch the docking buoy was built by holding Ctrl while placing the navigation buoy.

With New Map Features cirdan's solution is remarkably more simple ... Just build a dock directly on a water tile. The Ctrl function opens the Join Station GUI.

Perhaps an Alt or Shift function could be added: Hold Ctrl + Alt while building a dock on a water tile to open the Join Station GUI and produce HackaLittleBit's mooring buoy attached to a station.

Docking Buoy:
- Build dock on water ==> independent station
- Build dock on water + Ctrl ==> Joined station
Mooring Buoy:
- Build dock on water + Ctrl + Alt ==> Mooring buoy joined to station