Wrong company's inagurated date

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
RedEclipse
Engineer
Engineer
Posts: 45
Joined: 19 Feb 2012 16:00

Wrong company's inagurated date

Post by RedEclipse »

Hi, is there any way to fix company inaugurated date? For some reason now it displays 2652 year(current date 2780), though real start of the game was 1888 year and time when company was founded.
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Wrong company's inagurated date

Post by Taschi »

That sounds like a pretty nasty bug, you should probably file a report at https://github.com/OpenTTD/OpenTTD.
RedEclipse
Engineer
Engineer
Posts: 45
Joined: 19 Feb 2012 16:00

Re: Wrong company's inagurated date

Post by RedEclipse »

Oh, probably it was me, not the bug. Once I've transferred my save to scenario mode to delete FIRS petrol station that appeared right before railroad placement. I've tested it again and company start data has changed again. Still looking for the way to restore company start date though.. I believe scv can be opened by VS to edit save or I'm wrong?
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Wrong company's inagurated date

Post by Taschi »

Yes, changing your NewGRFs in a game has the potential to completely ruin them - that's why it's hidden behind several layers of hidden options and developer tools.

Your best option is probably to restore a backup save if you have one, or start a new game and take this as a valuable learning experience if you don't.

Changing the NewGRF settings in a running game has a myriad of different ways to corrupt game state so there isn't an easy way to fix it and fixing the problem you currently have would probably just expose another problem.
User avatar
kamnet
Moderator
Moderator
Posts: 8582
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Wrong company's inagurated date

Post by kamnet »

RedEclipse wrote: 12 Aug 2021 20:01 Oh, probably it was me, not the bug. Once I've transferred my save to scenario mode to delete FIRS petrol station that appeared right before railroad placement. I've tested it again and company start data has changed again. Still looking for the way to restore company start date though.. I believe scv can be opened by VS to edit save or I'm wrong?
No, scn files and sav files cannot be opened by VS. But, if you study enough coding you can pretty much open anything with a hex editor ;)
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Wrong company's inagurated date

Post by Taschi »

kamnet wrote: 12 Aug 2021 20:23 But, if you study enough coding you can pretty much open anything with a hex editor ;)
Well, the ability to open a file with a hex editor is mostly dependent on understanding how the program which wrote said file works than it is dependent on coding ability.

But... yeah, editing save games by hand is usually not something you really want to do, not just in OpenTTD but pretty much in general.
RedEclipse
Engineer
Engineer
Posts: 45
Joined: 19 Feb 2012 16:00

Re: Wrong company's inagurated date

Post by RedEclipse »

Well, thanks for the tips. I'll try hex editor. I'm a web dev so it could be an interesting experience :)

Unfortunately due to behavior of FIRS grf starting a new game wouldn't help - those immortal petrol stations messing things around. I've tried to avoid building roads like cancer, but instead came up in solution to demolish them in scenario mode if they misbehave a lot.

P.S. I just remember of good old tool that I've used ages ago - ArtMoney. Found year by pattern and replaced it manually to proper year :]
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Wrong company's inagurated date

Post by Taschi »

RedEclipse wrote: 12 Aug 2021 21:03P.S. I just remember of good old tool that I've used ages ago - ArtMoney. Found year by pattern and replaced it manually to proper year :]
If that works for you, that's fine. But just for the sake of posterity, I'd like to state that this is not guaranteed to result in a functional game state. NwGRFs and game scripts can rely on the fact that the list of which NewGRFs are loaded is constant throughout the game. If that assumption is violated, many components of the game could behave erratically (which is a euphemism for "bad") afterwards.

So your best bet is still to not change NewGRF settings in a running ge, or at least have a backup save when you do.
RedEclipse
Engineer
Engineer
Posts: 45
Joined: 19 Feb 2012 16:00

Re: Wrong company's inagurated date

Post by RedEclipse »

But I didn't update the list of GRFs and scripts afterall. Or even this slight change may ruin the save?
Taschi
Route Supervisor
Route Supervisor
Posts: 425
Joined: 11 Oct 2014 22:58

Re: Wrong company's inagurated date

Post by Taschi »

RedEclipse wrote: 12 Aug 2021 23:13 But I didn't update the list of GRFs and scripts afterall. Or even this slight change may ruin the save?
Oh, sorry, you just deleted an individual building? In that case I misread your earlier post.

I don't understand just how much a NewGRF can do but this is definitely the kind of thing I wouldn't do without a backup save.

Worst thing that can happen to you if you change the founding date of your company through a hex editor is that your game will just go off the rails again a few hours later. Your choice if you want to accept that risk. There are definitely occasions where it's worth it.
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Wrong company's inagurated date

Post by Eddi »

tip: if you want to hexedit your savegame, you must first set openttd.cfg to make uncompressed savegames.
gebik
Traffic Manager
Traffic Manager
Posts: 174
Joined: 07 Sep 2020 15:12
Location: Usually near some interesting rail systems. :P

Re: Wrong company's inagurated date

Post by gebik »

RedEclipse wrote: 12 Aug 2021 20:01 Oh, probably it was me, not the bug. Once I've transferred my save to scenario mode to delete FIRS petrol station that appeared right before railroad placement. I've tested it again and company start data has changed again. Still looking for the way to restore company start date though.. I believe scv can be opened by VS to edit save or I'm wrong?
Next time use Ctrl+Alt+C to open cheat menu. Then turn on "magic bulldozer", delete the offending industry, and then turn the cheat again off... (having it always on can cause towns deleting industries too)
Are you an eye candy player? Check out Invisible engine set! viewtopic.php?f=67&t=88934
You can write to me in English, or Czech. Můžete mi psát česky nebo anglicky.

Formerly known as MLG.
RedEclipse
Engineer
Engineer
Posts: 45
Joined: 19 Feb 2012 16:00

Re: Wrong company's inagurated date

Post by RedEclipse »

Taschi wrote: 12 Aug 2021 23:30
RedEclipse wrote: 12 Aug 2021 23:13 But I didn't update the list of GRFs and scripts afterall. Or even this slight change may ruin the save?
Oh, sorry, you just deleted an individual building? In that case I misread your earlier post.

I don't understand just how much a NewGRF can do but this is definitely the kind of thing I wouldn't do without a backup save.

Worst thing that can happen to you if you change the founding date of your company through a hex editor is that your game will just go off the rails again a few hours later. Your choice if you want to accept that risk. There are definitely occasions where it's worth it.
I'm totally fine with list of my current GRFs. Though I dislike in "Old Wagons with New Cargos" that most of commodities using inappropriate type of wagons. If i'll try to mess with OpenTTD GRFs it'll be my first mod, as I'm fan of good old TT :)
Eddi wrote: 13 Aug 2021 02:33 tip: if you want to hexedit your savegame, you must first set openttd.cfg to make uncompressed savegames.
Thanks, I'll keep that in mind.
MLG wrote: 13 Aug 2021 06:27
RedEclipse wrote: 12 Aug 2021 20:01 Oh, probably it was me, not the bug. Once I've transferred my save to scenario mode to delete FIRS petrol station that appeared right before railroad placement. I've tested it again and company start data has changed again. Still looking for the way to restore company start date though.. I believe scv can be opened by VS to edit save or I'm wrong?
Next time use Ctrl+Alt+C to open cheat menu. Then turn on "magic bulldozer", delete the offending industry, and then turn the cheat again off... (having it always on can cause towns deleting industries too)
To be honest I don't like to flag my game as "cheated". I love to keep original landscape, rivers and etc, industries aswell. But immortal petrol stations is what I dislike a lot in FIRS(though mod itself is gem).
User avatar
Emperor Jake
Tycoon
Tycoon
Posts: 3427
Joined: 24 Apr 2007 09:37
Skype: Discord: Emperor Jake #4106
Location: Not Actually Japan
Contact:

Re: Wrong company's inagurated date

Post by Emperor Jake »

MLG wrote: 13 Aug 2021 06:27(having it always on can cause towns deleting industries too)
That hasn't been the case in well over a decade and yet the myth still persists. I haven't played with magic bulldozer off in years and towns have never removed industries. AIs, however, will sometimes destroy industries while trying to serve them.

To the OPs problem, I realise it's too late now but the company year reset might be avoided by renaming the .scn back to a .sav before reloading it (not sure though)
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 25 guests