IRC logs for #openttd on OFTC at 2018-06-10
⏴ go to previous day
01:28:37 *** Thedarkb1-X40 has joined #openttd
01:28:50 *** Thedarkb1 has joined #openttd
04:48:12 *** muffindrake1 has joined #openttd
05:30:02 *** supermop has joined #openttd
05:59:07 *** ToBeFree has joined #openttd
07:03:52 *** themanhimself has joined #openttd
07:04:02 <themanhimself> is anyone willing to play a game with me?
07:43:18 *** Alberth has joined #openttd
07:43:18 *** ChanServ sets mode: +o Alberth
07:52:12 *** sla_ro|master has joined #openttd
07:58:58 *** synchris has joined #openttd
08:08:35 *** andythenorth has joined #openttd
08:13:03 *** themanhimself has joined #openttd
08:13:11 *** Wacko1976 has joined #openttd
08:18:45 *** Wacko1976_ has joined #openttd
08:28:03 *** Progman has joined #openttd
08:53:08 <themanhimself> actually can high fives be three way?
09:28:23 *** HerzogDeXtEr has joined #openttd
09:54:32 *** chomwitt has joined #openttd
10:01:35 *** gelignite has joined #openttd
10:04:18 *** Wacko1976 has joined #openttd
10:14:41 *** ToffeeYogurtPots has joined #openttd
11:42:25 *** Wormnest has joined #openttd
11:46:53 *** andythenorth_ has joined #openttd
11:47:39 <Wolf01> Mmmh why they do this... Updating a purchased route, I have a pro account do download at max speed etc, limit of 200MB/day -> broken route because I hit the limit
11:53:36 <nielsm> is DOS still a fully supported platform?
11:54:16 <nielsm> I think there are a few platforms that lack a GetTime() implementation to get milliseconds (or greater) precision timestamps
11:54:46 <LordAro> DOS doesn't have networking
11:54:57 <LordAro> oh, and no one's tried in months :p
11:55:21 <nielsm> does a C++11 compiler even exist that can target DOS?
11:56:20 <nielsm> allegro_v.cpp line 464, there's the GetTime() for DOS too
11:56:51 <nielsm> should move it to a separate source file really
12:06:10 *** Wacko1976 has joined #openttd
12:07:43 *** HerzogDeXtEr1 has joined #openttd
12:27:04 *** frosch123 has joined #openttd
13:05:27 *** andythenorth has joined #openttd
13:49:05 *** Thedarkb1 has joined #openttd
13:59:45 <nielsm> scenario editor really needs a button to toggle "city" status of towns imo
14:05:33 <Wolf01> Scenario editor needs to be ported to 2018
14:06:43 <nielsm> and also a better tree brush and landscaping brushes
14:09:06 <Wolf01> I was working on those, bud andythenorth distracted me :P
14:12:07 <Wolf01> andythenorth: did you see the new lego big train (moc)?
14:13:16 <andythenorth> not really my kind of thing, but lot of work there
14:14:51 <Wolf01> I can't understand if the wheels flange piece is custom or what piece is
14:16:48 <andythenorth> he says it's lego only
14:17:37 <Wolf01> Yeah, but I don't recognize it
14:24:05 *** Wacko1976 has joined #openttd
14:56:15 *** Wacko1976_ has joined #openttd
14:59:01 *** Thedarkb1 has joined #openttd
15:53:00 *** supermop has joined #openttd
17:00:10 <m1cr0man> Hello. Is there a way to change the cost of placing rails either via an addon or the game settings? I want to try a different train set than UKRS2 but I want to keep the much more expensive rails
17:03:19 <nielsm> there is the BaseCosts Mod 5.0, it lets you adjust the cost factor of everything individually
17:10:07 *** rocky1138 has joined #openttd
17:16:33 *** andythenorth has joined #openttd
17:44:33 <nielsm> I was just reminded that C++11 has std::chrono in, and it might actually be the best approach to all fine time measuring needs... is it okay to use? :)
18:04:06 *** planetmaker_ has joined #openttd
18:07:43 *** gelignite has joined #openttd
18:29:08 *** Wacko1976 has joined #openttd
19:03:14 *** chomwitt has joined #openttd
19:03:45 *** snail_UES_ has joined #openttd
19:48:52 *** sla_ro|master has joined #openttd
20:13:10 *** Wormnest has joined #openttd
20:16:01 *** ANIKHTOS has joined #openttd
20:24:29 <ANIKHTOS> i will try to write soem code albarth
20:24:52 <ANIKHTOS> but c++ is the first time i see thelanguage i used visual basic in the past
20:24:57 <ANIKHTOS> and all seems a bit strange
20:24:58 <Alberth> nice, what part are you thinking to extend?
20:25:51 <ANIKHTOS> well i am stil confused readign the code
20:26:02 <ANIKHTOS> i get the functiosn but nto get them fully
20:26:14 <Alberth> you may want to read some patches, and try to compile them, and play with them to get an idea of how they look and feel
20:26:51 <Alberth> that's normal, it's 300+K lines of code, not something you can understand in a few weeks
20:27:11 <ANIKHTOS> /* check if we entered a new month? */ bool new_month = ymd.month != _cur_month;
20:27:19 <ANIKHTOS> id do not get hwo it works lol
20:27:53 <ANIKHTOS> i got the increase fo ticks
20:27:58 <ANIKHTOS> the chekc of fractiont o new day
20:28:11 <ANIKHTOS> and in new month i do nto get it
20:28:25 <Alberth> not that difficult, _cur_month is likely the current month we saw last, and ymd.month the "real" new month
20:28:57 <ANIKHTOS> well it seems i feel to grasp the ymd
20:29:54 <Alberth> so if (ymd.motn != _cur_month), you have a new month
20:30:15 <Alberth> sorry, my network connection tends to die every now and then
20:30:52 <ANIKHTOS> i have plan soem code so far
20:30:57 <ANIKHTOS> but stuck in new month
20:31:21 <nielsm> that line compares ymd.month with _cur_month and sets new_month to true if they're different, false if they're equal
20:32:16 <Alberth> ymd is a variable of type YearMonthDay, defined at line 103 of date_type.h
20:32:38 <ANIKHTOS> i am changing date.cpp
20:33:26 <Alberth> no idea what's in it, but it sounds like a useful file to modifiy :)
20:33:50 <ANIKHTOS> there is all i want to change
20:34:06 <ANIKHTOS> the increasement in day month year and the call outs for dailly motnhly yearly cahnges
20:34:34 <ANIKHTOS> the trick is i do nto want to break compatibility and rewrite everythign lol
20:35:16 <Alberth> at that point better start openttd2 :)
20:35:36 <ANIKHTOS> i will nto break comaptibility
20:35:47 <ANIKHTOS> i jsut need soem better understadign of c++
20:35:48 <Alberth> sounds like the better plan to me :)
20:36:08 <Alberth> I'd say spend a few weeks learning c++
20:36:28 <ANIKHTOS> sugest a godo readign material??
20:37:16 <nielsm> I haven't seen any recommendations of any online courses, all recommendations I see are for "real" books
20:37:56 <nielsm> can't get around the fact that C++ is a very complex language
20:38:32 <ANIKHTOS> well so far i understand some code
20:38:37 <ANIKHTOS> and some is still headache
20:39:53 <Alberth> that's a normal state of mind for something so big and complicated as openttd source code
20:40:21 <ANIKHTOS> lol i only see 314 lines
20:41:20 <ANIKHTOS> the code is always brek into small files?? or there is a big file with all the code??
20:41:30 <Alberth> you're fighting 3 things currently, learning c++, understanding the code, changing the code for something that several others failed to get working
20:41:58 <nielsm> the code is split into multiple files since there's so much of it
20:42:06 <ANIKHTOS> soem call outs from this date.cpp are for functions in another files but it wll be pain int he ass to fidn where exactt hey are to see what they do
20:43:02 <ANIKHTOS> i think it is too much split
20:43:13 <ANIKHTOS> why we have so many date files?/ and not 1 huge??
20:43:17 <Alberth> grep is your friend, or an IDE that understands C++ code
20:43:33 <nielsm> are you on windows or something else?
20:43:48 <nielsm> what are you using for editor/compiler/IDE?
20:43:53 <nielsm> visual studio or something else?
20:44:26 <ANIKHTOS> have nto download anything yet
20:44:36 <Alberth> there is more structure in the files than you think
20:44:37 <nielsm> visual studio has a lot of good tools to help navigating the code
20:45:17 <ANIKHTOS> well i ahve a problem of space iam not in home , my laptop is full so i need a programm that will take the niniest space to install
20:45:25 <ANIKHTOS> and i mean the tiniest i ahve 500mb free
20:45:42 <Alberth> date_type.h defines the date data types, date_func.h declares the functions used at other places, date.cc should implement the functions in date_func.h
20:46:04 <nielsm> if you have that little space you're in bad luck
20:46:16 <nielsm> it takes almost 400 MB of space for me to just compile openttd
20:46:31 <Alberth> *gui* stuff is for the window system, probably just displaying the date or so
20:46:38 <nielsm> that's not including the multiple GB taken by visual studio installation
20:46:44 <ANIKHTOS> i have a ramdrive of 2 gb
20:47:05 <ANIKHTOS> so i can have free temp space of 2.5gb free but not for storage more for workign space
20:48:05 <Alberth> one source set + repo + build in it, is near 850MB
20:48:35 <ANIKHTOS> i can find the work space
20:48:36 <Alberth> not doing really much
20:49:26 <Alberth> everything openttd-develop is 19G, but that has a lot of history and experiments
20:50:40 <nielsm> really, get 10 GB free harddisk space before you get started
20:51:01 <ANIKHTOS> if i was hoem i could but since i am on travel
20:51:06 <ANIKHTOS> thats nto an option for now
20:51:50 <ANIKHTOS> okey when i fidn the free space
20:52:00 <ANIKHTOS> what free programs i can use??
20:52:12 <nielsm> I recommend visual studio 2017 community edition
20:52:46 <ANIKHTOS> so strange to hear the words visual studio and free at same sentence
20:53:10 <nielsm> they've had the community edition for free for many years now
20:53:25 <nielsm> it has all the pro features, you're just not allowed to use it for paid work
20:55:42 <Wolf01> <nielsm> it has all the pro features <- nope
20:56:10 <ANIKHTOS> is there a zip of all the files of ottd??
20:56:18 <ANIKHTOS> or i will have to downlaod 1 by 1??
20:56:47 <Wolf01> The client is even integrated into VS
20:57:15 <Alberth> github allows download of a zip, but you're far better off by cloning the git repository
20:57:49 <nielsm> if you aren't used to working with version control (or just git for that matter) that's another hurdle too...
20:57:53 <Alberth> openttd is a moving target, and git can integrate changes with your modifications for you
20:57:56 <andythenorth> we all start somewhere eh :P
20:58:08 <andythenorth> but this is learning to swim by jumping off cliff into water
20:58:24 <andythenorth> C++, git, editor, compiling, openttd
20:58:56 <Alberth> yep, learning c++ first, adding some git for fun and profit, then try to hack openttd
20:59:20 <ANIKHTOS> well alberth that woudl a normal person do
20:59:22 <andythenorth> Wolf01: could be, did you count the studs? o_O
20:59:34 <andythenorth> Wolf01: looks very plausible
20:59:36 <ANIKHTOS> so i will hack ottd while learnign c int he process of hacking
20:59:57 <andythenorth> if you learn git basics fast, you will have a better time
21:00:04 <andythenorth> and be less frustrated
21:00:13 <Alberth> and move faster forward
21:00:30 <glx> rule one: rebasing is better than merge
21:00:39 <andythenorth> glx: that is highly subjective by project
21:00:47 <andythenorth> rebasing is 'banned' where I work
21:00:53 <nielsm> IMO first steps would be 1) install VS2017 2) clone openttd repository 3) get it to compile and work 4) try to make some basic changes and get them to compile
21:01:07 <glx> andythenorth: but you are many to work on the same branch I guess
21:01:18 <andythenorth> ANIKHTOS: you want direct explanation, or "it's like xyz" explanation?
21:01:35 <andythenorth> glx: we make individual feature branches
21:01:43 <andythenorth> ANIKHTOS: it's a program
21:01:53 <andythenorth> do you use anything like dropbox?
21:02:26 <nielsm> it's a directed acyclic graph
21:02:38 <ANIKHTOS> git is linux kernel ??
21:02:45 <andythenorth> any excuse to say DAG nielsm :)
21:02:53 <andythenorth> I feel 10% smarter when I can say DAG
21:02:56 <Alberth> it was developed by the authors of the linux kernel
21:03:23 <Alberth> but it's generic, and used for many other progjects
21:03:35 <Alberth> in fact, it's the defacto standard VCS
21:03:40 <nielsm> git is a program for managing source code for programs
21:03:51 <nielsm> to keep track of who changed what, when
21:04:07 <nielsm> and make sure multiple people can work on the same project at the same time
21:05:06 <ANIKHTOS> okey a programm that helps many peopel work at same programm to develop
21:05:57 <ANIKHTOS> we are goign somewhere now
21:06:06 <ANIKHTOS> when you say clone you mean download every single file??
21:06:18 <ANIKHTOS> or there is somewhere i a link tto downalod all in 1 go??
21:06:19 <nielsm> "git clone" is a command that downloads everything
21:06:31 <Alberth> every single change of every file ever done in the past 10+ years
21:06:37 <nielsm> a copy of all the current files, and also the data to be able to turn back history and see how all of the files looked in the past
21:06:57 <Alberth> and yes, "git clone" does that all in one command
21:07:38 <ANIKHTOS> is there a free git programm for windowns??
21:07:57 <andythenorth> add 'learning shell' to ANIKHTOS list :)
21:08:23 <ANIKHTOS> lol andy add!!!!!!!!!!!! no no thank you
21:08:33 <Alberth> several git clients exist for windows
21:09:11 <Alberth> but I don't know, as I use the plain git command-line (ie the "shell" as andy puts it)
21:09:36 <nielsm> I think visual studio includes a basic git client
21:09:40 <Wolf01> <Wolf01> The client is even integrated into VS <-
21:09:49 <nielsm> you can also use github's client
21:10:08 <glx> there's git for windows too
21:11:00 <glx> I use github desktop and git for windows
21:12:24 <LordAro> probably better to install msys2, then install git from within it
21:12:36 <Alberth> just try it, if it doesn't work for you, find another (btter) one
21:13:02 <Alberth> repeat until you run out of programs, or you find a working tool for you
21:13:03 <glx> and there's a nice extension for powershell too
21:16:04 <Alberth> as long as it's virtual money, sure
21:16:29 <__ln__> it's probably not real, it looks rendered.
21:16:35 <Alberth> unless you're buying real metal, in which case you need a big parking spot for it
21:18:17 <andythenorth> it's real money :P
21:18:55 <ANIKHTOS> its so sad when you want to learn somethign but you need to learn so many other thigns first before to learn that
21:20:52 <Alberth> I think it's a great thing, so many new things to explore, and play with!
21:21:07 <ANIKHTOS> yes i am playing 3 different solutions
21:21:45 <ANIKHTOS> i think i am in he mode to overcomplicate thign snow
21:23:37 <ANIKHTOS> okey 1 question the game time more or less does everythign in days??
21:23:45 <Alberth> don't try to do everything at the same time, it's just too much to grasp all without getting totally confused
21:23:59 <ANIKHTOS> i see the engines are set on days
21:24:05 <ANIKHTOS> the date is set on days
21:24:32 <Alberth> most stuff runs in terms of days
21:24:46 <Alberth> except for animations mostly
21:25:12 <ANIKHTOS> is anything that will check ticks??
21:25:56 <Alberth> I don't know, never looked into how time works in openttd
21:26:25 <ANIKHTOS> the montly update for industry prodction
21:26:49 <ANIKHTOS> is done every new month?? or every 30 days from the date you start the game??
21:26:53 <Alberth> I think I know around 30-40%, have some ideas about 40%, and no clue whatsoever on the remaining parts :)
21:27:15 <ANIKHTOS> well thats more than me
21:27:23 <Alberth> industry production at least is monthly
21:27:43 <ANIKHTOS> i knwo its montly but when it reset
21:27:45 <Alberth> you haven't looked at openttd code for 7 years yet :)
21:27:48 <ANIKHTOS> at 1st of every month??
21:28:16 <ANIKHTOS> well i kow it existed for a decade
21:28:42 <Alberth> there is probably more running on a monthly rhytm
21:29:04 <ANIKHTOS> there is a new month call
21:29:15 <ANIKHTOS> that call many fucntions
21:29:25 <Alberth> to know, find the relevant variables, and see how they are used
21:30:30 <ANIKHTOS> #include "stdafx.h" #include "network/network.h" #include "network/network_func.h" #include "currency.h" #include "window_func.h" #include "settings_type.h" #include "date_func.h" #include "vehicle_base.h" #include "rail_gui.h" #include "linkgraph/linkgraph.h" #include "saveload/saveload.h" #include "safeguards.h"
21:30:45 <ANIKHTOS> this are all the files that are connected with functiosn with thsi one??
21:30:59 *** tokai|noir has joined #openttd
21:30:59 *** ChanServ sets mode: +v tokai|noir
21:32:12 <ANIKHTOS> IndustryMonthlyLoop() where i will find this function??
21:32:22 <nielsm> .h and .hpp files are "headers", they declare data types and functions
21:32:27 <andythenorth> you need a way to search all files in src
21:32:31 <andythenorth> my text editor does it
21:32:35 <andythenorth> so I search for function names
21:32:38 <nielsm> and .cpp files actually contain the implementing code
21:33:00 <nielsm> (which is not entirely correct with C++ templates and inline functions in classes and more)
21:34:38 <ANIKHTOS> your text editor search multiple files??
21:35:19 <nielsm> in visual studio I'd right click the function name and run "find all references"
21:35:34 <nielsm> it'll find all places that name is used, either called or defined
21:38:28 <ANIKHTOS> i iwll create a frankestein in the end of code
21:39:35 <nielsm> everyone learns best from mistakes :)
21:39:43 <Alberth> a proper C++ IDE allows jumping to the functions directly
21:40:20 <Alberth> really, invest the time to learn visual studio and c++
21:40:46 <ANIKHTOS> i am learnign c++ slowly
21:40:58 <ANIKHTOS> and then search for what it means
21:41:11 <ANIKHTOS> and slowly i learn C++
21:41:21 <LANJesus> in VS can't you also just ctrl+click the method/function names?
23:22:09 <ANIKHTOS> in the if statement lets say i say if a<5and a=5 what happens then?
23:23:57 <FLHerne> Then it'll never be true
23:24:10 <FLHerne> Same as `if (false) {}`
23:24:42 <FLHerne> (unless `a` is some function call that has side-effects)
23:26:53 <ANIKHTOS> to it will run as long as a<5 and when a=5 it will not
23:27:28 <FLHerne> I misread your question
23:27:59 <FLHerne> But coincidentally, my answer was about right anyway :P
23:28:30 <FLHerne> The common way to do that is usually a for- or while-loop
23:29:02 <FLHerne> `for (int a = 0; a < 5; ++a) { <do thing with a> }`
23:29:19 <ANIKHTOS> different langiuage handle the <> different when comes to equal
23:29:47 <FLHerne> I don't think I've ever seen a language where < means <=
23:30:00 <FLHerne> (in C++, <= means 'less than or equal')
23:30:41 <ANIKHTOS> i am askign to be in safe side
23:31:30 <ANIKHTOS> well i think the if in this case i want to use is better
23:31:40 <ANIKHTOS> it will do nothign until it reach the desired value
23:36:13 *** andythenorth has left #openttd
23:39:51 *** supermop has joined #openttd
23:58:49 *** Thedarkb-X40 has joined #openttd
continue to next day ⏵