Traffic lights (r17455)
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 4
- Joined: 16 Jul 2009 10:09
Re: Traffic lights (r13411)
So separate GRF isn't possible? Is this feature (Traffic Lights) compiled to some binary file?
If yes, could someone who know these routines share patched binary file with us? (exe / dat?)
Thanks
If yes, could someone who know these routines share patched binary file with us? (exe / dat?)
Thanks
Re: Traffic lights (r13411)
Yes, that's exactly what I said in my previous post.hwndmaster wrote:So separate GRF isn't possible?
Maybe.Is this feature (Traffic Lights) compiled to some binary file?
If there is a patched binary, you'll find it in this topic. Don't be afraid to do some reading / searching yourself. If you don't find it, the only way will be to compile openttd yourself.If yes, could someone who know these routines share patched binary file with us? (exe / dat?)
-
- Engineer
- Posts: 4
- Joined: 16 Jul 2009 10:09
Re: Traffic lights (r13411)
Attempted to apply latest .diff to latest revision of OpenTTD in SVN (used TortoiseSVN) and got very many conflicts.
I don't know how the source of OpenTTD works and attempted to resolve them (conflicts) by intuition. It did not help me - VS2008 shows many errors.
Do you planning to update .diff for the latest version of OpenTTD sources?
I don't know how the source of OpenTTD works and attempted to resolve them (conflicts) by intuition. It did not help me - VS2008 shows many errors.
Do you planning to update .diff for the latest version of OpenTTD sources?
Re: Traffic lights (r13411)
Try using the version specified in the patch (quite likely 13411)hwndmaster wrote:Attempted to apply latest .diff to latest revision of OpenTTD in SVN (used TortoiseSVN) and got very many conflicts.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Re: Traffic lights (r13411)
I'm currently not planning to update this patch. Your best bet is to use on the revision it was made for, as DaleStan suggested.hwndmaster wrote:Do you planning to update .diff for the latest version of OpenTTD sources?
Re: Traffic lights (r13411)
Which is sad because I like this patch
-
- Chief Executive
- Posts: 658
- Joined: 11 Nov 2007 12:06
- Contact:
Re: Traffic lights (r13411)
so do many but no one seem to want or have the skills to update the pacth
For Community Integrated Version http://code.google.com/p/civopenttd/
Re: Traffic lights (r13411)
For my personnal use I've updated this patch to r17420, I'm posting it here for those who are still interested.
you'll need to update savegame version manually
you'll need to update savegame version manually
- Attachments
-
- r17420_trafficlights.patch
- (48.82 KiB) Downloaded 228 times
Re: Traffic lights (r13411)
Mmm, good to see this back up to date, how many changes were needed?
Re: Traffic lights (r13411)
Nice Sorry for not updating it myself, got busy with other things.
But why didn't you include the savegame bump in your patch? Other users who want to use it might not understand how to do it...
---
mmh, I just looked at this code again first time since a long time I'm missing one little thing.. didn't I insert some hack to restrict usage of the m1 byte in other places to bits 0-6, so I could use bit 7 for the traffic lights? Because that bit was not declared as "free" but only "used but without meaning" (see docs/landscape_grid.html). Gotta check my old patch... edit: forget what I said, your update still contains said hack, I just didn't see it while browsing through for the 1st time.
Anyway, I should probably change it to m6 bit 2 or m7 bit 4, as appearently those are free nowadays (r17435) (back in r13411 they weren't)
That will break savegames though (well, not completely break, but existing TLs would vanish).
hmmm
damn you (not meant seriously! ) for updating the patch.. I'll end up making a new version like this...
But why didn't you include the savegame bump in your patch? Other users who want to use it might not understand how to do it...
---
mmh, I just looked at this code again first time since a long time I'm missing one little thing.. didn't I insert some hack to restrict usage of the m1 byte in other places to bits 0-6, so I could use bit 7 for the traffic lights? Because that bit was not declared as "free" but only "used but without meaning" (see docs/landscape_grid.html). Gotta check my old patch... edit: forget what I said, your update still contains said hack, I just didn't see it while browsing through for the 1st time.
Anyway, I should probably change it to m6 bit 2 or m7 bit 4, as appearently those are free nowadays (r17435) (back in r13411 they weren't)
That will break savegames though (well, not completely break, but existing TLs would vanish).
hmmm
damn you (not meant seriously! ) for updating the patch.. I'll end up making a new version like this...
Re: Traffic lights (r13411)
enough for me this WEZephyris wrote:Mmm, good to see this back up to date, how many changes were needed?
but almost no change to the core of the patch.
I find it easier to bump the whole when making a patch pack for myself, so I post it as it was on my computer. But you're right, it should be kept in public version. (and now that you're back on it... )Roujin wrote:Nice Sorry for not updating it myself, got busy with other things.
But why didn't you include the savegame bump in your patch? Other users who want to use it might not understand how to do it...
Re: Traffic lights (r13411)
Alright, here is the promised update. Special thanks to Gedemon for doing all the tedious work (updating 4k revisions).
edit: removed due to saveload flaw. fixed version will be uploaded shortly.
Changelog:
I'd like to point out a small feature of this patch maybe not all of you know: There is a trafficlight penalty added for both the NPF and YAPF pathfinder. It is a "hidden" setting, not found in the GUI, so you have to set it inside your openttd.cfg or using the console in a running game.
The settings are named "pf.npf.npf_road_trafficlight_penalty" and "pf.yapf.road_trafficlight_penalty", respectively.
So what does it do? It causes vehicles to avoid traffic lights by a certain degree (you can finetune it by setting the value to something higher/lower. The higher the value, the more the vehicle will avoid traffic lights).
For example in the screenshot below, there's a town with a ridiculous amount of traffic lights, so trucks will take the route around the town even if it's quite a detour. As a final note, imo this patch works well together with another (small) patch I made, random road construction. Together with the setting "towns build traffic lights during road construction", it will result in towns constructing some traffic lights by themselves after some time.
Have fun.
edit: removed due to saveload flaw. fixed version will be uploaded shortly.
Changelog:
Code: Select all
* savegame version bump
* fixed inconsistency regarding tram tracks: now they are equal to roads regarding TLs.
If there are at least three roadbits of any kind, a TL is allowed on the tile.
Also added button to build tramway toolbar.
* fixed error string that would never appear ("Must remove traffic light first") when
removing roadbits so there would be less than three left.
* increased performance by not drawing traffic lights when zoomed out
(can't see them properly anyway)
* Bundle advanced settings into own section
I'd like to point out a small feature of this patch maybe not all of you know: There is a trafficlight penalty added for both the NPF and YAPF pathfinder. It is a "hidden" setting, not found in the GUI, so you have to set it inside your openttd.cfg or using the console in a running game.
The settings are named "pf.npf.npf_road_trafficlight_penalty" and "pf.yapf.road_trafficlight_penalty", respectively.
So what does it do? It causes vehicles to avoid traffic lights by a certain degree (you can finetune it by setting the value to something higher/lower. The higher the value, the more the vehicle will avoid traffic lights).
For example in the screenshot below, there's a town with a ridiculous amount of traffic lights, so trucks will take the route around the town even if it's quite a detour. As a final note, imo this patch works well together with another (small) patch I made, random road construction. Together with the setting "towns build traffic lights during road construction", it will result in towns constructing some traffic lights by themselves after some time.
Have fun.
Last edited by Roujin on 07 Sep 2009 14:16, edited 4 times in total.
Re: Traffic lights (r13411)
If this was merged with Improved RV acceleration, I would fall over dead.
May you please provide a Binary?
May you please provide a Binary?
Something goes here, hell if I know.
Re: Traffic lights (r17438)
Win32 binary. Trafficlight.grf included.
- Attachments
-
- trafficlights_win32_r17432.zip
- (3.87 MiB) Downloaded 383 times
Re: Traffic lights (r17438)
The Binary is of (Ahem) Poor quality. It crashes every time i build something. I waiting for roujin to post one. But thank you for trying Petert.
Something goes here, hell if I know.
Re: Traffic lights (r17438)
That is strange. I can't imagine that being caused by a mistake in compiling. Could you describe what exactly you did so it crashed, so I can check?Comm Cody wrote:The Binary is of (Ahem) Poor quality. It crashes every time i build something. I waiting for roujin to post one. But thank you for trying Petert.
Anyway, above patch (I removed it now) contained a mistake by me. That one should have had no impact on building anything though, only on loading trunk savegames (that failed with a crash). I'm uploading a new one shortly.
Re: Traffic lights (r17438)
When i went to build a station using drag and drop, my game went to desktop whining about mingwin or the compiler and booted me out of OTTD. so I put the Binary in the recycling bin.
Something goes here, hell if I know.
Re: Traffic lights (r17438)
Here it is. New version for r17455.
Please, if you downloaded the one from earlier, use this one instead. The old one messed up saveload stuff badly. Savegames are not compatible between this one and the previous one. Loading games from clean trunk should work now, though.
Here's a win32 binary. Hope it works for you.
Fix: loading trunk savegames.
Please, if you downloaded the one from earlier, use this one instead. The old one messed up saveload stuff badly. Savegames are not compatible between this one and the previous one. Loading games from clean trunk should work now, though.
Here's a win32 binary. Hope it works for you.
Re: Traffic lights (r17438)
Sorry Comm Cody, but I didn't write the patch, try the link from above this post.Roujin wrote:That is strange. I can't imagine that being caused by a mistake in compiling. Could you describe what exactly you did so it crashed, so I can check?Comm Cody wrote:The Binary is of (Ahem) Poor quality. It crashes every time i build something. I waiting for roujin to post one. But thank you for trying Petert.
Anyway, above patch (I removed it now) contained a mistake by me. That one should have had no impact on building anything though, only on loading trunk savegames (that failed with a crash). I'm uploading a new one shortly.
- Kosov_1986
- Traffic Manager
- Posts: 248
- Joined: 01 May 2006 14:37
- Location: Pecs, Hungary
- Contact:
Re: Traffic lights (r17455)
hello,
sorry, but will you put this into trunk in the future?
sorry, but will you put this into trunk in the future?
Kosov from the depths of East Europe!
My English isn't good but i never use translating programs
I had a Chinese gf, for 3 days, now she's in Germany because she studies there... she was my first serious gf.
Minibus topic, (Renault-Ikarus 546 released by wyctor) http://www.tt-forums.net/viewtopic.php?t=25662
Ikarus buses from all around the world! http://www.tt-forums.net/viewtopic.php?t=26985
My English isn't good but i never use translating programs
I had a Chinese gf, for 3 days, now she's in Germany because she studies there... she was my first serious gf.
Minibus topic, (Renault-Ikarus 546 released by wyctor) http://www.tt-forums.net/viewtopic.php?t=25662
Ikarus buses from all around the world! http://www.tt-forums.net/viewtopic.php?t=26985
Who is online
Users browsing this forum: No registered users and 43 guests