Back to Home / #openttd / 2012 / 09 / Prev Day | Next Day
#openttd IRC Logs for 2012-09-11

---Logopened Tue Sep 11 00:00:47 2012
00:15-!-sla_ro|master [slaco@] has joined #openttd
00:56-!-Eddi|zuHause [] has quit []
00:56-!-Eddi|zuHause [] has joined #openttd
01:10-!-Supercheese [~Password4@] has joined #openttd
01:23-!-Prof_Frink [~proffrink@] has quit [Ping timeout: 480 seconds]
01:59<Supercheese>Are there vehicle variables that determine whether a vehicle is moving upwards/downwards on a slope?
01:59<Supercheese>so that you could provide separate sprites for inclined vehicles?
02:01<Supercheese>well, not so much "moving on a slope" as "is on a slope"
02:10<Supercheese>Hmm, timezones must mean fewer people are on here right now
02:10<__ln__>or maybe not timezones, just that it's early morning
02:11<Supercheese>It's 11:11 PM here
02:11<Supercheese>Ergo, timezones
02:12<__ln__>i think the concept of timezones insults people who believe the world is flat.
02:13<Supercheese>So be it :)
02:15<__ln__>11:11 PM is pacific time or something?
02:16<Supercheese>Yep, GMT -8 (not accounting for daylight savings wizardry)
02:16<Supercheese>I have no idea if daylight savings means I'm effecively -7 right now, -8, or -9 :S
02:17*Supercheese wonders if other countries have daylight savings or equivalents
02:17<__ln__>unfortunately most countries do
02:17<Supercheese>yep, looks like it
02:18<Supercheese>Hmm, I don't see any vehicle variables for slope-status
02:24-!-M1zera [] has joined #openttd
02:35<Hirundo>Supercheese: You can check the z-pos, if it is not divisible by 8 you are on a slope
02:35-!-fjb [] has joined #openttd
02:35<Supercheese>Oh, that would work I suppose
02:36<Supercheese>check direction is easy
02:37<Hirundo>I'm not sure if it's that easy, to determine whether you're going up or down
02:37<Supercheese>symmetrical vehicles shouldn't matter
02:37<Supercheese>but yeah, non-symmetric hmm
02:38<Supercheese>wait... is symmetrical or symmetric the correct adjective
02:38<Hirundo>Even for symmetric vehicles there are both both / (going up) and \ (going down) sprites
02:38<Hirundo>I dunno... non-native speaker here
02:39<Supercheese>looks like symmetric, from quick Googling
02:41-!-Zeknurn` [] has quit [Remote host closed the connection]
02:41-!-Zeknurn [] has joined #openttd
02:42<Supercheese>Oh, I see what you mean now
02:42<Supercheese>Guess you'd have to... store the previous Z pos temporarily?
02:42-!-Mucht [] has joined #openttd
02:43-!-M1zera [] has quit [Quit: Miranda IM! Smaller, Faster, Easier.]
02:44<Hirundo>you can't store stuff either temporarily or permanently for vehicles
02:44<Hirundo>(by design)
02:44-!-Mucht [] has quit [Remote host closed the connection]
02:44<Supercheese>Well, that wasn't what I'm working on right now anyway, just a thought I had (that others likely have had before)
02:45<Hirundo>AFAIK CETS has something similar, but they compose a vehicle out of several parts
02:45<Hirundo>so you can obtain the z differences between them and use that to pick your sprite
02:46<Supercheese>that would indeed do it
03:08<@Terkhen>good morning
03:21-!-fjb [] has quit [Ping timeout: 480 seconds]
04:20<@Terkhen>hi planetmaker
04:20-!-cypher [] has joined #openttd
04:26-!-George|2 [~George@] has joined #openttd
04:26-!-George is now known as Guest6620
04:26-!-George|2 is now known as George
04:30-!-Guest6362 [~George@] has quit [Ping timeout: 480 seconds]
04:36-!-DDR [] has quit [Quit: for the love of god this is not safe for work]
04:42-!-HerzogDeXtEr1 [~Flex@] has joined #openttd
04:48-!-HerzogDeXtEr [~Flex@] has quit [Ping timeout: 480 seconds]
05:29-!-Devroush [] has joined #openttd
05:37-!-FLHerne [] has joined #openttd
05:41-!-sla_ro|master [slaco@] has quit [Quit: DANGER is OFFLINE DANGER]
05:41-!-fjb [] has joined #openttd
05:44-!-cypher [] has quit [Quit: Miranda IM! Smaller, Faster, Easier.]
05:49-!-FLHerne [] has left #openttd []
05:51-!-KingJ [~KingJ-OFT@] has quit [Quit: ZNC -]
06:01<NGC3982>I fail to find documentation on this
06:01<NGC3982>But, the Vacuum Tube Train NewGRF only supports goods/pax/mail?
06:05<V453000>I think so
06:29-!-Mucht [] has joined #openttd
06:30-!-FlyingFoX [] has joined #openttd
06:31-!-cypher [] has joined #openttd
06:34-!-cypher [] has quit []
07:05-!-Snail [] has joined #openttd
07:30-!-Supercheese [~Password4@] has quit [Read error: Connection reset by peer]
07:31-!-Supercheese [~Password4@] has joined #openttd
07:36-!-Snail [] has quit [Ping timeout: 480 seconds]
07:48-!-sla_ro|master [slaco@] has joined #openttd
08:03-!-Elukka [] has joined #openttd
08:40-!-Zeknurn [] has quit [Read error: Connection reset by peer]
08:41-!-Zeknurn [] has joined #openttd
08:44-!-M1zera [] has joined #openttd
08:45-!-M1zera [] has quit []
09:06-!-TheMask96 [] has quit [Ping timeout: 480 seconds]
09:11-!-TheMask96 [] has joined #openttd
09:47-!-valhallasw [] has joined #openttd
09:50-!-Rhamphoryncus [] has quit [Quit: Rhamphoryncus]
10:16-!-M1zera [] has joined #openttd
10:41-!-argoneus [] has joined #openttd
10:52-!-TheMask96 [] has quit [Ping timeout: 480 seconds]
11:00-!-TheMask96 [] has joined #openttd
11:13-!-KopjeKoffie [] has joined #openttd
11:30-!-andythenorth [] has joined #openttd
11:32-!-valhallasw [] has quit [Read error: Operation timed out]
11:32-!-onix [] has joined #openttd
11:33<@Terkhen>hi onix
11:34<onix>i am freaking out a little bit....just installed openttd for the first to railway stations....connected them via a depot....can buy wagons but no locomotives....its the year 1950 :/
11:35<@planetmaker>any newgrfs?
11:35<@planetmaker>or just the default install and no mods / extensions / whatever?
11:35<onix>dont know?
11:36<onix>just installed..maybe i did click something? how can i check it?
11:36<@planetmaker>they're not active without some interference, so you should be safe.
11:36<@planetmaker>is it a scenario or a self-created random map?
11:37<onix>the acivated newgrf list is empy
11:37<onix>random map
11:37<@planetmaker>and the railtype?
11:37<@planetmaker>and the climate?
11:38<onix>climate? "normal" one :) grass :D
11:38<onix>railtype? dunno...should i create a new map or can i check it?
11:39<@planetmaker>you can probably build normal rail or electrified
11:39<@planetmaker>so no desert and snow anywhere, right? then it's temperate :-)
11:39<onix>yep temperate
11:42<onix> am i blind? do i do something wrong?
11:43<@Terkhen>if you are playing temperate, without newgrfs, using default railtype, in 1950, you should be able to build trains
11:43<@planetmaker>^^ yes. I'm not at home. Otherwise I'd ask you to post a savegame of what you just started playing
11:44<@planetmaker>to me it looks like you might have loaded an (old) broken scenario
11:44<@planetmaker>but on a new random map that should just show you some engines in 1950
11:44<@Terkhen>please upload a complete screenshot that shows the date, you can use ctrl+s for this
11:45*Terkhen is not at home either
11:45<KopjeKoffie>i´m @ home!
11:46<onix>2050...started a new map
11:46<onix>so in 2050 there are no more maps?
11:47<onix>i mean trains :D
11:47<@Terkhen>in 2050 you will not have default trains
11:47<@Terkhen>try maglev
11:48<onix>my fault :(
11:48<@Terkhen>but in 1950 you should have default trains too
11:50<Eddi|zuHause>onix: click on the little train icon in the main toolbar, then you get to the train list, there you have a button "available vehicles". if this list shows more vehicles than your depot, you have chosen the wrong railtype
11:50<Eddi|zuHause>onix: to change railtypes, click and hold the rail icon
11:51<onix>aaaaaah cool :)
11:51<onix>thank you!
11:51-!-valhallasw [] has joined #openttd
11:52<Bad_Brett>Anyeone with a creative idea on how to add company colors on this one?
11:54<Elukka>hm. bright company colors sorta look awkward on old stuff like that
11:55<Eddi|zuHause>Bad_Brett: the jackett of the driver, and/or the roof of the wagon?
11:55<Eddi|zuHause>Bad_Brett: or a sign on the side of the wagon?
11:57<Bad_Brett>jacket or sign might be to small to see at normal zoom level... I guess the roof or the wooden part would be the best
11:58<Eddi|zuHause>the wooden things that hold the oxes?
11:59<Eddi|zuHause>Bad_Brett/Supercheese: had any chance to test the patches i posted?
11:59<Bad_Brett>i meant the wagon. perhaps i could make some nice pattern on the roof
12:00<Bad_Brett>Nope... I read your post but unfourtunately I have no clue on how to run the patch :)
12:00<Eddi|zuHause>Bad_Brett: well. try one of the compiling guides on the wiki :)
12:01<Bad_Brett>Hehe... I will, but I've been busy animating those godamn oxen all afternoon :)
12:02-!-onix [] has quit [Quit: ajax IRC Client]
12:02<Bad_Brett>Oh well... guess it's time to learn
12:03-!-KenjiE20 [] has quit [Remote host closed the connection]
12:04-!-kais58 [] has quit [Ping timeout: 480 seconds]
12:11<Bad_Brett>Installing now... let's see if I can get this to work
12:12<V453000>does that SkiddLow guy talk any sense at all ever, or is that just me?
12:12<V453000>I havent yet understood a single of his contributions on the forums
12:12<V453000>ok maybe some pointless ones :>
12:13<Eddi|zuHause>V453000: that's what you get for using online translators...
12:13<V453000>holy shit :D
12:13<Eddi|zuHause>i'm sure he's a nice kid and all, but what he does doesn't help his cause.
12:14<Eddi|zuHause>i have also no clue whether he actually understands any of the answers
12:14<V453000>guess he doesnt if he takes it from the translator
12:14<V453000>yeah that is a shame
12:15-!-FLHerne [] has joined #openttd
12:19<@planetmaker>Well, I think he posted sprites in the WAS thread
12:22-!-pugi [] has joined #openttd
12:44-!-keoz [] has joined #openttd
12:50-!-Markavian [] has joined #openttd
12:55-!-Markavian` [] has quit [Ping timeout: 480 seconds]
12:57-!-Alberth [~hat3@2001:980:272e:1:21a:92ff:fe55:fc8d] has joined #openttd
12:57-!-mode/#openttd [+o Alberth] by ChanServ
12:59<@Terkhen>hi Alberth
13:00-!-andythenorth [] has quit [Quit: andythenorth]
13:09-!-andythenorth [] has joined #openttd
13:21-!-frosch123 [] has joined #openttd
13:24-!-Markavian` [] has joined #openttd
13:30-!-glx [glx@2a01:e35:2f59:c7c0:3d96:da43:5ad0:65aa] has joined #openttd
13:30-!-mode/#openttd [+v glx] by ChanServ
13:30-!-keoz [] has quit [Quit: keoz]
13:31<Supercheese>Oh sheesh, this Skiddlow guy
13:31<Supercheese>reading his posts gives me a headache
13:31-!-Markavian [] has quit [Ping timeout: 480 seconds]
13:31<frosch123>whose posts don'T?
13:32<@planetmaker>it's very difficult to read. But he's kind. He's making an honest effort.
13:32<Supercheese>I'm tempted to just dismiss him as an imbecile, but then he posts decent screenshots and contributes sprites to WAS
13:32<@planetmaker>If you don't understand him either ignore it or ask kindly
13:32<Supercheese>so I cannot merely dismiss him
13:33-!-TheMask96 [] has quit [Ping timeout: 480 seconds]
13:33<Supercheese>He is indeed trying
13:34<@planetmaker>and that needs a lot of courage and persistence in what he does
13:35<Supercheese>Ooh, an ox cart
13:35<Bad_Brett>yep! you asked for it :)
13:36<@planetmaker>sports time... see you later
13:36<Supercheese>I hope it can be easily split apart into three components, to facilitate coding it as a vehicle
13:36<Bad_Brett>that's the idea
13:36<Supercheese>two* components
13:36<Supercheese>since the first two pairs of oxen will be the same
13:37<Supercheese>are you planning to code your graphics into a grf yourself, or has anyone volunteered to do it?
13:37<Supercheese>or neither?
13:37<Bad_Brett>they're actually a bit different so it might very well be three parts
13:37<Supercheese>you can use random bits to make the oxen vary slightly though they use the same sprites
13:37-!-TheMask96 [] has joined #openttd
13:37-!-KenjiE20 [] has joined #openttd
13:38<Bad_Brett>that's right... good idea
13:39<Bad_Brett>well... at first i was hoping that someone would help me, but with nml i can do much of it on my own
13:39<Supercheese>If you need help, I volunteer :)
13:39<Bad_Brett>really? much appreciated
13:40<Supercheese>just let me release my next grf first, should happen later today :)
13:40<Bad_Brett>yes, of course... nothing is ready here anyway :)
13:41<Supercheese>Well, even with no sprites yet, there's a lot of coding groundwork to be done
13:41<Supercheese>(and there are a few sprites)
13:41<Bad_Brett>what kind of grf are you going to release?
13:41<Supercheese>arg, damn enter key
13:41<Supercheese>a "fake subway" grf
13:41<Supercheese>where subway consists are coded as road vehicles
13:41<Bad_Brett>cool! do you have any pictures?
13:42<Supercheese>not yet, part of what I need to do
13:42<Supercheese>it's got some limitations and issues, but they're fairly minor IMHO
13:42<Supercheese>have a class to get to shoot
13:42<Supercheese>be back later
13:42<Bad_Brett>see youy
13:43<Bad_Brett>have fun now :)
13:48-!-M1zera [] has quit [Quit: Miranda IM! Smaller, Faster, Easier.]
13:56-!-Biolunar [] has joined #openttd
14:09-!-DDR [] has joined #openttd
14:25-!-Progman [~progman@] has joined #openttd
14:33-!-Hyronymus [] has quit [Quit: Hyronymus]
14:35-!-Hyronymus [] has joined #openttd
14:37-!-andythenorth [] has left #openttd []
14:49<__ln__>@seen Bjarni
14:49<@DorpsGek>__ln__: Bjarni was last seen in #openttd 48 weeks, 4 days, 18 hours, 29 minutes, and 54 seconds ago: <Bjarni> heh
15:00-!-Hyronymus1 [] has joined #openttd
15:01-!-Alberth [~hat3@2001:980:272e:1:21a:92ff:fe55:fc8d] has left #openttd []
15:03-!-Hyronymus [] has quit [Ping timeout: 480 seconds]
15:06-!-sla_ro|master [slaco@] has quit [Quit: DANGER is OFFLINE DANGER]
15:12<Eddi|zuHause>his previous "famous last words" were way better :)
15:18<Bad_Brett>Eddi: compiling your patched version right now... should i use variable 0xB8?
15:21<Eddi|zuHause>i can not guarantee that it works, though
15:21<Bad_Brett>alright, i'll give it a try
15:21<Eddi|zuHause>and the order of the offsets is reversed now, it starts at 255 and counts down to 0 before it moves
15:23<Bad_Brett>ok... but that shouldn't really matter, right?
15:23<Eddi|zuHause>oh, i think i found the first error/corner case. the range that i map to might be 256..1, so the patch may need an additional -1 in the formula
15:23<Eddi|zuHause>but that is uncritical, so i'll wait for your test before i update
15:24<Bad_Brett>sounds good
16:01-!-M1zera [] has joined #openttd
16:06-!-Xaroth [] has joined #openttd
16:11<Eddi|zuHause>that is borderline evil...
16:31<@Terkhen>good night
16:33-!-Mucht [] has quit [Remote host closed the connection]
16:46<NGC3982>__ln__: SFW?
16:49<__ln__>NGC3982: very
16:49<NGC3982>Hah, harr.
16:49<NGC3982>That's a good one.
16:50-!-keoz [] has joined #openttd
16:52-!-roadt [~roadt@] has quit [Ping timeout: 480 seconds]
16:54-!-Chris_Booth [] has joined #openttd
16:54-!-Hyronymus1 [] has quit [Quit: Hyronymus1]
17:02-!-keoz [] has quit [Quit: keoz]
17:04-!-Frankr [] has joined #openttd
17:05<Bad_Brett>ok, i keep getting that "No available language packs" error, though i definately built "langs" as well... what files do i need to copy to run the game?
17:07<Bad_Brett>nevermind, found it
17:08<Bad_Brett>sorry :)
17:11-!-Prof_Frink [~proffrink@] has joined #openttd
17:19-!-argoneus [] has quit [Ping timeout: 480 seconds]
17:24<NGC3982>Why onearth is that spelled with an i.
17:31-!-FLHerne [] has left #openttd []
17:32<Bad_Brett>alright, it works... now, how can I access variable 0xB8?
17:34-!-Pixa [~pixa@] has joined #openttd
17:41-!-LordPixaII [~pixa@] has quit [Ping timeout: 480 seconds]
17:43-!-frosch123 [] has quit [Remote host closed the connection]
17:46-!-Progman [~progman@] has quit [Remote host closed the connection]
17:50-!-Chris_Booth [] has quit [Quit: ChatZilla [Firefox 16.0/20120904124322]]
17:58<Eddi|zuHause>if you use NML
17:58<Eddi|zuHause>(obviously you'd just write "B8" in NFO :p)
17:59<Bad_Brett>oh thanks... it's that easy? :)
17:59<Eddi|zuHause>NGC3982: because "finite" is derived from latin
18:00<NGC3982>Ah, yes. That sounds logical.
18:01<Eddi|zuHause>(same root as the word "finish", btw)
18:09<Bad_Brett>hmm... i see no difference... maybe i failed to apply the patch
18:11-!-Frankr [] has quit [Read error: Connection reset by peer]
18:12-!-Frankr [] has joined #openttd
18:25-!-Devroush [] has quit []
18:29<NGC3982>I dont understand this
18:30<NGC3982>What's up with Germany's stop-n-turn's with the nuclear reactors?
18:30<Eddi|zuHause>Bad_Brett: did you apply all three patches?
18:31<Eddi|zuHause>Bad_Brett: how did you apply the patches, did you recompile afterwards, was the game closed during that recompilation, and did you start the right .exe?
18:35-!-valhallasw [] has quit [Ping timeout: 480 seconds]
18:43-!-M1zera [] has quit [Read error: Connection reset by peer]
18:46<Bad_Brett>i applied them using tortoiseSVN before compiling...
18:51<Bad_Brett>perhaps i need to update openttd.grf
18:52-!-fjb [] has quit [Ping timeout: 480 seconds]
19:21<Supercheese>Can one use the refit_cost callback for a vehicle that changes length when refiting to refund money when refitting down to fewer parts and then charge more money when refitting back to more parts?
19:23-!-Stimrol [] has quit [Quit: ZNC -]
19:26<Eddi|zuHause>Supercheese: afair that should be possible
19:26-!-cypher [] has joined #openttd
19:26<Eddi|zuHause>Bad_Brett: no changes to openttd.grf are necessary
19:28-!-Stimrol [] has joined #openttd
19:30<Bad_Brett>then i'm clueless. the variable works, but only the first sprite is shown so it seems to be cache issue, which suggests that i didn't patch it properly
19:31<Bad_Brett>the problem is that it looks patched and I have recompiled it several times... maybe supercheese can get it running?
19:43<Eddi|zuHause>it might well be that my anticache-hack may be wrong/nonfunctional
19:44<Eddi|zuHause>but i can't investigate that at this time
19:46<Bad_Brett>yep... it's bedtime
20:00<Supercheese>err, hmm
20:00<Supercheese>does NML have a mask() function?
20:01<Supercheese>guess I can try it first
20:02-!-pugi [] has quit []
20:03<Supercheese>or bit shifting? urg
20:04<Supercheese>I'm wanting to extract the cargo subtype from extra_callback_info1
20:04<Supercheese>which "contains information about the target cargo type in the format 0xccccsstt"
20:04<Supercheese>I'm interested in the "ss"
20:05<Supercheese>do I have to do something like the "<<" operation?
20:09<Supercheese>I'm thinking I do
20:10<Supercheese>and I shall try it
20:11<Bad_Brett>are you working on the subway mod?
20:12<Bad_Brett>looking forward to try it
20:12<Bad_Brett>if you get the time, perhaps you could try eddi's patch because i couldn't get it to work (which probably is due to some mistake i did) :)
20:13<Eddi|zuHause>Supercheese: there are occasionally special functions to decompose these things
20:13<Supercheese>yeah, been interested in that
20:13<Supercheese>I'm trying to compute the difference between the current cargo subtype and the target subtype
20:13<Supercheese>something like:
20:13<Supercheese>(extra_callback_info1 << 4) - cargo_subtype
20:13<Supercheese>if that operator does what I think it does
20:14<Eddi|zuHause>that is probably wrong
20:15<Supercheese>Or I suppose I could accomplish roughly the same thing by testing to see if the Nth vehicle's capacity
20:15<Supercheese>is equal to 0 or not
20:15<Eddi|zuHause>you cannot query Nth vehicle during callbacks
20:15<Supercheese>which will essentially return the current refitted length (which is based on cargo subtype)
20:15<Supercheese>oh nevermind then
20:16<Eddi|zuHause>because you cannot be sure that the callback might change the Nth vehicle
20:17<Eddi|zuHause>anyway, you could try "var[0x10,8,0xFF]" or similar
20:18-!-cypher [] has quit [Quit: Miranda IM! Smaller, Faster, Easier.]
20:18<Supercheese>var[0x10,8,0xFF] - cargo_subtype
20:18<Supercheese>would return the difference I'm seeking?
20:19<Eddi|zuHause>no guarantees
20:24<Supercheese>well, it compiled
20:25<Supercheese>now to see if it works
20:25<Supercheese>Huzzah, it does
20:26<Supercheese>thanks :D
20:27<Supercheese>Although it looks rather silly to see "Cost of refit: {red}-$19,680"
20:28<Supercheese>it functions as desired
20:30<Eddi|zuHause>that is probably worth a bug report
20:30<Supercheese>I'll get to it after I finish adding these switch blocks
20:32<Supercheese>Sheesh, it amazes me how small compiled .grfs are
20:32<Supercheese>stuff is packed very efficiently in there
20:34<Eddi|zuHause>well CETS is several MB :)
20:34<Supercheese>but it can compress into a tiny .7z
20:34<Eddi|zuHause>even though the source is only several 100 kB :)
20:35<Supercheese>Well, I just proved a section of the NML tutorial false
20:35<Supercheese>guess I have to edit it now to fix it :P
20:36<Supercheese>Refitting to change # of parts: "There's no way to charge the user for puchasing the extra vehicle part."
20:36<Supercheese>But I just did! :D
20:37<Eddi|zuHause>the tutorial is possibly older than the refit cost callback
20:37<Supercheese>it is indeed
20:37<Supercheese>hence why I'll update it once I'm sure of my method
20:37<Eddi|zuHause>and quite certainly older than the ability to charge negative cost
20:37<Supercheese>although perhaps I should file the bug report first
20:37<Supercheese>sheesh, so much to do @_@
20:40<Supercheese>I also have to work on my university homework T_T
20:40<Supercheese>too bad I'm not a comp sci major, maybe I could be getting credit for this :P
20:45<Supercheese>Oh snap another problem: you build the vehicle, add carriages via refit, are charged for those carriages, but you aren't refunded that cost when you sell the vehicle
20:45<Supercheese>workaround is to refit back down to the default smallest before sale
20:46<Supercheese>then you are refunded
20:46<Supercheese>and even then, if you have an old vehicle, you can "sell" those carriages via refit for the same cost as you paid
20:46<Supercheese>no depreciation
20:53<Eddi|zuHause>Supercheese: i have no solution for the first problem, but the vehicle value you can get from var 0xDC
20:55<Eddi|zuHause>so you can solve the second problem by scaling the refit cost by *current_vehicle_value/orig_vehicle_value [those variables do not exist (yet)]
20:56<Supercheese>what formula does the game use to depreciate old vehicles?
20:56<Eddi|zuHause>"49 B Incremented daily, when the low 3 bits are zero (i.e. every 8 days) vehicle's value is reduced by 1/256"
20:56<Supercheese>I figure taking whatever depreciation value is used, multiplying by vehicle age, and subtracting that from the refit refuding
20:56<Supercheese>might work too
20:57<Supercheese>Every 8 days, the vehicle value decreases by 1/256?
20:57<Eddi|zuHause>that is an exponential function, so you likely cannot reproduce it through NFO/NML
20:57<Supercheese>So the vehicle loses .39% of its current value every 8 days
20:57<Supercheese>if my logic is correct
20:57<Eddi|zuHause>at least that is what i think, not actually checked
20:58<Supercheese>problem is that .39% is recursive, depending on current value at each of those steps
20:58<Supercheese>or wait
20:58<Eddi|zuHause>that is what i just said
20:58<Supercheese>is the vehicle value that is looked up by that variable
20:58<Supercheese>the current value anyway
20:58<Eddi|zuHause>yes, that is the current value
21:00<Eddi|zuHause>src/vehicle.cpp:1071: v->value -= v->value >> 8;
21:00<Eddi|zuHause>that line probably hasn't been touched in a long time
21:00-!-fjb [~frank@] has joined #openttd
21:01<Eddi|zuHause>so it's using shifts instead of arithmetics
21:01<Eddi|zuHause>but x>>8 is equivalent to x/256 (as long as x is positive, at least)
21:02<Supercheese>Well for my grf the refit cost is very closely related to the purchase cost
21:02<Supercheese>that might help
21:02<Supercheese>adding 2 more carriages costs virtually the same as buying another copy of the vehicle
21:02<Supercheese>so if I take vehicle current value, divide by 2
21:02<Supercheese>that should be the depreciated sale value of one carriage
21:03<Supercheese>(the vehicle is initially purchased as a 2-car consist)
21:03<Supercheese>refittable between 2-8 carriages
21:03<Supercheese>lemme try that logic, see if it works
21:04-!-Snail [] has joined #openttd
21:09<Supercheese>Or maybe not divided by 2, since I guess for articulated vehicles that variable returns only 1 vehicle's value?
21:09<Supercheese>seemingly, anyhow
21:12<Supercheese>Oh jeez, that's not it
21:12<Supercheese>the value seems to be fluctuating wildly
21:12<Eddi|zuHause>@calc ln(255/256)/3/ln(2)
21:12<@DorpsGek>Eddi|zuHause: Error: 'ln' is not a defined function.
21:13<Eddi|zuHause>@calc log(255/256)/3/log(2)
21:13<@DorpsGek>Eddi|zuHause: -0.00188218771371
21:13<Supercheese>oh the value isn't a byte
21:13<Supercheese>it's a "long", or some such
21:14<Eddi|zuHause>internally it's a "long long", but NFO/NML cannot handle that, so it is clamped to "long"
21:14<Eddi|zuHause>no, byte: FF, word: FFFF, long [or double word]: FFFFFFFF
21:14<Supercheese>oh, dang
21:14<Supercheese>even longer
21:15<Eddi|zuHause>and long long would be FFFFFFFFFFFFFFFF
21:15<Supercheese>var[0xDC,0,0xFFFFFFFF] , then
21:15<Eddi|zuHause>it doubles each time :)
21:16<Eddi|zuHause>that looks correct
21:16<Supercheese>(probably shoulda asked that first :P )
21:16<Eddi|zuHause>Supercheese: articulated parts likely have a value of 0
21:17<Eddi|zuHause>not sure about the rear end of a dual headed vehicle
21:17<Eddi|zuHause>that may have a value
21:18-!-fjb [~frank@] has quit [Ping timeout: 480 seconds]
21:18<Supercheese>yeah, I was presuming incorrectly
21:18<Supercheese>since I was masking for a byte, not a long
21:19<Supercheese>oh sheesh, the value's all over the place now again
21:20<Eddi|zuHause>that usually means you changed the wrong part of the code, or you did not compile, or you did not reload after compile
21:20<Supercheese>overflow issue perhaps?
21:21<Supercheese>I'm multiplying the returned long value by up to 6
21:21<Supercheese>and that's returned as the max refit refund
21:21<Eddi|zuHause>it overflows when it reaches 2 billion pound
21:21<Supercheese>not that, then
21:21<Eddi|zuHause>oh wait
21:21<Eddi|zuHause>you have callback result
21:21<Supercheese>within the switch block
21:21<Eddi|zuHause>that is only 15 bit
21:22<Eddi|zuHause>so 16 thousand pound?
21:22<Supercheese>yeah, the max values are decidedly more than that
21:22<Supercheese>~$228,000 max values
21:23<Eddi|zuHause>then that needs further investigation, which i cannot do right now
21:23<Supercheese>All right, thanks for your help
21:25-!-Biolunar_ [] has joined #openttd
21:28-!-Biolunar_ [] has quit []
21:29-!-Biolunar [] has quit [Read error: Operation timed out]
21:44-!-roadt [~roadt@] has joined #openttd
21:47-!-Frankr [] has quit [Quit: ChatZilla [Firefox 15.0/20120824154833]]
21:49-!-glx [glx@2a01:e35:2f59:c7c0:3d96:da43:5ad0:65aa] has quit [Quit: bye]
22:05-!-tokai|noir [] has joined #openttd
22:05-!-mode/#openttd [+v tokai|noir] by ChanServ
22:10-!-tokai|mdlx [] has quit [Ping timeout: 480 seconds]
22:30-!-Elukka [] has quit []
22:36-!-Bad_Brett [] has quit [Ping timeout: 480 seconds]
22:37-!-Bad_Brett [] has joined #openttd
23:23-!-CIA-2 [] has quit [Read error: Operation timed out]
23:37-!-Rhamphoryncus [] has joined #openttd
23:43-!-Bad_Brett [] has quit []
23:44-!-Bad_Brett [] has joined #openttd
23:56-!-Snail [] has quit [Quit: Snail]
---Logclosed Wed Sep 12 00:00:48 2012