Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Feb 24, 2019 12:06 am

All times are UTC




Post new topic  Reply to topic  [ 120 posts ]  Go to page Previous 1 2 3 4 5 6 Next
Author Message
PostPosted: Wed May 02, 2012 1:01 pm 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
Thanks for your feedback ffpp!

Yes, the clone button is a good choice to clone templates. In my opinion this is the only choice.

> - During the creation of a template, it is complicated to get an engine to be the first vehicle in the chain: this is also the same when dealing with a train in a depot, only that there you have multiple lines available to make things easier. Should be improved as well.

The behavior is diffent from the depot. I am trying to create some screenshots later.


Top
   
PostPosted: Wed May 02, 2012 8:52 pm 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
Look at the screen shots below. I have tried to document the facts in this way.

While creating the screen shots I pressed for few seconds the Ctrl key (+S). I held a waggon. When I release the (mouse or ctrl?) button, I got the following error message.

Code:
Assertion failed at line 67 of src/train_gui.cpp: selection != INVALID_VEHICLE


This happened one time. I can not reproduce it again.

Attachment:
Assertion-failed-tbtr-hpps-r24122-2012-05-02.rar [2.55 MiB]
Downloaded 75 times


Attachments:
01-try-to-move-first.png
01-try-to-move-first.png [ 16.2 KiB | Viewed 3504 times ]
02-move-forward-one-by-one.png [19.78 KiB]
Downloaded 3 times
Top
   
PostPosted: Wed May 02, 2012 9:01 pm 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
Oh yes, I've seen another little problem. Look at the screen shot(s) again.


Attachments:
waggons-overlap.png
waggons-overlap.png [ 12.73 KiB | Viewed 3501 times ]
Top
   
PostPosted: Thu May 03, 2012 11:20 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
@Eisenbaehr,

I checked the things you mentioned.

- You're right, the main gui needs the ability to scroll horizontally, I didn't notice this yet because my game settings don't allow for such long trains :)

- moving template vehicles inside the chain vs depot movement: I'm not sure if I understand you.
I think you mean that you cannot make a template vehicle the new head of its chain by moving it to the front. But this is the case for the real trains inside a depot as well. You cannot make a vehicle != first the new head of the chain, you have to make it the second vehicle and then move the current head backwards. Just tried it. Please correct me if you where meaning something else.

- I will look at the savegame with the crash, maybe it happens again for me.


Top
   
PostPosted: Thu May 03, 2012 11:44 am 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
> I did not notice this yet because my game settings do not allow for searching long trains

Long? The trains have 30 cars only :)

The move ... I think you misunderstood me, unfortunately. The problem is really very striking. So I think it might be due to NewGRF Train Set. However, there are no problems in the depot.

By, for example Cloning, is a train correctly in the template. The locomotive is at the start, the cars behind it.
If I simply click on a wagon, for example the 5th, the locomotive will be placed in this position. Now I have to click five times on a wagon behind the locomotive to get right back in the first place. It works no other way to do this.

The next time I make a video :D


Top
   
PostPosted: Thu May 03, 2012 12:57 pm 
Offline
Engineer
Engineer

Joined: Mon Mar 26, 2012 10:23 am
Posts: 55
Eisenbaehr wrote:
>Long? The trains have 30 cars only :)


I would say a train with 30 cars is pretty long...


Top
   
PostPosted: Thu May 03, 2012 1:59 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Eisenbaehr wrote:
Long? The trains have 30 cars only :)

As long as the engine can still pull it ;)

Eisenbaehr wrote:
By, for example Cloning, is a train correctly in the template. The locomotive is at the start, the cars behind it.
If I simply click on a wagon, for example the 5th, the locomotive will be placed in this position. Now I have to click five times on a wagon behind the locomotive to get right back in the first place. It works no other way to do this.

Ah, I know now what is going on... This is a known bug/stupidity which annoyed me such much as well, that I corrected it immediately for my playtesting version but it is not included in the v0.4c. But this bug will be gone in the next release. This is also the reason why I didn't understand you, I had totally forgotton that this issue was there in the last release version.

Eisenbaehr wrote:
The next time I make a video :D

No need ! :D


Top
   
PostPosted: Thu May 03, 2012 5:48 pm 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
Du Humpen!

Thx for the facility!

Btw.: ?? A 30-car long train is completely normal? Where do you live that you think this is not normal?? (Max. 250 axes or 700 meters.)

This old one has 21-23 (?) cars, 30-32 (?) cars, over 40 cars.


Top
   
PostPosted: Fri May 04, 2012 12:57 am 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
Now you can easily de- or increase the transported volumes by move a train (with Ctrl to get the complete route) from one to another group with a different template. Very very nice :)

But, I'm very afraid to say that there is the next assertiation-problem.

First a few words about a few priority issues.
To scrolling is dirty by click on an arrow of the scroll bar or mouse wheel.
You should disable sorting on template-id. It is better to sort by creation time. Or new templates never get old template-ids (auto increment).
When old templates will be deleted, there are many holes. Now, new templates created, they are scattered everywhere. But this is only a very small problem.

Now to the assert-problem.

Code:
Assertion failed at line 535 of src/aaa_template_vehicle_func.cpp: !part_of_chain || new_head->IsPrimaryVehicle()


I had used the Replace All Templates-Function. By the NewGRF Train Set, there are two cars with the same name. "Schüttgutwagen" One for 80 and 120 km/h. In the interface, the difference was not seen, unfortunately. Whatever... first, I selected on the left side, so I think, the wrong car and clicked Replace All. Nothing happened. I chose the other, and clicked again on Replace All. What I chose on the right I can not remember. I selected Apply and the stone get to run... Maybe this has nothing to do with the error. But maybe it helps somehow.

In the attachment is the savegame before the assertiation fails.
First, pause game and stop all trains. Goto train 110. Let him go.
Train 110 will now go into the depot. When he arrived, so it crashes.

Attachment:
Assertion-failed-at-line-535-hpp-r24122.rar [2.75 MiB]
Downloaded 69 times


You will find most NewGRFs that I used here.

Please make a note of this post. I forgot that the error happened before. I wondered just why this is so familiar to me.


Top
   
PostPosted: Sat May 05, 2012 10:32 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
I also noticed some bugs but fortunately I was able to extract some cases where exactly those bugs happen. So I can actually fix them ;)
For example: Please don't use the ReplaceAll-Function as of now. It felt stable when I developed it but it seems my test cases weren't sufficient at all back then.
Another problem seems to be (for me at least) that when templates get switched around or changed, normally the [group->replacement->template]-connotations are being kept consistent. But with regards to multiple railtypes this seems to be lacking in some instances. Which leads to trains trying to use a nonexisting template which will lead to segfaults. (If the main gui says 'uses template of different railtype', better check if there really *is* a different railtype which has a legal template set of the selected group).

All this will be fixed in the future of course, I'm just very short on time at the moment.


Top
   
PostPosted: Wed May 09, 2012 12:04 am 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
> If the main gui says 'uses template of different railtype', better check if there really *is* a different railtype which has a legal template set of the selected group

I remember that the interface was confusing. Some templates showed "uses template of different railtype" although this was not true.

> > I would say a train with 30 cars is pretty long...
>
> Btw.: ?? A 30-car long train is completely normal?

Yesterday I read an article on Wikipedia about the first railroad in the world. :)

The English article differs from the German. This surprises me. ...however...

http://en.wikipedia.org/wiki/Stockton_a ... operations
> ...in 1863 that, for the inaugural run, a locomotive pulling 33 waggons...

http://de.wikipedia.org/wiki/Stockton_a ... Lokomotive
> Am 26. September 1825 fanden Probefahrten und am darauf folgenden 27. September die Jungfernfahrt statt. Der Zug bestand aus 36 Wagen...
> On 26 September 1825 were trial runs and the following 27th September, the maiden voyage instead. The train consisted of 36 cars ...


Top
   
PostPosted: Wed May 09, 2012 9:23 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Eisenbaehr wrote:
> If the main gui says 'uses template of different railtype', better check if there really *is* a different railtype which has a legal template set of the selected group

I remember that the interface was confusing. Some templates showed "uses template of different railtype" although this was not true.


Yes, I'm currently looking for more instances during playing where this happens because during the more basic tests before the last release I didn't notice any such behaviour.


Eisenbaehr wrote:
> > I would say a train with 30 cars is pretty long...
>
> Btw.: ?? A 30-car long train is completely normal?

Yesterday I read an article on Wikipedia about the first railroad in the world. :)

The English article differs from the German. This surprises me. ...however...

http://en.wikipedia.org/wiki/Stockton_a ... operations
> ...in 1863 that, for the inaugural run, a locomotive pulling 33 waggons...

http://de.wikipedia.org/wiki/Stockton_a ... Lokomotive
> Am 26. September 1825 fanden Probefahrten und am darauf folgenden 27. September die Jungfernfahrt statt. Der Zug bestand aus 36 Wagen...
> On 26 September 1825 were trial runs and the following 27th September, the maiden voyage instead. The train consisted of 36 cars ...

The only thing I would say against 30-cars long trains would be that it might not make too much sense with regards to the map size. I image it to look a bit weird when a train's length already covers half the distance between two cities.

I like to play with a 4x cargo weight multiplier, btw. This gives a stronger role to the slow-but-strong freight engines and also gives incentive to use multiple engines per train even later in the game.


Top
   
PostPosted: Wed Aug 08, 2012 9:47 am 
Offline
Engineer
Engineer

Joined: Sun May 30, 2004 8:48 pm
Posts: 39
Having been away from OpenTTD for a while I find this a very interesting patch I'd like to try out.

I did actually about 5 years ago suggest that the current way of handling trains/routes which are more or less vehicle/set based should be changed to route based, and I guess this is as close as it gets:

"Routes" primary way to handle traffic: viewtopic.php?f=32&t=34086


Top
   
PostPosted: Wed Aug 08, 2012 4:51 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Hello and thanks,

I've been away from the project for some time due to finishing my diploma and starting to work but I kept it in the back of my head that there are things left to do and things left to fix here.
I definitely want to finish and refine it and propose it for trunk integration once I meet the needed criteria.


Top
   
PostPosted: Wed Aug 08, 2012 5:40 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
ffpp wrote:
I've been away from the project for some time due to finishing my diploma and starting to work but I kept it in the back of my head that there are things left to do and things left to fix here.I definitely want to finish and refine it and propose it for trunk integration once I meet the needed criteria.
Good to know it isn't abandoned, it's become almost indispensable to me now I've got used to relying on it :D .

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Fri Mar 29, 2013 7:45 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Finally resuming this.

I updated the first post with a plan/tasks for version0.5, namely:

- move the current version (v.0.4c) to newest trunk
- move to git
- split patch in smaller sub-patches


Top
   
PostPosted: Sun Mar 31, 2013 10:02 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Jul 12, 2011 12:09 pm
Posts: 1534
Location: St Ives, Cambs, UK
It's good to see this patch back in development, I found it really useful for dealing with UKRS! :)

_________________
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have a screenshot thread now...
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer buiding robots.
Author of an incredibly boring stickied post about NewGRFs.


Top
   
PostPosted: Mon Apr 22, 2013 1:16 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
I fixed it up to compile against the newest trunk, it wasn't even that much work. I discovered that I couldn't make it compatible to trunk and cargodist at the same time anymore, but it is only a tiny fix that is necessary to get the trunk version to compile against cd as well.

It's in saveload.h:
Code:
/** Type of reference (#SLE_REF, #SLE_CONDREF). */
enum SLRefType {
   REF_ORDER         = 0, ///< Load/save a reference to an order.
   REF_VEHICLE       = 1, ///< Load/save a reference to a vehicle.
   REF_STATION       = 2, ///< Load/save a reference to a station.
   REF_TOWN          = 3, ///< Load/save a reference to a town.
   REF_VEHICLE_OLD   = 4, ///< Load/save an old-style reference to a vehicle (for pre-4.4 savegames).
   REF_ROADSTOPS     = 5, ///< Load/save a reference to a bus/truck stop.
   REF_ENGINE_RENEWS = 6, ///< Load/save a reference to an engine renewal (autoreplace).
   REF_CARGO_PACKET  = 7, ///< Load/save a reference to a cargo packet.
   REF_ORDERLIST     = 8, ///< Load/save a reference to an orderlist.
   REF_STORAGE       = 9, ///< Load/save a reference to a persistent storage.
   REF_TEMPLATE_VEHICLE = 10, ///< Load/save a reference to a template vehicle,


where cargodist also has apended two items of its own. So this must be integrated manually.

I wanted to apply for getting my patch into trunk any time in the future but there is most likely a lot of work ahead for that to happen.
I've set up a git repository which will help in splitting the code up into reviewable sizes and I'm currently cleaning this up from debugging-leftovers and such.

There should still be instances of bad coding style inside, like using command functions not via the DoCommand() wrapper but rather directly. And I have to think about network-safety too.

Patch v0.5 will be simply a recent trunk-compilable one, with another version integrated into cargodist.


Top
   
PostPosted: Mon Nov 25, 2013 11:58 pm 
Offline
Engineer
Engineer
User avatar

Joined: Wed Mar 13, 2013 1:53 pm
Posts: 88
A small bugreport via Trond: the crash when push template replace button in vehicle window which called from station gui.
Quick fix:
vehicle_gui.c near line 160:
Code:
 DropDownList *BaseVehicleListWindow::BuildActionDropdownList(bool show_autoreplace, bool show_group)
 {
        DropDownList *list = new DropDownList();

-       if (show_autoreplace) list->push_back(new DropDownListStringItem(STR_VEHICLE_LIST_REPLACE_VEHICLES, ADI_REPLACE, false));
+       if (show_autoreplace) {
+           if (!_networking) list->push_back(new DropDownListStringItem(STR_TMPL_TEMPLATE_REPLACEMENT, ADI_TEMPLATE_REPLACE, false));
+           list->push_back(new DropDownListStringItem(STR_VEHICLE_LIST_REPLACE_VEHICLES, ADI_REPLACE, false));
+       }

And yes: it also causes crash/desync on network games, so i've disabled it. :(


Top
   
PostPosted: Tue Nov 26, 2013 6:40 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
I didn't abandon this project, but I didn't have time to come back to it yet (this happens when you start too many projects at once and have only little time after work).
I didn't take care of any network compatibility with this mod so far, either ^^


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 120 posts ]  Go to page Previous 1 2 3 4 5 6 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.