Patch: More conditonal orders (r15271)

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Patch: More conditonal orders (r15271)

Post by Hirundo »

See svn rev 14828
Create your own NewGRF? Check out this tutorial!
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Patch: More conditonal orders (r15271)

Post by ColdIce »

can someone update this to the latest trunk, please? thank you
The rest is confetti!
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Patch: More conditonal orders (r15271)

Post by Hirundo »

Although *someone* has quite a long todo list, he managed to find some time to update this patch. No changes apart from save/load version bump. Only tested to the extent that it compiled and didn't crash my pc.

See the first post for the patch file.
Create your own NewGRF? Check out this tutorial!
User avatar
ColdIce
Transport Coordinator
Transport Coordinator
Posts: 306
Joined: 25 Apr 2006 10:22
Location: Bucharest

Re: Patch: More conditonal orders (r15271)

Post by ColdIce »

Thank you "Someone" Swallow :lol:
The rest is confetti!
Xanobia
Engineer
Engineer
Posts: 9
Joined: 30 Mar 2009 23:16

Re: Patch: More conditonal orders (r15271)

Post by Xanobia »

Hmm any chance you can make it compatible with 0.7.0 tag?

(combining several patches can be quite a hassle, and i have no C++ skills)


I might have misunderstood the concept of patches, but i thought them to be a way for me to enhance my game?

If so i find it 'silly' that patch makers dont release a patch that works with the last stable release of the game making it easier for us non-c++ programmers to combine any number of patches we like. (tried trunk 16055 for this patch but then Vehicle Console Commands and Close Airport didnt work) And so i could ask those guys to update to the latest trunk, and they might do that in a couple of days to a new trunk most likely making this patch useless/incompatible.

sorry for being OT, but felt i needed to explain the request :)
It is here
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: More conditonal orders (r15271)

Post by Terkhen »

IMHO, patches are new features made looking forward to a possible inclusion in trunk, and they should be tested with a trunk revision as current as possible. Maintaining a patch for both 0.7.0 and trunk can add a lot of work for such little gain, and if you're going to use custom builds there's almost no difference between both versions.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Patch: More conditonal orders (r15271)

Post by Conditional Zenith »

Xanobia wrote: If so i find it 'silly' that patch makers dont release a patch that works with the last stable release of the game making it easier for us non-c++ programmers to combine any number of patches we like.
I find it silly that people complain about stuff they are getting after having contributed nothing towards it, and expecting volunteers to put in more effort than they already have.

And once you have 2 patches, no matter what version they are made for, there is a chance of a conflict which requires resolution (which requires at least a basic understanding of the code). Making them against stable gets us nothing. And it doesn't exactly take programming skills to download the latest trunk source instead of stable source.

Before you start calling things 'silly', you should understand how things work.
Xanobia
Engineer
Engineer
Posts: 9
Joined: 30 Mar 2009 23:16

Re: Patch: More conditonal orders (r15271)

Post by Xanobia »

Conditional Zenith wrote:I find it silly that people complain about stuff they are getting after having contributed nothing towards it, and expecting volunteers to put in more effort than they already have.
I fail to see where i complain about anything? or for that matter where i expect anyone to do anything
When did you start contributing when you first got here? 2 weeks later? 2months? 2 years? maybe, just maybe you should ease up and try and remember how it was for you first time you got 'here'. such arrogance!

Conditional Zenith wrote:And once you have 2 patches, no matter what version they are made for, there is a chance of a conflict which requires resolution (which requires at least a basic understanding of the code). Making them against stable gets us nothing. And it doesn't exactly take programming skills to download the latest trunk source instead of stable source.
Well did you read my post at all or did the 'silly' word just catch you eyes and you went off on that? All you did was looking like an arrogant person.

Conditional Zenith wrote:Before you start calling things 'silly', you should understand how things work.
I was asking in a friendly way and thankfully got a friendly answer from someone else (thank Therken). Your answer only encourage me to say "f*** this" and never waste time on it again. As i stated i have NO C++ experience, but 'wow' maybe i was considering it so i could contribute to this project. But not even I can master C++ in 2 weeks.



Again i apologize for being OT

Terkhen wrote:Maintaining a patch for both 0.7.0 and trunk can add a lot of work for such little gain, and if you're going to use custom builds there's almost no difference between both versions.
Well to be fair there is no maintaining in releasing a patch thats compatible with the latest release, it pretty much a one time deal?
It is here
Terkhen
OpenTTD Developer
OpenTTD Developer
Posts: 1034
Joined: 11 Sep 2008 07:32
Location: Spain

Re: Patch: More conditonal orders (r15271)

Post by Terkhen »

Of course it has to be mantained. If Swallow made a 0.7.0 version and then he decides to add anything to the patch, he would have to mirror the changes in the 0.7.0 version. Double (and complicated) work. If you want a patch that can be applied to stable and forget about any future changes at the patch, grab a version of it just when a new stable version comes out and use it. I just don't see the need since almost everybody that uses patches uses trunk anyways, and playing with trunk only gave me problems once in a full year, and they where solved quickly.
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: More conditonal orders (r15271)

Post by Bilbo »

Xanobia wrote:(tried trunk 16055 for this patch but then Vehicle Console Commands and Close Airport didnt work)
Thats weird, I noticed no conflicts from SVN when updating to 16061. I guess perhaps there is conflict between close airport, my vehicle console commands or this patch. Where exactly is there a problem/patch conflict with your combination?

BTW I have taken out the "skip in N percent of cases" part of this patch, changed it to "Skip randomly in N percent of cases" (it skips randomly, not deterministically, which avoids situations when vehicles could get "in sync" and skip/not skip orders in waves) and uploaded it to flyspray - FS#2840. Maybe that part in that form gets to trunk :)
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)
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: More conditonal orders (r15271)

Post by Bilbo »

Terkhen wrote:... patch that can be applied to stable and forget about any future changes at the patch, grab a version of it just when a new stable version comes out and use it. I just don't see the need...
Maintaining patches for stable makes sense, but usually only for patches that maintain network compatibility (like copy & paste, my vehicle console patch and basically any other GUI/interface improvement), as most multiplayer servers run stable and if you want to play multiplayer, you need to use stable version.

Maintaining this patch also for stable makes little sense, as this patch breaks both network and savegame compatibility.
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)
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Patch: More conditonal orders (r15271)

Post by Conditional Zenith »

Xanobia wrote:
Conditional Zenith wrote:I find it silly that people complain about stuff they are getting after having contributed nothing towards it, and expecting volunteers to put in more effort than they already have.
I fail to see where i complain about anything? or for that matter where i expect anyone to do anything
When did you start contributing when you first got here? 2 weeks later? 2months? 2 years? maybe, just maybe you should ease up and try and remember how it was for you first time you got 'here'. such arrogance!
Calling things silly is what annoyed me. There are plenty of better ways you could have phrased your question, with out calling the author's actions silly. And I'm fairly sure I didn't come here calling things silly without understanding how things worked, most people don't.
Xanobia wrote:
Conditional Zenith wrote:And once you have 2 patches, no matter what version they are made for, there is a chance of a conflict which requires resolution (which requires at least a basic understanding of the code). Making them against stable gets us nothing. And it doesn't exactly take programming skills to download the latest trunk source instead of stable source.
Well did you read my post at all or did the 'silly' word just catch you eyes and you went off on that? All you did was looking like an arrogant person.
See above.
Xanobia wrote:
Conditional Zenith wrote:Before you start calling things 'silly', you should understand how things work.
I was asking in a friendly way and thankfully got a friendly answer from someone else (thank Therken). Your answer only encourage me to say "f*** this" and never waste time on it again. As i stated i have NO C++ experience, but 'wow' maybe i was considering it so i could contribute to this project. But not even I can master C++ in 2 weeks.
No, that's not at all what I was suggesting. There are more options than saying "this is silly" or going away. As I said before, there are many ways you could have just asked your question without saying that the patch author was being silly.
Xanobia wrote: Again i apologize for being OT
I would apologize for calling the author's patching practice silly, but that's just me.
Xanobia
Engineer
Engineer
Posts: 9
Joined: 30 Mar 2009 23:16

Re: Patch: More conditonal orders (r15271)

Post by Xanobia »

Bilbo wrote:Thats weird, I noticed no conflicts from SVN when updating to 16061. I guess perhaps there is conflict between close airport, my vehicle console commands or this patch. Where exactly is there a problem/patch conflict with your combination?
Tried again with 16061 and everything seemed to work, well it compiled only with some warnings (from more conditional orders i think), maybe i screwed something up on previous attempt ;) Anyway thanks for your time Bilbo. :)

Code: Select all

4>..\src\console_cmds.cpp(2191) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
and A LOT of these language warnings

Code: Select all

3>Generating english_US language file
3>c:\Users\XXX\Documents\!!openttd_src_trunk\src\lang\english_US.txt(2683): warning: STR_ORDER_CONDITIONAL_REQUIRES_SERVICE: Param idx #0 '<empty>' doesn't match with template command 'STRING'
3>c:\Users\XXX\Documents\!!openttd_src_trunk\src\lang\english_US.txt(2696): warning: STR_CONDITIONAL_TRUE_FALSE: Param idx #2 'STRING' doesn't match with template command '<empty>'
one set for each language, not sure if it matters? (lack of translation right?)
It is here
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: More conditonal orders (r15271)

Post by Bilbo »

Xanobia wrote:

Code: Select all

4>..\src\console_cmds.cpp(2191) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
Merely a warning, I've fixed that :) I'll release new version of my patch once I add some new features to it :)
Xanobia wrote:and A LOT of these language warnings

Code: Select all

3>Generating english_US language file
3>c:\Users\XXX\Documents\!!openttd_src_trunk\src\lang\english_US.txt(2683): warning: STR_ORDER_CONDITIONAL_REQUIRES_SERVICE: Param idx #0 '<empty>' doesn't match with template command 'STRING'
3>c:\Users\XXX\Documents\!!openttd_src_trunk\src\lang\english_US.txt(2696): warning: STR_CONDITIONAL_TRUE_FALSE: Param idx #2 'STRING' doesn't match with template command '<empty>'
one set for each language, not sure if it matters? (lack of translation right?)
Guess there is problem with the conditional orders+close airports combo, as my console patch does not modify any language files or anything related to translations. It is not lack of translation, just the strings are in wrong format/have wrong number of parameters. Try adding only one patch, then compile, if it works, add only second patch ... that way you can perhaps isolate the cause to single patch.
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)
Xanobia
Engineer
Engineer
Posts: 9
Joined: 30 Mar 2009 23:16

Re: Patch: More conditonal orders (r15271)

Post by Xanobia »

Conditional Zenith wrote:There are more options than saying "this is silly" or going away. As I said before, there are many ways you could have just asked your question without saying that the patch author was being silly.

Try reading what i wrote one more time, and pay attention to the "if so" just 5 words before the silly word, and reading from there its the process of not maintaining a stable 'version' of a patch that strikes me as odd/silly, NOT the patch itself. And i very much would appreciate you not putting opinions/words into my 'mouth'. No-where did i call swallow silly for making a patch I obviously want to use in my own game.
It is here
Xanobia
Engineer
Engineer
Posts: 9
Joined: 30 Mar 2009 23:16

Re: Patch: More conditonal orders (r15271)

Post by Xanobia »

Thx Bilbo for clarifying that :)


I just tried compiling trunk 16061 applying only "More conditional Orders patch 16055" and those language warnings still show

using TortoiseSVN and Microsoft Visual Studio 2008 configured according to the wiki http://wiki.openttd.org/Microsoft_Visua ... s_Editions

(Airport Close and Vehicle Console Commands raised no errors or warnings when compiled alone, apart from tha C4800 warning)
It is here
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Patch: More conditonal orders (r15271)

Post by Conditional Zenith »

Xanobia wrote:
Conditional Zenith wrote:There are more options than saying "this is silly" or going away. As I said before, there are many ways you could have just asked your question without saying that the patch author was being silly.

Try reading what i wrote one more time, and pay attention to the "if so" just 5 words before the silly word, and reading from there its the process of not maintaining a stable 'version' of a patch that strikes me as odd/silly, NOT the patch itself. And i very much would appreciate you not putting opinions/words into my 'mouth'. No-where did i call swallow silly for making a patch I obviously want to use in my own game.
Nowhere did I say that you said that. Swallow did not maintain a stable version of the patch (very few patch authors do, I certainly don't), you said that practice is silly. It seems you are saying Swallow is silly for not maintaining a stable version of the patch (as opposed to making the patch in the first place). Have I made some mistake here?

And I did read your post the first time, including your qualification. I still find your assertion that maintaining patches against trunk instead of stable is a silly way of enhancing the game problematic. Or is that not an assertion you are making?

If I have made some mistake in interpreting your post, then I do apologize. If you phrased it as "why do people make patches against trunk instead of stable?", or even "why isn't there a version of this patch against stable?", or maybe even "could you please make a patch against stable?", instead of "it is silly to maintain patches against trunk instead of stable", you would avoid such confusion over what you meant.
Hirundo
Transport Coordinator
Transport Coordinator
Posts: 298
Joined: 27 Jan 2008 13:02

Re: Patch: More conditonal orders (r15271)

Post by Hirundo »

Bilbo wrote:BTW I have taken out the "skip in N percent of cases" part of this patch, changed it to "Skip randomly in N percent of cases" (it skips randomly, not deterministically, which avoids situations when vehicles could get "in sync" and skip/not skip orders in waves) and uploaded it to flyspray - FS#2840. Maybe that part in that form gets to trunk :)
Did you use shared orders to test this? Which shared orders such 'waves' should not occur.

FYI, due to issues with the PBS lookahead code I fear both your and my patch have very little chance to be trunked, regardless of quality. Especially the random part of your patch will be problematic.

I saw and see little point in maintaining a separate patch for 0.7.0 since most people will use trunk anyway. If you want, backporting is relatively easy and involves little more than changing the savegame version in two places.
Create your own NewGRF? Check out this tutorial!
User avatar
Bilbo
Tycoon
Tycoon
Posts: 1710
Joined: 06 Jun 2007 21:07
Location: Czech Republic

Re: Patch: More conditonal orders (r15271)

Post by Bilbo »

Swallow wrote: Did you use shared orders to test this? Which shared orders such 'waves' should not occur.

FYI, due to issues with the PBS lookahead code I fear both your and my patch have very little chance to be trunked, regardless of quality. Especially the random part of your patch will be problematic.

I saw and see little point in maintaining a separate patch for 0.7.0 since most people will use trunk anyway. If you want, backporting is relatively easy and involves little more than changing the savegame version in two places.
Well, I have not actually tested it, though I changed it to random to be sure. From what I saw in the patch, the counter is in the order, so with shared orders it should not be a problem, but there still could be issues with synchronizing between different order sets targeting the same station. And my patch basically contain only the random part :)

Although in game, I think differences between my and your approach will be minimal.

I split that part off of your patch because I saw posts from devs telling about the problematic part "If next station accepts..." involving some complicated lookaheads, so I thought that the "random skip" (or "skip n out of 100 cases") alone would have better chance of getting to trunk (and it is the part I personally need more than conditional orders regarding next station cargo acceptance)

What is exactly the problem with PBS lookahead code? It is problem only with the conditional orders regarding next station, or also with the random skip code?

Technically I wonder how that could be a problem, since in case of currently used conditional orders of load percentage and reliability, any PBS lookahead have basically same chance of predicting jump as for the random order.

And I don't want to backport this patch to 0.7.0 - as it does not preserve network compatibility, I think it's pretty pointless :)
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)
User avatar
SirXavius
Transport Coordinator
Transport Coordinator
Posts: 302
Joined: 28 Jun 2006 18:25
Location: Florida

Re: Patch: More conditonal orders (r15271)

Post by SirXavius »

OK Zenith and Xanobia, let's drop the debate. I have been where you both are, in the middle of a contentious debate over semantics, meanwhile, readers who are gleaning information from the thread are getting PO'd at having to be in the middle of this. You obviously don't agree on the word 'silly', now can one of you be a gentleman and just drop it?

Thanks from all of us... :roll:
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 11 guests