Back to Home / #openttd / 2016 / 04 / Prev Day | Next Day
#openttd IRC Logs for 2016-04-10

---Logopened Sun Apr 10 00:00:21 2016
00:12-!-supermop [~supermop@pool-100-37-203-161.nycmny.fios.verizon.net] has quit [Ping timeout: 480 seconds]
00:32-!-MonkeyDrone [~Monkey@84.255.131.63] has joined #openttd
01:16-!-_johannes [~johannes@port-92-203-225-175.dynamic.qsc.de] has joined #openttd
01:17-!-Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has quit [Quit: Snail]
01:20-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has joined #openttd
01:20-!-mode/#openttd [+o Alberth] by ChanServ
01:25-!-Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has joined #openttd
01:40-!-Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has quit [Quit: Snail]
01:41-!-HerzogDeXtEr1 [~farci@i59F6D857.versanet.de] has quit [Read error: Connection reset by peer]
02:02-!-_johannes [~johannes@port-92-203-225-175.dynamic.qsc.de] has quit [Ping timeout: 480 seconds]
02:05-!-Progman [~progman@p57A19801.dip0.t-ipconnect.de] has joined #openttd
02:11-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has joined #openttd
02:14<andythenorth>o/
02:34<@Alberth>moin
02:48<@Alberth>do you know how you find a git revision that added a line matching a pattern? I have lost a new file, it's in the git repo, but I don't know exactly where, and I only have part of the line that it should contain
02:49<@Alberth>I can also guess a filename
02:49-!-Supercheese [~Superchee@cpe-76-178-136-186.natnow.res.rr.com] has quit [Quit: Valete omnes]
02:51<andythenorth>I don’t :(
02:51<andythenorth>I’m sure it can be done
02:53<@Alberth>pro-git book doesn't seem to have a discussion about it
02:58<andythenorth>Alberth: ? http://stackoverflow.com/a/1340245
02:58<@Alberth>looks useful, thanks
02:59<andythenorth>I’m assuming you need to dig out specific string from [all diffs]
03:04<@Alberth>that would be fine, the file is obviously not used much yet :p
03:07<andythenorth>if I knew roughly when I committed it, I might be tempted to just step through commits using bitbucket interface or similar ;)
03:09<@Alberth>git log --all  -G<pattern> did the trick
03:09<@Alberth>--all means search all branches
03:10-!-efess [~Efess@c-24-61-64-170.hsd1.ct.comcast.net] has quit [Ping timeout: 480 seconds]
03:19<@Alberth>fyi --branches may be better for local branches :)
03:25<andythenorth>git fu
03:26<@Alberth>haha, GarryG is such fun, boldly just breaking all rules, and making new additions no-one ever did :)
03:26<andythenorth>yup
03:34<@peter1138>Who?
03:38<@Alberth>http://www.tt-forums.net/viewtopic.php?f=26&t=74510
03:38<@Alberth>and two other projects iirc
03:56<@peter1138>breaking all rules?
03:56<@peter1138>hmm
03:57*andythenorth wonders about newgrf industry farm fields
03:57<andythenorth>again
04:07-!-Arveen [~Arveen@ip-95-223-75-47.hsi16.unitymediagroup.de] has joined #openttd
04:10-!-Hiddenfunstuff [~Geth@y32.ip1.anvianet.fi] has joined #openttd
04:15-!-Cybertinus [~Cybertinu@cybertinus.customer.cloud.nl] has joined #openttd
04:19-!-Quatroking [~Quatrokin@ip226-139-211-87.adsl2.static.versatel.nl] has joined #openttd
04:19-!-sla_ro|master [slamaster@89.136.141.100] has joined #openttd
04:53<andythenorth>Alberth: do you remember how I was going to do RoadTypes? All state was in my head, that was a long week ago :P
04:54*andythenorth believes the best route was to use m4 for subtype
04:54<andythenorth>and drop the current type bits, in favour of returning ROADTYPES_INVALID_TRAM / ROADTYPES_INVALID_ROAD where needed
04:55<@Alberth>/me tries to interpret that message
04:56<andythenorth>sorry
04:57<@Alberth>yes, I remember, and I even wondered about it today
04:57<andythenorth>wondered if I’d done it, or wondered if there’s a better way? o_O
04:57<@Alberth>but I have some problems connecting m4 with source code modifications
04:58<@Alberth>wondered how far it was, mostly
04:58<andythenorth>state fell out of my head :D
04:58<andythenorth>didn’t touch it
04:58<@Alberth>oops :(
04:59<@Alberth>so what is the new idea about road types?
04:59<andythenorth>application programming is so much harder than just compilling stuff :P
04:59<andythenorth>I will write a spec first I think, implementation and spec are getting blurred too much
04:59<@Alberth>yep, you have to invent the right solution out of the blue
05:00*andythenorth always finds decoupling implementation and spec weird
05:00<andythenorth>there are implementation facts to address, like which bits are free in map
05:01<@Alberth>implementation is also a spec, but with a lot of details
05:01<@Alberth>so usually it's better to first write a spec at a higher level
05:01<@Alberth>leaving out all the details until you're reasonably sure that it will do what you want
05:02<@Alberth>and then fill in the details without having to worry about the overall structure
05:02<@Alberth>ie it's
05:03<@Alberth> ie it's a continuum from single thought to realization
05:03-!-Wolf01 [~wolf01@host11-55-dynamic.182-80-r.retail.telecomitalia.it] has joined #openttd
05:03<@Alberth>o/
05:03<Wolf01>o/
05:03-!-frosch123 [~frosch@00013ce7.user.oftc.net] has joined #openttd
05:04<Wolf01>quak
05:04<frosch123>hoi
05:04<@Alberth>hi hi
05:04-!-efess [~Efess@c-24-61-64-170.hsd1.ct.comcast.net] has joined #openttd
05:06<Wolf01>http://img-9gag-fun.9cache.com/photo/arKdKqV_460s_v1.jpg me this night...
05:08<@Alberth>good evening then :)
05:09<andythenorth>frosch123: o/
05:10<andythenorth>your proposal to split road / tram in the global toolbar
05:10<andythenorth>that’s incidental to NotRoadTypes, but I think it helps it make sense
05:10<andythenorth>would you put that at start or end of spec?
05:11-!-Clockworker_ [Clockworke@200-102-65-33.paemt701.dsl.brasiltelecom.net.br] has joined #openttd
05:11<@Alberth>near the end imho, as it's just the shape of things that you need in the realization
05:12<@Alberth>ie there are a zillion ways to split them, and it doesn't really matter how
05:13<andythenorth>ta
05:13<@Alberth>at least at the start :)
05:13<frosch123>andythenorth: both :)
05:13<frosch123>the first thing is that "road" and "tram" shall be independent like "road" and "rail"
05:13<frosch123>they can coexist on the same tile in some cases, but do not influence each other
05:13<andythenorth>agreed
05:14<frosch123>in particular, that building tram does not alter/upgrade the roadtype on the tile etc
05:15<andythenorth>yup
05:15<frosch123>basically: at some point you would likely want to specify how the gameplay actions are affected
05:18-!-Clockworker [~Clockwork@200-102-65-33.paemt701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 480 seconds]
05:23<Wolf01>I'm trying to figure out what would be the implications of moving the tram away of roadtypes, but I read "gameplay affections" so I think I'm not ready to think this morning
05:30<frosch123>it means that a vehicle cannot be both roadvehicle and tram
05:31<frosch123>and that building electrified tram on a road does not enable trolley busses
05:35-!-Samu [~oftc-webi@po-217-129-255-23.netvisao.pt] has joined #openttd
05:35<Samu>hi
05:39<Wolf01>makes sense
05:39<Wolf01>hi
05:46-!-JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has joined #openttd
05:48<andythenorth>draft https://paste.openttdcoop.org/pjhqhkese/ygl147/raw
05:49<andythenorth>frosch123 ? ^
05:50<andythenorth>needs more clarity
05:51<andythenorth>concept is clear, words not precise yet
05:59<andythenorth>it would help clarity greatly to remove all existing use of ‘RoadType’ and have instead ‘RoadType’ and ‘TramType’ but there are problems with that
06:01<Samu>uhm....
06:01<@Alberth>maybe differentiate between train rails and tram rail?
06:02<@Alberth>s/light rail/tram/ ?
06:03<@Alberth>1st line of subtypes is relevant, other lines are not. Move to end or discard?
06:03<Samu>let me read :o
06:04<@Alberth>mybe add a "newgrf author considerations" :)
06:04<@Alberth>addition there: "user should be able to see whether catenary exists for road, tram, or both
06:10<Samu>so trams are special roads
06:10<andythenorth>currently
06:10<andythenorth>some parts of the code have concept of ‘mode’
06:10<andythenorth>where mode is rail / road / water etc
06:11*andythenorth wonders if tram can be treated as a first class mode, for terminology purposes
06:11<andythenorth>half the challenge here is the terms are blurred becuase tram is just a roadtype
06:11<andythenorth>but it’s a roadtype with numerous special cases :P
06:15<Samu>NotRoadType needs a better name, :o
06:20<Samu>NotRoadType { road, tram, subtype3, subtype4, subtype5, etc... up to 15? }
06:21<Samu>so roads are nested stuff?
06:22<Samu>oh wait, im wrong
06:22<andythenorth>read it 10 times
06:22<andythenorth>then decide if roads are nested or not
06:22<andythenorth>then read it again and change your mind
06:24<andythenorth>Tram _should_ be a first class transport mode
06:24<andythenorth>whether the implementation can be made to support that without too much work is another question
06:24<Samu>names are confusing me a bit
06:24-!-JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has quit [Quit: JacobD88]
06:25<andythenorth>what’s confusing about RoadTypeRoad? o_O
06:25<andythenorth>so you have Road on a tile, and the Road has a RoadType, and the RoadType can be RoadTypeRoad or RoadTypeTram
06:25<andythenorth>so Road is Road, except when it’s Tram
06:26<andythenorth>otoh, at least someone implemented it :)
06:26-!-gelignite [~gelignite@x4e318694.dyn.telefonica.de] has joined #openttd
06:28<Samu>TrackTypeRoad
06:28<Samu>TrackTypeTram
06:28<Samu>TrackTypeRail
06:28<Samu>TrackTypeWater
06:30<Samu>and i don't even know if aircraft have their own tracks
06:31<Samu>if you want to make road and tram completely unrelated with each other, better not have Road in the name, imo
06:31<frosch123>• vehicle routing and movement per ‘road’ and ‘tram’ are independent <- that is likely not correct
06:31<frosch123>they won't drive through each other, and may still consider occupancy of roadstops in pathfinder costs
06:33<frosch123>‘tram’ is always drawn above ‘road’; authors need to be aware of this when drawing sprites, no mechanism will be provided to vary this <- i guess there are three layers: road, tram, road/tram catenary
06:34<frosch123>drawing of city roads, bridges, tunnels, and similar will follow existing behaviour <- what existing behaviour?
06:34<frosch123>do you mean like railtypes?
06:34<frosch123>with overlays
06:38<andythenorth>wavey hands
06:38<andythenorth>I don’t know how the current implementation works for that
06:38-!-zeknurn [~sup@hd9483bd7.seveveb.dyn.perspektivbredband.net] has quit [Read error: Connection reset by peer]
06:39<andythenorth>currently I’ve only tried making bridges etc support different subtype
06:39<andythenorth>didn’t touch drawing except for catenary, which is trivial
06:41<Samu>ok i better shut up, i have no idea what i'm talking about, sorry
06:44-!-Defaultti [defaultti@lakka.kapsi.fi] has quit [Quit: Quitting.]
06:45-!-Defaultti [defaultti@lakka.kapsi.fi] has joined #openttd
06:45<frosch123>so, how do hg bookmarks work?
06:46*frosch123 googles
06:51<andythenorth>Samu: no your points are quite fair I think
06:51<andythenorth>‘better not have Road in the name’ especially
06:52<andythenorth>but there are so many places that is used, e.g. pathfinding etc, I can’t see how it could be sensibly changed
06:53<@Alberth>sed -e 's/Road/BlackTile/g' -i src/{*,*/*,*/*/*} or so ?
06:53<@Alberth>:)
06:54<andythenorth>ha
06:54<andythenorth>well that might work :P
06:54<frosch123>i like lightrail
06:54<frosch123>we just need a specialsed term for road that does not include tram/lightrail
06:55<frosch123>rubbertrack or so
06:55<frosch123>:p
06:55<andythenorth>unguided :P
06:55<frosch123>RailType, RubberType, TramType, WaterClass
06:56<frosch123>negations are complicated
06:56<andythenorth>aren’t they just
06:56<frosch123>sounds like something pikka would say
06:56<andythenorth>for reasons also
06:57<andythenorth>wikipedia seems to distinguish ‘wheeled’ and ‘railed’
06:58<andythenorth>on the basis of how the force is transmitted to the ground
06:58<andythenorth>ha there’s an ISO :)
06:58<andythenorth>http://www.iso.org/iso/catalogue_detail.htm?csnumber=9389
06:59<@Alberth>CarType ?
06:59<Samu>Track is bad name?
07:00<@Alberth>confuses train with tram
07:00<Samu>Foundation?
07:00<frosch123>CarType could work :)
07:00<frosch123>sounds weird, but is unique
07:00<andythenorth>TruckAndBusType
07:00<andythenorth>:P
07:00<@Alberth>maybe WaterClass is weird :p
07:01<andythenorth>lots of things are weird :D
07:01<@Alberth>\o/
07:01<andythenorth>weird is fine, confusing and ambiguous is not :)
07:01<Samu>WaterClass, i'm a bit familiar with this term
07:02<Samu>GroundClass?
07:02<frosch123>we already have groundvehicles
07:02<frosch123>which include also rail
07:03<frosch123>CarType is good
07:03<Samu>oki
07:03<frosch123>ottd is en_GB, trains have wagons
07:04<frosch123>RailType, CarType, TramType, WaterClass
07:04<@Alberth>SilverSurferzz has cars :)
07:04<frosch123>(LightRail is too complicated after all)
07:04<frosch123>Alberth: and lots of them
07:04<frosch123>like one per day
07:05<@Alberth>just like his strings :)
07:05<frosch123>yup :) silversurfer is basically the definition of a squirrel
07:05-!-liq3 [~liq3@CPE-120-147-195-191.gdiv2.lon.bigpond.net.au] has quit []
07:07<Samu>RoadOrTramType?
07:07<Samu>lol
07:07<Samu>sorry
07:07<andythenorth>CarType is weird to me, but it’s bikeshedding :P
07:07<andythenorth>as long as it’s unique, I don’t care
07:08<Samu>FoundationType?
07:08<frosch123>foundations are the walls, when you make a sloped tile flat
07:09<Samu>I can see how easy it is to relate it to RoadType
07:09<andythenorth>TurnpikeType
07:09<Samu>yeah, complicated task just for a name
07:09<andythenorth>HighwayType
07:09<andythenorth>StreetType
07:09<andythenorth>AutomobileType :P
07:09<andythenorth>CarType is fine
07:10<frosch123>StreetType is also nice
07:10<andythenorth>use that?
07:10<andythenorth>it’s replaceable later anyway
07:11<frosch123>reminds me of sydney. every town district has a victory road, a victory avenue, a victory lane and a victoria street
07:11<Samu>TerrestrialTransportType
07:11<Samu>nah...
07:11<@Alberth>streettype is more generic imho
07:11<frosch123>s/victory/victoria"
07:12<Samu>LandType
07:12<Samu>hmm :(
07:12<frosch123>i prefer streettype because it refers more to the track than to the vehicles
07:12<andythenorth> yup
07:12<andythenorth>wfm
07:12<frosch123>like RailType instead of TrainType, WaterClass instead of ShipClass
07:13<frosch123>just TramType is easier :p
07:13<andythenorth>yup
07:13<andythenorth>LightRailType produces unwanted results if searching for RailType :P
07:13*andythenorth is lazy about searching
07:17*andythenorth rewrites spec, per StreetType and TramType
07:21<@Alberth>SteelWheelType :p
07:21<andythenorth>nicely played
07:30<andythenorth>improved https://paste.openttdcoop.org/pf4sixzxy/6mnitx/raw
07:34<Samu>Alberth: if you have time for me
07:34<Samu>The GS slot is following different rules to those of AI slots
07:35<Samu>the red/green rules for the GS slot are.... confusing
07:35<@Alberth>yes, that's what I was trying to tell you yesterday
07:36<@Alberth>you're confusing configuration and game play
07:36<Flygon>Nah, it's simple. You get four code slots per cartridge. You just have to plug in enough Gamesharks until your Mega Drive can't supply enough 5v current.
07:36<Flygon>:3
07:36<@Alberth>or rather, mixing them
07:36<Samu>I've just uploaded a new version, v5, cus i spotted a bug, don't know you noticed it
07:37-!-degasus [~markus@markus.members.selfnet.de] has left #openttd []
07:37<Samu>and also implemented the coloring for the GS slot. The GS slot "Configure" button can be clicked through that window
07:37<Samu>that was something already possible before
07:38-!-MonkeyDrone [~Monkey@84.255.131.63] has quit [Read error: Connection reset by peer]
07:40<@Alberth>I mostly got highly confused by all the unrelated max company changes
07:43<Samu>this? -> "b) While in the main menu, all 15 slots are configurable, regardless of the current value of Maximum no. competitors. This means they're all highlighted in orange text."?
07:43<Samu>i wanted to add some flexibility to this window
07:44<@Alberth>so the aim is just to have 15 competitors and colours?
07:44*andythenorth needs a NotRoadTypes repo
07:44<andythenorth>github? or hg and devzone?
07:44<@Alberth>BusTruckTramTypes :p
07:45<Samu>the aim is to let you configure the 15 slots, without locking them out if you have set a max no competitors to a value less than 15
07:45<@Alberth>how does devzone work with temporary repos?
07:45<andythenorth>dunno
07:45<@Alberth>I usually just make a repo at my local file system
07:45<Samu>but a running game will still obey to the max_no_competitors value
07:46<andythenorth>you are very trusting of your backups :)
07:46<Samu>it's merely lets you configure those slots instead of locking them
07:46<@Alberth>nah, I don't mind much if they disappear :p
07:46<andythenorth>$someone should make an annoying recursive name for NotRoadTypes
07:47<@Alberth>NRT is not road types ?
07:47<@Alberth>pretty trivial :p
07:47<andythenorth>:)
07:48<Samu>it* merely
07:48<Samu>typo
07:49<@Alberth>you want to configure AIs that can never be used?
07:50<Samu>they could still be used, the max_no_competitor value is still changeable during a game
07:50<Samu>but yes
07:53<andythenorth>bbl
07:53-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has quit [Quit: andythenorth]
08:25<Samu>Hey, I had an idea for the name
08:25<Samu>WayType
08:26<Samu>tramway, roadway, railway
08:28-!-gelignite [~gelignite@x4e318694.dyn.telefonica.de] has quit [Quit: http://bit.ly/1kso8Ta]
08:31-!-Wormnest [~Wormnest@s5596abd2.adsl.online.nl] has joined #openttd
08:39-!-smoke_fumus [~smoke_fum@188.35.176.90] has quit [Ping timeout: 480 seconds]
08:42-!-Arveen [~Arveen@ip-95-223-75-47.hsi16.unitymediagroup.de] has quit [Quit: Nettalk6 - www.ntalk.de]
08:44<Samu>i should universalize the behaviour of AI slots + GS slot
08:44<Samu>they behave differently for some of the common things
08:45<Samu>even in the original code
08:49<Samu>a GS slot is always editable
08:49<Samu>an AI slot is never editable once it starts, in the original code
08:50<Samu>GS slot script can't restart
08:50<Samu>AI slot script can restart
08:53<Samu>GS script can't be altered during a game
08:53<Samu>AI script can be altered during a game if it has not started yet, in the original code
08:54-!-zeknurn [~sup@hd9483bd7.seveveb.dyn.perspektivbredband.net] has joined #openttd
08:55<Samu>AI script can be altered during a game if it has started and died, in my code
08:56<Samu>AI script can't be altered during a game if it has started and isn't dead, in my code
08:58<Samu>GS parameters can be altered during a game, slot is editable
08:59<Samu>AI parameters can't be altered during a game if it has started and isn't dead, slot is not editable, in my code :( must make it editable
08:59<frosch123>Samu: http://noai.openttd.org/api/trunk/classAIInfo.html#5c8349ebc14ec2c4b63187780c33f5b9 <- add CONFIG_INGAME to your list
09:17-!-supermop [~supermop@pool-100-37-203-161.nycmny.fios.verizon.net] has joined #openttd
09:17<supermop>yo
09:22-!-HerzogDeXtEr [~farci@i59F6D857.versanet.de] has joined #openttd
09:24<@Alberth>hi hi
09:24<supermop>hows it going Alberth
09:26<@Alberth>quite alright
09:34-!-MonkeyDrone [~Monkey@84.255.131.63] has joined #openttd
09:35<Samu>add CONFIG_INGAME to my list. I don't know where to look
09:40<Samu>there are two ways to access the script Parameter windows: via AI/GS Debug window and via AI/GS Config window
09:41<@Alberth>script/script_config.hpp
09:41<@Alberth>27:     SCRIPTCONFIG_INGAME    = 0x4, ///< This setting can be changed while the Script is running.
09:41<@Alberth>so there is a bit whether you can edit the script, apparently
09:42<@Alberth>or rather, change the parameter while it is running
09:43-!-gelignite [~gelignite@x4e318694.dyn.telefonica.de] has joined #openttd
09:45<Samu>it is the AI/GS Config window that is locking the slot
09:45<Samu>im geting confused
09:46<Samu>i think the issue is solvable in the ai_gui.cpp
09:47<Samu>don't have to edit the other files
09:47<Samu>or i'm not sure what you're telling me
09:48<@Alberth>just telling you what that SCRIPTCONFIG_INGAME means
09:48<@Alberth>as you said "I don't know where to look"
10:01<Samu> virtual void OnInvalidateData(int data = 0, bool gui_scope = true)
10:01<Samu>must be here
10:01<Samu>have to think
10:01<Samu>it's hard to think
10:15<Samu>IsEditable is so misleading
10:15<Samu>IsSlotSelectable would be better
10:15<Samu>lel
10:18-!-MonkeyDrone2 [~Monkey@94.76.40.193] has joined #openttd
10:25-!-MonkeyDrone [~Monkey@84.255.131.63] has quit [Ping timeout: 480 seconds]
10:49-!-sim-al2 is now known as Guest108
10:49-!-sim-al2 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has joined #openttd
10:53-!-Guest108 [~sim-al2@108-221-157-231.lightspeed.mmphtn.sbcglobal.net] has quit [Ping timeout: 480 seconds]
11:02<Samu>is it possible to simplify this code?
11:02<Samu>this->SetWidgetDisabledState(WID_AIC_CHANGE, ((this->selected_slot == OWNER_DEITY && _game_mode == GM_NORMAL) || this->selected_slot == INVALID_COMPANY) || (this->selected_slot <= MAX_COMPANIES && _game_mode == GM_NORMAL && Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead()));
11:03<Samu>for readability
11:05<Samu>https://paste.openttdcoop.org/pytpi3bkw
11:05<Samu>it's 1 big line :(
11:07<Samu>and as you can see, I am letting green slots to be selectable
11:08<Samu>but disabling the Select AI button
11:08-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has joined #openttd
11:09<Samu>to have similar funcionality as the GS slot
11:09<@Alberth>the final line is this->SetWidgetDisabledState(WID_AIC_CHANGE, disabled);
11:09<@Alberth>above it, bool disabled = ....
11:10<@Alberth>the latter gives you room to assign separate parts to the boolean
11:10<Samu>yes, that's the intended goal, disable "Select AI" for the selected green slot
11:11<Samu>I am once again allowing green slots to be selectable, aka IsEditable
11:11<Samu>just not leting it to change to another AI
11:12<Samu>but the line is huge!
11:12<@Alberth>I just explained how you can break it in small pieces?
11:12<Samu>hmm, let me read again
11:12<LordAro>https://paste.openttdcoop.org/pqsukrgvs is what i'd do
11:13<LordAro>assuming i'm reading it right
11:13<@Alberth>hi hi LordAro
11:13<LordAro>o/ Alberth
11:13<LordAro>just passing through :)
11:13<@Alberth>yw :)
11:14<LordAro>the condition(s) themselves don't appear to be able to be simplified though
11:14<Samu>deity is the GS
11:14<Samu>thx aro
11:15<Samu>there's also INVALID_COMPANY, when you're not selecting anything
11:15<LordAro>np, make sure you understand what it's doing though
11:16*LordAro disappears into the night again
11:16<@Alberth>night? at this hour?
11:17<andythenorth>so eh, got a spec
11:18<andythenorth>implementation, it looks plausible to still wrap StreetType and TramType in some RoadType stuff
11:18<andythenorth>or alternatively…not :P
11:21<Samu>I had the WayType idea
11:22<Samu>WayType for the name
11:23-!-Arveen [~Arveen@ip-95-223-75-47.hsi16.unitymediagroup.de] has joined #openttd
11:23<Samu>i see Alberth thx
11:24<@Rubidium>Alberth: the sun has set and not risen again, so it must be night (here and where LordAro is)
11:24<andythenorth>removing RoadType in favour of only StreetType and TramType makes a lot of the road-related code more explicit and easier to understand
11:25<andythenorth>but it also makes other places needlessly complex? e.g. infrastructure costs, vehicle construction…others
11:25<andythenorth>pathfinding
11:29<andythenorth>loads of AI / GS support
11:30<frosch123>i think you dug too deep
11:30<frosch123>be careful of balrogs
11:30<andythenorth>I think keeping RoadType and being able to unpack it to StreetType and TramType is preferable
11:30<frosch123>yup :)
11:30<@Rubidium>do you need 16 road and 16 tram types? Or is sharing 15 of both enough? (i.e. the num of road and tram types is 15). Then you could just have two IDs stored as "road type", where RoadType 0 means: slot not used
11:31<andythenorth>I found > 500 places that RoadType would be removed and replaced with slightly more complex code :P
11:31<andythenorth>not good
11:32-!-glx [~glx@000128ec.user.oftc.net] has joined #openttd
11:32-!-mode/#openttd [+v glx] by ChanServ
11:32<andythenorth>Rubidium: something like this is the plan https://paste.openttdcoop.org/phz94hxiy/i6cbdb/raw
11:36<@Alberth>Rubidium: maybe lord aro is near you then :)
11:36<@Alberth>Samu: yw
11:47<Samu>https://paste.openttdcoop.org/pcgnsbddr i have it like this
11:48<Samu>gonna test it
11:52<Samu>yep, it's working!
11:52<Samu>i just hope assertions dont' get in the way
11:52<Samu>i'm not sure if that's the right way to find out if a company is an AI, and it's AI script is dead
11:52<Samu>do you know of a more correct way to check that?
11:54<Samu>this part here: Company::IsValidAiID(this->selected_slot) && !Company::Get(this->selected_slot)->ai_instance->IsDead();
11:56<Samu>what's the difference between Company::GetIfValid and Company::Get
11:57<@Alberth>documentation should tell you, but likely, the latter doesn't trust you give it a valid company id
11:58<@Alberth>euhm, the former, I mean
11:59<+glx>if AI is dead, the company is no longer an AI
11:59<Samu>it still is
11:59<+glx>it's a ghost company ;)
12:06-!-MonkeyDrone [~Monkey@84.255.131.63] has joined #openttd
12:06<Samu>alright, Get is enough
12:07<Samu>IsValidAiID is also doing GetIfValid
12:11<Samu>moving forward to WID_AIC_CONFIGURE
12:11<Samu>there's a dilema here
12:12<Samu>I don't know how I want this widget to work
12:12-!-MonkeyDrone2 [~Monkey@94.76.40.193] has quit [Ping timeout: 480 seconds]
12:12-!-MonkeyDrone2 [~Monkey@94.76.42.149] has joined #openttd
12:13<Samu>have to decide
12:15-!-MonkeyDrone [~Monkey@84.255.131.63] has quit [Ping timeout: 480 seconds]
12:18<Samu>idea 1: make it work like the GS. it can be configurable from both AI/GS Config window and AI/GS Debug window
12:18-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has quit [Quit: andythenorth]
12:18<Samu>idea 2: disable the button when an AI and a GS are running. it can be configurable from the AI/GS Debug window only
12:19-!-tokai|noir [~tokai@00012860.user.oftc.net] has joined #openttd
12:19-!-mode/#openttd [+v tokai|noir] by ChanServ
12:20<Samu>both AIs and GSs can die as well.
12:21<Samu>when AI dies, it can restart, when a GS dies, it cannot restart
12:23<Samu>i think idea 1 is a better approach, but then I also have to deal with alive and dead configs
12:25<Samu>the instantiation or whatever it's called
12:25-!-tokai [~tokai@00012860.user.oftc.net] has quit [Ping timeout: 480 seconds]
12:26-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has joined #openttd
12:29-!-Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has joined #openttd
12:30-!-HerzogDeXtEr1 [~farci@i59F6C0AB.versanet.de] has joined #openttd
12:35-!-HerzogDeXtEr [~farci@i59F6D857.versanet.de] has quit [Ping timeout: 480 seconds]
12:48<andythenorth>is it painful to review if I do NotRoadTypes as a set of git branches?
12:49<@Alberth>at worst you can make a patch file for each commit at the end :)
12:52<andythenorth>ok :)
13:03-!-Wormnest_ [~Wormnest@s5596abd2.adsl.online.nl] has joined #openttd
13:05<Samu>i'm at script_config.cpp, hmm... so apparently I got to edit this file
13:05<Samu>:(
13:06<@Alberth>just think of all the other files that you don't have to edit
13:06<Samu>hehe
13:09<Samu>AnchorUnchangeableSettings
13:09<Samu>this is the culprit
13:09<Samu>grrr
13:10-!-Wormnest [~Wormnest@s5596abd2.adsl.online.nl] has quit [Ping timeout: 480 seconds]
13:11<Samu>in a game, AIs can define some parameters to be unchangeable during a game. This is nice, for as long as the AI is not dead
13:11<Samu>but if it dies.... what's the point :(
13:13<Samu>I am trying to find a way to "UnAnchorUnchangeableSettings" for dead AIs. halp!
13:13<Samu>treat them like they're not in the game mode GM_NORMAL
13:14-!-Gja [~Martin@93-167-84-102-static.dk.customer.tdc.net] has joined #openttd
13:15<Gja>Hello
13:15<Gja>Can anyone tell me what train carts I can use with YETI?
13:16<@Alberth>anything except default set, and not too ancient
13:16<Gja>oh
13:16<Gja>Im new so just tring different stuff
13:16-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has quit [Quit: andythenorth]
13:16<Gja>YETI seems pretty cool
13:16<@Alberth>if you like the default set, you can try ogfx+trains
13:17<@Alberth>there is also ogfx+rvs and a few other ogfx+ newgrfs
13:17<Gja>honestly dont know about any alternatives to teh default
13:17<Gja>I dont mind trying new things
13:17<frosch123>use nuts to get matching yeti graphics on the trains
13:17<@Alberth>these work mostly like the default set, but you can use them with eg yeti
13:17<Gja>nuts seems just kind of over done..
13:18<frosch123>well, then pineapple trains
13:18-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has joined #openttd
13:18<@Alberth>iron horse, and squish are very playable too
13:18<andythenorth>Squish :D
13:18<@Alberth>and road hog
13:18<andythenorth>it should really be renamed
13:18<@Alberth>*squid
13:19<@Alberth>andy: fish2 :p
13:21<Gja>what is ogfx+rvs?
13:22<Sylf>with nuts, one shouldn't try to use all trains at once
13:22<@Alberth>rv = road vehicle
13:22<Gja>ah
13:22<Gja>found it
13:22<@Alberth>ie buses and trucks :)
13:22<Sylf>nuts is actually very simple if you learn the system behind it
13:23<@Alberth>typing "+" in the search box works well :)
13:23<Sylf>almost too systematic
13:23<@Alberth>nah, unlucky 13 breaks things sufficiently :p
13:23<Sylf>:D
13:35<Gja>I find NUTS confusing
13:35<Gja>and kind of stupid
13:35<@Alberth>how is it confusing?
13:35<@Alberth>there is a very simple system behind it
13:36<@Alberth>you have different classes of engines, you pick the class, and within it, usually the newest engine
13:36<@Alberth>that's it
13:37<@Alberth>but I agree, engine names are quite unique :)
13:39<@Alberth>but then again, other sets make engines with names that are mostly numbers foo-2-8-0 foo-2-8-2
13:40<Samu>bool editable = bla bla bla || (config_item.flags & SCRIPTCONFIG_INGAME) != 0; it's here! I can feel it
13:43<Samu>SCRIPTCONFIG_INGAME !=0 means GM_NORMAL, ya?
13:43<Samu>gonna try something
13:43<Samu>brb
13:46<Gja>dont reallly see the need of different classes
13:47<Gja>I am happy with the simple normal game with normal rail and trains
13:49<@Alberth>freight doesn't need to be fast, but it's heavy so you need something powerful, but that's slow
13:49<@Alberth>passengers want to be fast, but are not heavy, so you can use a fast light but less powerful engine
13:50<Gja>I know but that was not my point
13:51<@Alberth>what cargo do you transport? if you do only passengers or only freight, you'll always use the same class
13:51<@Alberth>so basically you use just a single engine
13:51<@Alberth>perhaps for longer distances a second one
13:52<@Alberth>but fair enough, ogfx+ grfs will work too
13:53<Gja>I just ind NUTS strange and rather want a basic trainset to start out with as a new player
13:53<andythenorth>Iron Horse
13:53*andythenorth self-promotes :P
13:53<@Alberth>pineapple or iron horse are find if you're into transporting things
13:54<@Alberth>if you want to simulate country X, there is likely a train set for that
13:54<@Alberth>but they're heavy on the simulation side, rather than nicely playable
14:00<Samu>help me at math! bool editable = false || false & true || false
14:00<Samu>this results in editable = false?
14:02<@Alberth>not adding parentheses in mixed || and && expressions is always tricky
14:02<Samu>erm... bool editable = false || true && false || false
14:02<Samu>ah yes the parentessis
14:02<Samu>erm... bool editable = false || (true && false) || false
14:05<Samu>hmm ok, must think
14:07<Samu>bool editable = false || (true && false) || (false || something_that_makes_this_one_true)
14:07<Samu>guess this is what I gotta do
14:13<andythenorth>is there any viable strategy for incrementally patching something like RoadTypes?
14:13<andythenorth>the RoadTypes enum is used in about 200 places, and I can’t change all 200 before trying a compile
14:14<andythenorth>well 78 places to be strict
14:16<@Alberth>my strategy is to first make the solution in any way I can
14:16<@Alberth>and only then worry about a nice incrmental path
14:16<frosch123>and certainly don't start with a renaming session :)
14:17<@Alberth>if you want to change only a few things between compiles, add new names with existing values, and replace old names with new names, could be a strategy
14:17<frosch123>that only makes changes more complicated, since you are touching a lot of code without a real reason
14:18<@Alberth>once you did all places, you can remove the old names
14:18<@Alberth>and then change the values
14:18<Eddi|zuHause>#define oldname newname
14:20-!-skrzyp [skrzyp@188.166.115.173] has joined #openttd
14:20<andythenorth>I can’t see a way to do it without adding something like RoadTypesNew
14:20<andythenorth>then replacing that later
14:23<andythenorth>NotRoadTypes :P
14:26<Samu>another giant code line created :(
14:26<Samu>bool editable = _game_mode == GM_MENU || ((this->slot != OWNER_DEITY) && !Company::IsValidID(this->slot)) || ((((config_item.flags & SCRIPTCONFIG_INGAME) != 0) || ((this->slot != OWNER_DEITY) && Company::IsValidAiID(this->slot) && Company::Get(this->slot)->ai_instance->IsDead())));
14:27<Samu>though the buttons are shown as clickable, they are, in fact, not clickable when i click on them. what else must i change?
14:28-!-_johannes [~johannes@port-92-203-225-175.dynamic.qsc.de] has joined #openttd
14:29<andythenorth>this channel seems to currently be home to inept C++ coders :)
14:30<Samu>im sorry :(
14:30<andythenorth>there are two of us at least ;)
14:31<@peter1138>hey
14:31<@peter1138>i resemble that remark
14:38<V453000>http://imgur.com/a/ERUze
14:41<@Alberth>:D
14:42<@peter1138>"lego"
14:43<@peter1138>ah it's just worn...
14:44<@peter1138>i don't remember being able to see so many molding marks back in the day
14:48<andythenorth>the inserters are not bad eh?
14:49<@peter1138>the what?
14:49<andythenorth>tripod things
14:49<andythenorth>whatever they’re called
14:49<andythenorth>I played factorio once
14:50<@peter1138>i havne't
14:51<Eddi|zuHause>i played the demo a few months back
14:54-!-blurrghh [~blurrghh@2a02:8388:8a01:a080:a4a2:f15:f6f2:f5ec] has joined #openttd
14:58-!-blurrghh [~blurrghh@2a02:8388:8a01:a080:a4a2:f15:f6f2:f5ec] has left #openttd []
15:14-!-MonkeyDrone2 [~Monkey@94.76.42.149] has quit [Quit: Leaving]
15:26<Samu>I play tetris with openttd code
15:26<Samu>that's how I code, cus i barely understand what i'm doing
15:27<Samu>tetris or lego
15:41-!-Wormnest__ [~Wormnest@s5596abd2.adsl.online.nl] has joined #openttd
15:48-!-Wormnest_ [~Wormnest@s5596abd2.adsl.online.nl] has quit [Ping timeout: 480 seconds]
16:13-!-Wormnest_ [~Wormnest@s5596abd2.adsl.online.nl] has joined #openttd
16:13<supermop>yo
16:20-!-Wormnest__ [~Wormnest@s5596abd2.adsl.online.nl] has quit [Ping timeout: 480 seconds]
16:27-!-Hiddenfunstuff [~Geth@y32.ip1.anvianet.fi] has quit [Quit: HydraIRC -> http://www.hydrairc.com <- \o/]
16:27-!-gelignite [~gelignite@x4e318694.dyn.telefonica.de] has quit [Quit: http://bit.ly/1kso8Ta]
16:36-!-Alberth [~alberth@2001:981:c6c5:1:be5f:f4ff:feac:e11] has left #openttd []
16:40-!-_johannes [~johannes@port-92-203-225-175.dynamic.qsc.de] has quit [Ping timeout: 480 seconds]
16:40-!-frosch123 [~frosch@00013ce7.user.oftc.net] has quit [Quit: be yourself, except: if you have the opportunity to be a unicorn, then be a unicorn]
16:41<andythenorth>bed
16:41-!-andythenorth [~Andy@cpc87201-aztw31-2-0-cust156.18-1.cable.virginm.net] has quit [Quit: andythenorth]
16:55-!-sla_ro|master [slamaster@89.136.141.100] has quit []
17:04-!-Arveen [~Arveen@ip-95-223-75-47.hsi16.unitymediagroup.de] has quit [Quit: Nettalk6 - www.ntalk.de]
17:11-!-Clockworker__ [~Clockwork@200-102-65-33.paemt701.dsl.brasiltelecom.net.br] has joined #openttd
17:17<Samu>is svn openttd dead?
17:17<Samu>tried to update, it's slow
17:18-!-Clockworker_ [Clockworke@200-102-65-33.paemt701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 480 seconds]
17:19-!-Supercheese [~Superchee@cpe-76-178-136-186.natnow.res.rr.com] has joined #openttd
17:21-!-Progman [~progman@p57A19801.dip0.t-ipconnect.de] has quit [Remote host closed the connection]
17:33-!-FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has joined #openttd
17:36<supermop>a train vehicle normally has 8 sprites, right?
17:36<Eddi|zuHause>4 or 8, depending on symmetry
17:36<supermop>does it need an extra 8 to be flippable?
17:37<Eddi|zuHause>if it's shorter than 8/8, then it should have two sets of offsets (but the template could take care of that)
17:37-!-liq3 [liq3@CPE-120-147-195-191.gdiv2.lon.bigpond.net.au] has joined #openttd
17:37<supermop>i have red lights on one end and white on the other so asymetrical
17:38<supermop>unless headlights/tailights can be switched by some kind of pallette magic?
17:38<Eddi|zuHause>basically the reversed vehicle should shuffle around the sprites
17:38<Eddi|zuHause>you can use recolouring to change the headlights, yes
17:38<Eddi|zuHause>but that is probably complicated to set up, if it's not prepared already
17:39<Eddi|zuHause>lights should have 3 states: red, white, off
17:39<Eddi|zuHause>red lights are only allowed at the end of the train
17:39<Eddi|zuHause>(because if the train is cut in half, it must be recognizable that some part is missing)
17:41<FLHerne>Eddi|zuHause: In OTTD, wouldn't the lights generally be hidden by the following vehicle anyway?
17:41<Eddi|zuHause>a) that's not the point, and b) no, it can be exposed in curves
17:43<Samu>question: when I am viewing the parameters of an AI slot that suddenly starts, the Reset button to bring back the defaults of that AI, doesn't turn itself off. How can I improve this?
17:44<Samu>sec, let me get a screenshot
17:47-!-Taco [~kitty@2402:9e80:1::1:9a37] has quit [Remote host closed the connection]
17:47<Eddi|zuHause>so, a single engine should have white/red, an engine at the front should have white/off, an engine in the middle should have off/off and an engine at the end should have off/red
17:48<Eddi|zuHause>(you can check position in chain and total train length (or position from end of chain) to decide the graphics or the recolouring)
17:51-!-Clockworker_ [~Clockwork@200-102-65-33.paemt701.dsl.brasiltelecom.net.br] has joined #openttd
17:51<Samu>http://i.imgur.com/pdcOiWj.png - let me explain what happens
17:52<Samu>before the SimpleAI started, just below the Human player slot, I opened the parameter settings
17:52<Samu>The Reset button on the Parameters window is to be enabled for as long as the SimpleAI does not start
17:53<Samu>but then, since the game was running, SimpleAI started, and the Reset button is still clickable. I want to make it unclickable when the AI starts
17:53<Samu>how can i do this?
17:54-!-Wormnest_ [~Wormnest@s5596abd2.adsl.online.nl] has quit [Quit: Leaving]
17:54<Samu>if I close and open the Parameters window again, the Reset button displays unclickable, as intended
17:57-!-Taco [~kitty@2402:9e80:1::1:9a37] has joined #openttd
17:58-!-Clockworker__ [~Clockwork@200-102-65-33.paemt701.dsl.brasiltelecom.net.br] has quit [Ping timeout: 480 seconds]
17:59<supermop>Eddi|zuHause: if the engine is physically asymetrical, does it need 8 or 16 sprites?
17:59<Eddi|zuHause>8
17:59<supermop>assuming player can flip it
17:59<Eddi|zuHause>like i said it, flipping can be handled by the template
18:00<supermop>ok
18:00<Eddi|zuHause>(i.e. the code that uses the sprites)
18:00<supermop>any sensible reason to have pantograph up/down sprites
18:01<supermop>or better to just say every unit runs with every pantograph up?
18:10-!-Gja [~Martin@93-167-84-102-static.dk.customer.tdc.net] has quit [Quit: Going offline, see ya! (www.adiirc.com)]
18:19-!-JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has joined #openttd
18:27<Samu>hey, i figured it out.
18:27<Samu>it closes the window now, not exactly optimal, but...
18:27<Samu>tomorrow i'll improve this
18:41-!-JacobD88 [~Thunderbi@cpc80661-stap13-2-0-cust817.12-2.cable.virginm.net] has quit [Quit: JacobD88]
19:13-!-Ketsuban [~ketsuban@2a02:c7d:a34a:9000:f1e6:dc79:fd23:d389] has quit [Quit: Leaving]
19:23<Samu>gah, i need a GS that crashes
19:23<Samu>must test something
19:24<Samu>time to destroy BusyBee
19:27<Samu>is there a reason why crashed GS can't restart?
19:28<Samu>I need to know what I can do about crashed GS parameters
19:54<Samu>okay, new version out -> http://www.tt-forums.net/viewtopic.php?f=33&t=74694&p=1166831#p1166831
19:59<Samu>editing main post
20:15<Eddi|zuHause>ha. they're showing a rerun of the moon landing on tv. and they did stage it in a studio :p
20:17<Eddi|zuHause>(they do not have footage from the moon lander before armstrong hits the ground, so they hired some actors to play that part out)
20:22<Wolf01>'night
20:22-!-Wolf01 [~wolf01@0001288e.user.oftc.net] has quit [Quit: Once again the world is quick to bury me.]
20:50-!-Samu [~oftc-webi@po-217-129-255-23.netvisao.pt] has quit [Quit: Page closed]
20:51-!-Samu [~oftc-webi@po-217-129-255-23.netvisao.pt] has joined #openttd
21:11<Samu>main post edited, finally, sorry I took this long -> http://www.tt-forums.net/viewtopic.php?f=33&t=74694
21:12-!-LadyHawk- [~LadyHawk@5751e87a.skybroadband.com] has joined #openttd
21:14<Samu>is it permitable or permissible
21:14<Samu>bah my english :8
21:16-!-LadyHawk [~LadyHawk@5751e87a.skybroadband.com] has quit [Ping timeout: 480 seconds]
21:16-!-LadyHawk- is now known as LadyHawk
21:20-!-HerzogDeXtEr1 [~farci@i59F6C0AB.versanet.de] has quit [Read error: Connection reset by peer]
21:22<Samu>cyas goodnight
21:22-!-Samu [~oftc-webi@po-217-129-255-23.netvisao.pt] has quit [Quit: Page closed]
21:23-!-FLHerne [~flh@dsl-217-155-24-22.zen.co.uk] has quit [Ping timeout: 480 seconds]
22:32-!-glx [~glx@000128ec.user.oftc.net] has quit [Quit: Bye]
22:37-!-supermop [~supermop@pool-100-37-203-161.nycmny.fios.verizon.net] has quit [Ping timeout: 480 seconds]
23:25-!-Snail [~jacopocol@cpe-98-14-130-227.nyc.res.rr.com] has quit [Quit: Snail]
---Logclosed Mon Apr 11 00:00:23 2016