Author Topic: passenger and mail classes  (Read 3758 times)

0 Members and 1 Guest are viewing this topic.

Offline wlindley

Re: passenger and mail classes
« Reply #70 on: November 10, 2017, 07:36:59 PM »
Have successfully compiled the very latest program and Britain Ex pakset in this branch.  Everything seems to be functional, although the convoy manifest list is always empty, regardless of whether it's passengers, mail, or goods being carried.  I have carefully copied all the *.tab and *.txt into the directory where I run the game, but cannot find what might be missing.  Any suggestions?


Offline Ves

Re: passenger and mail classes
« Reply #71 on: November 10, 2017, 09:08:41 PM »
Glad that you have tried it! That manifest is still work in progress. I have to find a way to sort the passengers by accommodation, which appears to be more difficult than it might seem. The “show class” button will disappear and be replaced by sort options for classes.
So for the moment, no good is shown because of that.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #72 on: November 10, 2017, 09:15:24 PM »
Thank you for your feedback.

I should note that I am hoping to have this integrated with the master branch quite soon, preferably by December, so that more rigorous testing can start (including starting online servers) and so that the amount of work involved in maintaining two separate actively developed branches comes to an end. This does not mean that all work needs to have been completed on this by December, but we should aim at least to have it playable by then. As far as the GUI is concerned, do you think that you would be able to make what we have workable and fix obvious bugs (such as the failure to display passengers and goods, as here) by early December, even if all the desired UI features cannot be completed by then and even if this means temporarily removing some of the more advanced UI features that are not essential for the passenger and mail classes features to work?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #73 on: November 10, 2017, 10:12:42 PM »
The thing being, that version was the version which had the bug of not showing correct amount of good in the accommodations, which we talked about earlier. What I try to achieve now is in fact to get these basic stuff to show up as desired.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #74 on: November 10, 2017, 10:19:16 PM »
If you are getting stuck with the task of fixing this bug, might I try to assist? Have you made any more progress since your last update of code to Github from which I could start in attempting at least a basic solution to this for the time being?

Thank you for your work on this so far.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #75 on: November 10, 2017, 11:15:58 PM »
I have not had much time lately, I don’t recall currently what you have got and what you haven’t. I’m not home tonight so I can’t check, but I should be able tomorrow to check and update my github.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #76 on: November 10, 2017, 11:19:14 PM »
Splendid, that is very helpful, thank you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #77 on: November 11, 2017, 03:12:45 PM »
I have merged your latest code with my gui-classes and uploaded it to github. I dont recall what you had incorporated and what not from beforehand.

AND, please save the base-translation file. I do still fill it out with new entries! :)

edit:

I have now spent a few hours today trying to figure some of these things out, and somethings have been solved and others have arized.
For instance, I can sort passengers (only passengers, it seems) by classes in the convoys now, but I cannot with mail.
I do, however, realize that I have made a big error in simconvoy that I need to fix, but I am too tired to do that now Im afraid :P

It is on Github now!
« Last Edit: November 11, 2017, 07:13:47 PM by Ves »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #78 on: November 11, 2017, 10:20:28 PM »
I think that I have fixed what appeared to be the principal bugs, although it is not as clear as it might have been what the intention was in many cases. Ves - can you let me know what parts that you think are and are not working as at my latest fixes in case I have missed anything important?

Edit: Having noticed your edit, after my original post, I see that our possible solutions may have collided. I will have a look at what you have managed and see what we come up with.

Incidentally, can you upload a saved game in which the specific problems that you report can be reproduced reliably?

Edit 2: I am afraid that there are some major merge conflicts between our respective fixes, and I am not entirely sure what you had intended. Can you check whether things are working better in my version or your version so that we can consider how to deal with these difficult merge conflicts?

Edit 3: Incidentally, we also need to show the class proportions, etc. for depots and stations.
« Last Edit: November 12, 2017, 10:37:58 AM by jamespetts »
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #79 on: November 12, 2017, 10:40:31 AM »
Oh no, too bad with conflicts! :p
I’m away for the day, but maybe I can look into it tonight. We really should coordinate so we don’t do duplicate work! :)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #80 on: November 12, 2017, 11:40:29 AM »
Splendid, please do. I did the work that I did because I thought that you had got stuck with some of these things and wanted a little assistance, so I tried to fix some of the bugs; my apologies if this was not clear. Thank you again for your assistance with this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #81 on: November 12, 2017, 01:13:34 PM »
No worries, I appreciate all the help I can get! :)

Offline Ves

Re: passenger and mail classes
« Reply #82 on: November 12, 2017, 07:47:47 PM »
Writing in a new message, so as to minimize confusion this time ;)

I have now merged it with my work, but I do not know if I have merged it correctly. The display looks odd with quite some bugs somewhere, and I can see some parts of code you have added which looks like they are supposed to be used by simconvoy.

Trying "passenger-and-mail-classes" in the state you left it, it looks luckily much better, as my code is not interrupting it. However some issues:
* The max capacity of the classes are wrong, they show the total amount of passengers in the convoy, not the total for the classes.
* The passengers is now always sorted by class.

Some questions:

you have modified the void freight_list_sorter_t::sort_freight(vector_tpl ...... ) and added uint8 g_class to the end. I can see that it is used a few times in the code, but I had imagined that it would also be used in conjuction with simconvoi_t?
I dont understand why you have modified the sort section with parameters like (g_class == all_classes || wlist[ i ].get_class() == g_class) when sorting by anything else than by class/wealth?

Lastly, should I start digging in the code, or would you like to?  ;D

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #83 on: November 12, 2017, 07:54:12 PM »
I am currently away from home, so cannot easily answer in detail. However, can I clarify whether the issues that you report are before or after your merging work?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #84 on: November 12, 2017, 08:13:38 PM »
I think our two versions do not work well together at all, so I might have to start on a new branch to continue working :P

The issues I describe comes from the unmodified "passenger-and-mail-classes" branch, so that will say without any merging.

Offline Ves

Re: passenger and mail classes
« Reply #85 on: November 14, 2017, 06:45:27 PM »
Also, another odd bug I have come acros now is that mail appear to exist also in 5 classes.
Using the savegame linked below , you will notice that we suddently now have "m_class[ 4 ]" class mail. This you can also see with the version compiled directly from passenger-and-mail-classes branch.
savegame:
http://simutrans-germany.com/files/upload/classes_GUI_vehicle_tests_6.sve

Also, could you help me understand the changes you have made?

edit:
Added savegame!

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15816
  • Total likes: 404
  • Helpful: 177
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: passenger and mail classes
« Reply #86 on: November 15, 2017, 12:07:58 AM »
Splendid, thank you for the report. I think that I have fixed the mail issue, which was a problem in the passenger generation code whereby mail and passengers were not properly distinguished in terms of which class that they would be assigned on generation. The old mail with an excessive class will linger until it is delivered, but no new mail with the wrong class will now be generated.

To answer your questions above, the issue with the capacity of classes being shown in the sort by class detail/via displays as the total class seems to be caused by the use of current.menge as the third argument in add_ware_heading() on line 450 of freight_list_sorter.cc, and that simply gives the whole capacity irrespective of class. This is an illustration of why it is difficult for two people to work on the exact same piece of code: it is not clear what was intended here. How did you intend to calculate and store the figure for the per class capacities in order to pass to the add_ware_heading() method? If you want the capacity just for the class to be displayed here, that is what you will need to do.

Adding the parameter g_class to freight_list_sorter (which is currently unused) was intended to allow it to operate exclusively on one class and ignore others, but it became apparent that this was not an effective means of dealing with at least the immediate issues. As the intention behind the code was not entirely clear, I left it in in case this becomes useful. If you find that this has no use in any permutation, feel free to remove it.

To answer your final question, it might be better for you to look into the code, as I really have a very large amount of work to try to get the pakset ready for these new features.

Thank you very much indeed for your ongoing work on this - it is much appreciated.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Ves

Re: passenger and mail classes
« Reply #87 on: November 15, 2017, 02:31:19 PM »
Hehe, it seems that you ran into the very same issue as I did then with the amount of passengers in each class.

But thanks for the explanations! I will continue working to find some solutions! :)