Page 22 of 42
Posted: 28 Aug 2005 20:04
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!

George, welcome to team!

Posted: 30 Aug 2005 19:41
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.
Posted: 30 Aug 2005 20:00
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.

)
Posted: 30 Aug 2005 21:34
by DaleStan
Indeed, please ask; I probably forgot to comment something, despite my best attempts to cover everything important.
Posted: 31 Aug 2005 05:14
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).
Posted: 31 Aug 2005 05:40
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
Posted: 31 Aug 2005 05:47
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?
Posted: 31 Aug 2005 06:51
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).
Posted: 31 Aug 2005 07:14
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.
Posted: 31 Aug 2005 07:32
by Wile E. Coyote
OK, I then suggest mixed solution: for old wagon changed cappacity (5 tourists for example, 1 is too small capacity

), 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!
Posted: 01 Sep 2005 06:04
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

Posted: 01 Sep 2005 08:36
by Wile E. Coyote
George wrote:Wile E. Coyote wrote:And, please explain your vote in poll. Thanx!
I did not vote

I mean everybody who voted

Posted: 01 Sep 2005 14:13
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!
Posted: 01 Sep 2005 15:04
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.
Posted: 02 Sep 2005 09:18
by Wile E. Coyote
It's done

George, please look at prices, if something is needed to correct.
Posted: 02 Sep 2005 12:42
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!
Posted: 02 Sep 2005 21:42
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).
Posted: 03 Sep 2005 15:58
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?
Posted: 03 Sep 2005 20:53
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
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?
Posted: 03 Sep 2005 21:57
by goalie
your industries grf only works in tropics is this wanted by you