AuzObjects

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
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

Martin wrote: 05 May 2023 16:54 I like the result (also nice that one of my photos has been of some use. )
ebla71 wrote: 05 May 2023 15:00 It really looks nice and would be great to show limits of parks, gardens, cemeteries and the like.
However, I am a bit sceptical if it will have enough contrast relative to the green background of temperate climate as this here is desert, right?
When I first made them I tested in Temperate and it was hard to see. So I put sample in the desert so could get a better idea. Need some tweaking so will look good in all climates. Maybe lighter green leaves. Shall see what I can do next chance I get.
Quast65 wrote: 05 May 2023 11:40 Things are never easy hey
Silly me .. I removed the road in the nml file but forgot to convert it to a GRF :oops: I uploaded the previous version. If I could get my brain working properly I'd be dangerous :roll: .
Try this one.
AuzFarmObjects.grf
(11.82 MiB) Downloaded 119 times
AuzBeachObjects now has the issue that when you disable the road via Parameter, that the whole GRF gets an error.
Because the code works in road sets I though to test when I put the parameters in the beach set as when converting the NML to a game file no errors was detected. :oops:

Will give your idea a try shortly (I better do some cleaning up in kitchen first.) .. if has problem still .. maybe I remove the speed limits. The reason to turn on and off the speed limits is to satisfy the rev heads (those with heavy feet).

I probably could do same with the roads in AuzFarmRoads for those who do not want both roads.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

Quast65 wrote: 05 May 2023 11:40 AuzBeachObjects now has the issue that when you disable the road via Parameter, that the whole GRF gets an error.
Same issue as before with that vehicle-set.
I moved the
"if (param[0] == 0) {"
as suggest and it seems to work. I disabled the roads one at a time and then both and opened and closed a game and had no issues.

Here the game file and the source.
Attachments
AuzBeachObjects.grf
Game File
(8.99 MiB) Downloaded 176 times
AuzBeachObjectsSource6May2023.rar
Source Files
(10.62 MiB) Downloaded 127 times
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

AuzfarmRoads

Curiosity I wonder if the idea moving the parameter would affect if I added a few vehicles to the AuzFarmRoads.
So I added a tractor and some horses and change the position of the parameter and tested games by turning roads on and off and had no issues.

The tractor and the horse should travel down the middle of the 2 roads in this set like they would on a farm.
Farm RVs.png
Farm RVs.png (36.83 KiB) Viewed 4044 times
This set is related to the AuzFarmObjects .. main reason I put it here with the object sets.

Still some tweaking to do to the RV's as they will go on other roads. Need to find how to code them to restrict them just to the Farm Roads.

I add the game file and source. maybe some one will see in the source what I should add to the tractor and horses to make them only go on the farm roads.

Cheers
Attachments
AuzFarmRoads.grf
(115.34 KiB) Downloaded 182 times
AuzFarmRoadsSource6May2023.rar
(282.58 KiB) Downloaded 144 times
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
Quast65
Tycoon
Tycoon
Posts: 2798
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: AuzObjects

Post by Quast65 »

Moving the parameter to the place I suggested seems to have worked! :D
Good to know.

The main issue there was, was that there were some references to certain pieces of the code within the parameter remaining when you used a parameter.
The code itself had no errors as code-language alone, that is why there were no warnings when you compiled the GRF.
However, when you use the parameter (which means you skip/remove certain parts of the code), then errors appeared.

A way to test it then, is what happens if you remove a certain piece code
The part between

Code: Select all

if (param[0] == 0) {
. . . . . . .
 } else { }
 
And then compile the GRF, then you should get an error if something is wrong.

Curiosity I wonder if the idea moving the parameter would affect if I added a few vehicles to the AuzFarmRoads.
So I added a tractor and some horses and change the position of the parameter and tested games by turning roads on and off and had no issues.
Anything added before or after:

Code: Select all

if (param[0] == 0) {
. . . . . . .
 } else { }
 
Is not affected by that specific parameter, only parts of the code inbetween (as indicated by the dots).

There is a typo with one of those vehicles by the way:
Example805.png
Example805.png (3.61 KiB) Viewed 3968 times


Also, there is a very easy way to also use a parameter to choose between UK or US.
The parameter I have shown you is an If-Else parameter, meaning that if it is inactive, you get the part between the first set of { } (the If-part)
If it is active, you get the part between the second set of { } (the Else-part)
So for example, this:

Code: Select all

//tractor01
spriteset (spriteset_eyecandy_tractor01, "gfx/tractor01.png") {
 tmpl_widelivestock(0)
}

item(FEAT_ROADVEHS, item_tractor01) {
 property {
  name: string(STR_NAME_tractor01);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: spriteset_eyecandy_tractor01;
 }
}

//tractor02


item(FEAT_ROADVEHS, item_tractor02) {
 property {
  name: string(STR_NAME_tractor02);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: spriteset_eyecandy_tractor02;
 }
}

Should become this:

Code: Select all

//Spritesets for tractor UK/US

spriteset (spriteset_eyecandy_tractor01, "gfx/tractor01.png") {
 tmpl_widelivestock(0)
}

spriteset (spriteset_eyecandy_tractor02, "gfx/tractor01.png") {
 tmpl_widelivestockUS(0)
}

if (param[XXX] == 0) {

item(FEAT_ROADVEHS, item_tractor01) {
 property {
  name: string(STR_NAME_tractor01);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: spriteset_eyecandy_tractor01;
 }
}

 } else { 

item(FEAT_ROADVEHS, item_tractor02) {
 property {
  name: string(STR_NAME_tractor02);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: spriteset_eyecandy_tractor02;
 }
}
}
maybe some one will see in the source what I should add to the tractor and horses to make them only go on the farm roads.
I already explained that here:
viewtopic.php?p=1260947#p1260947
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

Quast65 wrote: 06 May 2023 09:03 Also, there is a very easy way to also use a parameter to choose between UK or US.
I tried other day to see if could figure out a way to have it choose between UK and US but failed so thought it could not be done. So I separated them.

But now with what you showed me I can try make just one set again?
That should also reduce the number of vehicles in the AuzfarmRoads.
Thank you kindly.
There is a typo with one of those vehicles by the way:
I might be blind but looks ok to me as suppose to be a US Horse and dog. I check in morning as might be on wrong side of road.

The new code you give me so can reference each vehicle to either US or UK will work on that tomorrow. Once I get all that working properly will have another try to get tractor and the horses to only work on the 2 farm roads.

Cheers pal
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
Quast65
Tycoon
Tycoon
Posts: 2798
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: AuzObjects

Post by Quast65 »

GarryG wrote: 06 May 2023 10:54 I might be blind but looks ok to me as suppose to be a US Horse and dog. I check in morning as might be on wrong side of road.
My mistake, I just woke up when I wrote this.
I was thrown off as you started out with UK/US Tracktor and then continued with UK HorseDog UK 2HorseDog and then US HorseDog US 2HorseDog
I was expecting UK HorseDog US HorseDog, UK 2HorseDog US 2HorseDog ;-)

All is well, also with the position on the road.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
alan98
Engineer
Engineer
Posts: 46
Joined: 09 Jan 2023 14:31

Re: AuzObjects

Post by alan98 »

kamnet wrote: 05 May 2023 21:47
alan98 wrote: 05 May 2023 19:53 Would it be possible for you to take one (some) of the car you already made add the flasher and turn them in police and ambulance cars?
In case you didn't know, these are already available in the Eyecandy Road Vehicles set.
I'm aware about this set, my question was about eye candy object, not real car.

Cheers,
Alan
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

Quast65 wrote: 06 May 2023 11:20 My mistake, I just woke up when I wrote this.
:D I have that problem too, and also most of the day. Often write the wrong word or read someones message wrong. :D
With the code you gave me I no longer need to name the Horses and Tractor US or UK :D .

The parameters I made to decide if the UK or US I changed the wording to "Left Side" and "Right Side" so it same wording as in the "Settings" when choose what side the road you drive on.
alan98 wrote: 06 May 2023 18:13 I'm aware about this set, my question was about eye candy object, not real car.
How you thinking to use them?

The police car gives me one idea .. maybe design it so it can be placed side of a country road booking speed hogs. :D

They would make good Waypoints in "fridaemon" set he been making too.

Cheers

EDIT:

Had a go converting some cars to police cars.
Police.png
Police.png (4.49 KiB) Viewed 3758 times
EDIT EDIT:
I just tested 4 different police cars with animated lights. These can be places on the side of roads waiting for speeding motorists.
Police Cars.png
Police Cars.png (18.58 KiB) Viewed 3748 times
Be for I do any more .. let me finish the herding animals and FarmRoads.
That will also give time to dream up some ideas.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
RoyalExamination9410
Traffic Manager
Traffic Manager
Posts: 236
Joined: 14 Nov 2021 06:56
Location: Canada

Re: AuzObjects

Post by RoyalExamination9410 »

GarryG wrote: 06 May 2023 00:31
AuzfarmRoads

Curiosity I wonder if the idea moving the parameter would affect if I added a few vehicles to the AuzFarmRoads.
So I added a tractor and some horses and change the position of the parameter and tested games by turning roads on and off and had no issues.

The tractor and the horse should travel down the middle of the 2 roads in this set like they would on a farm.
Farm RVs.png
This set is related to the AuzFarmObjects .. main reason I put it here with the object sets.

Still some tweaking to do to the RV's as they will go on other roads. Need to find how to code them to restrict them just to the Farm Roads.

I add the game file and source. maybe some one will see in the source what I should add to the tractor and horses to make them only go on the farm roads.

Cheers
No need to make them farm roads only, in rural areas you can sometimes see horseback riders and tractors on paved roads.
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

RoyalExamination9410 wrote: 07 May 2023 07:58 No need to make them farm roads only, in rural areas you can sometimes see horseback riders and tractors on paved roads.
Re: AuzObjectsQuote GarryG
by GarryG » Sun May 07, 2023 8:41 am
The roads hope can be used anywhere .. I designed the tractor and the horses to go down the center of the roads so like to restrict those just to these roads .. going down the center of other roads might not look good.
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
alan98
Engineer
Engineer
Posts: 46
Joined: 09 Jan 2023 14:31

Re: AuzObjects

Post by alan98 »

GarryG wrote: 06 May 2023 22:41
alan98 wrote: 06 May 2023 18:13 I'm aware about this set, my question was about eye candy object, not real car.
How you thinking to use them?

The police car gives me one idea .. maybe design it so it can be placed side of a country road booking speed hogs. :D

They would make good Waypoints in "fridaemon" set he been making too.
Many thanks Garry! They look great! I'm thinking about some applications:
1) wait on highways
2) second application is to park on checkpoints (that may be combined with Waypoints)
3) third one is to park near police statio.

So if you can place these cars on side of the road like you did and also place them on asphalt tile it will be great!

Cheers,
Alan
User avatar
Quast65
Tycoon
Tycoon
Posts: 2798
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: AuzObjects

Post by Quast65 »

I have been thinking of a way to have a simpeler way of using a parameter to get the vehicles in the middle of a road, depending on the drivingside a player has chosen for a game.
I have been looking at the way Rattroads has done that to choose between European/UK-style roadgraphics or US-style roadgraphics.

It may be interesting for you to try out, as it uses a lot less code.

1. Add this to your .lng

Code: Select all

STR_PARAM_DRIVINGSIDE_NAME               :Driving Side
STR_PARAM_DRIVINGSIDE_DESC               :Use this parameter, depending on the drivingside you have chosen for your game, to make sure certain vehicles are in the middle of a road.
STR_PARAM_ROAD_DRIVINGSIDE_1             :Left Side (Default)
STR_PARAM_ROAD_DRIVINGSIDE_2             :Right Side
2. Add this parameter to your code
(Place it just before the last } at the end of the Define-the-NewGRF-block)

Code: Select all

		param 3 {
			param_drivingside {
				type:      int;
				name:      string(STR_PARAM_DRIVINGSIDE_NAME);
				desc:      string(STR_PARAM_DRIVINGSIDE_DESC);
				min_value: 0;
				max_value: 1;
				def_value: 0;
				names: {
					0: string(STR_PARAM_DRIVINGSIDE_1);
					1: string(STR_PARAM_DRIVINGSIDE_2);
				};
			}
		}
3. Now, replace this code

Code: Select all

//Spritesets for tractor UK/US

spriteset (spriteset_eyecandy_tractor01, "gfx/tractor01.png") {
 tmpl_widelivestock(0)
}

spriteset (spriteset_eyecandy_tractor02, "gfx/tractor01.png") {
 tmpl_widelivestockUS(0)
}

if (param[XXX] == 0) {

item(FEAT_ROADVEHS, item_tractor01) {
 property {
  name: string(STR_NAME_tractor01);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: spriteset_eyecandy_tractor01;
 }
}

 } else { 

item(FEAT_ROADVEHS, item_tractor02) {
 property {
  name: string(STR_NAME_tractor02);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: spriteset_eyecandy_tractor02;
 }
}
}
With just this:

Code: Select all

spriteset (spriteset_eyecandy_tractor01_drivingleft, "gfx/tractor01.png") {
 tmpl_widelivestock(0)
}

spriteset (spriteset_eyecandy_tractor01_drivingright, "gfx/tractor01.png") {
 tmpl_widelivestockUS(0)
}


switch (FEAT_ROADTYPES, SELF, switch_drivingside_check, param_drivingside) {
	1: spriteset_eyecandy_tractor01_drivingright;
	spriteset_eyecandy_tractor01_drivingleft;
}


item(FEAT_ROADVEHS, item_tractor01) {
 property {
  name: string(STR_NAME_tractor01);
  climates_available: ALL_CLIMATES;
  introduction_date: date(01,01,01);
  vehicle_life: 45;
  road_type: ROAD;
  model_life: VEHICLE_NEVER_EXPIRES;
  cost_factor: 1;
  running_cost_factor: 2;
  sprite_id: SPRITE_ID_NEW_ROADVEH;
  speed: 25 km/h;
  cargo_capacity: 0;
  cargo_age_period: 0; // ageing disabled
  running_cost_base: RUNNING_COST_ROADVEH;
  misc_flags: bitmask(ROADVEH_FLAG_2CC);
  power: 100;
  weight: 1;
  sound_effect:	 SOUND_COMEDY_CAR_2;
  length: 8;
  cargo_allow_refit: [];
 }
 graphics {
  default: switch_drivingside_check;
 }
}

Very interested to know if this works...
Maybe better to try it after a good nights sleep ;-)



EDIT:
This way you could also use this kind of parameter to solve some more issues regarding driving-side.
For example, with those police vehicles you are working on now, those are all based on left-hand-drive.
With just this simple parameter, you can change the graphics to suit right-hand-drive, without the need for coding a separate item (thus using fewer object-id's)
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

alan98 wrote: 07 May 2023 08:33 So if you can place these cars on side of the road like you did and also place them on asphalt tile it will be great!
They can be placed at the side of any road as they are overlap objects.
Each has the grass as the main tile and the car overlaps a little so they appear to be on the side of the roads as shown in yellow.
Police Cars.png
Police Cars.png (20.7 KiB) Viewed 3666 times
Quast65 wrote: 07 May 2023 08:49 I have been thinking of a way to have a simpeler way of using a parameter to get the vehicles in the middle of a road
1. Add this to your .lng
2. Add this parameter to your code
I did a simular one today .. but yours is worded better .. so will change it to what you have.
3. Now, replace this code
With just this:
Very interested to know if this works...
Maybe better to try it after a good nights sleep ;-)
Be heading to bed in just over an hours time .. I need my beauty sleep :D
For example, with those police vehicles you are working on now, those are all based on left-hand-drive.
There just objects .. I did them for both sides left and right .. blank tile next to road and car overlaps on to the side of the road .. I made them as the Eye Candy Police Car and Ambulance I think are just a wee bit big for use in some of my object sets. The garbage truck, Tow Truck and Fire Truck in EyeCandy I think will be suitable as they are.
Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
alan98
Engineer
Engineer
Posts: 46
Joined: 09 Jan 2023 14:31

Re: AuzObjects

Post by alan98 »

GarryG wrote: 07 May 2023 09:51
alan98 wrote: 07 May 2023 08:33 So if you can place these cars on side of the road like you did and also place them on asphalt tile it will be great!
They can be placed at the side of any road as they are overlap objects.
Each has the grass as the main tile and the car overlaps a little so they appear to be on the side of the roads as shown in yellow.
Police Cars.png
Yeah, that's great, thanks! I meant, would it be possible in addition to place this car (or multiple of them in a row) in a grey tile like you did for military objects? This way we can emulate a police car garage in the police department, like for example on this photo:
Image
Cheers,
Alan
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

alan98 wrote: 07 May 2023 17:39 Yeah, that's great, thanks! I meant, would it be possible in addition to place this car (or multiple of them in a row) in a grey tile like you did for military objects? This way we can emulate a police car garage in the police department, like for example on this photo:
That should be ok .. wondering has any town sets have a police station?
When I get chance would like to try make some buildings for Police and other emergency vehicles.
This image if the Ambulance Station at Hamilton, in Newcastle NSW Australia. Love t try build in but no idea what that will be as other projects need work on first.
Attachments
Hamilton Ambulance Station 1920s.jpg
Hamilton Ambulance Station 1920s.jpg (66.81 KiB) Viewed 3544 times
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

Quast65 wrote: 07 May 2023 08:49 I have been thinking of a way to have a simpeler way of using a parameter to get the vehicles in the middle of a road, depending on the drivingside a player has chosen for a game.
The coding you supplied works.

Here the update game and source. In the source is also a template of the roads what I use to align the RV.

During the day will work on what was mentioned over in Herding Livestock forum.
Attachments
AuzFarmRoads.grf
(115.42 KiB) Downloaded 185 times
AuzFarmRoadsSource8May2023.rar
(291.86 KiB) Downloaded 134 times
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

ebla71 wrote: 05 May 2023 15:00 It really looks nice and would be great to show limits of parks, gardens, cemeteries and the like.
Had a fiddle with the hedges by making them a bit lighter green and this how they look on Temperate grass.
At least they can be seen.
HedgeFences2.png
HedgeFences2.png (19.23 KiB) Viewed 3501 times
Hope to do some corner pieces, various gates and on slopes.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
User avatar
GarryG
Tycoon
Tycoon
Posts: 6207
Joined: 14 Feb 2015 00:44
Location: Newcastle, Australia

Re: AuzObjects

Post by GarryG »

alan98 wrote: 07 May 2023 17:39 Yeah, that's great, thanks! I meant, would it be possible in addition to place this car (or multiple of them in a row) in a grey tile like you did for military objects?
I made some police stations and Police Car Parks and put them in AuzTownsObjectsAddOns.
They still need a bit of tweaking.
PopliceStationandCarPark.png
PopliceStationandCarPark.png (74.84 KiB) Viewed 3461 times
The light poles cover up the Police sign and the police cars lights all flash. So hope to work on that in a day or two.

One BIG problem will be when I upload the game files. A month or so ago I was preparing the object sets to upload on Bananas so I combined the AuzTownObjects, AuzTownObjectsAddOns and the AuzObjectsPre1900 into just 2 sets. (But got side tracked as usual on new ideas).

The AuzObjectsPre1900 is no longer available .. the objects in this been move to the other 2 sets.

So when I upload AuzTownObjects and AuzTownObjectsAddOns they might upset saved games as had to change a few IDs to fit the other set into these.

Cheers
Soot Happens
Screenshot Of The Month Winner March 2020
All my projects are GPLv2 License unless stated.
Auz Road Sets: viewtopic.php?f=29&t=87335
Auz Project Releases: viewtopic.php?f=67&t=84725
Auz Trains: http://www.tt-forums.net/viewtopic.php?f=26&t=74193
Auz Industry Sets: http://www.tt-forums.net/viewtopic.php?f=26&t=74471
Auz Objects: viewtopic.php?f=26&t=75657
Auz Bridges: viewtopic.php?f=26&t=75248
Auz Stations: viewtopic.php?f=26&t=76390
Auz Tracks: viewtopic.php?f=26&t=82691
Auz Subway Stations: viewtopic.php?f=26&t=85335
Auz Eyecandy TramTracks: viewtopic.php?t=89908
Videos and Images of Trains: viewtopic.php?t=90763
alan98
Engineer
Engineer
Posts: 46
Joined: 09 Jan 2023 14:31

Re: AuzObjects

Post by alan98 »

GarryG wrote: 08 May 2023 08:16
alan98 wrote: 07 May 2023 17:39 Yeah, that's great, thanks! I meant, would it be possible in addition to place this car (or multiple of them in a row) in a grey tile like you did for military objects?
I made some police stations and Police Car Parks and put them in AuzTownsObjectsAddOns.
They still need a bit of tweaking.
PopliceStationandCarPark.png
The light poles cover up the Police sign and the police cars lights all flash. So hope to work on that in a day or two.
Garry, the police station looks amazing! Looking forward to try it in my scenario :) Also really like your idea to make ambulance station! That's definitely improve gameplay making it closer to reality, like everything you do!

Cheers,
Alan
RoyalExamination9410
Traffic Manager
Traffic Manager
Posts: 236
Joined: 14 Nov 2021 06:56
Location: Canada

Re: AuzObjects

Post by RoyalExamination9410 »

GarryG wrote: 08 May 2023 08:16 I made some police stations and Police Car Parks and put them in AuzTownsObjectsAddOns.
They still need a bit of tweaking.
PopliceStationandCarPark.png
The light poles cover up the Police sign and the police cars lights all flash. So hope to work on that in a day or two.

One BIG problem will be when I upload the game files. A month or so ago I was preparing the object sets to upload on Bananas so I combined the AuzTownObjects, AuzTownObjectsAddOns and the AuzObjectsPre1900 into just 2 sets. (But got side tracked as usual on new ideas).

The AuzObjectsPre1900 is no longer available .. the objects in this been move to the other 2 sets.

So when I upload AuzTownObjects and AuzTownObjectsAddOns they might upset saved games as had to change a few IDs to fit the other set into these.

Cheers
What do you mean by this? How do I make sure it doesn't confuse my existing gamefiles?
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 14 guests