New GRF

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

OSkar000
Engineer
Engineer
Posts: 24
Joined: 02 Feb 2005 12:02
Location: Sweden
Contact:

Re: New GRF

Post by OSkar000 »

planetmaker wrote:
OSkar000 wrote:
planetmaker wrote:Disallowing the change of newgrfs after starting the game is by design. NewGRFs are an integral part of the map. That holds also for vehicles.
I think some kind of manual override is needed, otherwise it will kill a lot of the fun with making new scenarios.
It usually kills my fun when every day there's a new bug report of <whatever> going wrong and then only to find out that the person changed newgrf after map create.

use set scenario_developer 1 in the console and your control over newgrfs is back. Then all warranty is void though (as if there's been some in the first place ;-) ). If you can avoid to change NewGRFs, then do it by all means. Even changing vehicle grfs in the scenario editor does compromise the game and has the potential to introduce quite a bit of unwanted behaviour.
Thanks, that solved my problem (and maybe gave me some new probems).
User avatar
Gord
Chairman
Chairman
Posts: 775
Joined: 15 Aug 2007 10:14
Location: Upper Gornal, Dudley

Re: New GRF

Post by Gord »

I don't normally post in this section of the forums (or normally look here to be honest because if I come across a problem with the game...it's usually something I've done and not the fault of anyone else!), but just want to say thanks for posting that Planetmaker.

Good to know there are options for us who know the risks!

Although I do completly understand why the changes were made.
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: New GRF

Post by Voyager One »

Sorry for bumping this already discussed topic but... I've noticed a "new" thing in one of the latest nightlies. You CAN'T change NewGRFs in-game any more, there's no option for that.

How do I change a NewGRF with the latest nightly? I need to do it 2-3 times per week. Do I need to start a new game every time from now on?
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: New GRF

Post by planetmaker »

Voyager1 wrote:Sorry for bumping this already discussed topic but... I've noticed a "new" thing in one of the latest nightlies. You CAN'T change NewGRFs in-game any more, there's no option for that.
That's right, it's one of the primary reasons for game crashes and no-one ever reads the red warning box that it's the source of many different kind of troubles.
(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs
If you change NewGRFs on an existing map on a daily basis and you do NOT develop NewGRFs you do something wrong [TM]. If you test NewGRFs, just overwriting the existing NewGRF with the updated version will work and the game will most often load as compatible as usual (unless those versions are indicated as incompatible); as such even then you usually don't need to change the newgrf config, just replace the grf file and reload the game.

If you still insist on messing with savegames and insist you know all implications, e.g. it is an old scenario which you need to 'update' (and then provide such useful scenarios on bananas like one of the 'England and Wales' ones :-P) use the scenario_developer switch or use the newgrf_developer_tools for even more power (both console only) to get back the old behaviour.
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: New GRF

Post by Voyager One »

Thanks for the tips. I'll try renaming the new nightlies. :D

I'm aware of the risk but I'm contributing and testing the 2cc set and I really want to know if I've drawn something wrong or anything else that's wrong in the nightlies.

Thank you.
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: New GRF

Post by planetmaker »

Voyager1 wrote:I'm aware of the risk but I'm contributing and testing the 2cc set and I really want to know if I've drawn something wrong or anything else that's wrong in the nightlies.
Yes, but exactly there such setting is not needed active usually;-) The nightlies come all with the same filename within the same folder. You can just overwrite the existing one. And reload the game. Removing and Re-adding NewGRFs is MUCH more dangerous than such smooth update by a compatible newgrf.

(Just to convince myself that there's really everything just overwritten when unzipping a newer nightly over the old: No version names present except in the zip file name:

Code: Select all

~/ottd/grfdev/2cctrainset> unzip -l 2cctrainset-nightly-r683.zip 
Archive:  2cctrainset-nightly-r683.zip
  Length     Date   Time    Name
 --------    ----   ----    ----
        0  11-26-10 10:39   2cctrainset-nightly/
  1093984  11-26-10 10:39   2cctrainset-nightly/2cctrainset.grf
      745  11-26-10 10:39   2cctrainset-nightly/changelog.txt
    35147  11-26-10 10:39   2cctrainset-nightly/gpl.txt
    18092  11-26-10 10:39   2cctrainset-nightly/license.txt
     4967  11-26-10 10:39   2cctrainset-nightly/readme.txt
 --------                   -------
  1152935                   6 files
User avatar
norbert79
Engineer
Engineer
Posts: 102
Joined: 25 Apr 2003 16:44
Location: Hungary
Contact:

Re: New GRF

Post by norbert79 »

planetmaker wrote:
(svn r21116) -Add [FS#3012]: Reduce the chances to accidentially break savegames with NewGRFs
If you change NewGRFs on an existing map on a daily basis and you do NOT develop NewGRFs you do something wrong [TM]. If you test NewGRFs, just overwriting the existing NewGRF with the updated version will work and the game will most often load as compatible as usual (unless those versions are indicated as incompatible); as such even then you usually don't need to change the newgrf config, just replace the grf file and reload the game.
I disagree, and I hope this change won't be for long term. One very simple scenario: Running game, I discover a new GRF handling some more pretty fences or trees, but it's not the same I have used. So I have to add a new GRF and remove an older one. It needs to be done.
Other scenario: I start a game, play with it for around 10 years of gameplay, discover I have made a mistake by forgating addign one GRF, and/or to set right parameters. That needs to be also be done.

So I really don't like the idea not being able to modify any GRF settings while in game. I think such risk shall be leaved on the user, but having a reminder, that the user shall blame himself/herself if the game might crash. This has nothing to do with stability, this is just user own decision.
Üdvözlettel / Mit freundlichen Grüßen / Best regards:
Norbert


Image Image
Image Image
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: New GRF

Post by Voyager One »

planetmaker wrote:The nightlies come all with the same filename within the same folder.
Actually that's my stupidity at work - I download a nightly and rename it with a suffix regarding revision number (i.e. 2cctrainset-r685.grf). :D I'll just stop doing that.

Thanks mate. :wink:

EDIT: @norbert79: Have you read this topic at all? Did you understand it?
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
norbert79
Engineer
Engineer
Posts: 102
Joined: 25 Apr 2003 16:44
Location: Hungary
Contact:

Re: New GRF

Post by norbert79 »

Voyager1 wrote:
planetmaker wrote:The nightlies come all with the same filename within the same folder.
Actually that's my stupidity at work - I download a nightly and rename it with a suffix regarding revision number (i.e. 2cctrainset-r685.grf). :D I'll just stop doing that.

Thanks mate. :wink:

EDIT: @norbert79: Have you read this topic at all? Did you understand it?
Yes, I have.
Üdvözlettel / Mit freundlichen Grüßen / Best regards:
Norbert


Image Image
Image Image
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: New GRF

Post by Voyager One »

Then you must understand why it has been deleted. Causing just too much problems.

*cough* and too many similar "why did my game crash" questions *cough* :lol:
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
Nite Owl
Tycoon
Tycoon
Posts: 1889
Joined: 06 Mar 2007 19:32
Location: In The Dark

Re: New GRF

Post by Nite Owl »

Voyager1 wrote:Actually that's my stupidity at work - I download a nightly and rename it with a suffix regarding revision number (i.e. 2cctrainset-r685.grf). :D I'll just stop doing that.
Actually you do not have to stop doing that. I do the same thing with regards to adding a version number to the name of a grf I have downloaded. If you add the newer version of the grf to the proper folder and then remove the older one and then start up OpenTTD it will recognize the newer version provided the grf ID has not changed. At least I believe it is based on the grf ID not changing. Please correct me if I am wrong.
Humor is the second most subjective thing on the planet
------------------------------------------------------------
Brevity is the soul of wit and obscenity is its downfall
--------------------------------------------------------
Good Night And Good Luck - Read You Soon
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: New GRF

Post by planetmaker »

Nite Owl wrote:At least I believe it is based on the grf ID not changing. Please correct me if I am wrong.
That's correct, but not the whole story.

Different grfIDs are never considered compatible.

But grfs with the same grfID can (meanwhile) define a version number and a minimum_compatible_version number. As such the grfID needs not change anymore (e.g. with this scheme FIRS would never have had to change grfIDs or NARS and NARS2 could have the same). The grf authors can now declare incompatibility by setting the min_compatible_version to the oldest version of itself to which it is still backward compatible.
The result can then be, of course, that a game played with an old version cannot update to a newer one, if it declares itself to be not compatible to that old version. After all NARS isn't compatible to NARS2 either.

See http://wiki.ttdpatch.net/tiki-index.php?page=Action14 for details
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: New GRF

Post by Voyager One »

I changed the filename as I've said and it works fine. Ah, no problem, I just need it to work somehow. Thanks to all for the tips. :)
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: New GRF

Post by belugas »

Just to remind you what can potentially happen:

Most precisely, the part where you can see the user's action:)

THis is far more frequent then what people may think.
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
Voyager One
Tycoon
Tycoon
Posts: 11204
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: New GRF

Post by Voyager One »

I know, that's why I'm testing with a "test" game, not my "real" game. So, if it goes to hell, so be it. I just didn't want to make a new test game EVERY freaking time a new 2cc set nightly gets out. :D
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield
slaca
Engineer
Engineer
Posts: 97
Joined: 14 Feb 2010 10:31

Re: New GRF

Post by slaca »

ICE3 (db set xl) has smoke (like steam engines) in the newest nightly. :? Whats the problem?
Kogut
Tycoon
Tycoon
Posts: 2493
Joined: 26 Aug 2009 06:33
Location: Poland

Re: New GRF

Post by Kogut »

slaca wrote:ICE3 (db set xl) has smoke (like steam engines) in the newest nightly. :? Whats the problem?
http://bugs.openttd.org/task/4275
http://www.tt-forums.net/viewtopic.php?p=914992#p914992
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
User avatar
zero.eight
Traffic Manager
Traffic Manager
Posts: 128
Joined: 15 Jun 2007 01:14

Re: New GRF

Post by zero.eight »

Is changing parameters in a running game considered to be dangerous in the same way that adding/removing NewGRFs is? I don't know how OpenTTD handles this, but changing parameters in a running game is useful for giving players options with immediate results. Given a large number of options and a user who wants to try all of them, it is much easier to change parameters in a running game than to change them from the main menu and start a new game each time.

A specific case: I have a NewGRF that provides sprite replacements (Actions A/5). Users can change the graphics by changing the values of parameters. Action 14 defines parameter minima, maxima and defaults (forced to 0). Parameters are handled by Actions 7 and 10 skipping forwards and backwards. I haven't managed to crash the game or get any unexpected results with this code, but that isn't proof that I won't ever do so. I can easily see the results of changing parameters since I set newgrf_developer_tools = true, however the average player will have to start new games because of FS#3012.

Arguably it is up to the NewGRF developer to provide code that won't lead to crashes or unexpected results through adequate testing and using code that isn't expected to cause such issues. In the case of parameters, this is helped by Action 14 limiting the allowed input values so a user cannot input a value that has not been tested. Therefore a developer has control over what a player can do with parameters, so perhaps it would be acceptable to (re)allow this functionality. Unless, of course, it is unsafe.

I hope I don't sound like I'm whingeing :) I think the change is good but I wonder whether it can be scaled back slightly.
OpenTTD: VAST - station tiles and objects | MICS - urban monorail graphical conversion | Universal Rail Type - easier train replacement
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: New GRF

Post by Eddi »

If only Action5/A are affected, the parameter change would probably be safe [compare: static GRFs], but OpenTTD cannot check that this is the only thing affected, thus it must be assumed it is unsafe.

an extreme example: you might combine two entirely different GRFs into one, and switch between them via parameter. this would be the same as switching the GRFs.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: New GRF

Post by planetmaker »

zero.eight wrote:Is changing parameters in a running game considered to be dangerous in the same way that adding/removing NewGRFs is?
Yes. Consider this: if (param1 == 1) { deactivate(this grf) } else { deactivate(other grf) }. We can't do a semantical analysis of the whole grfs.
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: Ahrefs [Bot] and 23 guests