Experimental multipatch build

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Experimental multipatch build

Post by Quark »

(following text is partially automated translation, sorry me if something is wrong)

Based on MiniIN with following pathces included:
    • 32bpp branch + minimap fix
    • the maximum number of sprites is increased in 2 times
    • bridge branch (bridges through junctions)
    • improved original AI (AI fix patch)
    • Face customization patch (the Generator of the person's face by a principle of an identikit)
    • Passengers/Mail with Specific Destinations (passengers choose where to go)
    • Seasons — Snow in Temperate Climate (the snow in the first climate increases in the winter and thaws in the summer)
    • City growth more challenging (the city grows depending on amount of the brought passengers)
    • Predicted Total Production of Mines (extracted resources are limited and can come to an end)
    • Service rating details patch (details for a rating of the goods at station)
    • My own patch of economy — the tax to possession of the ground and property, paid repair of transport, the industries can deliver a cargo on 3 different stations
    • something about what I have forgotten is possible still (like cyrillic support with newgrf file — remove line «russian.grf» from config file to disable it)

For interested persons to play with my newgrf set — a newgrf pack and config file — different trainsets in each climate

For installation in a new folder it is necessary to unpack file OpenTTD.rar and to place there files openttd.dat and tycoon.dat (and other data files like lang.dat and newgrf.dat if you wish)
Attachments
openttd.dat
The data file which is not changing between builds
(374.57 KiB) Downloaded 598 times
lang.dat
Language file for languages other that russian or english
(660.6 KiB) Downloaded 542 times
OpenTTD.rar
build version r7123M
(913.76 KiB) Downloaded 707 times
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Where's the patch/source code?

Partly because this is GPL, and you are required to produce the source on request, and partly because I want to see how you did "the maximum number of sprites is increased in 2 times".
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

need to generate diff… will attach later
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

I'd like to see the source too, so I can compile it for my laptop... it'd be nice to play with some of the other branches.
We Am De Best

Host of ThroughTheTube site
User avatar
Slace
Transport Coordinator
Transport Coordinator
Posts: 368
Joined: 15 Mar 2004 10:20

Post by Slace »

Soure would be nice for non-windows players :)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

What, exactly, is supposed to be in newgrf.dat? Or the other dat files? None of my tools could make any sense out of them.
Also, that binary is clearly packed, but nothing I can find can tell me what tool was used to pack it.

Neither of these makes me inclined to actually run that binary.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

damn, tell me — how to make right diff? :) (with subdirectories, only needed files, regex lines exclusion and nothing unnecessary in output?)

I will like to hear comments on my changes — especially 32bit map fix (I was lazy and make it easy way) and sprite limit change (any consequnces?)
Attachments
sourcecode.7z
complete source code
(1.66 MiB) Downloaded 336 times
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Quark wrote:damn, tell me — how to make right diff? :)

Code: Select all

$ svn diff > file.diff
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

DaleStan wrote:What, exactly, is supposed to be in newgrf.dat? Or the other dat files? None of my tools could make any sense out of them.
Also, that binary is clearly packed, but nothing I can find can tell me what tool was used to pack it.

Neither of these makes me inclined to actually run that binary.
newgrf.dat is just pack of grf files — binary will find them inside and unpack
other dat files is also just archives to prevent file versions conflicts and make easier distribution
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

DaleStan wrote:
Quark wrote:damn, tell me — how to make right diff? :)

Code: Select all

$ svn diff > file.diff
svn blame that «.» is not working directory
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

hmm, this time worked, but how to exclude unneeded files and lines?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Quark wrote:hmm, this time worked, but how to exclude unneeded files and lines?
Define "unneeded". The definition of a diff is that it lists *ALL* changed lines, not only the changes you want us to see.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

DaleStan wrote:Neither of these makes me inclined to actually run that binary.
if you unpack build in your OpenTTD directory then it is possible that you have all other required files already (especially if you have MiniIN build)
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

DaleStan wrote:
Quark wrote:hmm, this time worked, but how to exclude unneeded files and lines?
Define "unneeded". The definition of a diff is that it lists *ALL* changed lines, not only the changes you want us to see.
I need only the changes in source code files, excluding all «*.o», «*.diff», «*.patch», «*.exe» and makefile files and all «/* $Id: …» lines — surely, I can just delete all these files and lines and then make diff, but it is not what I want to do every time
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

If svn diff is including any of the .o, .diff, .patch, or .exe lines, you're doing something wrong. The best I can guess is that you svn added them. Don't do that.

And some of the Makefile changes are required, seeing as you added files.

The presence of $Id changes just means that you merged those changes from the branch(es). Revert them first. Intelligent use of grep may make this task easier.

In any case, the changes you made to the sprite number can easily cause breakage. PALETTE_SPRITE and SPRITE_WIDTH *MUST* be the same, since they are both indices into the same table.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

DaleStan wrote:In any case, the changes you made to the sprite number can easily cause breakage. PALETTE_SPRITE and SPRITE_WIDTH *MUST* be the same, since they are both indices into the same table.
There was no assert on this and I try — seems that it at least partially works :)

Maybe you know why id of sprite containing the recolor palette is stored in same variable as sprite id and limit us to 16384 sprites?
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

Maybe add some code to remap all recolor sprites to lower numbers, or put it to separate variable?
Last edited by Quark on 14 Nov 2006 03:02, edited 1 time in total.
Image
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Two reasons why just changing the constants doesn't work:
1) It will work, but only as long as all recolor sprite require no less than 13 bits. However, the recolor sprites and the real sprites are placed in the same table, which now has 15-bit indices, so this is only safe if you can guarantee that no recolor sprites will be placed above the 2000h barrier[0].

2) Station property 09 uses the same format as the old internal format: 14+2+14+1+1. If you want to change these constants, you have to change the loader for station prop 09 too. Fortunately for you, the high bit of the recolor sprite is guaranteed to be clear unless the GRF file uses GRM, in which case you can use the modified GRM (see [0]) to ensure that the high bit remains clear.

[0] And basically the only sane way to do that is to halve the space available for type 08 GRM reservations, plus ensure that the color maps from 2ccmap.grf are all loaded below that barrier.

In any case, here's the diff I generated from the above source. It should apply properly to the MiniIN r7123, with zcat | patch.
Attachments
expmultipatch.diff.gz
(221.01 KiB) Downloaded 315 times
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Quark wrote:
DaleStan wrote:What, exactly, is supposed to be in newgrf.dat? Or the other dat files?
newgrf.dat is just pack of grf files
What grf files? And do you have a license to distribute all of them, in that format? And how do I unpack it?

(Oh, BTW: No attempt was made to compile the source after taking the above diff.)
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

here is a list of newgrf files that I use

Code: Select all

3VolvoTrucksw.grf
334LongBusesNAw.grf
334LongCutBusesw.grf
334McTrucksw.grf
334MercedesTrucksw.grf
334NavistarTrucksw.grf
334OpelTrucksw.grf
334ScaniaTrucksw.grf
334SkodaTrucksw.grf
334SpitzerTrucksw.grf
anglebuilding.grf
bighq.grf
brp.grf
dbsetxlw.grf
harbourw_456.grf
jcindstaw.grf
NewMonorailW.grf
newoffice.grf
newofficebuilding.grf
newshipsw.grf
newstatsw.grf
newtown_415.grf
pb_ukrs.grf
pgs-barew.GRF
pgs-platw.GRF
pgs-statw.GRF
PlaneSetw.grf
Toyland2MarsW.grf
troprs_w.grf
ukwaypointsw.grf
usstatsw.grf
and all of this in 7z format for using with other builds — to unpack dat files you need to add code to the source to copy it somewhere

BTW i never see any license for newgrf files (and tycoon.dat is just some piece of garbage, not original game file :) )
Attachments
newgrf.7z
(3.12 MiB) Downloaded 416 times
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 18 guests