Page 1 of 2
Earlier & Improved (for DB Set XL) Road Vehicles
Posted: 29 Aug 2007 12:48
by Putcha
I changed
capacity of transported cargo for dbsetxl so the RVs are not useless, mainly goods trucks. For example goods truck can now carry 60 goods, because there is wagon that carry 80 goods. I also changed
introduce year and speed (see below).
There are 2 versions:
Earlier Road Vehicles v1.0 - changed only introduce year and speed.
Download ERV
Improved Road Vehicles (for DB Set XL) v1.0 - changed introduce year, speed and capacities.
Download IRV
List of changes:
Code: Select all
Generation of vehicle: 1st 2nd 3rd 4th
Introduce year for buses are: 1925, 1955, 1985, 2005
Introduce year for trucks are: 1925, 1965, 2005
Speed of buses [kph] 60, 90, 110, 125
Speed of trucks [kph] 50, 90, 110
capacities:
Buses 35, 48, 56, 62
Coal 20, 26, 30
Mail 20, 26, 30
Oil 15, 21, 25
Livestock 15, 21, 25
Goods 40, 52, 60
Grain 20, 26, 30
Wood 15, 19, 22
Iron ore 20, 26, 30
Steel 15, 19, 22
Valuables 10, 14, 17
Food 15, 21, 25
Paper 15, 19, 22
Copper ore 20, 26, 30
Water 15, 21, 25
Fruit 15, 21, 25
Rubber 15, 21, 25
Any Suggestions?
---------------------------------------------------------------------------------------------------------------------------
old msg:
In which program I can change the speed and and capacity of basic road vehicles? Or there are some other road vehicle set besides Georges longvehicle?
Re: Vehicle stats...
Posted: 29 Aug 2007 12:52
by Zephyris
No programs are available which alter vehicle stats in OpenTTD, and other than longvehicles there aren't many truck newgrfs around. You may want to try my one I am currently developing (see "generic road vehicles" in the ttdpatch/graphics forum) *shameless advertising*, but you will need to use a nightly version of openttd.
Re: Vehicle stats...
Posted: 29 Aug 2007 13:05
by Putcha
Zephyris wrote:No programs are available which alter vehicle stats in OpenTTD...
And its possible to extract that original vehicle set, change stats and export it as standalone grf or edit the game grf (i think its trg1r.grf)?
Re: Vehicle stats...
Posted: 29 Aug 2007 13:15
by Zephyris
Unlike downloaded vehicle sets the game graphics are not newgrfs, but just grfs. The original vehicle stastics are hard coded into the game itself and the grf simply contains the graphics; vehicle statistics cannont be modified by modifying the grf. Downloaded newgrfs do, however, also code for the vehicle statistics.
Re: Vehicle stats...
Posted: 29 Aug 2007 13:31
by Putcha
OK. Then I will use the old, but they are in "late game" useless with that low capacities...
Re: Vehicle stats...
Posted: 29 Aug 2007 14:42
by George
Zephyris wrote:Unlike downloaded vehicle sets the game graphics are not newgrfs, but just grfs. The original vehicle stastics are hard coded into the game itself and the grf simply contains the graphics; vehicle statistics cannont be modified by modifying the grf. Downloaded newgrfs do, however, also code for the vehicle statistics.
You can make a new grf that change stats for default RVs. It will work fine if there are no other RVs sets loaded.
Re: Vehicle stats...
Posted: 29 Aug 2007 15:10
by Putcha
Heh Im not coder
If you can write some tutorial how to change it, I would try it, but i havent any experience.
Thanx anyway.
Re: Vehicle stats...
Posted: 29 Aug 2007 15:37
by George
Putcha wrote:Heh Im not coder
If you can write some tutorial how to change it, I would try it, but i havent any experience.
http://wiki.ttdpatch.net/tiki-index.php ... phicsSpecs
http://wiki.ttdpatch.net/tiki-index.php ... adVehicles
Re: Vehicle stats...
Posted: 29 Aug 2007 15:46
by Zephyris
its supprisingly simple...
Re: Vehicle stats...
Posted: 29 Aug 2007 16:22
by Putcha
Thanx for quick answer, but look at my sig...
Re: Vehicle stats...
Posted: 29 Aug 2007 16:45
by Zephyris
Hopefully this may be some use for you, otherwise you'll just have to wait for someone else to make a suitable grf I'm afraid
.
Example code for a basic vehicle statistic alteration. Put in a text file, rename to *grfname*.nfo then encode with grfcodec.
Code: Select all
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
// Number of sprites in the grf
0 * 4 02 00 00 00
// Action 8: Defines DRF details; GRF ID (AA BB CC DD) and name (Simple Vehicle Demos: Changing Vehicle Properties)
1 * 56 08 06 AA BB CC DD "Simple Vehicle Demos: Changing Vehicle Properties" 00
// Action 0: Change vehicle properties; Train 00 speed to 100mph and make double headed
// Sprite number
// | Number of bytes in this sprite
// | |
// | | Action 00: Change vehicle properties
// | | | Feature 00: Trains
// | | | | 02 properties: Two properties altered
// | | | | | 01 vehicles: On one vehicle
// | | | | | | Vehicle 00: Trains, so Kirby Paul Tank (Steam)
// | | | | | | | Property 09: Maximum speed
// | | | | | | | | Value A0: 100 mph (A0 (Hexadecimal) = 160 (Decimal) = 100 mph * 1.6)
// | | | | | | | | | Property 13: Double headed?
// | | | | | | | | | | Value 01: Double headed (00 = no, 01 = yes)
// | | | | | | | | | | |
2 * 9 00 00 02 01 00 09 A0 13 01
//Thats it!
Re: Vehicle stats...
Posted: 29 Aug 2007 16:49
by George
Putcha wrote:Thanx for quick answer, but look at my sig...
I do not know a good tutorial for learning to read English
Re: Vehicle stats...
Posted: 29 Aug 2007 18:31
by Putcha
first attemp - 3 parameters change...
Code: Select all
// Automatically generated by GRFCODEC. Do not modify!
// (Info version 7)
// Format: spritenum pcxfile xpos ypos compression ysize xsize xrel yrel
// Number of sprites in the grf
0 * 4 02 00 00 00
// Action 8: Defines DRF details; GRF ID (AA BB CC DD) and name (Test - MPS Regal Bus)
//<sprite-number> * <length> 08 <version> <grf-id> <name> <description>
1 * 56 08 06 AA BB CC DD "Test - MPS Regal Bus" 00
// Action 0: Change vehicle properties; RV 00 speed to 60kph and 100 passengers capacity and introduce year is 1925
// Sprite number
// | Number of bytes in this sprite
// | |
// | | Action 00: Change vehicle properties
// | | | Feature 01: Road vehicle
// | | | | 03 properties: Two properties altered
// | | | | | 01 vehicles: On one vehicle
// | | | | | | Vehicle 00: MPS Regal Bus
// | | | | | | | Property 08: Speed
// | | | | | | | | Value 78: 60kph... kph*2 -> hex
// | | | | | | | | | Property 0F: Capacity
// | | | | | | | | | | Value 64: 100 people -> hex
// | | | | | | | | | | | Property 00: date of introduction
// | | | | | | | | | | | | Value 1925: 1925 -> hex
// | | | | | | | | | | | | |
// | | | | | | | | | | | | |
2 * 9 00 01 03 01 00 08 78 0F 64 00 785
//Thats it!
Now Some questions:
I modified only Action0 and name in action8.
How can i know this:
1. Code: Select all
// Number of sprites in the grf
0 * 4 02 00 00 00
2. Code: Select all
// Action 8: Defines DRF details; GRF ID (AA BB CC DD) and name (Test - MPS Regal Bus)
//<sprite-number> * <length> 08 <version> <grf-id> <name> <description>
1 * 56 08 06 AA BB CC DD "Test - MPS Regal Bus" 00
3.Code: Select all
// Sprite number ( 2 )
// Number of bytes in this sprite ( 9 )
4. Its in Action0 ... If i want to change 2 properties for all RV it will be:
02 properties: Two properties altered
X vehicles: On X vehicles
or:
02*X properties: Two * X properties altered
X vehicles: On X vehicles
X - all vehicles
or:
again all Action0 section
After last value i can contiune with Vehicle 01: Hereford Leopard Bus ... or i must something add before new vehicle?
Re: Vehicle stats...
Posted: 29 Aug 2007 19:32
by DaleStan
1&3: Ignore them. NFORenum will fix them for you automatically.
2. Read the docs. Action8 is among the simplest parts of NFO.
4. If you want to change two properties, then report 02 properties. If you want to change not-two properties then report not-02 properties. The number of vehicles is completely unrelated.
5. No. Go reread the Action0 spec. It's quite clear on the required order when setting a property for multiple vehicles.
If you have read the spec, and don't understand it, specify which sentence(s) (at most two or three per page) you don't understand.
Re: Vehicle stats...
Posted: 30 Aug 2007 13:20
by Putcha
OK, i have code. I have 53 sprites in grf and dont know what should be here:
Code: Select all
// Number of sprites in the grf
0 * 4 02 00 00 00
Re: Vehicle stats...
Posted: 30 Aug 2007 13:44
by Zephyris
53 (Decimal)
--->
35 (Hexadecimal)
--->
00000035 (Add preceding zeros so there are 8 digits; it is a doubleword/dword/D )
--->
35 00 00 00 (Reorder into little endian)
See:
"2) Add the special first pseudosprite" at
http://wiki.ttdpatch.net/tiki-index.php ... rstVehicle
"Byte order" at
http://wiki.ttdpatch.net/tiki-index.php ... ght=endian
edit:
Alternatively use NfoRenum (
http://www.tt-forums.net/viewtopic.php?t=11711), which automatically renumbers all sprites into order, corrects their byte length and changes the number of sprites in the grf to be correct.
edit (again!):
It should look like this once done:
Code: Select all
// Number of sprites in the grf
0 * 4 35 00 00 00
Re: Vehicle stats...
Posted: 30 Aug 2007 13:47
by Lakie
Change the number 0x00000002 to 0x00000035 (53 in hex) which should look something like:
Quite simple when you get used to it, you can use Window's Calculator to convert the decimal to hexadecimal.
Alternately you could be lazy and jut run DaleStan's Renum over it and that would correct it and the length of sprites, and their sprite numbers.
[Edit] Renum would also give you warnings around code which it considers to be wrong, which may help you...
~ Lakie
Re: Vehicle stats...
Posted: 30 Aug 2007 13:49
by Putcha
thanx.
Re: Vehicle stats...
Posted: 30 Aug 2007 14:22
by Putcha
So here is it.
I change values of cargo for dbsetxl so the RVs are not useless, mainly goods truck.
List of changes:
Code: Select all
Generation of vehicle: 1st 2nd 3rd 4th
Introduce year for buses are: 1925, 1955, 1985, 2005
Introduce year for trucks are: 1925, 1965, 2005
Speed of buses [kph] 60, 90, 110, 125
Speed of trucks [kph] 50, 90, 110
capacities:
Buses 35, 48, 56, 62
Coal 20, 26, 30
Mail 20, 26, 30
Oil 15, 21, 25
Livestock 15, 21, 25
Goods 40, 52, 60
Grain 20, 26, 30
Wood 15, 19, 22
Iron ore 20, 26, 30
Steel 15, 19, 22
Valuables 10, 14, 17
Food 15, 21, 25
Paper 15, 19, 22
Copper ore 20, 26, 30
Water 15, 21, 25
Fruit 15, 21, 25
Rubber 15, 21, 25
Any Suggestions?
Re: Vehicle stats...
Posted: 30 Aug 2007 14:49
by Zephyris
And you've just released your first grf! How does it feel?