New map features

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

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 14 Feb 2018 23:30

Thanks for testing.

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

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 14 Feb 2018 23:39

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:

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 15 Feb 2018 02:06

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 1400 times
I need a newgrf with lots of docks
Any suggestions?

I also send you pm with my savegame.(new)
Attachments
cirdan.zip
(4.66 KiB) Downloaded 42 times

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 15 Feb 2018 03:30

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.

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 15 Feb 2018 13:36

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:
Attachments
1.png
1.png (34.85 KiB) Viewed 1349 times
1a.png
1a.png (36.87 KiB) Viewed 1349 times
1b.png
1b.png (40.08 KiB) Viewed 1349 times

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 15 Feb 2018 15:19

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.
Dock Test 5.png
MariCo by Michael Blunck
Dock Test 5.png (115.49 KiB) Viewed 1331 times

User avatar
kamnet
Moderator
Moderator
Posts: 6718
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: New map features

Post by kamnet » 15 Feb 2018 16:00

Also, GarryG's AuzObjects, Andythenorth's CHIPS, maybe VAST?

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 15 Feb 2018 16:17

kamnet wrote:Also, GarryG's AuzObjects, Andythenorth's CHIPS, maybe VAST?
:bow:
Looks like we have lots of choices. :D
Thanks kamnet.

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 15 Feb 2018 18:34

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:

TrueSatan
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 16 Jul 2003 18:33

Re: New map features

Post by TrueSatan » 15 Feb 2018 18:47

strike that... wally said marico first :)

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: New map features

Post by michael blunck » 15 Feb 2018 20:10

This looks very interesting.

Would it eventually lead to "newharbours"? :P

regards
Michael
Image

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 15 Feb 2018 21:43

Test Report #4
OpenTTD-NMF-HALB-5-g30353e06M-Win32.7z
The latest and greatest :D
(5.74 MiB) Downloaded 40 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 47 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.
Last edited by wallyweb on 18 Feb 2018 23:50, edited 1 time in total.

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 15 Feb 2018 22:36

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.
Attachments
harb.png
(177.7 KiB) Not downloaded yet

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 15 Feb 2018 23:26

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

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 15 Feb 2018 23:51

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?

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 16 Feb 2018 02:57

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.
Attachments
Cirdan-clone_26121_service_bug.patch
(1.76 KiB) Downloaded 42 times

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: New map features

Post by michael blunck » 16 Feb 2018 06:41

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
Image

User avatar
HackaLittleBit
Director
Director
Posts: 550
Joined: 10 Dec 2008 16:08
Location: tile 0x0000

Re: New map features

Post by HackaLittleBit » 16 Feb 2018 10:00

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

michael blunck
Tycoon
Tycoon
Posts: 5269
Joined: 27 Apr 2005 07:09
Contact:

Re: New map features

Post by michael blunck » 16 Feb 2018 10:52

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
Image

User avatar
wallyweb
Tycoon
Tycoon
Posts: 5524
Joined: 27 Nov 2004 15:05
Location: Canada

Re: New map features

Post by wallyweb » 16 Feb 2018 12:30

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

Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 5 guests