2CC Trams 0.9c & 2CC Cargo Trams v0.8r
Moderator: Graphics Moderators
-
- Engineer
- Posts: 10
- Joined: 07 Aug 2011 11:58
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
do you guys need help with any of it? I might not understand much (yet) but I have oodles and oodles of free time.
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
Thank you for offering assistance but there's no need at this moment. Arnoud is recoding the whole set so he'll surely deal with this as well.
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
First of all, sorry for the lack of recent updates, I have been busy with other RL stuff.
I havent spent much time on the passenger trams at all, because atm the still uncoded trams in the cargo set have priority for me.
The values that have been reported as indicating 0 are in fact set correctly in the source code, and the game is allso using these values, they are just not displayin g correctly in the purchase menu.
If I remember correctly this bug is only present in non articulated vehicles, the error message (undefined string) implies that a piece of coding is missing from these vehicles.
I havent actually tested wether this causes the bug, but this line of text appears to be missing from the graphics block of these vehicles:
purchase_cargo_capacity: return 45;
This sets the cargo capacity in the purchase menu to 45 (passengers).
If this is indeed what is causing the bug, it would not be that difficult to fix, just a lot of work because there are a lot of vehicles in the set.
I am currently not working on the passenger set, so if someone wants to have a go at trying to fix the issue be my guest.
I havent spent much time on the passenger trams at all, because atm the still uncoded trams in the cargo set have priority for me.
The values that have been reported as indicating 0 are in fact set correctly in the source code, and the game is allso using these values, they are just not displayin g correctly in the purchase menu.
If I remember correctly this bug is only present in non articulated vehicles, the error message (undefined string) implies that a piece of coding is missing from these vehicles.
I havent actually tested wether this causes the bug, but this line of text appears to be missing from the graphics block of these vehicles:
purchase_cargo_capacity: return 45;
This sets the cargo capacity in the purchase menu to 45 (passengers).
If this is indeed what is causing the bug, it would not be that difficult to fix, just a lot of work because there are a lot of vehicles in the set.
I am currently not working on the passenger set, so if someone wants to have a go at trying to fix the issue be my guest.
Coder for the 2cc trams (passenger) and the 2cc cargo trams
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
That should be an easy enough task for me to take on. Only took me a few minutes to fix.Arnoud wrote: 19 Jan 2020 11:30 I am currently not working on the passenger set, so if someone wants to have a go at trying to fix the issue be my guest.
- Attachments
-
- trams-2cc.nml
- (489.65 KiB) Downloaded 187 times
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
I made a little build of that, was getting curious wether it would work allso.
I got an error while compiling;
return ; 138 is incorrect, this needs to be
return 138 ;
After correcting this, this is the build, did not test it ingame:
I got an error while compiling;
return ; 138 is incorrect, this needs to be
return 138 ;
After correcting this, this is the build, did not test it ingame:
- Attachments
-
- 2cctramstest.grf
- test file
- (455.7 KiB) Downloaded 212 times
Coder for the 2cc trams (passenger) and the 2cc cargo trams
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
This did not fix the issue of missing stats. Yes, it is only happening to the non-articulated vehicles.Arnoud wrote: 19 Jan 2020 14:27 I made a little build of that, was getting curious wether it would work allso.
After correcting this, this is the build, did not test it ingame:
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
I tried a number of other fixes and in my last test the graphics block was basically the same as the cargotrams, in all but the reference to the coding for the side views, it didnt work.
The code related to the sideviews seems to be using nfo commands and that is something I dont understand.
The coding for the sideviews seems to be working like a master switch that allso effects other things and may very well be causing this.
I have noticed while coding the cargotrams that if you set certain switches belonging to articulated vehicles for non articulated vehicles this can cause bugs in the purchase menu, in those cases though I understood the code and could fix it.
In theory we could rewrite it to be completely nml like my cargotrams (who dont have this bug), but that would mean a loss of the sideviews for the affected trams, so that is not an ideal solution.
Edit: for those that didnt know, the passenger set has special side views that make them look extra good from a side angle.
The code related to the sideviews seems to be using nfo commands and that is something I dont understand.
The coding for the sideviews seems to be working like a master switch that allso effects other things and may very well be causing this.
I have noticed while coding the cargotrams that if you set certain switches belonging to articulated vehicles for non articulated vehicles this can cause bugs in the purchase menu, in those cases though I understood the code and could fix it.
In theory we could rewrite it to be completely nml like my cargotrams (who dont have this bug), but that would mean a loss of the sideviews for the affected trams, so that is not an ideal solution.
Edit: for those that didnt know, the passenger set has special side views that make them look extra good from a side angle.
Coder for the 2cc trams (passenger) and the 2cc cargo trams
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
Hi 2cc developers,
I am using 2cc in my latest game, and I think this is a bug for the tram, as shown below:
As you can see, there is "undefined string" and the power is 0hp, tractive effort is 0kN, and running cost is $0/year.
Is this a bug or is there anything I miss to do before using the newGRF?
Regards,
AJ
I am using 2cc in my latest game, and I think this is a bug for the tram, as shown below:
As you can see, there is "undefined string" and the power is 0hp, tractive effort is 0kN, and running cost is $0/year.
Is this a bug or is there anything I miss to do before using the newGRF?
Regards,
AJ
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
Kindly refer to the prior posts on the previous page.ajee wrote: 20 Jan 2020 09:39 Is this a bug or is there anything I miss to do before using the newGRF?
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
I think I may have found what is causing the bug, unfortunately that does not bring a proper fix any closer.
The script is making use of what looks like a trick in the position in consist variable to assign the normal sprites to position 0 (first part of the tram), leaving certain parts blank, which it then tells to fill in by using the sideview sprites 'for all undefined/blank positions'.
The problem here seems to be that in non articulated vehicles the number of positions (parts) that a tram has is not defined.
In articlulated vehicles you would add a piece of code that in plain english would look something like this:
Create positions 0 until 2 (this would create 3 parts; part 0, part 1 and part 2)
In non articulated vehicles this piece of code is missing because It is (normally) not needed and not possible to create 0 until 0 parts (=1 part).
if I recall correctly you get a compile error if you attempt it.
In other words the script doesnt understand what position 0 means because it hasnt been told that is has positions.
If this theory is correct it would imply that it is not possible to use multiple spritesets for a vehicle that has only 1 part, so I think this bug cannot be solved without removing the extra sideviews.
The script is making use of what looks like a trick in the position in consist variable to assign the normal sprites to position 0 (first part of the tram), leaving certain parts blank, which it then tells to fill in by using the sideview sprites 'for all undefined/blank positions'.
The problem here seems to be that in non articulated vehicles the number of positions (parts) that a tram has is not defined.
In articlulated vehicles you would add a piece of code that in plain english would look something like this:
Create positions 0 until 2 (this would create 3 parts; part 0, part 1 and part 2)
In non articulated vehicles this piece of code is missing because It is (normally) not needed and not possible to create 0 until 0 parts (=1 part).
if I recall correctly you get a compile error if you attempt it.
In other words the script doesnt understand what position 0 means because it hasnt been told that is has positions.
If this theory is correct it would imply that it is not possible to use multiple spritesets for a vehicle that has only 1 part, so I think this bug cannot be solved without removing the extra sideviews.
Coder for the 2cc trams (passenger) and the 2cc cargo trams
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
I think we could survive without these...

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
I'll be honest, I don't even know what these are! LOL...

Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
- Voyager One
- Tycoon
- Posts: 11204
- Joined: 28 Dec 2009 09:47
- Location: Rijeka, Croatia
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
Neither do I, hahahahaha!!!
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
lol ok then.
This is a test file where I recoded the Melbourne class A, this seems to fix the bug.
In the source code the coding for this tram starts at line 5365.
What I did was remove everything above the item block, except the loading of the 2 needed spritesets (default and pre-purchase).
On the graphics block I allso removed the link to the master switch (because I removed that switch), which was at the bottom of the block.
And then the only thing needed was to add a link in the graphics block to the loading of the default graphics ( a link to the purchase sprites was allready present).
This is a test file where I recoded the Melbourne class A, this seems to fix the bug.
In the source code the coding for this tram starts at line 5365.
What I did was remove everything above the item block, except the loading of the 2 needed spritesets (default and pre-purchase).
On the graphics block I allso removed the link to the master switch (because I removed that switch), which was at the bottom of the block.
And then the only thing needed was to add a link in the graphics block to the loading of the default graphics ( a link to the purchase sprites was allready present).
- Attachments
-
- 2ccpassengertest1.grf
- test file
- (455.09 KiB) Downloaded 235 times
-
- trams-2cc.nml
- source code
- (488.23 KiB) Downloaded 220 times
Coder for the 2cc trams (passenger) and the 2cc cargo trams
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
Arnoud, if you can please look at the stats in 2CC Cargo for the Oradea Freight Service tram. It's a 4-car tram that says it can carry 400 mail bags.
But when you go to refit it says it can carry:
1600 mail
800 crates of goods
400t of bulk cargo
2132 heads of livestock
3200 bags of valuables
Way too much cargo for this one tram, and at a cost of $2800 no player will ever need to buy a train.
But when you go to refit it says it can carry:
1600 mail
800 crates of goods
400t of bulk cargo
2132 heads of livestock
3200 bags of valuables
Way too much cargo for this one tram, and at a cost of $2800 no player will ever need to buy a train.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
-
- Route Supervisor
- Posts: 431
- Joined: 08 Nov 2019 23:54
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
The same problem with incorrect loading concerns four trams:
-Amsterdam...
-Dresden ...
-The Hague ...
-Oradea ...
Prices and costs are completely eyecandy in all cases.
And of course the sound - the same problem as in the case of regular 2cc trams: there is no sound / only splash. It sounds very poor.
-Amsterdam...
-Dresden ...
-The Hague ...
-Oradea ...
Prices and costs are completely eyecandy in all cases.
And of course the sound - the same problem as in the case of regular 2cc trams: there is no sound / only splash. It sounds very poor.
I am sorry for may English. I know is bed.
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
The good news is that I got a server that's now running 2CC Trams under JGRPP, and they're loving it. They feel that the trams, while sometimes slower, are competitive with trains due to price and ability to get them into places where trains can't easily go. Which is exactly what I envisioned for 2CC Trams. 

Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
I have a fix for the Oradea tram that needs testing.
Changes are to the Oradea tram only, other trams will be fixed once we decide that this is a correct cargo capacity, particularly I want to know if the capacity is not too low now.
- capacity now calculated on unit weight.
- purchase and refit capacities now match eachother.
- capacity downscaled by factor of 10 (from 400t to 40t).
Changes are to the Oradea tram only, other trams will be fixed once we decide that this is a correct cargo capacity, particularly I want to know if the capacity is not too low now.
- capacity now calculated on unit weight.
- purchase and refit capacities now match eachother.
- capacity downscaled by factor of 10 (from 400t to 40t).
- Attachments
-
- cargotramstest2.grf
- cargotrams test file
- (85.76 KiB) Downloaded 229 times
-
- cargotrams.nml
- source code
- (73.7 KiB) Downloaded 201 times
Coder for the 2cc trams (passenger) and the 2cc cargo trams
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
It's still slightly off. Info screen says:Arnoud wrote: 29 Jan 2020 11:59 I have a fix for the Oradea tram that needs testing.
Changes are to the Oradea tram only, other trams will be fixed once we decide that this is a correct cargo capacity, particularly I want to know if the capacity is not too low now.
- capacity now calculated on unit weight.
- purchase and refit capacities now match eachother.
- capacity downscaled by factor of 10 (from 400t to 40t).
Weight: 19t (27t)
Speed: 40 km/h
Power: 122 hp
T/E: 93 kN
Capacity: 175 bags of mail (refittable)
What refit menu says:
Mail: 160 bags
Goods: 80 crates
Valuables: 320 bags
Livestock: 212 head
Bulk cargo: 40 tons
As for performance, I think this feels about right. Running head-to-head with a Kirby (faster speed, higher TE, more power) pulling 30t coal, the train makes more money than the tram (nearly 2:1) but the trams make the company value go higher by nearly the same ratio.
The only thing I'd adjust is the livestock. Cattle runs around 1000 pounds (or 0.45 metric ton), 212 of them would be 96 metric tons. Adjusting it to 88 heads would put it right near 40 tons.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: [OTTD] 2CC|Trams - Nightly Betas Now Released
hmm interesting, I tested it in Firs and in that set I had no difference between purchase and refit capacity.
I changed the default cargo from post to steel when playing with the default industries, this seems to fix the problem, I guess the default cargo needs to be in tons as unit weight.
The cargo capacities for different cargoes are all calculated centrally, I dont think it is possible to change the outcome of just 1 specific cargo (livestock).
I changed the default cargo from post to steel when playing with the default industries, this seems to fix the problem, I guess the default cargo needs to be in tons as unit weight.
The cargo capacities for different cargoes are all calculated centrally, I dont think it is possible to change the outcome of just 1 specific cargo (livestock).
- Attachments
-
- cargotramstest4.grf
- cargotrams test file 2nd version
- (85.76 KiB) Downloaded 202 times
-
- cargotrams.nml
- source code
- (73.7 KiB) Downloaded 229 times
Coder for the 2cc trams (passenger) and the 2cc cargo trams
Who is online
Users browsing this forum: No registered users and 9 guests