IRC logs for #openttd on OFTC at 2014-07-30
⏴ go to previous day
00:07:48 *** Hazzard has joined #openttd
00:34:45 *** luaduck is now known as luaduck_zzz
00:41:56 *** Flygon_ has joined #openttd
00:43:58 *** Flygon__ has joined #openttd
03:08:32 *** bdavenport has joined #openttd
04:31:32 *** KWKdesign has joined #openttd
04:56:16 *** Eddi|zuHause has joined #openttd
05:32:22 *** zeknurn has joined #openttd
06:29:10 *** sla_ro|master has joined #openttd
07:21:22 *** Myhorta has joined #openttd
07:43:00 *** tokai|mdlx has joined #openttd
09:25:52 *** HerzogDeXtEr has joined #openttd
09:59:45 *** Midnightmyth has joined #openttd
10:30:28 *** zeknurn` has joined #openttd
10:35:33 *** zeknurn` is now known as zeknurn
11:00:57 *** LadyHawk has joined #openttd
11:12:00 *** Jinassi has joined #openttd
11:32:18 *** Supercheese is now known as Guest4282
11:32:20 *** Supercheese has joined #openttd
11:49:48 *** KWKdesign has joined #openttd
11:54:25 *** pthagnar has joined #openttd
11:58:37 *** KWKdesign has joined #openttd
11:59:18 *** b_jonas has joined #openttd
12:05:49 *** shirish has joined #openttd
12:46:07 *** luaduck_zzz is now known as luaduck
12:47:27 <luaduck> anyone know if it's possible to dump company data eg. profit, value etc at the end of each round?
12:47:36 <luaduck> had a feature request that we have leaderboards
12:49:49 <keoz> Question about hg: how do I update to new trunk revisions a precedent trunk source which I modified without losing my changes ?
13:04:21 <keoz> mmh looks "hg pull" is just enough :)
13:07:15 <planetmaker> luaduck, use admin port
13:08:12 <luaduck> what's the command on admin to dump that data
13:08:19 <luaduck> b/c lazy and I just want to mod soap
13:08:27 *** Alberth has joined #openttd
13:08:27 *** ChanServ sets mode: +o Alberth
13:08:48 <planetmaker> you will need to teach soap to get those info
13:09:54 <luaduck> yeah I'm aware of that
13:10:04 <luaduck> just wondered what I need to send to adminport to get it to dump that data
13:10:29 <luaduck> oh, ADMIN_UPDATE_COMPANY_STATS
13:10:30 <planetmaker> a packet to request that info
13:11:20 <luaduck> I wonder if there's a handler in libottdadmin2 for that
13:13:35 <luaduck> probably easiest to write some kind of handler for this instead of trying to integrate it into soap
13:13:53 <luaduck> will need to dump it just before the map reloads
13:14:07 <planetmaker> might be easier, yes
13:14:21 <luaduck> what'd be the easiest way to time it
13:14:27 <luaduck> just do it like a year before the end date?
13:15:17 <planetmaker> Well, or at the end date. Whenever you decide that it should end. You could also use that to determine the end
13:15:34 <planetmaker> soap doesn't do that, that admin port could decide to pause at end date, get data and restart
13:15:41 <planetmaker> just make sure to make the project public :) You probably are not the only one who can make use of it.
13:15:53 <luaduck> my python skills are awful
13:16:04 <luaduck> if I FOSS it everyone will point and laugh
13:16:55 <planetmaker> nor anyone can learn from it. Nor make use it. And everyone has to re-invent the wheel
13:17:04 <planetmaker> nor anyone can improve it
13:17:18 <planetmaker> openttd would not be there with *that* attitude
13:17:48 <luaduck> anyway if I do it on the end date isn't there a chance the game itself will just restart on its own
13:17:53 <luaduck> and I won't be able to get data out in time
13:18:07 <luaduck> plus I'll have to keep polling for the current date which seems wasteful
13:18:11 <planetmaker> why would openttd restart on its own?
13:18:47 <planetmaker> oh, there is such var? I never knew :)
13:19:14 <luaduck> basically it just issues newgame
13:21:10 *** tokai|noir has joined #openttd
13:21:10 *** ChanServ sets mode: +v tokai|noir
13:29:20 <peter1138> If you're using the admin port you can use that to restart the game instead, can't you?
13:31:39 <planetmaker> that's what I suggested :)
13:32:40 <planetmaker> it would even easily allow time-variable end condition. Like having reached a population of XX in your town, transported XX cargo of type Y or at least 500 trains in game...
13:54:59 *** MTsPony_zzz has joined #openttd
13:54:59 *** MTsPony_zzz is now known as MTsPony
14:44:56 *** Myhorta has joined #openttd
15:00:06 *** MTsPony has joined #openttd
15:18:55 *** TheMask96 has joined #openttd
15:32:58 *** Hazzard has joined #openttd
15:53:21 *** Jinassi has joined #openttd
15:57:05 *** DorpsGek` has joined #openttd
15:57:05 *** ChanServ sets mode: +o DorpsGek`
15:59:48 *** sla_ro|master has joined #openttd
15:59:48 *** ToBeFree has joined #openttd
15:59:48 *** Cybertinus has joined #openttd
15:59:48 *** jjavaholic has joined #openttd
15:59:48 *** Kurimus has joined #openttd
15:59:48 *** peter1138 has joined #openttd
15:59:48 *** xintron has joined #openttd
15:59:48 *** Prof_Frink has joined #openttd
15:59:48 *** dihedral has joined #openttd
15:59:48 *** Terkhen has joined #openttd
15:59:48 *** Born_Acorn has joined #openttd
15:59:48 *** coulomb.oftc.net sets mode: +oov peter1138 Terkhen Terkhen
15:59:48 *** DorpsGek` is now known as DorpsGek
16:02:49 *** V453000 has joined #openttd
16:02:49 *** fonsinchen has joined #openttd
16:02:55 *** ChanServ sets mode: +v peter1138
16:02:55 *** ChanServ sets mode: +o SmatZ
16:03:19 *** planetmaker has joined #openttd
16:03:42 *** ChanServ sets mode: +o planetmaker
16:06:08 *** Hazzard has joined #openttd
16:06:08 *** Alberth has joined #openttd
16:06:08 *** LadyHawk has joined #openttd
16:06:08 *** Stimrol has joined #openttd
16:06:08 *** jpierre03 has joined #openttd
16:06:09 *** TinoDidriksen has joined #openttd
16:06:09 *** NGC3982 has joined #openttd
16:06:09 *** michi_cc has joined #openttd
16:06:09 *** solenoid.oftc.net sets mode: +ov Alberth michi_cc
16:07:11 *** ChanServ sets mode: +v Alberth
16:18:30 *** oskari89 has joined #openttd
16:27:34 *** Pensacola has joined #openttd
16:36:51 *** HerzogDeXtEr has joined #openttd
16:55:44 *** sla_ro|master has joined #openttd
16:59:29 *** Progman has joined #openttd
17:14:38 *** frosch123 has joined #openttd
17:21:45 <DorpsGek> Commit by rubidium :: r26708 /trunk (Makefile.grf.in media/extra_grf/assemble_nfo.awk) (2014-07-30 17:21:42 UTC)
17:21:46 <DorpsGek> -Codechange: replace C preprocessor with all kinds of options to prevent adding certain things to the result and the sed script to remove everything that shouldn't be in the resulting nfo file but came out of the C preprocessor by a small-ish awk program. This means no more breaking if a C preprocessor decides to add more data to the processed file (like GCC's inclusion of stdc-predef.h when not passing (1 more message)
17:31:04 *** jjavaholic has joined #openttd
17:48:00 *** jjavaholic has joined #openttd
18:38:10 *** andythenorth has joined #openttd
18:54:01 <Eddi|zuHause> andythenorth: could you walk me through your compiling process? because i have the feeling you missed a step and are now trying to fix things at the wrong level
18:54:20 <andythenorth> here or in a paste?
18:54:32 <andythenorth> and the one that works, or the one that doesn't?
18:54:59 <Eddi|zuHause> i have a firs checkout
18:55:11 <andythenorth> there’s a brnach
18:55:32 <andythenorth> partial_compiles
18:55:48 <andythenorth> I hope you’re correct because the solution is getting too string-laden
18:55:58 <andythenorth> whereas with Iron Horse, it was ~trivial
18:57:15 <andythenorth> Eddi|zuHause: got the branch?
18:59:41 *** shirish has joined #openttd
19:00:46 <andythenorth> so at the top level
19:01:01 <andythenorth> python + templates -> pnml -> nml -> nfo -> grf
19:01:13 <andythenorth> the ‘problem’ lies in the nml -> nfo step
19:01:51 <andythenorth> nmlc doesn’t appear to write (most) industry and cargo strings unless a grf header is present
19:02:01 <andythenorth> unlike for trains, where it writes a nice action 4 near the action 0
19:02:14 <Eddi|zuHause> why is there are generated_pnml and a generated/pnml?
19:02:52 <andythenorth> generated_pnml might be legacy crap
19:02:57 <andythenorth> I haven’t pushed for a while
19:03:06 <andythenorth> I don’t have many atomic commits, didn’t push much non-working code
19:03:47 <andythenorth> what does hg st say about it?
19:04:28 <Eddi|zuHause> loads of "? generated_pnml/blah.pnml"
19:04:53 <Eddi|zuHause> ok, let's ignore that.
19:05:10 <Eddi|zuHause> let's look at the generated/nml files
19:05:16 <andythenorth> that is the only interesting thing
19:05:51 <Eddi|zuHause> there's a header.nml and loads of industry_name.nml?
19:06:10 <andythenorth> I don’t remember where I last committed, but all the cargos should now be in header.pnml
19:06:16 <andythenorth> which solves the cargo strings issue
19:07:19 <Eddi|zuHause> yes, there are some cargos in there
19:07:40 <Eddi|zuHause> i'm not seeing any dummy callback that references the industry strings, though
19:08:34 <andythenorth> that version won’t work though
19:08:43 <andythenorth> it produces industries with 2 action 3s
19:09:02 <andythenorth> the dummy callback route doesn’t work at all without a grf header
19:09:11 <andythenorth> and even then it writes the strings in the wrong order
19:10:13 * andythenorth wishes for commits of older non-working code
19:10:35 <andythenorth> I can recreate it if you want
19:10:40 <andythenorth> I’d like to solve this
19:12:37 <Eddi|zuHause> because that looks like it shouldn't be in the header...
19:13:20 <Eddi|zuHause> and if that is meant to be filtered out, then it shouldn't be before the cargo stuff
19:13:29 <andythenorth> currently I’m not filtering
19:13:39 <andythenorth> on the basis that filtering isn’t very reliable
19:14:47 <andythenorth> the version of the repo you can see is a version that is simply never going to wrok
19:15:05 *** Myhorta has joined #openttd
19:15:40 <Eddi|zuHause> the way i see it, you have too much stuff in there that is meant to do actual work, and not "dummy callback"-like
19:16:02 <Eddi|zuHause> it's too different from what i have in CETS, anyway
19:16:31 <Eddi|zuHause> the point of the dummy callback is that it shouldn't do anything at all. ever. so it doesn't matter if it's repeated in every file
19:16:58 <andythenorth> it just doesn’t work
19:17:10 <andythenorth> give me 20 mins, I’ll put it back, we can read nml src and figure out what it’s doing
19:19:27 <andythenorth> ah r3953 has some dummy stuff in
19:19:51 <Eddi|zuHause> so i go back to that?
19:20:13 <Eddi|zuHause> can you give me the hash? my revisions might not match
19:20:25 <andythenorth> might not be a working compile
19:20:29 <andythenorth> or might have other wrong stuff in
19:20:46 <andythenorth> a simple test is to paste the dummy nml into an industry and try compiling to nfo
19:20:52 <andythenorth> bypass all the linking and crap
19:21:20 <Eddi|zuHause> that is r3963 here
19:21:39 <Eddi|zuHause> so we have an offset of 10
19:23:54 <andythenorth> render the dummy with the render_nml_nfo script
19:24:01 <andythenorth> bail when the nfo stuff kicks in
19:24:05 <andythenorth> paste the result into an industry
19:24:25 <andythenorth> watch it astoundingly write out no strings
19:24:39 <andythenorth> add a grf header, it will write strings
19:24:43 <andythenorth> was a few days ago
19:25:34 <Eddi|zuHause> so, i ran make, and it did stuff
19:26:33 <Eddi|zuHause> what's the command i should run?
19:26:55 *** Progman_ has joined #openttd
19:27:05 <Eddi|zuHause> oh, it's in src. not in scripts...
19:30:04 *** Progman_ is now known as Progman
19:30:06 <andythenorth> this dummy is wrong
19:30:10 <Eddi|zuHause> so i have a dummy.pnml
19:31:52 <andythenorth> it’s not what you’re looking for
19:32:11 <andythenorth> 3952 looks closer
19:32:18 <andythenorth> or whatever your rev is
19:34:00 <Eddi|zuHause> that one gives loads of nforenum errors
19:35:34 <andythenorth> then try compiling with nmlc
19:37:04 <Eddi|zuHause> that seems to already be in the nml files
19:38:09 <andythenorth> pastebin sulks about many lines
19:39:00 <andythenorth> and you might well think, “where are the action 4s?” o_O
19:40:14 <Eddi|zuHause> that doesn't even load
19:42:05 <Eddi|zuHause> but anyway, it doesn't actually matter if there are action4's in the industry file. if you put the dummy also in the header file, and it generates the action4 there, it should be fine?
19:42:52 <Eddi|zuHause> what's necessary is that the IDs are the same
19:45:52 <andythenorth> couple of minutes, I’ll clean up the compile
19:46:06 <andythenorth> and fish that have TB
19:48:57 *** oskari89 has joined #openttd
19:51:53 <andythenorth> also our shower flooded and the lights are out
19:51:57 <andythenorth> #firstworldproblems
20:06:10 <andythenorth> and aluminium_plant.nfo
20:06:56 <andythenorth> string id for STR_EXTRA_ALUMINUM_PLANT agrees in both
20:07:04 *** Hazzard_ has joined #openttd
20:07:22 <Eddi|zuHause> so are there action4 in the header?
20:07:34 <andythenorth> search for Aluminium or such
20:07:45 <andythenorth> can’t remember what *doesn’t* work with this
20:07:48 <andythenorth> there was something
20:08:00 <Eddi|zuHause> ok, so after combining, this should work
20:08:57 <Eddi|zuHause> does the text "Aluminium plant" appear in that version of the grf?
20:09:49 <andythenorth> the industry name is borked
20:09:57 <andythenorth> all names are DC00 iirc
20:10:13 <andythenorth> which caused me to try and write out multiple action 0 blocks
20:10:24 <andythenorth> which is my commit 3953
20:10:27 <andythenorth> which worked fine
20:10:32 <andythenorth> but then I tried to extend that to cbs
20:10:40 <andythenorth> which is multiple action 3 and no no no
20:11:44 <Eddi|zuHause> where is the industry name set in the nfo?
20:11:53 <andythenorth> resolves to DC00
20:12:14 <andythenorth> L7983 in aluminium plant nfo
20:12:54 <andythenorth> should resolve to DC21 afaict
20:12:55 <andythenorth> STR_IND_ALUMINIUM_PLANT
20:13:30 <Eddi|zuHause> so that's where to look why does it resolve in the callback, but not in the props?
20:13:49 <andythenorth> it shouldn’t resolve to a DC00 at all
20:14:02 <andythenorth> these are D000 texts
20:14:13 <andythenorth> the issue is that we’re dumping it into a cb I think
20:14:29 <andythenorth> action 0 props want a different text range?
20:15:02 <andythenorth> I’m 99% certain that 3953 solves this specific industry name issue
20:16:26 <Eddi|zuHause> so, let's ignore names. which other texts don't show up?
20:17:02 <Eddi|zuHause> you probably need to repeat constructed strings like "string(STR_XXX, param1, param2)" in the dummy callback
20:17:50 <andythenorth> I’m compiling to test
20:19:32 <DorpsGek> Commit by planetmaker :: r26709 /trunk (6 files in 4 dirs) (2014-07-30 20:19:29 UTC)
20:19:33 <DorpsGek> -Fix (r15892 and others) [FS#6069]: [OSX] Compilation fails with some lzo2 versions if we define __LP64__ as 0 instead of checking whether it is defined (kernigh2)
20:19:38 <andythenorth> ok so in 3953, names work, but no extra text shown at all
20:19:49 <andythenorth> my late-night conclusion was that the industry cb prop was set wrong
20:19:52 <andythenorth> but I didn’t check
20:19:58 <andythenorth> I just tried adding the cbs
20:20:07 * andythenorth reads a BIG nfo file
20:20:55 <Eddi|zuHause> you should not add the cbs, only the strings used in the cbs
20:20:55 <planetmaker> ah, well. Wanted to commit that, too
20:21:55 <Eddi|zuHause> planetmaker: so you now need to make an empty commit, so there's a commit message for what you commited before?
20:22:35 <Eddi|zuHause> andythenorth: also you probably can remove loads of stuff from the dummy callback
20:22:44 <andythenorth> the cargo stuff isn’t needed
20:22:50 <Eddi|zuHause> like all the parameters
20:23:00 <andythenorth> sulks without the parameters iirc
20:23:12 <andythenorth> they’re referenced by action 6 or such
20:23:43 <Eddi|zuHause> no, i meant the STR_PARAM_blah
20:25:01 <andythenorth> I just write everything in the lang file
20:25:20 <Eddi|zuHause> neither is it needed, nor is it enough
20:25:41 <Eddi|zuHause> you need to look for all places where you use "string(...)" in callbacks
20:25:51 <Eddi|zuHause> and place these exactly like this in the dummy
20:26:00 <andythenorth> that’s quite onerous
20:26:02 <Eddi|zuHause> it doesn't matter what's in the lang file
20:28:11 <Eddi|zuHause> because nmlc evaluates "string(STR_blah, param1, param2)" into a different ID than "string(STR_blah)" by itself
20:28:27 <Eddi|zuHause> and i suspect that is why your callback texts don't show up
20:29:17 <andythenorth> yup that makes sense
20:29:23 <andythenorth> but I don’t like the manual maintenance route
20:29:44 <andythenorth> if I’m going to write those out, I might as well stickthe industry in the header wrapped in action 6 or such
20:29:56 <andythenorth> at least then it’s maintainable, for same result
20:30:11 <andythenorth> although that might yet fail, for reasons I didn’t forsee
20:30:23 <Eddi|zuHause> what would be the point of that?
20:30:41 <Eddi|zuHause> so you're effectively compiling every industry twice?
20:31:17 <andythenorth> but to do it for only the text cbs is fast
20:31:22 <andythenorth> relative to all the spritelayouts etc
20:31:35 <andythenorth> it’s about 3s, I timed it
20:44:05 <Eddi|zuHause> andythenorth: but you still need to repeat this in every industry file
20:44:57 <andythenorth> seems clunky tbh
20:45:03 <andythenorth> I think it will work, but ugly solution
20:47:39 <andythenorth> but is it uglier than maintaining strings by hand?
20:50:58 <andythenorth> I wonder if I could dump all the strings out into some deps file
21:07:22 *** FLHerne has joined #openttd
21:33:25 *** Hazzard_ has joined #openttd
21:37:02 *** Hazzard__ has joined #openttd
21:57:14 *** MTsPony has joined #openttd
23:35:20 *** Stimrol has joined #openttd
continue to next day ⏵