[OTTD] 2CC|Trams - Nightly Betas Now Released

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

TheNewTeddy
Engineer
Engineer
Posts: 10
Joined: 07 Aug 2011 11:58

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by TheNewTeddy »

do you guys need help with any of it? I might not understand much (yet) but I have oodles and oodles of free time.

User avatar
Voyager One
Tycoon
Tycoon
Posts: 11170
Joined: 28 Dec 2009 09:47
Location: Rijeka, Croatia

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by Voyager One »

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.
Leon

Image Image Image Image
"... all I ask is a tall ship and a star to steer her by..." - John Masefield

Arnoud
Engineer
Engineer
Posts: 44
Joined: 29 Sep 2008 05:02
Location: Amsterdam

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by Arnoud »

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.

User avatar
kamnet
Moderator
Moderator
Posts: 6972
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by kamnet »

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.
That should be an easy enough task for me to take on. Only took me a few minutes to fix.
Attachments
trams-2cc.nml
(489.65 KiB) Downloaded 9 times

Arnoud
Engineer
Engineer
Posts: 44
Joined: 29 Sep 2008 05:02
Location: Amsterdam

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by Arnoud »

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:
Attachments
2cctramstest.grf
test file
(455.7 KiB) Downloaded 10 times

User avatar
kamnet
Moderator
Moderator
Posts: 6972
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by kamnet »

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:
This did not fix the issue of missing stats. Yes, it is only happening to the non-articulated vehicles.

Arnoud
Engineer
Engineer
Posts: 44
Joined: 29 Sep 2008 05:02
Location: Amsterdam

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by Arnoud »

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.

ajee
Engineer
Engineer
Posts: 8
Joined: 09 Dec 2019 11:55

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by ajee »

Hi 2cc developers,

I am using 2cc in my latest game, and I think this is a bug for the tram, as shown below:
2cc issue.JPG
2cc issue.JPG (35.09 KiB) Viewed 71 times
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

User avatar
kamnet
Moderator
Moderator
Posts: 6972
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [OTTD] 2CC|Trams - Nightly Betas Now Released

Post by kamnet »

ajee wrote:
20 Jan 2020 09:39
Is this a bug or is there anything I miss to do before using the newGRF?
Kindly refer to the prior posts on the previous page.

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot] and 2 guests