Page 4 of 55

Re: Auz Lineside and Roadside Objects

Posted: 24 Feb 2016 10:17
by GarryG
Woodenbridge code.

What I could figure out with what others told me could have something to do with xextent: 16; yextent: 16; and zextent: 16;

But because I have 4 sprites I wonder if each sprite needs its own spriteset information?

Code: Select all

/* WOODBRIDGE */

spriteset (spriteset_woodbridge1) {
    template_footbridge(18,8,"gfx/objects/woodbridge1.png")
    template_footbridge(162,8,"gfx/objects/woodbridge1.png")
    template_footbridge(306,8,"gfx/objects/woodbridge1.png")
    template_footbridge(450,8,"gfx/objects/woodbridge1.png")
}

spritelayout spritelayout_woodbridge1 {
    ground {
        sprite: GROUNDSPRITE_NORMAL;
    }
    building {
        sprite: spriteset_woodbridge1(LOAD_TEMP(1));
        xoffset: 0; //from NE edge
        yoffset: 0; //from NW edge
        zoffset: 0;
        xextent: 16;
        yextent: 16;
        zextent: 16;
    }
}

//set building sprite
switch (FEAT_OBJECTS, SELF, switch_woodbridge1_building, [
        //store building sprite
        STORE_TEMP(view == 1 ? 1 : (view == 2 ? 2 : (view == 3 ? 3 : 0)), 1)
        ]) {
	spritelayout_woodbridge1;
}

item (FEAT_OBJECTS, woodbridge, 130) {
    property {
        class: "ROAD";
        classname: string(STR_ROAD);
        name: string(STR_woodbridge);
        climates_available: ALL_CLIMATES;
        size: [1,1];
        build_cost_multiplier: 1;
        remove_cost_multiplier: 10;
        introduction_date: date(1800,1,1);
        end_of_life_date: 0xFFFFFFFF;
        object_flags: bitmask(OBJ_FLAG_NO_FOUNDATIONS, OBJ_FLAG_ALLOW_BRIDGE, OBJ_FLAG_ANIMATED, OBJ_FLAG_RANDOM_ANIMATION, OBJ_FLAG_ANYTHING_REMOVE, OBJ_FLAG_REMOVE_IS_INCOME);
        height: 0;
        num_views: 4;
     }
    graphics {
        default: switch_woodbridge_building;
        autoslope: return CB_RESULT_AUTOSLOPE;
      }
}
The other code I having problems with is slopes.

Code: Select all

/* GRAVEL SLOPES */

# 79 "Auz_Roadside_Objects.pnml" 2
# 1 "src/objects/gravelslope1.pnml" 1

spriteset (spriteset_gravelslope1) {
    template_building_slope(14,2,"gfx/objects/gravelslope1.png")
    template_building_slope(89,2,"gfx/objects/gravelslope1.png")
    template_building_slope(164,2,"gfx/objects/gravelslope1.png")
    template_building_slope(239,2,"gfx/objects/gravelslope1.png")
}

spritelayout spritelayout_gravelslope1 {
    ground {
      // normal ground sprite - always draw
      sprite: GROUNDSPRITE_NORMAL + slope_to_sprite_offset(nearby_tile_slope(0, 0));
   }
    
    building {
        sprite: spriteset_gravelslope1(LOAD_TEMP(1));
        xoffset: 0; //from NE edge
        yoffset: 0; //from NW edge
        zoffset: 0;
        xextent: 16;
        yextent: 16;
        zextent: 16;
    }
}

//set building sprite
switch (FEAT_OBJECTS, SELF, switch_gravelslope1_building, [
        //store building sprite
        STORE_TEMP(view == 1 ? 1 : (view == 2 ? 2 : (view == 3 ? 3 : 0)), 1)
        ]) {
 spritelayout_gravelslope1;
}

item (FEAT_OBJECTS, gravelslope1, 156) {
    property {
        class: "ROAD";
        classname: string(STR_ROAD);
        name: string(STR_gravelslope1);
        climates_available: ALL_CLIMATES;
        size: [1,1];
        build_cost_multiplier: 1;
        remove_cost_multiplier: 10;
        introduction_date: date(1800,1,1);
        end_of_life_date: 0xFFFFFFFF;
        object_flags: bitmask(OBJ_FLAG_NO_FOUNDATIONS, OBJ_FLAG_ALLOW_BRIDGE, OBJ_FLAG_ANIMATED, OBJ_FLAG_RANDOM_ANIMATION, OBJ_FLAG_ANYTHING_REMOVE, OBJ_FLAG_REMOVE_IS_INCOME);
        height: 0;
        num_views: 4;
     }
    graphics {
        default: switch_gravelslope1_building;
        autoslope: return CB_RESULT_AUTOSLOPE;
      }
}
If you all someone else interested to type in what should be there be appreciated.

Thanks ever so kindly

Re: Auz Lineside and Roadside Objects

Posted: 24 Feb 2016 10:41
by Quast65
What I could figure out with what others told me could have something to do with xextent: 16; yextent: 16; and zextent: 16;
It most definitely has something to do with those. In NFO-coding you can (and probably have to) define those for all 4 sprites. Maybe in NML it automatically adapts to the 4 different views.
Have you experimented with changing those values (in perticular, Y-extent and X-extent) and then by pressing CTRL-B ingame see what changes? In your case, one of them has to change from 16 to 32.

Re: Auz Lineside and Roadside Objects

Posted: 24 Feb 2016 11:16
by GarryG
I seen the sample on internet with the X, Y, Z coordinations .. but not sure what they be as all tiles have the extension. Do I count backwards from the xyz starting point for those going NW and NE of that position?

Maybe someone more familiar will see my plight and give me a better clue or maybe I need to upload the sprites here too so they can get corodinations from them?

But if this helps any one the sprite sizes I have in template is:

Code: Select all

template template_footbridge(x,y,filename) {
    [x, y, 130, 120, -65, -73, filename]
}

Re: Auz Lineside and Roadside Objects

Posted: 25 Feb 2016 05:21
by GarryG
Been looking at overlapping the gravel roads over the sealed roads as was asked previously about.

One problem I coming across is the different types of sealed roads need covering.

First attempt I used the American Road Replacement Set as I think that is the widest sealed roads. To cover this need very wide gravel roads which doesn't really suit country outback roads.
Overlap Roads1.png
Overlap Roads1.png (159.29 KiB) Viewed 4394 times
I had a look at making the gravel as wide as the default roads that come with OpenTTD and wider dirt edges and to me it too not really suitable.

Another idea .. maybe I just make some straight gravel road sections only for the different road ideas and players can act as if this is roadwork.

I going to set this idea a side for a while and wait for suggestions or maybe I might think of something.

I'll finish off some of the over parts of the Roadside_Objects before I go back to it.

Cheers

Re: Auz Lineside and Roadside Objects

Posted: 25 Feb 2016 11:45
by V453000 :)
That colour looks insanely bright and saturated.

Re: Auz Lineside and Roadside Objects

Posted: 25 Feb 2016 12:00
by GarryG
That colour looks insanely bright and saturated.
You could be right. In the FIRS Quarry it looked ok .. but maybe that a small area. Maybe I should have mixed it with some of the darker gravel in the quarry too.

I'll see what can be done over the next few days or so. I'll see if can fix up the object roads that colour first.

Re: Auz Lineside and Roadside Objects

Posted: 25 Feb 2016 14:16
by GarryG
Been making some farm animals for objects.

The fence objects bit hard to see .. but there is a gate and a cattle grid along that fence.

The sheep I think look great but should have done some without dogs and horses as well.

One of the outriders with the cattle should be on opposite side .. will change or make a few more.

Like to make another fence with the gate open and sheep passing through the gate.

See if can get done ready to release Friday evening so can enjoy on the weekend.

Re: Auz Lineside and Roadside Objects

Posted: 26 Feb 2016 09:13
by GarryG
Been addition animals and changing colours to the gravel roads in this issue of Auz_Roadside_Objects.
Auz_Roadside_Objects.grf
(129.04 KiB) Downloaded 131 times
You now can now muster your sheep and cattle ready for shearing, milking or sell them to the Abattoirs.

Hope you enjoy this over the weekend as I hope to.

Cheers

Re: Auz Lineside and Roadside Objects

Posted: 26 Feb 2016 09:28
by Quast65
I think you did a great job with recoloring the gravel road, they look much better!!! :bow:
One suggestion, the transition from grass to gravel is very sharp (its a straight dark brown line), maybe use the transition like you used for the dirt-road.
Simplest way to do that is just superimpose your new gravel road over the dirt road. I think that would look even better and is easy to try out.

Re: Auz Lineside and Roadside Objects

Posted: 26 Feb 2016 09:55
by GarryG
Thanks Quast65 you like the colour .. I know the gravel roads need a bit of roughness along the edges .. just thinking of a way to do it .. the gravel been laid on dirt so should be some dirt off to the sides, but vehicles driving fast along the gravel would have thrown some gravel off into the grass too .. so think be nice if I had a bit of both. Will get done eventually.

Cheers

Re: Auz Lineside and Roadside Objects

Posted: 27 Feb 2016 04:47
by GarryG
Here's a copy of the source files if anyone interested. They also include latest .grf files too.
AuzRoadsideObjectsV2.rar
Auz Roadside Objects V2
(4.72 MiB) Downloaded 154 times
In the roadside objects I updated the gravel roads so has a splash of dirt in the grass. Also changed the sheep and cattle .. they have no horserider and dogs now. These are separate so you can put the riders where you want. Added some more horses too.

AuzRailsideObjectsV9.rar
Auz Lineside Objects
(7.07 MiB) Downloaded 141 times
Update:

Those who like the game file and not the sauce files .. go to BaNaNaS as I just uploaded them there.

Unless someone finds any errors I not be doing any more to the objects for a while .. going to enjoy a few days of game play before start working on another idea with Quast65.

Enjoy

Re: Auz Lineside and Roadside Objects

Posted: 28 Feb 2016 01:21
by GarryG
Hi fellas,

Sorry to say but I made a udder mistake with Auz_Roadside_Objects.

Update is here.
Auz_Roadside_Objects.grf
Version 3
(147.52 KiB) Downloaded 151 times
Some cows had flashing udders and the dark brown cow also flashing. I thought I fixed those before I released it .. which I did fix them .. I just forgot to run the NMLC to add the changes to the newgrf file. :shock:

Discovered that had some gravel roads pieces specially on the hills not line up properly so fixed those too. When fixing that problem in my graphics editor this morning wondered why it not show the changes when I test .. discovered it would help if I saved the graphics works I did first before running the nmlc.

Been making several minor mistakes lately so I think it time to take my mind away from this for a few days and do something totally different.

I will update this on BaNaNaS too.

Re: Auz Lineside and Roadside Objects

Posted: 28 Feb 2016 20:55
by SkeedR
I don't know about other countries, but in the UK cattle grids normally consist of several cross bars.

Re: Auz Lineside and Roadside Objects

Posted: 28 Feb 2016 22:24
by GarryG
I don't know about other countries, but in the UK cattle grids normally consist of several cross bars.
Yep .. usually made with up to about a dozen or so bars, seen some made with wood, metal bars and even made of railway lines. Unfortunately not enough room in the game to show them properly.

Your comment just made me realise, I forgot the side fences to the grids.

Re: Auz Lineside and Roadside Objects

Posted: 01 Mar 2016 06:59
by GarryG
Hi all,

Been seeing if I can do a shearing shed.

Have it as a object and maybe make it a Industry for Auzind.

The Large doors on left is where they load the wool bales onto wagons and tracks. The Door on right is where the sheep enter the shed. Hope to make another shed that will join on the right with the smaller doors where the sheared sheep come out. Also see if can make some sheep holding pens.

If I make it a industry have it so it only produces Wool.

Re: Auz Lineside and Roadside Objects

Posted: 01 Mar 2016 08:58
by GarryG
Finished the Shearing Sheds and holding pens. Just need to add the odd sheep.

There are 4 parts to sheds so you can make what ever size you wish.

Will see if I can do a few more pens with sheep in them.

Think I should add another category to the Auz_Roadside_Objects and call it FARMS. Put the shearing sheds, fences and maybe farm animals all together.

But I'll think on it.

Re: Auz Lineside and Roadside Objects

Posted: 01 Mar 2016 12:16
by GarryG
If anyone want to try a shearing shed in their game here's the latest newgrf.
Auz_Roadside_Objects.grf
(154.89 KiB) Downloaded 129 times
It has the Shearing Shed shown above and also some pens with sheep in them. Listed it under Farm Objects.

The fences I made for the Sheep Pens, I will make some more of these over the next few days so you can build holding pens to larger size if like.

I attempting to make a dairy now .. first go well .. not good enough. Will keep trying.

Re: Auz Lineside and Roadside Objects

Posted: 02 Mar 2016 02:15
by GarryG
I've had a interesting phone call from a friend .. his 10 year old daughter like playing OpenTTD now .. not interested in the transport side of things, but when her dad starts a game, she wants to do the decorating with the objects, especially the animals and fences.

He says she like to find farms in the game and add objects to those them.

Wonder if anyone else having that minor problem now? :D

Re: Auz Lineside and Roadside Objects

Posted: 03 Mar 2016 05:19
by GarryG
Hi all,

Here's the first image of a Milking Shed.
Milkingshed.png
Milkingshed.png (8.13 KiB) Viewed 3927 times
I intend to make another building to join on the right if players like a larger Milking shed.

Cheers

Re: Auz Lineside and Roadside Objects

Posted: 03 Mar 2016 07:32
by GarryG
here's a few more shots of the dairy and the picture I based my idea on.

The milking shed on far left .. I left the fence out on the right so you can either add a fence or add the milking shed extension 2nd from left.

Then the images if want a small milking shed or a larger one.

See if I can find some dairy cows now.