Ignore lines starting with # rather than remove them

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Ignore lines starting with # rather than remove them

Post by White Rabbit »

What has been irritating me lately is that OTTD removes lines starting with #, instead of simply ignoring them like it used to do. This is a problem when I sort out of new GRFs under [newgrf]. I sort them like on the OTTD wiki:

Code: Select all

#
#PLANES
#
#PLANESETW.GRF
#PLANESETW_459.GRF
data\PB_AV8W.GRF
#
#SHIPS
#
data\NEWSHIPSW.GRF
#
#MISC. VEHICLES
#
#CARGOSETW.GRF
This makes it so much easier to pick the new GRF I want, and deactivate the ones for later use. Now, however, all I get is this:

Code: Select all

data\PB_AV8W.GRF
NEWSHIPSW.GRF
#
#MISC. VEHICLES
#
#CARGOSETW.GRF
For some reason, only the lines starting with # below the last non-# line are kept. I would really like it if the old behaviour was brought back, thanks.
Image
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

Not on point to your question, but have you tried using subdirectories under your data\ directory?

Example:

Planes, RVs, Trams in a vehicle directory so that their entries in your *.cfg can be identified as shown below... Stations in a stations directory, etc.

data\Vehicles\PB_AV8.grf
data\Vehicles\TRAM.grf
data\Stations\Platforms.grf
data\Stations\CanadianStations.grf

Not perfect, but it does provide a greater level of clarity when working with your *.cfg and managing a larger list.
Many thanks to those who make OTTD and TTDP possible.
knedle
Traffic Manager
Traffic Manager
Posts: 158
Joined: 13 Apr 2007 17:07

Post by knedle »

Nice idea, I have so much grfs, but never though about it! :)
Have to try it tomorrow at work... ;)
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

Chicago Rail Authority wrote:Not on point to your question, but have you tried using subdirectories under your data\ directory?

Example:

Planes, RVs, Trams in a vehicle directory so that their entries in your *.cfg can be identified as shown below... Stations in a stations directory, etc.

data\Vehicles\PB_AV8.grf
data\Vehicles\TRAM.grf
data\Stations\Platforms.grf
data\Stations\CanadianStations.grf

Not perfect, but it does provide a greater level of clarity when working with your *.cfg and managing a larger list.
That won't help because I won't have easy access to deactivated new GRFs. If I want a new one, I have to look up its filename and type it in, rather than simply removing the # from a pre-written list.
knedle wrote:Nice idea, I have so much grfs, but never though about it! :)
Have to try it tomorrow at work... ;)
But it won't work because lines starting with # are removed. That's my point.
Image
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

Not sure I follow your issue, then.

What's wrong with loading all of them on start-up, and then removing ones you don't want for an individual game after the map loads? This would preserve your list in its entirety, and customize your current game to whatever settings you want to use for that game...
Many thanks to those who make OTTD and TTDP possible.
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

Chicago Rail Authority wrote:Not sure I follow your issue, then.

What's wrong with loading all of them on start-up, and then removing ones you don't want for an individual game after the map loads? This would preserve your list in its entirety, and customize your current game to whatever settings you want to use for that game...
That would take too long. I want it to be easier. Here's my full list:

Code: Select all

[newgrf]
#
#PLANES
#
#PLANESETW.GRF
#PLANESETW_459.GRF
data\PB_AV8W.GRF
#
#SHIPS
#
data\NEWSHIPSW.GRF
#
#MISC. VEHICLES
#
#CARGOSETW.GRF
#
#TRAINS
#
#TEMPSETW.GRF
#PB_UKRS.GRF
#UKRSAP1W.GRF
#DBSETXLW.GRF
#ARCTICSETW.GRF
#TROPICSTW.GRF
#japansetw.grf
data\USSETW.GRF
#PB_BRMINI.GRF
#PB_NARS.GRF = 0 7 1
#SRSNGW.GRF
#SRSSGW.GRF
#
#ROAD VEHICLES
#
#PB_HOVS.GRF
data\4LVW.GRF
#3AIMANAGERW.GRF
#3LONGBUSESW.GRF
#3LONGBUSESEEW.GRF
#3LONGBUSESNAW.GRF
#3MCTRUCKSW.GRF
#3MERCEDESTRUCKSW.GRF
#3NAVISTARTRUCKSW.GRF
#3OPELTRUCKSW.GRF
#3SCANIATRUCKSW.GRF
#!3SKODATRUCKSW.GRF!
#3SPITZERTRUCKSW.GRF
#3VOLVOTRUCKSW.GRF
#MCTRUCKSW.GRF
#NAVISTARTRUCKSW.GRF
#SCANIATRUCKSW.GRF
#SCANIA2TRUCKSW.GRF
#!3SKODATRUCKSW.GRF!
#SPITZERTRUCKSW.GRF
#VOLVOTRUCKSW.GRF
#/nightly/pb_hovs_bus.grf
#
#INFRASTRUCTURE
#
#ELRAILSW.GRF
#NGRAILSW.GRF
data\USROADSW.GRF
#UKROADSETW.GRF
data\NEWBRIDGESW.GRF 3
data\PB_VIADUCT.GRF
#EUROADSTW.GRF
#TRAFFICSETW.GRF
#NSIGNALSW.GRF
#ONEWAYW.GRF
#SIGNALSW.GRF
#TRAMTRKW.GRF
#USSIGNALSW.GRF
#BASETUNNELSW.GRF
#COMBROADW.GRF 2,1
#AIRPORTASPHALT(W).GRF
#CONTROLTOWER(W).GRF
data\USSIGZW.GRF = 2 2 1
#arcticsignalw.grf = 4
#UKRoadsetw.grf
#
#MISC/REDUNDANT
#
#JPSET_NAMW.GRF
#T2MARSBONUSW.GRF
#TOYLAND2MARSW.GRF
#AUTORAIL.GRF
#BRP.GRF
#CCOL2W.GRF
#DOSDUMMY.GRF
#
#BUILDINGS/LANDSCAPE
#
#TTRS2W.GRF = 1 1 0
data\TTRS3W.GRF = 1 0 0
#HIGHHQ.GRF
#NEWOFFICE.GRF
#NEWOFFICE3.GRF
#NEWOFFICEBUILDING.GRF
#OFFICES.GRF
#NEWTOWN_415.GRF
#TTRSW.GRF
#LIGHTFIX.GRF
#TRANSMITTER.GRF
#ANGLEBUILDING.GRF
data\GW_HQSET.GRF
#HELIPORTW.GRF
#L2HOUSEMALO.GRF
#MAINHQ(W).GRF
#NATIONALBANK(W).GRF
#NEWDOCKS(W).GRF
#NEWHOTEL.GRF
#NOPOINTS.GRF
data\NO-SPIRE.GRF
#STATUE-RESIDENCE_WIN.GRF
#TALLHQ.GRF
#alpinew.grf
#alpinetrkfound.grf
#TRKFOUNDW.GRF
#TTRS2-MODW.GRF 1 0 0
#GRASSCONVW.GRF
#TEMPENHW.GRF
#TTRS2-MODW.GRF
data\NABSW.GRF
#JPSET_LNDW.GRF
#JPSET_BLDW.GRF
#
#NEW STATIONS
#
data\BUFFERS.GRF
data\NEWSTATSW.GRF
data\USSTATSW.GRF
data\JCINDSTAW.GRF
data\HARBOURW_456.GRF
data\BRICKFREIGHTW.GRF
data\MODERNSUBURBANW.GRF
data\RURALW.GRF
data\SUBURBANW.GRF
data\CITYSTATIONSW.GRF
data\BASIC_PLATFORMSW.GRF
data\BARE_TILESW.GRF
data\NEWSTATIONS_ALL(W).GRF
data\CANSTNW.GRF
data\UKWAYPOINTSW.GRF
#OPENTTD.GRF
#GLASSSTATIONW.GRF
#JAPSTATW.GRF
#JSTATSW.GRF
#PLATFORMSW.GRF =
#
#INDUSTRIES (OTTD INCOMPATIBLE)
#
data\IRONOREMINECRANE.GRF
#FORESTLOGTRUCK.GRF
#FORESTLOGTRUCK_ARCTIC.GRF
#NEWCARGOW.GRF
#NEWCARGOSPETROLTOURISTSW.GRF
#PB_UKRSI.GRF
#PAPER.GRF

[newgrf-static]
data\BIGDEPOTS.GRF
data\SHIPDEPOTWITHCRANE.GRF
data\WOODENDOCKW.GRF
data\NEWWATERW.GRF
data\TRANSMITTER(W).GRF
Image
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1732
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Of course, the GUI and the savegame configuration takes much of the work out of configuring NewGRFs.

But at some point NewGRF 'presets' will arrive, and you'll be able to load and save lists of NewGRFs to use.
He's like, some kind of OpenTTD developer.
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

peter1138 wrote:Of course, the GUI and the savegame configuration takes much of the work out of configuring NewGRFs.

But at some point NewGRF 'presets' will arrive, and you'll be able to load and save lists of NewGRFs to use.
Cool. Thanks for the update, Peter.
Many thanks to those who make OTTD and TTDP possible.
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: Bing [Bot] and 13 guests