Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Dec 10, 2018 9:55 am

All times are UTC




Post new topic  Reply to topic  [ 205 posts ]  Go to page Previous 15 6 7 8 911 Next
Author Message
PostPosted: Fri Jun 01, 2018 7:09 am 
Offline
Engineer
Engineer

Joined: Sun Oct 02, 2011 6:56 pm
Posts: 126
Answers for previous posts:

Decoupled part of train is becoming new train. There is open question, if the train limit should apply for trains or for locomotives. With this patch it makes more sense to limit locomotives, since they are what makes profit possible.

MUs (dualheads) won't be allowed to decouple, there is not much to do with generic wagons, it would be just weird. Only possibility to decouple will be to decouple 2 already coupled MUs.

Then there is the reversing idea. My plan is to rework reversing, basically as mentioned ^^. Then it will allow more combinations for shunting.

I'm also working on: Adding number parameter for how many units to decouple. And basic conditions for finding train for couple - IS_EMPTY, IS_FULL, and something with cargotypes. This will create framework for such thing as non-electric->electric shunting station


Top
   
PostPosted: Fri Jun 01, 2018 7:56 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1083
Maybe involve train group into? To better handling with choose, which carriages should to be coupled?

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.


Top
   
PostPosted: Fri Jun 01, 2018 8:44 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Aug 08, 2005 1:46 pm
Posts: 1857
Location: Ipswich
Karn wrote:
MUs (dualheads) won't be allowed to decouple, there is not much to do with generic wagons, it would be just weird. Only possibility to decouple will be to decouple 2 already coupled MUs.

MU doesn't necessarily imply dual-head.
See attached for what I mean.

In general the NewGRF spec permits wagons and locomotives to be arbitrarily different when coupled compared to when not, and it isn't obvious to determine whether this is a "safe" thing to allow in the context of decoupling.
Probably you will need to snoop on what the NewGRF is doing and just not allow de/coupling if it is doing this sort of thing (e.g. using variables 40-42, 60-62, etc.)


Attachments:
MU decouple test, 1945-02-08.sav [29.97 KiB]
Downloaded 24 times

_________________
Ex TTDPatch Coder, Grumpy Greymuzzle
Avatar by MoonsongWolf.
Patch Pack, Github
Dad-Coder since April 2018
Top
   
PostPosted: Fri Jun 01, 2018 10:26 am 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5237
JGR wrote:
In general the NewGRF spec permits wagons and locomotives to be arbitrarily different when coupled compared to when not, and it isn't obvious to determine whether this is a "safe" thing to allow in the context of decoupling. [...]

"Longer" wagons/coaches are usually articulated, i.e. composed of 2 or 3 vehicles, e.g. by use of var 4D.

@Karn
A very interesting project!

regards
Michael

_________________
Image


Top
   
PostPosted: Fri Jun 01, 2018 4:41 pm 
Offline
Transport Coordinator
Transport Coordinator
User avatar

Joined: Sat Jan 05, 2013 2:34 am
Posts: 258
Location: at home
Could somebody post a precompiled zip package of the Decouple (https://github.com/Palo123/OpenTTD-YPS/tree/Decouple)
because I appear to be having... issues... with compiling.

_________________
Jetrain
========
I'm drawing things... you'll see what soon.
========
I want a sandwich.


Top
   
PostPosted: Fri Jun 01, 2018 5:59 pm 
Offline
Engineer
Engineer
User avatar

Joined: Sun Aug 24, 2014 12:20 pm
Posts: 83
Location: Kaon Prison, Cybertron
trainman1432 wrote:
Could somebody post a precompiled zip package of the Decouple

I wouldn't mind that too please! I have no idea how to compile OpenTTD and when I've looked at it I can't figure it out :P

_________________
Some links to stuff I've made:
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=-


Image


Top
   
PostPosted: Sat Jun 02, 2018 1:34 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Apr 28, 2003 6:52 pm
Posts: 1203
This is a very interesting project, but I'm not sure how it would work with trainsets that change wagon properties according to the engine they're attached to.

For instance, in the set I'm working on, a passengers wagon's characteristics (livery, appearance, properties, even length...) are determined by the leading engine type. If a wagon has a "short" length when attached to engine A, and a "longer" length when attached to engine B, how would it behave in a game where I swap engine A with engine B in the consist? So far, we're not allowed to change a wagon's length outside of a depot, so I'm really puzzled as to how it would work with this patch.

_________________
The French Narrow Gauge Train Set is now released! Get it here


Top
   
PostPosted: Sat Jun 02, 2018 5:54 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4713
Location: Lost in Music
Snail wrote:
This is a very interesting project, but I'm not sure how it would work with trainsets that change wagon properties according to the engine they're attached to.

It won't, not ever :)

But I think it's good that forks can explore new ground.

The future of OpenTTD is stable core, and lots of feature forks. Some forks won't be compatible with newgrf spec. That's ok.

Meanwhile we've discussed 'shunting' here since year zero. :twisted: Congrats to Karn for actually writing some code to implement it :bow:

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
PostPosted: Sat Jun 02, 2018 7:42 am 
Offline
Tycoon
Tycoon

Joined: Wed Apr 27, 2005 7:09 am
Posts: 5237
andythenorth wrote:
Snail wrote:
This is a very interesting project, but I'm not sure how it would work with trainsets that change wagon properties according to the engine they're attached to.

It won't, not ever

Depends. Some wagon properties, based on the engine, will fall back to default values. Others, like modifying vehicle length, would not work outside their scope (defined only when done in depots), and will probably produce desyncs in MP games.

BTW, apart from changing vehicle length by means of a CB for part vehicles inside a MU (which might not be split anyway by this patch), I don´t see any use case (= "bad feature") for changing vehicle lengths for wagons hauled by a normal engine (locomotive)?

regards
Michael

_________________
Image


Top
   
PostPosted: Sat Jun 02, 2018 8:00 am 
Offline
Engineer
Engineer

Joined: Sun Oct 02, 2011 6:56 pm
Posts: 126
Here are windows binaries. Use on own risk, it's still in development.

Update 0.2: Decoupling variable number of units and various fixes

edit: binaries removed to avoid confusion, there is newer version 0.3 available with less crashes


Last edited by Karn on Thu Jun 07, 2018 6:21 pm, edited 2 times in total.

Top
   
PostPosted: Sat Jun 02, 2018 9:56 am 
Offline
Engineer
Engineer
User avatar

Joined: Sun Aug 24, 2014 12:20 pm
Posts: 83
Location: Kaon Prison, Cybertron
Thought I'd post this video that I made demonstrating the patch for a sleeper styled loco swap service :P

_________________
Some links to stuff I've made:
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=-


Image


Top
   
PostPosted: Sun Jun 03, 2018 5:02 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
I don't know how your patch works, but i would propose to handle the "wagon properties depend on engine" by having the player specifically define "detachable wagon groups" in the depot. only those may take part in shunting operations, and vehicles in that group will not have access to vehicle properties outside that group. as far as the NewGRF is concerned, that is the whole train. shunting may only happen betewen such groups, and they cannot be searated by shunting

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


Top
   
PostPosted: Sun Jun 03, 2018 5:48 pm 
Offline
Engineer
Engineer

Joined: Sun Oct 02, 2011 6:56 pm
Posts: 126
Eddi wrote:
I don't know how your patch works, but i would propose to handle the "wagon properties depend on engine" by having the player specifically define "detachable wagon groups" in the depot. only those may take part in shunting operations, and vehicles in that group will not have access to vehicle properties outside that group. as far as the NewGRF is concerned, that is the whole train. shunting may only happen betewen such groups, and they cannot be searated by shunting


"Let's make player's judgement prevent technical problems". What could go possibly wrong?


Top
   
PostPosted: Sun Jun 03, 2018 8:48 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4713
Location: Lost in Music
How about consists of consists (and also articulated consists within them)?

What could go wrong (it's Turtles All The Way Down), eh? :twisted:

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
PostPosted: Mon Jun 04, 2018 1:44 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
Karn wrote:
"Let's make player's judgement prevent technical problems". What could go possibly wrong?
i don't think that's what i said

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


Top
   
PostPosted: Mon Jun 04, 2018 2:22 pm 
Offline
Engineer
Engineer

Joined: Sun Oct 02, 2011 6:56 pm
Posts: 126
Eddi wrote:
Karn wrote:
"Let's make player's judgement prevent technical problems". What could go possibly wrong?
i don't think that's what i said


There is technical problem with variable wagon length depending on NewGRF engine. The problem is, when you change the engine outside the depot, it can corrupt certain things like absolute positions on map or some properties on level of changing NewGRF in game. You proposed to make player define what's technicaly safe to do outside the depot, even when the game will end up in unexpected state. So player would have to guarantee with his choices that the game won't crash/corrupt.


Top
   
PostPosted: Mon Jun 04, 2018 2:32 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7226
no, i proposed that the user gets the option to specify what he intends to do, so the game can avoid the unsafe operations, without completely removing them from the game.

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


Top
   
PostPosted: Mon Jun 04, 2018 2:48 pm 
Offline
Engineer
Engineer

Joined: Sun Oct 02, 2011 6:56 pm
Posts: 126
Okay, now I get it. It sounded like you are trying to solve general case. So disallow by default and allow only specified consists.


Top
   
PostPosted: Mon Jun 04, 2018 6:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1083
Some newgrfs have restrictions, using "start-stop" or "can_attach" switches, to handle MU things etc.
Is it possible to check result of these switches when coupling/decoupling order is being set?
Probably only second one is possible (decoupling order sanity check)...

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.


Top
   
PostPosted: Tue Jun 05, 2018 3:24 pm 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Apr 17, 2017 4:52 pm
Posts: 644
Location: Western Ile-de-France Region
What about livery overrides? The stuff associated with that is only ever meant to take place in a depot. All kinds of crazy stuff could happen: in particular a change in capacity may occur.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 205 posts ]  Go to page Previous 15 6 7 8 911 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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.