IRC logs for #openttd on OFTC at 2018-02-07
⏴ go to previous day
00:15:52 *** Biolunar has joined #openttd
00:16:23 *** supermop has joined #openttd
00:41:56 *** Snail_ is now known as Snail
00:44:59 *** john-aj has joined #openttd
01:17:33 *** johnwhitlow[m] has quit IRC
01:58:20 *** Agiri[m] has joined #openttd
02:31:06 *** supermop has joined #openttd
02:54:49 *** supermop has joined #openttd
03:32:12 *** cute[m] has joined #openttd
03:57:59 *** UncleCJ has joined #openttd
04:37:27 *** Rubidium has joined #openttd
04:37:27 *** ChanServ sets mode: +o Rubidium
05:20:07 *** angguss[m] has joined #openttd
05:20:35 *** supermop has joined #openttd
06:04:45 *** rustyshackleford[m] has joined #openttd
06:19:53 *** sla_ro|master has joined #openttd
06:35:49 *** ToffeeYogurtPots has joined #openttd
07:22:17 *** swimstar[m] has joined #openttd
07:27:13 *** johnwhitlow[m] has joined #openttd
08:22:51 *** andythenorth has joined #openttd
08:42:15 *** andythenorth has joined #openttd
08:52:36 *** andythenorth has left #openttd
09:03:25 *** cute[m] has joined #openttd
09:20:34 *** Stimrol has joined #openttd
09:35:31 *** Agiri[m] has joined #openttd
09:36:12 *** ToffeeYogurtPots has quit IRC
09:43:54 *** Biolunar has joined #openttd
10:26:10 <vasatko> HI, i try again ask, if someone works with m4nfo (bridges)?
10:56:20 *** FLHerne has joined #openttd
11:51:48 *** mczapkie has joined #openttd
11:57:22 *** chomwitt has joined #openttd
12:52:28 <Samu> I need util.superlib with version 19
13:06:20 *** john-aj has joined #openttd
13:23:39 <LordAro> Samu: choose a different version
13:49:59 <Samu> nevermind, gonna try do something else
14:08:26 <Samu> can't make a goal damn it
14:19:44 <Samu> how do i clear all goals?
14:20:13 <Samu> when i load savegame, i get duplicated goals
14:37:55 *** supermop has joined #openttd
14:47:58 <Samu> how do GoalIDs work? any hint?
15:21:50 *** TheMask96 has joined #openttd
15:41:03 <Samu> ii got a string with two parameters or values, or whatever
15:41:19 <Samu> STR_GOAL_VALUE : {STRING}{CURRENCY_SHORT}
15:41:35 <Samu> but i can't make the text show up there
15:43:05 <Samu> GSGoal.New(cid, string, GSGoal.GT_COMPANY, cid)
15:43:12 <Samu> local string = GSText(GSText.STR_GOAL_VALUE, c_name, cv)
15:43:24 <Samu> local c_name = GSCompany.GetName(cid)
15:43:38 <Samu> local cv = GSCompany.GetQuarterlyCompanyValue(cid, GSCompany.CURRENT_QUARTER)
15:44:13 <Samu> company name isn't there
16:01:03 <Samu> nooo dont leave me alone :(
16:08:41 <LordAro> Samu: some of us have jobs to do :p
16:09:05 <LordAro> i'm afraid i don't have much of an idea about the string system, it's not available for AIs
16:10:11 <ST2> you need to send company id to {COMPANY}
16:10:39 <Samu> local c_name = GSText(GSCompany.GetName(cid))
16:11:23 <Samu> bah, first argument must be a valid stringid
16:14:18 <Samu> STR_GOAL_VALUE : {COMPANY}{CURRENCY_SHORT}
16:14:30 <Samu> local string = GSText(GSText.STR_GOAL_VALUE, cid, cv)
16:15:45 <Samu> STR_GOAL_VALUE : {YELLOW}{COMPANY}{ORANGE} - {YELLOW}{CURRENCY_SHORT}
16:16:37 <ST2> Samu: you type all your steps here, with some copy/paste I think I can fully replicate it xD
16:17:19 <LordAro> Samu likes to echo everything into here
16:17:47 <Samu> it keeps on repeating because ... yeah i dunno
16:18:25 <LordAro> you should probably investigate that
16:20:12 <Samu> the more i look at divnut the more i get confused
16:21:00 <ST2> because that's one that covers a bunch of other settings
16:49:14 *** Alberth has joined #openttd
16:49:14 *** ChanServ sets mode: +o Alberth
17:01:23 <Samu> if I use SetText, i don't get anything happening
17:01:40 <Samu> or actually, i get goalcid0 not existing
17:01:58 <Samu> if I use New, it keeps repeating the same goal
17:02:27 <LordAro> Samu: stop, and look up how scopes work
17:03:24 <LordAro> and please use arrays instead of duplicating code over and over
17:05:55 <Samu> how do i know if a goal already exists
17:06:13 <Samu> i don't know what's a scope
17:06:55 <LordAro> and you definitely do
17:07:05 <LordAro> even if you don't know the name
17:13:26 <Samu> wanna try make an array first
17:14:21 <LordAro> scope is a pretty important, and fundamental, bit of programming
17:19:44 <Samu> squirrel doesn't have arrays
17:20:05 *** sla_ro|master has joined #openttd
17:22:31 *** john-aj has joined #openttd
17:27:29 <supermop_work_> i find i don't really have patience to work for an employer who won't pay for software
17:46:43 *** synchris has joined #openttd
17:59:47 <Samu> there is no way to follow the code, i don't know what it is doing
18:04:37 <Alberth> Samu: unless you want to build a C extension to Squirrel that reference page is not needed
18:07:21 <Alberth> besides, it's Squirrel 3.1, you need Squirrel 2
18:13:29 *** Mahjong1 has joined #openttd
18:21:16 *** TheMask96 has joined #openttd
18:30:02 <nielsm> in defense of Samu, the squirrel-lang documentation is not that well written and seems to skip over a bunch of important details; the styling of it doesn't help readability either
18:30:27 <nielsm> (I'm comparing to the Lua documentation which I've used a lot myself, and find generally well-written and comprehensive)
18:31:38 <nielsm> Samu I don't think you should actually be using an array there, a table might be a better choice
18:32:11 <nielsm> apart from that, you're making a length 1 array, where the only valid index is 0, but then filling values in all kinds of index values
18:32:19 <nielsm> try making a table instead:
18:32:44 <nielsm> and then insert into new slots in the table:
18:32:57 <nielsm> goalcid[cid] <- GSGoal.New(...)
18:33:46 <nielsm> (the <- operator becomes important here, the difference between it and = for assignment is that = will throw an error if the index/slot you're inserting into doesn't already exist, but using <- will create the slot for you if it doesn't exist)
18:35:14 <nielsm> on the other hand, if you know the largest cid value you will be using (I guess GSCompany.COMPANY_LAST is it) you could declare goalcid to be an array of that length
18:35:57 <nielsm> like: local goalcid = array(GSCompany.COMPANY_LAST)
18:36:12 <nielsm> (the array() function creates an array with the length you give it)
18:38:06 <Alberth> still can't read openttdcoop pastes due to expired license
18:46:33 <Samu> Company Goal is still - None - "
18:47:09 <Samu> how do i create a goal for all companies on startup?
18:48:11 <Samu> what if they don't exist yet?
18:49:34 <Samu> do i have to resort on capturing events?
18:50:08 *** frosch123 has joined #openttd
18:54:28 <LordAro> AIs and such like are usually event driven
18:57:18 *** HerzogDeXtEr has joined #openttd
19:00:54 *** andythenorth has joined #openttd
19:02:59 *** ZexaronS has joined #openttd
19:06:16 <Wolf01> So, what needs to be fixed?
19:10:06 *** Thedarkb has joined #openttd
19:10:43 <Wolf01> I could give you a virtual cookie
19:11:13 <Samu> are company goals removed automatically when a company bankrupts? or do i have to go there remove its goal?
19:26:02 <Samu> is there a better way to remove all goals on load?
19:31:16 <Samu> how do I know which goalids exist when i load a savegame?
19:32:58 <Samu> actually I dunno what I want
19:45:44 <DorpsGek> Commit by translators :: r27968 trunk/src/lang/korean.txt (2018-02-07 19:45:38 +0100 )
19:45:46 <DorpsGek> korean: 1 change by telk5093
19:49:50 <supermop_work_> andythenorth: pho
19:50:35 *** Stimrol has joined #openttd
19:51:11 <andythenorth> I had katsu lunch
19:55:27 <peter1138> │··························
19:57:15 *** Biolunar has joined #openttd
20:16:13 <LordAro> Wolf01: already watched ^^
20:16:28 <Wolf01> I'm going to change my pants
20:16:48 *** Progman has joined #openttd
20:18:10 <nielsm> is there any kind of tool to help remove strings from the translation source files when you've changed something about the english master translation that invalidates everything else?
20:18:35 *** john-aj has joined #openttd
20:22:42 <nielsm> well sure I could construct my own
20:23:00 <Alberth> for newgrf and gamescripts, the translation service?
20:23:39 <nielsm> I'm toying around with a core game patch where I've had to change a bunch of strings
20:23:40 <Alberth> sed is a standard tool for programmatically editing a file :)
20:24:01 <Alberth> ok, just make new strings instead?
20:24:15 <nielsm> probably the more correct course of action
20:26:11 *** stefino has joined #openttd
20:28:39 <stefino> Hello all. Do youmeone use MUSA for uploading big files to bananas? I download it but have no idea how does it work. I only saw that I have to make some file, where I write all information about uploaded file, I have to set a path to this file -somewhere- but thats all. Thanks a lot :)
20:30:37 <Alberth> version line looks like it is fixed by the makefile
20:30:49 <Alberth> you may want to add an actual version number there
20:31:33 <stefino> ahh yes, this is the fil what I meant :)
20:31:44 <Alberth> type is obviously wrong
20:32:39 <stefino> and after I write this what I have to do after?
20:33:46 <Alberth> where line 68 seems to do the version magic
20:34:28 <Alberth> it seems to run the musa.py file
20:34:55 <Alberth> you could try musa.py --help
20:35:11 <Alberth> likely it gives some online help and options
20:41:50 *** gelignite has joined #openttd
20:43:39 <stefino> seems like mission impossible for me :/
20:49:32 <Alberth> run != double click file :)
20:50:25 <Alberth> it's a command-line tool, open a command.com window, and start it with something like "python musa.py --help"
20:54:19 <stefino> yes I have open command line and have open python musa help
20:56:23 <Alberth> Adding -d seems useful until you got everything right
20:57:45 <Alberth> and -c yourcfg.ini is likely useful too
20:58:45 <stefino> so the first of all I have to write this .ini file and put it into MUSA folder wit grf what I want to upload? and after this I can test with musa -d if all is ok
21:00:33 *** Stimrol has joined #openttd
21:01:58 <Alberth> not sure where it starts searching, best is to "cd" to that grf directory and do everything there
21:02:23 <Alberth> but basically, yes, you should first make an ini file
21:06:53 *** Supercheese has joined #openttd
21:16:08 <stefino> yes, i'll go to write ini :)
21:25:06 <stefino> What I have to change in "makefile"?
21:25:38 <Alberth> nothing, you don't need it
21:25:53 <Alberth> it's a tool to automate running programs
21:26:13 <stefino> ok ok , so I need only ini and description.txt
21:26:37 <Alberth> "make" is a tool to automate running programs, and make uses Makefile to figure out what to do
21:27:41 <Alberth> I store all stuff that I must run into a makefile or a shell script, so I don't have to remember how to call some $random program like musa
21:27:52 <Alberth> which I haven't used for several years :)
21:28:19 <Alberth> if you think you're complete, have a test run by adding the -d
21:33:11 <Samu> who can teach me save/load ?
21:34:54 <stefino> Alberth: mm have to pass configuration file
21:35:36 <Alberth> there was an option for that iirc
21:36:47 <Alberth> yep -c mybeautifulconfigurationfile.ini
21:37:23 <Alberth> or whatever your extension
21:37:50 <Alberth> musa doesn't care, it's just that the file format is known as INI file
21:38:17 <Alberth> but even that is not very fixed, people also use CFG for it :)
21:39:10 <Alberth> Samu: find a an AI that loads and saves?
21:39:47 <Alberth> busy-bee also loads and saves, but I forgot how it worked
21:42:43 <stefino> and what I have to write into config file?
21:46:28 <Samu> i managed to save a tick counter!, not what I wanted though
21:47:09 *** ToffeeYogurtPots has joined #openttd
21:52:33 <frosch123> stefino: there is only one ini file
21:53:06 <frosch123> the ini file is the config file
21:54:13 <stefino> frosch123: yes but what means error: you have to pass a configuration file
21:55:52 <stefino> and I have to write username, password somwhere or not?
21:56:35 <frosch123> you will be asked those
21:56:40 <frosch123> you do not put them into the ini file
21:56:57 <frosch123> the ini file is supposed to be reused for every upload, so it is usually part of the sources
21:57:08 <frosch123> and you do not give others your password :)
21:57:39 <frosch123> but you can put multiple usernames into the ini file to make the grf shared, and allow each of them to update it
21:57:48 <frosch123> but well, that's all written in the ini example
22:01:37 <stefino> ok I maybe understand what I have to do but the next error - cant read configuration file
22:04:34 *** HockeyD8 has joined #openttd
22:07:15 <stefino> File contains no section headres. file: bananas:ini line 1. 'type = NewGRF\n'
22:08:11 <frosch123> all lines but those with # are important
22:08:29 <frosch123> section headers are those with [ ]
22:10:19 <stefino> ini file looks ok now
22:11:17 *** Brainjammed has joined #openttd
22:11:40 <stefino> no ['.grf'] file :D my god
22:12:01 <stefino> it is world championship in errors
22:12:14 <Brainjammed> good evening ( in my country at least)
22:12:27 <Brainjammed> i have a question regarding gameplay
22:13:13 <stefino> a wrote musa -c bananas.ini and gives me that note
22:13:40 <Brainjammed> i remember in the times of the original ttd it was possible to copy order list between two vehicles of the same kind
22:13:57 <Brainjammed> but i do not remember how I did that
22:14:16 <frosch123> stefino: what did --help tell you?
22:16:37 <stefino> that I am only graphics developer, not programmer :D
22:18:14 <frosch123> python musy.py -d -c yourconfig.ini -u youruser yourgrf.grf yourreadme.txt yourlicenceifyoudonotuseoneofthedefaults.txt
22:18:35 <frosch123> are there more files to add? i can't remember
22:19:34 <frosch123> ah, changelog.txt is the third option
22:25:37 <stefino> okay it works, loaded and write error with any kind of socket acces
22:25:43 *** supermop_work_ has quit IRC
22:26:14 <stefino> socekt.error: Errno 10013
22:29:58 <frosch123> internet says that's your firewall
22:31:53 <stefino> I need to switch off firewaal during uploading?
22:32:17 <frosch123> no idea, last time i used windows (10 years ago), it had no such things
22:33:19 <__ln__> you must have used windows 95 or something
22:33:34 <frosch123> it probably thinks musa is stealing your banking credentials
22:34:12 <glx> usually windows firewall pops a window asking you what to do
22:37:16 <stefino> i switched it off and the next error 10054 - connestion will be canceled by distant host
22:38:09 <stefino> connection was....not will
22:38:33 <nielsm> that's the error usually known as "connection reset by peer"
22:38:40 <nielsm> which can mean almost anything
22:44:46 <Samu> busybee code is easier to follow, and yet quite complex
22:49:19 <stefino> still doesnt work but thanks a lot for help :)
22:54:26 *** supermop_work has joined #openttd
23:13:30 *** ToffeeYogurtPots has quit IRC
23:13:51 *** ToffeeYogurtPots has joined #openttd
23:52:08 *** ToffeeYogurtPots_ has joined #openttd
23:58:14 *** ToffeeYogurtPots has quit IRC
continue to next day ⏵