Log for #openttd on 4th September 2018:
Times are UTC Toggle Colours
00:22:57  *** chomwitt has quit IRC
00:49:38  *** Samu has quit IRC
01:17:55  *** Gustavo6046 has quit IRC
01:18:38  *** Gustavo6046 has joined #openttd
01:31:47  *** glx has quit IRC
01:36:03  *** WWacko1976-work has joined #openttd
01:53:11  *** KouDy has quit IRC
02:04:43  *** Flygon has joined #openttd
02:37:41  *** rocky113844 has joined #openttd
02:54:26  *** KouDy has joined #openttd
03:02:51  *** KouDy has quit IRC
03:22:50  *** Supercheese has joined #openttd
03:34:45  *** haudrauf has quit IRC
03:35:44  *** haudrauf has joined #openttd
03:46:37  *** KouDy has joined #openttd
03:53:22  *** KouDy has quit IRC
04:00:22  *** KouDy has joined #openttd
04:06:23  *** rocky113844 has quit IRC
04:15:49  *** sim-al2 has joined #openttd
04:23:07  *** ttech2 has joined #openttd
04:24:04  *** wodencafe has joined #openttd
04:26:31  *** cboyd_ has quit IRC
04:26:31  *** greeter has quit IRC
04:26:31  *** rocky1138 has quit IRC
04:26:31  *** cHawk has quit IRC
04:26:31  *** Ttech has quit IRC
04:27:54  *** rocky1138 has joined #openttd
04:29:50  *** greeter has joined #openttd
04:31:27  *** cHawk has joined #openttd
05:07:47  *** KouDy has quit IRC
05:16:29  *** KouDy has joined #openttd
05:53:46  *** Supercheese has quit IRC
05:54:08  *** Supercheese has joined #openttd
05:55:53  *** sla_ro|master has joined #openttd
06:01:42  *** snail_UES_ has joined #openttd
06:14:42  *** sla_ro|master has quit IRC
06:31:17  *** Progman has joined #openttd
06:35:31  *** andythenorth has joined #openttd
06:47:43  *** snail_UES_ has quit IRC
06:56:01  *** roidal has joined #openttd
07:04:44  *** andythenorth has quit IRC
07:25:24  *** roidal has quit IRC
07:32:23  *** Supercheese has quit IRC
07:32:44  *** Supercheese has joined #openttd
07:50:48  *** andythenorth has joined #openttd
07:52:10  *** snail_UES_ has joined #openttd
07:56:11  *** Supercheese has quit IRC
08:27:24  *** snail_UES_ has quit IRC
09:11:30  *** Groope has joined #openttd
09:11:51  <Groope> Hey, does automatic signal placement works in Chris Sawyer's locomotion or just in OPEN TTD ?
09:18:08  <peter1138> Does it it work in Microsoft Train Simulator?
09:20:21  <peter1138> Locomotion is a commercial game from 2004. It's not related to OpenTTD.
09:23:43  <Groope> okey, but there is any way to put signals automatically ? or I have to install them one by one ?
09:30:34  <peter1138> In Locomotion? No idea, haven't played it for over a decade.
09:30:52  <peter1138> IIRC Locomotion's signals are too basic to be able to do much useful with.
09:58:40  *** Samu has joined #openttd
10:07:58  <Samu> andythenorth: hey, what is the name of that roadhaul newgrfs that was used to test notroadtypes? i wanna try the equivalent version for 1.8.0, do youknow the name?
10:08:06  <Samu> wanna test the engines
10:09:04  <Samu> btw, did you fix the articulated vehicles issue?
10:10:45  *** Groope has quit IRC
10:12:08  <andythenorth> road hog?
10:12:34  <Samu> yes i think
10:14:44  <Samu> gonna test the articulated part precisely with the ai
10:14:47  <Samu> see what it choses
10:36:38  *** Samu has quit IRC
10:36:50  *** Samu has joined #openttd
10:42:11  <Samu> you don't have any articulated mail truck that is faster than the non articulated counterpart. The way I have the AI set up, it would always look for the fastest engine
10:43:02  <Samu> which means, no articulated chosen, hmm i gotta make a few changes
10:45:47  <Samu> oh, i see a window of opportunity between 1968 and 1971
10:46:33  <Samu> before goldmire courier truck is available, quickset box truck is the fastest mail truck and is articulated
10:46:42  <Samu> let's test
10:57:48  *** andythenorth has left #openttd
11:20:14  *** KouDy has quit IRC
12:02:23  *** chomwitt has joined #openttd
12:10:23  <Samu> it is done, AI is now refit and articulated viable!
12:10:33  <Samu> for road vehicles
12:42:47  *** KouDy has joined #openttd
12:50:31  *** sla_ro|master has joined #openttd
13:16:22  *** snail_UES_ has joined #openttd
13:20:23  <Samu> darn, lost helicopters are annoying
13:20:45  <Samu> how do they end trying to go to an hangar of an airport that does not exist anymore
13:20:52  <Samu> a* hangar
13:50:14  *** nielsm has joined #openttd
13:57:27  *** sla_ro|master has quit IRC
13:58:09  <Samu> okay, i found the problem
13:58:56  <Samu>
13:59:18  <Samu> this does not include orders of the kind "nearest hangar"
13:59:39  <Samu> "service at nearest hangar"
13:59:44  <Samu> it fails to detect
14:00:03  <Samu> that a vehicle is heading to the hangar
14:00:27  <Samu> bug or intended?
14:03:16  *** chomwitt has quit IRC
14:07:47  *** Progman has quit IRC
14:14:09  *** chomwitt has joined #openttd
14:21:19  <Eddi|zuHause> nielsm: so, are you volunteering to host a party for the next commit, then? :p
14:21:53  <nielsm> nah
14:22:25  <Eddi|zuHause> (also, didn't we already have an r25k party, how can we then celebrate 23k now?)
14:23:26  <nielsm> the 23k is linear count from now until beginning of the master branch, while 25k is number of svn revisions across all branches
14:26:37  *** HeyCitizen has joined #openttd
14:29:16  *** HeyCitizen_ has quit IRC
14:30:41  <Samu> what is ResolveOrderPosition doing
14:30:43  <Samu>
14:31:17  <Samu> I am trying to skip orders to the next
14:32:01  <Samu> AIOrder.SkipToOrder(i, AIOrder.ResolveOrderPosition(AIOrder_ORDER_CURRENT) == 0 ? 1 : 0);
14:32:14  <Samu> orderlist only contains 2 orders
14:32:23  <Samu> is this gonna do what I want?
14:33:51  <Samu> hmm
14:34:06  <Samu> AIOrder.SkipToOrder(i, AIOrder.ResolveOrderPosition(AIOrder.ORDER_CURRENT) == 0 ? 1 : 0);
14:34:46  *** Tweeterman has joined #openttd
14:35:11  *** snail_UES_ has quit IRC
14:37:18  <Tweeterman> I can't find a Japanese Track set for the Total Bridge Renewal Japan GRF.  Any help?
14:38:25  <Samu> not familiar with that newgrf
14:45:45  *** Tweeterman has quit IRC
14:45:58  <Samu> I am the worst coder in the world
14:46:11  <Samu> AIOrder.SkipToOrder(i, AIOrder.ResolveOrderPosition(i, AIOrder.ORDER_CURRENT) == 0 ? 1 : 0);
14:46:24  <Samu> 3rd fix on the same line
14:46:24  <Samu> lol
15:14:16  *** IgnoredAmbience has joined #openttd
15:27:57  *** Wormnest has joined #openttd
15:30:06  *** WWacko1976-work has quit IRC
15:50:39  *** streen has joined #openttd
15:51:12  *** streen has left #openttd
15:53:30  *** sla_ro|master has joined #openttd
16:01:33  *** KouDy has quit IRC
16:02:56  *** Thedarkb has joined #openttd
16:11:56  *** frosch123 has joined #openttd
16:14:34  *** andythenorth has joined #openttd
16:24:51  *** flitz has joined #openttd
16:25:01  <flitz> [test]
16:29:35  *** Thedarkb has quit IRC
16:31:42  *** Thedarkb has joined #openttd
16:34:21  <andythenorth> @seen alberth
16:34:21  <DorpsGek> andythenorth: alberth was last seen in #openttd 2 days, 2 hours, 46 minutes, and 1 second ago: <Alberth> less confused now :)
16:34:23  <andythenorth> oof
16:37:19  *** HerzogDeXtEr has joined #openttd
16:39:30  *** Flygon has quit IRC
16:59:51  *** Wormnest has quit IRC
17:02:43  <flitz> Hi. I just wanted to revive an old openttd project of mine. I switched the trunk URL I used to use to the new github one and wanted to update the +openttd master branch on it. But during the merge my old version of the game's files and the current master have merge conflicts in almost 400 +files. So it seems like a nightmare to merge the 2 versions.
17:05:57  <nielsm> not sure if this is the best way, but assuming your old work is based on the pre-github move tree, it might be best to first rebase your work onto the equivalent revision of your old base in the new repository
17:06:19  <nielsm> and then merge in the changes from then until current head
17:07:00  <nielsm> i.e. start out with what is hopefully a clean rebase and then do the "dirty" merge after that
17:07:18  *** Wormnest has joined #openttd
17:07:56  *** greeter has quit IRC
17:07:56  *** cHawk has quit IRC
17:07:56  *** Laedek_ has quit IRC
17:08:11  *** Laedek has joined #openttd
17:08:17  *** cHawk has joined #openttd
17:08:46  *** greeter has joined #openttd
17:10:15  <Eddi|zuHause> yeah, don't switch to github "head", but to github "old revision that you had back then"
17:11:39  <Eddi|zuHause> from there, you can also try to make smaller steps to upgrade to non-conflicting revisions
17:12:37  <Eddi|zuHause> as always with jobs that seem overwhelmingly complex and hard, separate them into easier smaller steps
17:17:46  *** IgnoredAmbience has left #openttd
17:24:14  *** Wolf01 has joined #openttd
17:24:30  <Wolf01> o/
17:24:56  <LordAro> flitz: rebase --onto is useful here
17:28:21  <flitz> I was also already thinking about just dropping my old git history and applying the patch in small chunks onto the new tree. that would give me the opportunity to review it. but its still a lot of work with about ~10k lines of code in the patch
17:33:36  <Eddi|zuHause> really, i would start patching the old revision, as then you can commit it to git and have an easy fallback if you make mistakes updating
17:33:38  <Wolf01> andythenorth:
17:34:10  <Eddi|zuHause> then maybe try bisecting the update so you identify which revisions conflict
17:34:29  <Eddi|zuHause> if you know the revision that conflicts, you often get an idea from there how to resolve the conflict
17:35:11  *** KouDy has joined #openttd
17:49:56  *** ToBeFree has joined #openttd
17:52:09  <andythenorth> so should I get Dwarf Fortress?
17:52:18  <Wolf01> Yes, definitely
17:58:55  *** HeyCitizen has quit IRC
18:00:42  <frosch123> only if you can survive blinking text
18:00:57  <frosch123> i couldn't
18:02:01  *** HeyCitizen has joined #openttd
18:03:11  <DorpsGek_II> [OpenTTD/OpenTTD] RailwAI opened issue #6890: Crash: disconnecting road vehicle
18:03:11  *** Progman has joined #openttd
18:05:18  <LordAro> that's a new one
18:05:20  *** Wacko1976 has joined #openttd
18:05:46  <frosch123> or a old one
18:06:17  <LordAro> possibly
18:06:20  <LordAro> the message is weird
18:06:46  <frosch123> hmm, it's a new one
18:06:47  *** tokai has joined #openttd
18:06:47  *** ChanServ sets mode: +v tokai
18:06:59  <frosch123> it's the standard message when people change vehicle grfs in game
18:07:03  <frosch123> but the gamelog is fine
18:07:04  <nielsm> let's see where the message exists
18:07:39  <nielsm>  roadveh_cmd.cpp
18:08:03  <LordAro> road vehicle trying to split itself?
18:08:33  <nielsm> FollowPreviousRoadVehicle returning INVALID_TRACKDIR
18:08:39  <frosch123> i can only imagine it being a timing problem
18:08:42  <LordAro> removing a road piece under an articulated road veh?
18:08:49  <LordAro> i'm speculating wildly here
18:08:54  <nielsm> yeah it smells a bit like the road disappearing
18:08:57  <frosch123> like the ai being able to reverse vehicles in weird spots
18:09:02  <frosch123> or selling/buying them
18:09:17  <frosch123> or removing tracks beneath a vehicle
18:12:12  <LordAro> can't manage to remove a road beneath a road vehicle myself
18:12:18  <LordAro> could need some AI preciseness
18:12:28  <nielsm> far too many ways FollowPreviousRoadVehicle can return INVALID_TRACKDIR
18:12:49  <frosch123> if it is reproducible with the ai, you can print the commands
18:13:00  <frosch123> LordAro: maybe depot, road stop, level crossing, ...
18:13:03  <nielsm> might be reversing while entering/leaving a depot or wormhole
18:13:15  <LordAro> frosch123: aye
18:13:22  <frosch123> yeah, or tunnel, bridge, ...
18:13:47  *** tokai|noir has quit IRC
18:14:09  <Wolf01> Had a lot of those in NRT when vehicles tried to take the wrong path
18:14:31  <Wolf01> Like, eltrams trying to go on non electric rail
18:14:36  <frosch123> ah, so also removing/adding tram/road to existing road/tram :)
18:15:03  <frosch123> so many options :)
18:15:29  <LordAro> nooo
18:16:56  <nielsm> if it's even reproducible (need to let the save run for 11+ years??) it's probably a good idea to augment the code to print some more details on the failed movement
18:17:19  <Wolf01> Agreed
18:17:34  <Wolf01> I had the same discussion with my coworkers today
18:17:35  <frosch123> usually crash.sav is sufficient
18:17:37  <frosch123> but it is missing
18:17:55  <frosch123> crash.sav contains everything
18:18:07  <frosch123> *would
18:19:10  <LordAro> frosch123: not if it's AI triggered
18:19:43  <frosch123> crash.sav, not crash.png
18:20:03  <frosch123> crash.sav contains the broken rv, and you can check the landscape around it and guess what changed
18:20:12  <nielsm> well it happens inside the roadveh movement code, not as a result of another command
18:20:36  <frosch123> it most likely happens directly after a command
18:22:04  <nielsm> oh it's one-and-a-half year, not eleven years, the save needs to run
18:22:20  <andythenorth> hmm
18:22:27  <andythenorth> I was testing a set of patches for NML
18:22:33  * andythenorth looks for those
18:22:40  <frosch123> nielsm: yes, but it is not exactly a light-cpu game :p
18:22:43  <andythenorth> it was 3 weeks ago :P
18:23:36  <andythenorth> oh here we go
18:23:42  *** [1]sim-al2 has joined #openttd
18:23:42  *** sim-al2 is now known as Guest2407
18:23:42  *** [1]sim-al2 is now known as sim-al2
18:23:55  <andythenorth> I had fixes
18:24:12  <andythenorth> and then there's the prop 28 question
18:24:24  <andythenorth> nielsm: ^ not sure how to best integrate those patches
18:25:23  <nielsm> lol buoys
18:26:00  <frosch123> 1999-05-30, this takes ages :p
18:26:41  <andythenorth> also what are those terrible newgrf ships :P
18:26:59  <frosch123> dbg: [sprite] Tried to load character sprite #15 as a recolour sprite. Probable cause: NewGRF interference <- is that their fault?
18:27:09  <nielsm> lol
18:27:31  <andythenorth> more terrible grf choices :P
18:27:46  <LordAro> haha
18:27:51  *** Guest2407 has quit IRC
18:28:16  <andythenorth> oh there was this too
18:28:22  <andythenorth> so many things I should do :P
18:28:39  <LordAro> oh yeah, that thing
18:28:49  <LordAro> still no idea how to fix that properly
18:29:13  <frosch123> more coffee?
18:29:15  *** gelignite has joined #openttd
18:29:30  <LordAro> smacking apple upside the head for using a completely separate version scheme
18:29:48  <andythenorth> class action suit? :P
18:30:02  <andythenorth> it's the only thing that gets Apple's attention :P
18:31:27  <LordAro> could hardcode a "if apple, version number is actually this" set of rules
18:31:42  <LordAro> or could finish TB's cmake build system
18:32:02  <andythenorth> for now, I have a workaround
18:32:20  <andythenorth> it builds, we have a probably cause
18:32:29  <andythenorth> so cmake? :P
18:32:50  <LordAro> mm.
18:33:50  <nielsm> almost aug 7 2000
18:34:06  <nielsm> okay doesn't reproduce in this build at least
18:34:10  <nielsm> (it's not 1.8.0)
18:34:37  <frosch123> LordAro: is it known that cmake fixed it, or is that only hopeful thinking?
18:37:41  <LordAro> frosch123: hopeful, but expected, iirc
18:41:48  *** sim-al2 has quit IRC
18:42:55  <nielsm> okay doesn't reproduce in my vanilla 1.8.0 install either
18:45:48  <DorpsGek_II> [OpenTTD/OpenTTD] nielsmh commented on issue #6890: Crash: disconnecting road vehicle
18:46:28  <frosch123> nielsm: there are tons of Random calls in the ai
18:47:36  <nielsm> but aren't those supposed to be deterministic too?
18:47:55  <nielsm> or are they Actually Random?
18:48:17  <nielsm> (since AI only runs on the host in multiplayer, and not every client, afaik)
18:48:18  <frosch123> i think ai random seed it not store
18:48:27  <frosch123> iirc ottd only has two random seeds
18:48:35  <frosch123> one for gameplay, which ai must not used
18:48:41  <frosch123> and a second one for client stuff
18:51:52  * nielsm looks at the time
18:52:04  <frosch123> 20:52
18:52:07  <nielsm> late, haven't had much food yet, need to run out
18:53:04  *** sim-al2 has joined #openttd
18:53:09  <andythenorth> deliveroo :D
18:59:37  <Eddi|zuHause> i just made some freezer food in the oven
19:00:18  <frosch123> do you also cook food in the fridge?
19:01:44  <andythenorth> I cook the oven in the fridge
19:01:50  <andythenorth> and freezer the fridge in the food
19:02:17  <Samu> how do I use CONFIG_RANDOM flag?
19:02:24  <Eddi|zuHause> or i fridge food in the cooker?
19:02:34  <Samu> doesn't seem to work, I am randomizing PASS and MAIL choice
19:02:39  <Samu> it always picks PASS
19:04:41  *** KouDy has quit IRC
19:05:18  <Eddi|zuHause> oha, it's no longer "public transport", it's now "Mobility as a Service"
19:06:36  <andythenorth> that happened
19:06:53  <andythenorth> I need alberth as a service
19:07:02  <andythenorth> or at least someone else who will indulge my GS idea
19:07:14  <andythenorth>
19:08:23  <andythenorth> I could have called it 'credit mobilier'
19:08:39  <andythenorth> which is has echoes of mobility-as-a-service :P
19:08:47  <Samu> help!
19:08:51  <andythenorth>
19:09:01  <Samu> it always picks PASS, nor MAIL, why!
19:09:05  <Samu> it should be random
19:09:47  <Samu> wiki doesn't have a clear example :(
19:11:31  <Samu> forgot to copy paste the labels
19:12:28  <Eddi|zuHause> that name sounds familiar somehow
19:19:25  <Eddi|zuHause> andythenorth: using fixed regions based on map size might not be that useful of an idea, if that region doesn't actually contain a significant portion of land
19:20:59  <Eddi|zuHause> andythenorth: in theory you could go through the map adding up all the land tiles, and then choosing a point where x% of the landmass is to decide the origin area
19:22:40  <andythenorth> good point
19:22:49  <andythenorth> this is oriented to railroad construction
19:23:01  <andythenorth> I hadn't considered water map cases, or non-rail transport types :P
19:24:40  <Eddi|zuHause> "Can a cargo monitor detect origin of cargo on delivery?" <-- in theory the game could do that, but i doubt that GS currently has access to that kind of information
19:28:23  <andythenorth> it doesn't
19:28:38  <andythenorth> the stuff at the bottom is older ideas
19:29:03  <andythenorth> I reduced it to 'connecting towns'
19:30:12  <Eddi|zuHause> so essentially an extension of the "subsidies" of the original game
19:30:45  <Eddi|zuHause> "establish a connection of <cargo> between <town> and <town>"
19:31:46  <Eddi|zuHause> the existing code to check for subsidy completion could be used to trigger a response from the GS to fulfill a goal?
19:43:42  *** flitz has quit IRC
19:44:13  *** gelignite has quit IRC
19:45:34  <andythenorth> yes I wondered about that
19:45:49  <andythenorth> it's perhaps just a more structured way to generate subsidies?
19:45:55  <andythenorth> or at least that might be worth exploring
19:46:15  <andythenorth> so the subsidies are for a deliberate graph, in sequence
19:46:18  <andythenorth> not just random
19:49:01  *** sim-al2 has quit IRC
20:11:26  *** sla_ro|master has quit IRC
20:13:42  <Eddi|zuHause> yeah, something like that
20:18:13  <andythenorth> is there a name for a graph that has a specific layout on a grid?
20:18:27  <andythenorth> most graphs I've encountered are not anchored to a plane
20:18:41  <Eddi|zuHause> "embedded"
20:19:33  <andythenorth> I am way out of my depth
20:19:49  <andythenorth> but I need something like, given an array of town x,y pairs
20:20:00  <andythenorth> generate a weighting of nodes that implies an order
20:20:09  <andythenorth> with some nodes equally weighted to allow randomness
20:20:44  <andythenorth> then x% of nodes at each weight must be connected before unlocking the next tier
20:21:39  <Eddi|zuHause> well, you already chose an origin, so you can calculate a distance to that origin
20:22:02  <Eddi|zuHause> and then divide a range of distances into groups
20:22:31  <Eddi|zuHause> you don't even need a graph for that
20:23:31  <andythenorth> so just bands of the map
20:23:36  <andythenorth> along an axis
20:23:39  <Eddi|zuHause> pretty much
20:23:40  <andythenorth> 32 tiles or so
20:23:45  *** nielsm has quit IRC
20:23:54  <Eddi|zuHause> more like x% of the map
20:23:55  <andythenorth> so it's a side note that it's a graph, not the implementation
20:24:26  <Eddi|zuHause> x% of the distance between the chosen origin and final destination
20:24:50  <Eddi|zuHause> where the method of choosing those is a separate issue
20:33:32  <andythenorth> thanks
20:33:35  * andythenorth bed
20:33:40  *** andythenorth has quit IRC
20:36:28  *** HerzogDeXtEr has quit IRC
21:04:26  <Samu> Wormnest: can you help me ?
21:04:48  <Samu> CONFIG_BOOLEAN in AIInfo doesn't work for me, or I can't manage to make it work
21:07:40  <Samu> Users won't explicitly set the value, it'll get a random value between min_value and max_value.
21:07:51  <Samu> i can't manage to make it work :(
21:10:23  <Wormnest>  Check how other ai´s use it
21:11:17  <Samu> do you know any ai using it? :(
21:18:16  <DorpsGek_II> [OpenTTD/OpenTTD] bou6 opened issue #6891: Question Building the project on Windows
21:20:29  <LordAro> well that's not an issue
21:22:16  <Wolf01> 'night
21:22:18  *** Wolf01 has quit IRC
21:29:06  <Samu> Wormnest: can't find any ai that uses it
21:29:14  <Samu> so far, still on E
21:29:20  <Samu> doing the search alphabetically
21:29:33  *** andythenorth has joined #openttd
21:35:14  <Wormnest> Samu: idk where you are looking but at least WormAI uses it
21:36:09  <Samu> oh, ok let me check
21:37:11  <Samu> oh crap, I meant to say CONFIG_RANDOM
21:37:16  <Samu> not CONFIG_BOOLEAN :(
21:39:50  *** Thedarkb has quit IRC
21:39:55  <Samu> my bad
21:40:12  <Samu> CONFIG_RANDOM is what doen't work for me, sorry about that
21:46:46  *** andythenorth has quit IRC
21:48:12  <Samu> I looked through them all
21:48:25  <Samu> no AI uses CONFIG_RANDOM flag
21:48:38  <Samu> I wonder if this feature actually works
21:50:49  *** rocky113844 has joined #openttd
22:02:20  *** Thedarkb has joined #openttd
22:08:50  <Samu> AHA
22:09:03  <Samu> i think I figured it out
22:09:54  <Samu> the AI must be selected from the pool of Random AIs
22:10:22  *** Wormnest has quit IRC
22:11:37  *** frosch123 has quit IRC
22:20:12  *** snail_UES_ has joined #openttd
22:21:06  <Samu> guys, your pseudo random number generator always returns 0
22:23:05  <Samu> this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value - (*it).min_value) + (*it).min_value);
22:23:21  <Samu> max value is 1
22:23:23  <Samu> min value is 0
22:23:40  <Samu> InteractiveRandomRange dude has always returned 0
22:23:46  <Samu> out of 14 times
22:23:51  <Samu> that's not very random
22:25:08  <Samu> line 39 of script_config.cpp
22:28:39  <Samu> peter1138: can u look into this?
22:31:09  <Samu> out of 42 times, always 0
22:31:15  <Samu> should I go on?
22:41:42  <Samu> this->SetSetting((*it).name, InteractiveRandomRange((*it).max_value + 1 - (*it).min_value) + (*it).min_value);
22:41:46  <Samu> this fixes it
22:42:01  <Samu> change max_value to max_value + 1
22:42:14  <Samu> because max_value is exclusive
22:43:40  <Samu> for anyone reading :(
22:44:41  <acklen> I was waiting for your 43rd try
22:45:19  <Samu> heh, can you fix it?
22:45:52  *** Thedarkb has quit IRC
22:46:13  <acklen> so, 1-0 doesn't work, but 2-0 does?
22:49:21  <Samu> yes
22:50:04  <Samu> Pick a random number between 0 and \a limit - 1, inclusive.
22:50:11  <Samu> 2-1 = 1
22:50:23  <Samu> 1-0 = 0
22:50:30  <Samu> no wonder it was always returning 0
22:51:23  <Samu> plz fix :) i wanna use this feature in the AI
23:07:55  *** sim-al2 has joined #openttd
23:16:01  *** sim-al2 has quit IRC
23:28:37  <Samu>
23:28:46  <Samu> someone ploz, :(

Powered by YARRSTE version: svn-trunk