Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Oct 21, 2018 11:17 am

All times are UTC




Post new topic  Reply to topic  [ 57 posts ]  Go to page 1 2 3 Next
Author Message
 Post subject: Patch: Juanjo's patches
PostPosted: Sat Aug 06, 2011 4:58 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
These are the patches I have written so far.

Warning: saved games using this patch won't work with any other version of OpenTTD.

GUI:
  • Setting for automatically choose size of buttons, dropdowns, fonts, etc. It is necessary to set a truetype font in the config file. (There is a set of fonts in the shared dropbox folder)
  • Window for selecting fonts and their size.
  • GUI modes for tablets.
  • Some sprites can be are rendered as a TrueType font.

Depots:
  • Two depot types: small ones (with the standard behaviour of OpenTTD depots) and big depots that can be enabled in the configuration window.
  • Big water depots will allow joining different depot parts. Ships in big depots don't disappear when entering the depot. Each part can have one ship at most.
  • Big road depots will allow joining different depot parts. Each depot tile can handle three vehicles at most. One road depot consisting of 4 tram depot tiles and 5 road depot tiles can have 4*3 trams and 5*3 road vehicles inside.
  • Big rail depots will allow joining different rail depot parts. It is allowed to join in the same depot different platforms for different rail types.

About filtering items:
  • Town directory: Added possibility to filter towns. Most important feature is list all towns the local company hasn't built a statue yet (in order to increase ratings).
  • Station directory: Added a small greyed box to show that a station has ever accepted a certain cargo. Also, a different filter has been added (find stations that have ever accepted steel,...).
  • Industry directory: Added a filter (find industries that accept/produce a certain cargo).
  • Groups/vehicles lists: filter to find some type of vehicles/groups depending on certain parameters. Mass commands for vehicles are disabled if the filter is opened (would cause desyncs if enabled).

About grouping vehicles:
  • Vehicle window: Icon to find next/previous vehicle that shares orders with current vehicle.
  • Vehicle window: Details icon + ctrl: open a window showing the group-related stuff of the vehicle.
  • Vehicle lists: Button to see groups instead of vehicles. If a station has 5 groups of 10 vehicles each, it may be useful to show only 5 items instead of 50.
  • Group window: Group names are unique by owner and vehicle type (FS#3473).
  • Group window: When clicking a vehicle on the list, highlight the group it belongs to.
  • Group window: When dragging a vehicle, do not draw a white frame. Draw a grey rectangle instead (as group list does). If CTRL pressed, vehicles with the same order list are also highlighted.
  • Group window: Sprite depending of group profit: it is calculated using the worst vehicle on the group.
  • Group window: Show profit details of a group when hovering over it.
  • Group window: Sort groups by name, number of vehicles and mean profit.
  • Group window: Direct access to all order lists and timetables of the vehicles of the group.
  • Group window: Do not drop vehicles into the ALL_GROUP (FS#5168).
  • Group window: Add shared vehicles also available for DEFAULT_GROUP.
  • Group window: Show which group is empty, or there is an auto-fill timetable in progress, etc.
  • Group window: When creating a group, new group is selected.
  • Group window: When deleting a group, nearest group is selected.
  • Group window: Automatic building of groups: Rebuild groups by order lists, visited towns, transported cargo, first engine class and first engine.
  • Group statistics window: mean profit, total cargo capacity, total cargo carried... Also, find the orderlists, timetables and vehicles involved on this group.

Catchment area:
  • Different definition of production/acceptance area around tiles is used. The coverage of each station is calculated as the union of the coverage area of each single tile of that station. This way, area of production == area of acceptance.
  • Catchment area controller: Main purpose is to see with a few clicks all the tiles a company/town/station covers. See Zoning - Local Authorities and Show station coverage areas to see the patches I based my work on.

Hide engines:
  • Each company can hide engines from their lists. On build engine/available engines/autoreplace engines windows, CTRL+click over an engine hides it. This is useful if you play with lots of engines and are not interested but in a few of them.
  • Buy rights to use engines: Experimental feature to make companies plan which transport types and engines will use through the game.

About water/ships:
  • River and canal banks and available water tracks are stored in the map array (except for rail+water tiles).
  • The flat tile of each normal two-tile dock can be crossed by ships. A Ctrl+Click on it will change which tracks can be taken on this tile. A special one-tile dock can be built on a flat tile with water.
  • Each station can have multiple docks.
  • Ships do not cross over each other. This is enabled by a setting so old savegames do not crash.
  • YAPF and NPF try to reserve a path for the ship as long as possible. This improves the performance of ship pathfinding. Paths are automatically updated if needed.
  • Locks controlled differently (being possible in the future to draw lock gates).

Other changes:
  • Ctrl+Del deletes all news windows and all pending news windows as well.
  • DeliverGoodsToIndustry: now first industry to deliver is not the closest one but the oldest by construction date.
  • OPF for ships is broken playing with these modifications.

You can get the code in GitHub: https://github.com/J0anJosep/OpenTTD/tree/JJ-last


Last edited by Juanjo on Mon Feb 12, 2018 2:03 pm, edited 33 times in total.

Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Sat Aug 06, 2011 8:43 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Sat Aug 16, 2008 5:51 pm
Posts: 674
Location: Long Eaton, Nottinghamshire. UK
Juanjo wrote:
...If CTRL is pressed when dropping, all vehicles with same shared orders are moved into the group...


This feature alone is worth the patch! Many thanks for your efforts; downloading....

_________________
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
Image
I now work for DE PHOTO - CLICK TO BOOK US TO SHOOT YOUR EVENT! We Shoot Kids with Canons!


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Sun Aug 07, 2011 12:30 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7160
A suggestion: keep each of these changes as separate patches, makes them easier to review and merge into trunk

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Sun Aug 07, 2011 8:58 am 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
Eddi wrote:
A suggestion: keep each of these changes as separate patches, makes them easier to review and merge into trunk


You are right. But it is easier and faster for me to work in several features at the same time. If somebody is interested in only one of them, I can make separate patches for those features. I'll add the CTRL+DragAndDrop and the one dealing with creating/deleting group icons. The visual changes have very close code so I don't know if it will be possible to separate them. Also, I found a little bug with returning error messages. I'll update right now.


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Sun Aug 07, 2011 9:24 am 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9040
Location: Sol d
Juanjo wrote:
Eddi wrote:
A suggestion: keep each of these changes as separate patches, makes them easier to review and merge into trunk


You are right. But it is easier and faster for me to work in several features at the same time. If somebody is interested in only one of them, I can make separate patches for those features. I'll add the CTRL+DragAndDrop and the one dealing with creating/deleting group icons. The visual changes have very close code so I don't know if it will be possible to separate them. Also, I found a little bug with returning error messages. I'll update right now.

It's not about "somebody interested in them". It's about actually being able to sensibly deal with it; thus if you're really interested in making a contribution which should (somewhen) hit the main development branch, Eddi's suggestion to split it up into its single constituents is essential. Doing it from the start keeps it simple as well. As a monolithic patch... it's unlikely that one even can bring up the motivation to review it as reviewing single patches with a single purpose and change is MUCH easier and MUCH less time-consuming.

Using something like mercurial queues it's also nothing which requires much of work to keep it separately. Actually on the contrary. And you still work on all features concurrently. Also generally, I can only recommend patch authors to have a look at mercurial (or maybe git).
Using svn when dealing with patches seems to be quite inferior to either of hg or git.

And yes, the intentions of these patches sound reasonable (I didn't yet look at any details, though)

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Mon Aug 08, 2011 6:52 am 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
planetmaker wrote:
Using something like mercurial queues it's also nothing which requires much of work to keep it separately. Actually on the contrary.


Thanks! I didn't know about it.


Last edited by Juanjo on Mon Aug 08, 2011 2:24 pm, edited 1 time in total.

Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Mon Aug 08, 2011 10:23 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7160
be careful who you actually quote.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Fri Sep 09, 2011 7:12 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
First post updated


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Mon Sep 12, 2011 3:50 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Sat Aug 16, 2008 5:51 pm
Posts: 674
Location: Long Eaton, Nottinghamshire. UK
Juanjo wrote:
First post updated


Many thanks Juanjo downloading now :bow:

_________________
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
Image
I now work for DE PHOTO - CLICK TO BOOK US TO SHOOT YOUR EVENT! We Shoot Kids with Canons!


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Tue Sep 13, 2011 8:34 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Thu Sep 11, 2008 7:32 am
Posts: 1034
Location: Spain
Can you add an screenshot?

_________________
Spanish translation of OpenTTD
Extended heightmaps

Have fun, don't quarrel too much and add as many advanced settings as you can.


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Tue Sep 20, 2011 9:42 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
JacobD88 wrote:
Juanjo wrote:
First post updated


Many thanks Juanjo downloading now :bow:

Thank you for your support!

Terkhen wrote:
Can you add an screenshot?

Hi! A week late, but I've added it. I wanted to end the next version of the patch before posting the screenshot.

I've uploaded the 4th version which is quite close to the initial purpose of this patch: creation of groups automatically and filtering groups and vehicles by cargo and destinations. I don't expect to add any new feature, although probably I will revise the code and maintain the patch.

I hope you like it!


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Tue Apr 03, 2012 8:27 am 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
Version 5 is out.

Most important change is about coverage area. Although the patch is mainly about groups, the filter window used to filter groups and vehicles is also reused to filter stations to show coverage area of a company. This window is hidden under the smallmap/viewport dropdown.


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Tue May 15, 2012 7:51 am 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
Another bump. No big changes, but some critical bugs cleaned and code updated to trunk.


Top
   
 Post subject: Re: Patch: Group GUI
PostPosted: Wed May 16, 2012 11:02 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Sat Aug 16, 2008 5:51 pm
Posts: 674
Location: Long Eaton, Nottinghamshire. UK
Thanks for the continued updates Juanjo :bow:

_________________
High-Functioning Autistic & Proud... National Autistic Society * Asperger Foundation
My (O)TTD Work...BIGGER DEPOTS (REL.) & SERVICING-STATIONS (WIP) * Advanced DEPOT DESIGNS * SCREENSHOTS
Image
I now work for DE PHOTO - CLICK TO BOOK US TO SHOOT YOUR EVENT! We Shoot Kids with Canons!


Top
   
PostPosted: Mon Jun 25, 2012 6:45 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
I'm posting an update due to a big change I'm planing to introduce in the set.

I previously included a station coverage controller to show which tiles are under the influence of certain stations. It calculated coverage as: "the station coverage is the union of the coverage of each single tile of the station." This differs with the way really stations work.
So I've decided to rewrite some functions to make acceptance and production of a station be coherent with the previously stated way. This is the first big change I'm introducing to gameplay. It still needs testing, but I think it deserves this update.

As usual, other minor changes (bugs and desyncs). I'll also change the name of the topic to something more appropriate.


Top
   
PostPosted: Mon Jun 25, 2012 9:19 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7160
Juanjo wrote:
So I've decided to rewrite some functions to make acceptance and production of a station be coherent with the previously stated way. This is the first big change I'm introducing to gameplay. It still needs testing, but I think it deserves this update.

i think that's a good idea, but it should be a completely separate patch.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Jun 26, 2012 8:44 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
Eddi wrote:
i think that's a good idea, but it should be a completely separate patch.


I'll separate them soon then. It should be no big deal. Just for the modified acceptance/production algorithm though.

EDIT: Patch updated. Industries didn't produce anything after loading a savegame.


Top
   
PostPosted: Tue Jul 31, 2012 12:48 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Dec 21, 2004 5:35 am
Posts: 185
Skype: andrey-zaharov
Location: St. Petersburg, Russia
Sounds good, but can this patch be separated to specialized ones?

_________________
OpenTTD Hard Game Pack


Top
   
PostPosted: Wed Aug 01, 2012 7:57 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
Vaulter wrote:
Sounds good, but can this patch be separated to specialized ones?


I'm reviewing the code to clean up some bugs/inconsistent behaviour. As soon as I release the new version, I will also separate the patches into smaller parts. I think it will take no longer than a week.


Top
   
PostPosted: Wed Sep 19, 2012 3:52 pm 
Offline
Engineer
Engineer

Joined: Sat Aug 06, 2011 3:51 pm
Posts: 123
Location: Spain
Well, I have added two experimental features to the set of patches. They are not finished but they work by now and I don't have time for deep testing.

First feature is about a station having multiple docks. CTRL+Click to join two separate docks into a single station, as road stops and rail station. Second feature (and this needs a lot of work) tries to separate ships a little bit, so they don't cross over each other. Unfortunately, this makes ships to stop when they find another ship ahead. I'll have to look at pathfinders also (OPF for ships doesn't find a path for oil rigs).

For playtesters, take care as newly saved games with this patch will work only for this patched version.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 57 posts ]  Go to page 1 2 3 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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-2018 phpBB Limited

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