Yep: one waypoint one the route all trains want to take and a panelty for those trains that should take the other route. But I'll implement it anyway.Buhmann wrote:This particular case could be solved with the option "next order", couldn't it?
But different penalties for differen't groups would be wonderful, anyway
[patch] Programmable waypoints
Moderator: OpenTTD Developers
Re: [patch] Programmable waypoints
Re: [patch] Programmable waypoints
I'm still pretty sure that it shouldn't be just waypoints that are programmable- signals should be as well.
For a useful resource of what is programmable in TTDPatch (I think?), check out this site: http://uwe.s2000.ws/ttdx/signal/restric ... hp?lang=en; it has a comprehensive list of routing criteria.
I think that 'Signal status' is an incredibly useful one, myself.
For a useful resource of what is programmable in TTDPatch (I think?), check out this site: http://uwe.s2000.ws/ttdx/signal/restric ... hp?lang=en; it has a comprehensive list of routing criteria.
I think that 'Signal status' is an incredibly useful one, myself.
Re: [patch] Programmable waypoints
Updated the patch again. See first post for details.
Re: [patch] Programmable waypoints
@ Octernion: Yexo has said that it is likely that he is going to work on making signals programmable. Also someone else is working on their own version of the patch.
Re: [patch] Programmable waypoints
Oh, awesome. I'll check out the updated version of the patch and see if I can break it!T-Unit wrote:@ Octernion: Yexo has said that it is likely that he is going to work on making signals programmable. Also someone else is working on their own version of the patch.
Edit: aw, it won't compile on mac os x... it dies when linking, complaining about a slew of undefined symbols related to the commands you added (like CmdCreateRule, etc.). If you want more debug information, or if I'm doing something very stupid, let me know

Re: [patch] Programmable waypoints
Did you run ./configure prior to running make? My patch adds two files (progsignals.h and progsignals.cpp) and if you don't configure these won't be compiled. If you did run ./configure or still getting errors can you please post the exact error message here? I don't have a mac myself, so testing it is difficult.octernion wrote:Oh, awesome. I'll check out the updated version of the patch and see if I can break it!T-Unit wrote:@ Octernion: Yexo has said that it is likely that he is going to work on making signals programmable. Also someone else is working on their own version of the patch.
Edit: aw, it won't compile on mac os x... it dies when linking, complaining about a slew of undefined symbols related to the commands you added (like CmdCreateRule, etc.). If you want more debug information, or if I'm doing something very stupid, let me know
Re: [patch] Programmable waypoints
I was pretty sure I ran configure, but I re-did it just to make sure, and I get the same error- it isn't actually building progsignal.cpp. For building, I checked out a fresh version of 11814, did a svn revert and cleanup just to make sure, did a ./configure and make. Since no one else is having problems, I assume I'm doing something silly, but I have gotten patches to work in exactly this fashion before, so it must be something new and exciting that I am doing stupidly.Yexo wrote: Did you run ./configure prior to running make? My patch adds two files (progsignals.h and progsignals.cpp) and if you don't configure these won't be compiled. If you did run ./configure or still getting errors can you please post the exact error message here? I don't have a mac myself, so testing it is difficult.
The error message is boring (linking fails obviously as the symbols don't exist in the object files since it wasn't compiled...), but here it is:
Code: Select all
[SRC] Linking openttd
Undefined symbols:
"CmdCreateRule(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
__command_proc_table in command.o
"__RuleSet_pool", referenced from:
__RuleSet_pool$non_lazy_ptr in train_cmd.o
__RuleSet_pool$non_lazy_ptr in waypoint.o
__RuleSet_pool$non_lazy_ptr in yapf_rail.o
"ShowRulesWindow(Waypoint const*)", referenced from:
ShowRenameWaypointWindow(Waypoint const*)in main_gui.o
"CmdRemoveRule(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
__command_proc_table in command.o
"CmdChangeRule(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
__command_proc_table in command.o
"CmdChangeRuleData(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
__command_proc_table in command.o
"InitializeRuleSets()", referenced from:
InitializeGame(int, unsigned int, unsigned int)in misc.o
"__ruleset_chunk_handlers", referenced from:
__chunk_handlers in saveload.o
"CmdCopyRuleSet(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
__command_proc_table in command.o
"CmdChangeRuleSetPenalty(unsigned int, unsigned int, unsigned int, unsigned int)", referenced from:
__command_proc_table in command.o
ld: symbol(s) not found
Edit edit: I changed source.list to have progsignal.cpp, and it compiled fine, hooray.
Re: [patch] Programmable waypoints
It is supposed to do that, and when I checked, I saw you were right. For some reason, svn diff doesn't take source.list into account unless specially told so.octernion wrote:Yexo wrote: Edit: I noticed the patch doesn't change source.list... is it supposed to?
Anyway, v0.6 is out! It's now possible to make rules based on the group a vehicle is in and based on the current order a vehicle has. I've added the changes to source.list to this patch, so just update to 11834 and apply the new patch.
Re: [patch] Programmable waypoints
It normally does take source.list into account; at least when I am using svn diff.Yexo wrote:For some reason, svn diff doesn't take source.list into account unless specially told so.
Re: [patch] Programmable waypoints
I know it should, but how can this happen?Rubidium wrote:It normally does take source.list into account; at least when I am using svn diff.Yexo wrote:For some reason, svn diff doesn't take source.list into account unless specially told so.
Code: Select all
~/openttd/progwaypoints$ svn diff source.list
Index: source.list
===================================================================
--- source.list (revision 11834)
+++ source.list (working copy)
@@ -1,4 +1,5 @@
# Source Files
+progsignal.cpp
airport.cpp
articulated_vehicles.cpp
autoreplace_cmd.cpp
@@ -99,6 +100,7 @@
window.cpp
# Header Files
+progsignal.h
aircraft.h
airport.h
airport_movement.h
thijs@s070411:~/openttd/progwaypoints$ svn diff | grep source.list
svn: Expected 'bin/data' to be a directory but found a file
thijs@s070411:~/openttd/progwaypoints$
Re: [patch] Programmable waypoints
you replaced the bin/data dir
Re: [patch] Programmable waypoints
I know I did, but that wasn't the point. The diff is created anyway, but source.list is clearly not in the output.glx wrote:you replaced the bin/data dir
Re: [patch] Programmable waypoints
And svn, therefore, gets confused, and bails.glx wrote:you replaced the bin/data dir
When things appear on stderr, the program very likely did not finish its task successfully.
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: [patch] Programmable waypoints
Even if I put the original data dir back (I have to do that every time I want to update) I don't get any output from grep. The error message from svn disappears then, but still no output.DaleStan wrote:And svn, therefore, gets confused, and bails.glx wrote:you replaced the bin/data dir
When things appear on stderr, the program very likely did not finish its task successfully.
Re: [patch] Programmable waypoints
Most excellent idea 
It compiles just fine under linux (kubuntu, x64) .. however in windows it fails both with BuildOTTD and VS C++ 2008 express. Logs are attached in case anyone can make any sense of whats borked on my system

It compiles just fine under linux (kubuntu, x64) .. however in windows it fails both with BuildOTTD and VS C++ 2008 express. Logs are attached in case anyone can make any sense of whats borked on my system

- Attachments
-
- vs.txt
- the VS C++ 2008 express log (copy&paste from the .htm output)
- (19.91 KiB) Downloaded 302 times
-
- BuildOTTD.log.txt
- BuildOTTD log..
- (9.61 KiB) Downloaded 291 times
Re: [patch] Programmable waypoints
Thx, I develop under linux myself, and don't test it under windows. With these logs however, it's easy to fix.Forked wrote:Most excellent idea
It compiles just fine under linux (kubuntu, x64) .. however in windows it fails both with BuildOTTD and VS C++ 2008 express. Logs are attached in case anyone can make any sense of whats borked on my system
Re: [patch] Programmable waypoints
sweet. I play under linux but I compile it in xp (vmware) for friends that use windowsYexo wrote: Thx, I develop under linux myself, and don't test it under windows. With these logs however, it's easy to fix.

thanks

Re: [patch] Programmable waypoints
I updated the start post to contain the new patch. It is fully compatible with v0.6, so you don't have to recompile under linux to play with them.Forked wrote:sweet. I play under linux but I compile it in xp (vmware) for friends that use windowsYexo wrote: Thx, I develop under linux myself, and don't test it under windows. With these logs however, it's easy to fix.
thanks
- SquireJames
- Tycoon
- Posts: 1863
- Joined: 07 Aug 2004 11:56
- Skype: squirejames5
- Location: Stoke-on-Trent
- Contact:
Re: [patch] Programmable waypoints
Could someone compile the latest version of ChrisIn with this patch for me? I have tried myself with BuildOTTD (I also have Tortoise) but it just fails at several hunks and never outputs anything.
Re: [patch] Programmable waypoints
Latest chrisin is for release 11355, which is few months old. So you won't be able to compile current trunk with chrisIN patch without heavy modifications to the patch, as too many things have changed in the meantime. This patch is for 11834 (quite recent version), so combining these two would be probabbly very hard work.
If you need something, do it yourself or it will be never done.
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
My patches: Extra large maps (1048576 high, 1048576 wide) (FS#1059), Vehicle + Town + Industry console commands (FS#1060), few minor patches (FS#2820, FS#1521, FS#2837, FS#2843), AI debugging facility
Other: Very large ships NewGRF, Bilbo's multiplayer patch pack v5 (for OpenTTD 0.7.3)
Who is online
Users browsing this forum: Ahrefs [Bot] and 22 guests