The International Simutrans Forum

 

Author Topic: Problem with fluid diesel barge (waytype 0 error)  (Read 511 times)

0 Members and 1 Guest are viewing this topic.

Offline Elemental

  • *
  • Posts: 15
  • Languages: EN, DE
Problem with fluid diesel barge (waytype 0 error)
« on: January 25, 2020, 03:39:59 PM »
I was just wondering why there was no two-part diesel barge for bulk fluids, especially since the second, unpowered one was there. When trying to build the convoy in reverse, using the insert option, the powered front shows up, but selection it causes a crash:

FATAL ERROR: vehicle_builder_t::build() - cannot build a vehicle with waytype 0.

It may also require some other vehicle in front of it (yellow half-bar), which seems strange, but could not test due to the crash.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #1 on: January 25, 2020, 04:29:58 PM »
I am investigating this now - this appears to be an error with vehicles that have both multiple liveries and multiple freight images defined.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #2 on: January 25, 2020, 05:23:12 PM »
There are more problems:

bulk and long goods, are OK
piece, cooled, oil and livestock cause crash

diesel barges, allow coupling with steel hull barges, but not wooden barges.
lightweight barges, allow coupling with steel hull unpowered barges, but not vice versa.
steel and wooden hull unpowered barges have duplicate constraints with diesel barge

bantam pusher, steam tug and seahorses, all allow both steel and wooden barges, that's OK

I'll try fixing the constrainst this way:
- remove the duplicates
- lightweight barge can run only single
- diesel barge can attach both wooden/steel barges

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #3 on: January 25, 2020, 05:34:48 PM »
I am investigating this now - this appears to be an error with vehicles that have both multiple liveries and multiple freight images defined.
That may be the case - bulk and long have multiple images for different goods, while the others have only one freight image type.
And I have checked the whole pakset - this happens only for barges and narrowboats
And removing the duplicate constraints did not help

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #4 on: January 25, 2020, 06:05:15 PM »
This was actually a mixture of pakset and code error: the pakset had the wrong livery numbers for the second freight image, but the code did not handle this well. The latter error is difficult to fix, but I have fixed the pakset error.

Thank you for your report.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #5 on: January 25, 2020, 06:20:20 PM »
Yeah seems we worked at the same time.

However I have more complex fix prepared. I'm afraid your fix is not good. Mine is to completely remove the freight specification in freightimage, if there is only one freight.
You mage the freight number equal to livery number which is iimho wrong.

Before preparing a push request I'd like to know if lightweigth barges were intended to allow pulling unpowered barges or not? They seem to have the same power, so should be good. But they would make the older diesel barge redundant (and could be obsoleted). However it may be that the lightweight barge's hull is not strong enough to pull anything?

Code: [Select]
-freightimagetype[0]=fish
-FreightImage[0][E][0]=./images/diesel-barge-blue-cover.1.4
-FreightImage[0][SE][0]=./images/diesel-barge-blue-cover.1.5
-FreightImage[0][S][0]=./images/diesel-barge-blue-cover.1.6
-FreightImage[0][SW][0]=./images/diesel-barge-blue-cover.1.7
-FreightImage[0][W][0]=./images/diesel-barge-blue-cover.1.0
-FreightImage[0][NW][0]=./images/diesel-barge-blue-cover.1.1
-FreightImage[0][N][0]=./images/diesel-barge-blue-cover.1.2
-FreightImage[0][NE][0]=./images/diesel-barge-blue-cover.1.3
-
-FreightImage[0][E][1]=./images/diesel-barge-bw-blue-cover.1.4
-FreightImage[0][SE][1]=./images/diesel-barge-bw-blue-cover.1.5
-FreightImage[0][S][1]=./images/diesel-barge-bw-blue-cover.1.6
-FreightImage[0][SW][1]=./images/diesel-barge-bw-blue-cover.1.7
-FreightImage[0][W][1]=./images/diesel-barge-bw-blue-cover.1.0
-FreightImage[0][NW][1]=./images/diesel-barge-bw-blue-cover.1.1
-FreightImage[0][N][1]=./images/diesel-barge-bw-blue-cover.1.2
-FreightImage[0][NE][1]=./images/diesel-barge-bw-blue-cover.1.3
+FreightImage[E][0]=./images/diesel-barge-blue-cover.1.4
+FreightImage[SE][0]=./images/diesel-barge-blue-cover.1.5
+FreightImage[S][0]=./images/diesel-barge-blue-cover.1.6
+FreightImage[SW][0]=./images/diesel-barge-blue-cover.1.7
+FreightImage[W][0]=./images/diesel-barge-blue-cover.1.0
+FreightImage[NW][0]=./images/diesel-barge-blue-cover.1.1
+FreightImage[N][0]=./images/diesel-barge-blue-cover.1.2
+FreightImage[NE][0]=./images/diesel-barge-blue-cover.1.3
+
+FreightImage[E][1]=./images/diesel-barge-bw-blue-cover.1.4
+FreightImage[SE][1]=./images/diesel-barge-bw-blue-cover.1.5
+FreightImage[S][1]=./images/diesel-barge-bw-blue-cover.1.6
+FreightImage[SW][1]=./images/diesel-barge-bw-blue-cover.1.7
+FreightImage[W][1]=./images/diesel-barge-bw-blue-cover.1.0
+FreightImage[NW][1]=./images/diesel-barge-bw-blue-cover.1.1
+FreightImage[N][1]=./images/diesel-barge-bw-blue-cover.1.2
+FreightImage[NE][1]=./images/diesel-barge-bw-blue-cover.1.3

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #6 on: January 25, 2020, 06:29:53 PM »
I must confess that I cannot remember the research that I did in respect of these barges now back in 2012 when I added them; I can only assume that there was good reason to treat the lightweight barge differently in terms of haulage capability. The power, incidentally, may well have been a guess as this may have been difficult to find.

May I ask why you have removed all of the freight specifications? I am not sure that I follow the reason for this.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #7 on: January 25, 2020, 06:35:12 PM »
Barges that have more than one freightImage work good. So the problem was with those that had only one.
The syntax is:
Code: [Select]
FreightImage[freightnumber][direction][liverynumber]According to https://simutrans-germany.com/wiki/wiki/en_VehicleDef#PNG_Image_for_Vehicles
Quote
If the loaded image will be the same for all goods don't include the above parameter (freightimagetype) and remove the number brackets. If only some goods will have different images and all other good type will have the same image just add below parameters without the number brackets.
So I assume the safe way is to use
Code: [Select]
FreightImage[direction][liverynumber]

I must confess that I cannot remember the research that I did in respect of these barges now back in 2012 when I added them; I can only assume that there was good reason to treat the lightweight barge differently in terms of haulage capability. The power, incidentally, may well have been a guess as this may have been difficult to find.
Are the "barges" is simutrans equivalent to widebeam boats? https://en.wikipedia.org/wiki/Widebeam
I'm trying to look up anything, but I can find only information about modern boats for recreational purposes...
« Last Edit: January 25, 2020, 07:03:47 PM by Vladki »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #8 on: January 25, 2020, 07:47:44 PM »
The barges seem to be equivalent in width to the widebeam boats to which you referred at least.

As to the various fixes, the one that I pushed seemed to work when I tested it; perhaps you can re-test with to-morrow's nightly build?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #9 on: January 25, 2020, 08:39:57 PM »
The barges seem to be equivalent in width to the widebeam boats to which you referred at least.

As to the various fixes, the one that I pushed seemed to work when I tested it; perhaps you can re-test with to-morrow's nightly build?

As I have looked on it, it is quite incomplete. It does not deal with unpowered barges (that can be pushed by bantam pusher).

See my pull request: https://github.com/jamespetts/simutrans-pak128.britain/pull/79

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #10 on: January 25, 2020, 10:11:42 PM »
That pull request has a large number of changes, not all of which I want to incorporate (e.g. in relation to light barges). May I ask which changes specifically relate to the bantam pusher?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #11 on: January 25, 2020, 10:43:33 PM »
So changes in diesel-barge.dat are:
- allow WoodenHullDumbBarge to be attached    (improvement)
- removed the freighttype index in freightimage for those that have only one freightimage for each livery   (bugfix)

diesel-light-barge:
- removed the constrains allowing attaching dumb barges. They cannot be attached anyway, as there is no corresponding constraint on dumb barges. So if you want light barges to be able to pull dumb barges, a constraint at dumb barges should be added. (consitency improvement)

steel-hull-dumb-barge
- removed the duplicate constraint on diesel barge. Could be replaced with constraint allowing them to be pulled by light barge. (consistency improvement)
- removed the freighttype index in freightimage for those that have only one freightimage for each livery   (bugfix - this allows pushing barges by bantam pusher. Otherwise they would require something in front...)

Is that clear?

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #12 on: January 26, 2020, 01:40:29 PM »
As to the various fixes, the one that I pushed seemed to work when I tested it; perhaps you can re-test with to-morrow's nightly build?

It crashes as before

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #13 on: January 26, 2020, 03:12:42 PM »
It crashes as before

That is odd - testing yesterday showed that this had been fixed, but this error seems now to recur. I have modified the barges' .dat files to remove the freight image type where there is only one type of freight, and this seems to work. Thank you for the information regarding that.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #14 on: February 08, 2020, 07:11:47 PM »
Hello James, I have modified the pull request https://github.com/jamespetts/simutrans-pak128.britain/pull/79

Now it allows boat horse, steam tug, diesel barge or lightweight barge to pull any wooden or steel hull dumb barge. And bantaam pusher to push it. Unfortunately it is impossible to prevent bantam pusher to push a barge that is already pulled by something (especially horse...)

Also some fixes regarding the single cargo and multiple liveries bug are present.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #15 on: February 08, 2020, 07:59:59 PM »
Thank you for that. I cannot immediately recall what my research was regarding these barges; I think it unlikely that I should not have created the distinctions that exist for a reason, but would need to check very carefully the research material to know what the position is. This is likely to be an extremely labour intensive task, and is not a priority at present.

However, if anyone else were able to find some data on the specific issues of what the lightweight diesel barge can pull, what the Bantam pusher could push, and what wooden hulled dumb barges could be pulled and pushed by, that would be most helpful.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #16 on: February 08, 2020, 08:11:50 PM »
My point is that previously the constraints were not consistent.
1. Both diesel & lightweight barges were allowed to pull only steel dumb barges
2. But both steel & wooden dumb barges were allowed to be pulled by diesel barge (but not the lightweight barge).
3. The constrains for diesel barge were duplicated so it seemed like obvious copy&paste with probable intent to make the second set for lightweight barge.

The issue with pusher is due to constraints. The dumb barge can be pushed or pulled, and there is no way in constraints to make it XOR.
But I do not consider this as bug, just funny glitch

I tried to find anything about these "weidebeam" boats, but could not find anything apart from leasure (house)boat sales and rentals.
« Last Edit: February 08, 2020, 08:28:26 PM by Vladki »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 19352
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #17 on: February 08, 2020, 08:44:01 PM »
Thank you for your reply.

Does anyone else have any data on this?

Online Freahk

  • *
  • Posts: 632
  • Languages: DE, EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #18 on: February 09, 2020, 04:27:02 AM »
No specific data from the UK.
However, there are different types of barges.
So called "Schute" is what I guess translates to tug barge.

These look roughly like a normal ship with a usual bow and stern.
These are always pulled.

So called "Leichter" (I guess it really translates to lighter) can be pushed and pulled but usually they are pushed.

There are some restrictions as not all kinds of lighter can be at the front, there always has to be some kind of Bow at the front, not all lighters have one.
Bow does not neccessarily mean it's peaky, often it's just a slope, which will allow multiple of such to be coubled and pushed as an up to 3x3 assembly (in Europe)
I could not find any exact data about how many can be pulled but only found images of single lighter barges being pulled.

Back to simutrans:
"unpowered tug barge" of any kind should not be pushed.
"steel hull unpowered barge" of any kind should be able to be assembled and pushed as a grid of up to 3x3. As this is not possible, I guess we should simply allow any number in a row to be pushed.
"diesel barge" of any kind (including the lightweight) should be able to pull exactly one steel unpowered barge. This would be possible if we copy each once for push and once for pull operation but I don't think we should do that and instead simply allow any number of pulled barges.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #19 on: February 09, 2020, 07:52:39 PM »
I think that the first image may be what's meant by barges in pak128 Britain. So probably pushing them should be forbidden.

Those on second image are much larger.

Online Freahk

  • *
  • Posts: 632
  • Languages: DE, EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #20 on: February 09, 2020, 08:45:13 PM »
The type is not about the size but about the shape.
However, when searching for bantam pusher, these indeeed seem to be quite little cute pushers, so sorry, but I fear the above doesn't fit here.
I just found that video:
https://www.youtube.com/watch?v=X9LaXvDQWAc

I think this is what the bantam/steel unpowered barges should represent in simutrans.
We can see these were pushed and it was mentioned these were pulles before but I cannot confirm if they were pulled by diesel barges or some kind of tug.

Offline Vladki cz

  • Devotee
  • *
  • Posts: 2977
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #21 on: February 10, 2020, 03:49:35 PM »
Yeah, even the name "bantam" can be seen on the pusher in video. Could please some native speaker listen to the video? There is something (at the end of video) about the 25% speed increase, but I could not understand what was the base for comparison...

Online Freahk

  • *
  • Posts: 632
  • Languages: DE, EN
Re: Problem with fluid diesel barge (waytype 0 error)
« Reply #22 on: February 10, 2020, 04:33:53 PM »
Not a native speaker but what I understand is "25% increase of speed over barges pulled by the same power"
Which also makes totally sense as one of the reason for pushing instead of pulling barges is an increase in efficiency.
However, we cannot easily simmulate this properly.

Bantam tug is btw. the type of ship. It's not the name of an inivisual ship from what I have learned now. There are quite a lot different bantams but all of the same type, that is rather small pushing "tugs".

Another interessting link about this:
http://www.jim-shead.com/waterways/mwp.php?LMCL=lcVLYW&wpage=Bantam-Tugs.html

push-pull tugs can push or pull a barge. Both at the same time is not permitted.
« Last Edit: February 10, 2020, 04:47:07 PM by Freahk »