Questions from an NML noob.

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Questions from an NML noob.

Post by The Growl »

Why does everything on this page say, set to 0 on everything for articulated vehicles? I thought maybe this could be wrong so my code looks like this so far.

Code: Select all

//CR4000
item (FEAT_ROADVEHS [,item_BOMBARDIER CR4000[){

property{
speed:80kph;
misc_flags:bitmask(ROADVEH_FLAG_TRAM);
misc_flags:bitmask(ROADVEH_FLAG_2CC);
refit_cost:50;
running_coast_base:RUNNING_COST_NONE;
power:161hp;
cargo_capcity:208x;
sound_effect:SOUND_ELECTRIC_SPARK;
visual_effect:visual_effect(VISUAL_EFFECT_ELECTRIC);
effect_spawn_model:EFFECT_SPAWN_MODEL_ELECTRIC;
length:16;
}

Code: Select all

/*CR4000 Vehicle*/
item (FEAT_ROADVEHS ,item_BOMBARDIER_CR4000){

property{
introduction_date:date(1998,01,01);
model_life:40(years);
reliability_decay:20;
refittable_cargo_classes:bitmask(CC_PASSENGERS);
loading_speed:7(cargo units);
cost_factor:0;
running_cost_factor:0
cargo_age_period:928.7;
name:string(STR_NAME_CR4000);
climates_available:bitmask(ALL_CLIMATES);
sprite_id:SPRITE_ID_NEW_ROADVEH;
speed:50mph;
misc_flags:bitmask(ROADVEH_FLAG_TRAM);
misc_flags:bitmask(ROADVEH_FLAG_2CC);
refit_cost:50;
running_coast_base:RUNNING_COST_NONE;
weight:36.3 ton;
power:161 hp;
cargo_capcity:208x;
sound_effect:SOUND_ELECTRIC_SPARK;
visual_effect:visual_effect(VISUAL_EFFECT_ELECTRIC);
effect_spawn_model:EFFECT_SPAWN_MODEL_ELECTRIC;
length:16;
}
^^Updated.
Is this right, or should I set it to zero? And if so why do I set it to zero, could you explain please?
Last edited by The Growl on 21 Aug 2016 21:00, edited 1 time in total.
Image
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Questions from an NML noob.

Post by Eddi »

"should be set to zero" basically means "this value is currently ignored, but if that is ever going to change, 0 will ensure that your vehicle will keep working the same way as before"
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Re: Questions from an NML noob.

Post by The Growl »

Eddi wrote:0 will ensure that your vehicle will keep working the same way as before"
But why would it change in the first place? And why only for articulates?
Image
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Questions from an NML noob.

Post by Eddi »

who knows what went on in the mind of the person who first implemented articulated vehicles? that was probably like 10 years ago.

most likely it was quicker (either to program or to run) to ignore the values for articulated parts, rather than go through the chain and add them up.
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Re: Questions from an NML noob.

Post by The Growl »

Eddi wrote:who knows what went on in the mind of the person who first implemented articulated vehicles? that was probably like 10 years ago.

most likely it was quicker (either to program or to run) to ignore the values for articulated parts, rather than go through the chain and add them up.
So I should program on part seperately, and the rest put them to zero? Just to be clear.
Image
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: Questions from an NML noob.

Post by Eddi »

yes, all the stats that say "should be zero" should be summed into the front vehicle of the articulated chain
User avatar
The Growl
Transport Coordinator
Transport Coordinator
Posts: 342
Joined: 30 May 2016 23:55
Location: London

Re: Questions from an NML noob.

Post by The Growl »

Eddi wrote:yes, all the stats that say "should be zero" should be summed into the front vehicle of the articulated chain
Ah, thanks for the help Ed!
Image
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 21 guests