SerbianRailSet(ECS,PBI,FIRS&TouristSet compatible)&scenario

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

Very interesting: you have some refineries which produce petrol and goods, and some which produce rubber and goods, and you can fund both of them! But I'm affraid it'll be confusing, so maybe it's better to all refineries produce petrol and rubber (factories produce goods anyway). You can try new version, which is compatible with George's new cargos! :D George, welcome to team! :D
Last edited by Wile E. Coyote on 20 Jan 2006 06:33, edited 1 time in total.
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

I'm afraid I'm tired of coding callbacks for you (partly because I lost a lot of my work). So, you get to learn how to code them yourself. Here's an NFO that should get you started; it's very heavily documented, and the things you still need to do are clearly marked.

You should probably have these four wiki pages open for reference.
Attachments
srsAI.txt
(2.11 KiB) Downloaded 83 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
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

OK, I'll try. I hope I can ask you for help if I'll have some problems.
(BTW you did great job for this set anyway. I'll never code articulated steamers, "Sinobus" etc. :D )
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Indeed, please ask; I probably forgot to comment something, despite my best attempts to cover everything important.
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
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

George's new cargos are added to set. Now you can transport petrol (with any tanker) and tourists (with any passenger car) too!
George: please recheck code for Serbian industries. There are still two kind of oil refineries in tropic (appearing in new game).
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Post by George »

Wile E. Coyote wrote:George's new cargos are added to set. Now you can transport petrol (with any tanker) and tourists (with any passenger car) too!
How much does the passenger car cost? if default, plese, reduce the capacity to 5 tourists. Otherwise it is cheaper, than buses, that is too bad.
Wile E. Coyote wrote:George: please recheck code for Serbian industries. There are still two kind of oil refineries in tropic (appearing in new game).
I'll do it this evening
Image Image Image Image
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

It's 84h for small wagon and 8Eh to 98h for big wagons (I suppose it's too cheap). I'll reduce refitted capacities, please help me with callbacks for changed capacity (actions 0, 2, 3), because I have problems with callbacks coding (I want to change refitted capacity for Gkks freight wagon also, because it carries only 8 items of livestock) and wiki does not helps me much. Other way is special car for tourists. Which price it should be? What is better solution?
DaleStan: you haven't wrote in tutorial callbacks for action 0. Are they needed or you added them before?
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

No action 0 setting is required to use the AI callback.

To change refitted capacity, code callback 15 (check variable 0C == 15).
Check variables B9 (climate-specific cargo type) and 03 (climate) as appropriate. Return the correct capacity the same way the wagon ID is returned (<nvar> [<capacity> FF <min-val> <max-val>]... <capacity> FF)

Check the appropriate action 0 page to determine which bit (if any) needs to be set in the action 0(s).
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
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Post by George »

Wile E. Coyote wrote:It's 84h for small wagon and 8Eh to 98h for big wagons (I suppose it's too cheap).
it is about 40 times cheaper, than a bus? then the capacity should be 1 tourist :)
Wile E. Coyote wrote:I'll reduce refitted capacities, please help me with callbacks for changed capacity (actions 0, 2, 3),
I'll have a look in to your code and try to help
Wile E. Coyote wrote:because I have problems with callbacks coding (I want to change refitted capacity for Gkks freight wagon also, because it carries only 8 items of livestock)
I'll help
Wile E. Coyote wrote:and wiki does not helps me much. Other way is special car for tourists. Which price it should be?
18 tourists wagon should cost at least 10K pounds. You have to change the wagons base cost to get such high costs.
Wile E. Coyote wrote:What is better solution?
To code it with high cost with a special wagon if you have enough IDs.
Image Image Image Image
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

OK, I then suggest mixed solution: for old wagon changed cappacity (5 tourists for example, 1 is too small capacity :wink: ), because I don't have data about any other passenger wagon, only existing (Baat), and for newer wagons new cars (sleeping cars, buffets etc. and that wagons will be expencive). We also have museum train in Serbia (I can add that wagons too), it'll be good for tourists, but it'll be needed to include steam loco with them (I don't know is it possible?). I hope I'll have enough IDs, because there are still not autoracks (I'm waiting for cars as new cargo to add them) and other special wagons in set.
EDIT: How to change price cost base for wagons? It's not action 0 property.
And, please explain your vote in poll. Thanx!
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Post by George »

Wile E. Coyote wrote:EDIT: How to change price cost base for wagons? It's not action 0 property.
it is, but not for trains, but global variables (type 08 ). See http://wiki.ttdpatch.net/tiki-index.php ... lVariables for details
Wile E. Coyote wrote:And, please explain your vote in poll. Thanx!
I did not vote :shock:
Image Image Image Image
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

George wrote:
Wile E. Coyote wrote:And, please explain your vote in poll. Thanx!
I did not vote :shock:
I mean everybody who voted :?
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

Some problems...
Here are 4 new tourist wagons: two sleeping wagons, couchette wagon (is it other name in English?), and wagon restaurant. They are working fine with George's new cargos, but without them I have wagons in purchase list with some errors instead of not have them. I probably need some action 7, but I don't know how to write it. Please help!
Attachments
Error.jpg
Error.jpg (19.9 KiB) Viewed 2545 times
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Use variable 88, conditions 06, 07, and/or 08. Use that/those act7(s) to skip action 0(s) that either:
- reset prop 06 (climate availability) to 00 (none) for each rail vehicle that should not be available if newcargos isn't loaded.
- reset props to appropriate values for a non-newcargos game.
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
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

It's done :D George, please look at prices, if something is needed to correct.
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

I don't know is this possible to code (and I know it will probably look ugly in curves) but if it's possible, please code this! Here are data:
Name: Autorack Laekkss-z
Date of introduction: 1970
Capacity: 12 (let it be crates of goods, in future will be cars)
gradual loading amount: 3
price: 13(hex)
ID: 48(hex)
Before ID 1D in list
Note: every half is 5/8 length. _ wiews are 21 pix, they would overlap to see middle axle (this is 3-axle wagon).
Thanx!
Attachments
Laekkss-z.gif
Laekkss-z.gif (2.89 KiB) Viewed 2649 times
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

With George's new cargos and Serbian new industries
Wile E. Coyote wrote:you have some refineries which produce petrol and goods, and some which produce rubber and goods, and you can fund both of them! But I'm affraid it'll be confusing, so maybe it's better to all refineries produce petrol and rubber (factories produce goods anyway).
Please help about that! It looks like there are two IDs for oil refinery (4 and?)
George, I'm little confused with your callbacks (probably I haven't understood something :? ). Here is code for freight car with capacity 16 crates of goods, and refitted 8 items of livestock. I can't edit it, so it would be refitted 16 items of livestock too. Here's original code:

Code: Select all

  120 * 22	 04 00 1F 01 1F "Freight Car Gkks" 00
  121 * 31	 00 00 0B 01 1F 00 00 00 06 07 05 00 14 10 15 05 16 0A 17 10 12 FD 1C 00 1D 30 10 00 00 21 02
  122 * 4	 01 00 01 04
  123 c:\igre\ttwin95\sprites/srssgw.pcx 418 152 01 17 8 -3 -8
  124 c:\igre\ttwin95\sprites/srssgw.pcx 434 152 09 13 16 -10 -7
  125 c:\igre\ttwin95\sprites/srssgw.pcx 466 152 01 12 20 -10 -8
  126 c:\igre\ttwin95\sprites/srssgw.pcx 498 152 09 13 16 -4 -7
  127 * 9	 02 00 02 01 01 00 00 00 00
  128 * 7	 03 00 01 1F 00 02 00
What to change?
About small passenger car: it's refittable with passengers and tourists, but refit cost is high (in that way we have expencive tourist car).
Last edited by Wile E. Coyote on 03 Sep 2005 12:39, edited 1 time in total.
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Post by George »

Wile E. Coyote wrote:George, I'm little confused with your callbacks (probably I haven't understood something :? ). Here is code for freight car with capacity 16 crates of goods, and refitted 8 items of livestock. I can't edit it, so it would be refitted 16 items of livestock too. Here's original code:

Code: Select all

  120 * 22	 04 00 1F 01 1F "Freight Car Gkks" 00
  121 * 31	 00 00 0B 01 1F 00 00 00 06 07 05 00 14 10 15 05 16 0A 17 10 12 FD 1C 00 1D 30 10 00 00 21 02
  122 * 4	 01 00 01 04
  123 c:\igre\ttwin95\sprites/srssgw.pcx 418 152 01 17 8 -3 -8
  124 c:\igre\ttwin95\sprites/srssgw.pcx 434 152 09 13 16 -10 -7
  125 c:\igre\ttwin95\sprites/srssgw.pcx 466 152 01 12 20 -10 -8
  126 c:\igre\ttwin95\sprites/srssgw.pcx 498 152 09 13 16 -4 -7
  127 * 9	 02 00 02 01 01 00 00 00 00
  128 * 7	 03 00 01 1F 00 02 00
What to change?
to add the call back.
121 * 31 00 00 {0c} 01 1F 00 00 00 06 07 05 00 14 10 15 05 16 0A 17 10 12 FD 1C 00 1D 30 10 00 00 {1e 08} 21 02
122 * 4 01 00 01 04
123 c:\igre\ttwin95\sprites/srssgw.pcx 418 152 01 17 8 -3 -8
124 c:\igre\ttwin95\sprites/srssgw.pcx 434 152 09 13 16 -10 -7
125 c:\igre\ttwin95\sprites/srssgw.pcx 466 152 01 12 20 -10 -8
126 c:\igre\ttwin95\sprites/srssgw.pcx 498 152 09 13 16 -4 -7
127 * 9 02 00 02 01 01 00 00 00 00
{128} * {14} 02 00 03 81 0c 00 ff 01 {10 new capacity} ff 15 15 00 00
129 * 7 03 00 01 1F {01} {04 03 00 apply to cargo 04 - livestock} 02 00
Wile E. Coyote wrote:About small passenger car: it's refittable with passengers and tourists, but refit cost is high (in that way we have expencive tourist car).
Well, prices are much better now, but I'd suggest to make them about 40-50% higher


A crash found (I think it is in grf, but may be some patch code too). Steps to reproduce it:
1) build a railway line (just a peace several tracks tiles, it was 10 in my test)
2) build a depot at one end of the line
3) build several passenger cars Beelmt
4) build passenger car Bm (it is a train indeed)
5) let it go
6) when it reaches the end of the ilne, look at the reversed wagon with lights
7) click it with a mouse and get the crash


It also looks strange that many mail and passengers and even cabose wagons are trains. Is it intended or a problem with coding?
Image Image Image Image
User avatar
Wile E. Coyote
Tycoon
Tycoon
Posts: 8515
Joined: 08 Jul 2004 22:14
Skype: wile.e.coyote2
Location: Belgrade, Serbia
Contact:

Post by Wile E. Coyote »

Something wrong with callbacks. Capacity is OK, but wagon sprites are changing :? And it'd be good to change refitted capacity for food to 16 tons also (this wagon is refittable for food too). I forgot to mention that :oops:
George wrote:Well, prices are much better now, but I'd suggest to make them about 40-50% higher
To all wagons or only for refittable?
George wrote:It also looks strange that many mail and passengers and even cabose wagons are trains. Is it intended or a problem with coding?
I tried to repeat your crash, but wagons are wagons :?: I'll check code anyway. Probably I forgot to set somewhere running cost bases to 00 and probably you have loaded some train set before Serbian, and you haven't disabled it.
I updated scw.grf, added name "Valuables" instead of "Diamonds" (and of course, changed all cargo data). Do you know names in other languages? If yes, please add them. But there is bug: banks in tropic don't produce valuables. What's wrong?
Serbian rail set with Serbian scenario (ECS, PBI, FIRS and Tourist set compatible) Website | Topic and download | Latest version: 03.06.2015.
Serbian tram set Tracking table | TTD Patch tram set Latest version: 17.06.2015. | Open TTD Remix Latest version: 11.07.2015.
WIN-DOS GRF Converter Topic and download | Version 0.2.1: 09.01.2005.


Runner-up in "Best avatar Forums award" for years 2006 and 2010!
goalie
Route Supervisor
Route Supervisor
Posts: 406
Joined: 28 Aug 2003 14:54
Location: Düsseldorf
Contact:

Post by goalie »

your industries grf only works in tropics is this wanted by you
Post Reply

Return to “Graphics Development”

Who is online

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