Page 35 of 185

Re: AuzObjects

Posted: 16 Aug 2020 12:06
by GarryG
Thanks keeos Quast65 for helping.

When I tried to code it this morning and had no animation I thought maybe needed in the "houses_32 graphics" but didn't work, but forgot to delete the animation from that file :oops: .

I tried something similar to what you coded for me but got this message and I still getting the message now with the code you sent.

Code: Select all

←[K←[91m nmlc ERROR: "AuzWaterTest.nml", line 39: Incorrect number of template arguments. Expected 3, got 4←[0m
This part of the code:

Code: Select all

template template_flat_low(x,y,filename) {
    [x+14, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+89, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+164, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+239, y+2, 64, 44, -31, -13, ANIM, filename]
}

/***************************************************
*   HOUSES ON WATER
***************************************************/

//spritesets with 4 directions, SNOW-version and the PURCHASE-menu
spriteset (spriteset_houses07) {
    template_flat_low(0,0,"gfx/houses07_8.png")
}
alternative_sprites (spriteset_houses07, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "") {
    template_flat_low(0,0,"gfx/houses07_32.png", "gfx/houses07_MASK.png")
}

spriteset (spriteset_houses07_SNOW) {
    template_flat_low(0,0,"gfx/houses07_8.png")
}
alternative_sprites (spriteset_houses07_SNOW, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "") {
    template_flat_low(0,0,"gfx/houses07_32.png", "gfx/houses07_MASK.png")
}

spriteset (spriteset_houses07_PURCHASE) {
    template_flat_low(0,0,"gfx/houses07_8.png")
}
alternative_sprites (spriteset_houses07_PURCHASE, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "") {
    template_flat_low(0,0,"gfx/houses07_32.png", "gfx/houses07_MASK.png")
}
Line 39 is this line:

Code: Select all

    template_flat_low(0,0,"gfx/houses07_32.png", "gfx/houses07_MASK.png")
Any suggestions?

I'll upload another source in case needed.

Thanks again for all the help.

Cheers

Re: AuzObjects

Posted: 16 Aug 2020 12:19
by Quast65
What happens when this:

Code: Select all

alternative_sprites (spriteset_houses07, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "")  
becomes

Code: Select all

alternative_sprites (spriteset_houses07, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP, "", "")   

Re: AuzObjects

Posted: 16 Aug 2020 12:42
by GarryG
Quast65 wrote: 16 Aug 2020 12:19 What happens when this:
Sorry, tried that and getting same error message.

EDIT: I tried the NMLTutorial/32 bit base graphics

I used same as they had, just changed the levelcrossing to houses07 and removed where it had 1370.

But get same error. Depends what I put there if either saying expected 3 and found 2 or expected 3 and found 4.

Cheers

Re: AuzObjects

Posted: 16 Aug 2020 15:54
by Quast65
I got it working!

Now have to find out exactly how I got it to work and try to explain it here what I did ;-)

Will update a.s.a.p. Got some things to do at home first.

Re: AuzObjects

Posted: 16 Aug 2020 19:58
by Andrew350
Haven't tested it, but try adding "mask-filename" to your template arguments, like this:

Code: Select all

template template_flat_low(x,y,filename,mask-filename) {
    [x+14, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+89, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+164, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+239, y+2, 64, 44, -31, -13, ANIM, filename]
}
That should work; at least that's what nmlc is complaining about anyway. I'm not sure if you also need to add it after the other "filename" arguments (if those are even necessary). Note that this will only work if you use this template only for 32bpp sprites with masks, otherwise nmlc will start complaining about not having enough arguments on everything else ;) You may have to use different templates or figure out someway to make non-masked spritesets "ignore" that last argument, if possible. Can't really test it at the moment, but hopefully this helps :)

Re: AuzObjects

Posted: 16 Aug 2020 21:34
by Quast65
Yep, there was indeed an argument missing and indeed I used two templates.

But first:

Graphics, You do need to draw something into the 32bpp graphics that can be masked!!!
Apparently the mask will not show up over completely transparent pieces!!

So, this is what the graphics should look like:
houses07_correctly drawn.rar
(23.44 KiB) Downloaded 127 times
Code:

- Templates:
You'll need two

Code: Select all

template template_flat_low(x,y, filename) {
    [x+14, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+89, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+164, y+2, 64, 44, -31, -13, ANIM, filename]
    [x+239, y+2, 64, 44, -31, -13, ANIM, filename]
}


template template_flat_low_MASK(x,y, filename, mask) {
    [x+14, y+2, 64, 44, -31, -13, ANIM, filename, mask]
    [x+89, y+2, 64, 44, -31, -13, ANIM, filename, mask]
    [x+164, y+2, 64, 44, -31, -13, ANIM, filename, mask]
    [x+239, y+2, 64, 44, -31, -13, ANIM, filename, mask]
}
- Spritesetblock should look like this:

Code: Select all

//spritesets with 4 directions, SNOW-version and the PURCHASE-menu
spriteset (spriteset_houses07) {
    template_flat_low(0,0, "gfx/houses07_8.png")
}
alternative_sprites (spriteset_houses07, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP) {
    template_flat_low_MASK(0,0, "gfx/houses07_32.png", "gfx/houses07_MASK.png")
}

spriteset (spriteset_houses07_SNOW) {
    template_flat_low(0,0, "gfx/houses07_8.png")
}
alternative_sprites (spriteset_houses07_SNOW, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP) {
    template_flat_low_MASK(0,0, "gfx/houses07_32.png", "gfx/houses07_MASK.png")
}

spriteset (spriteset_houses07_PURCHASE) {
    template_flat_low(0,0, "gfx/houses07_8.png")
}
alternative_sprites (spriteset_houses07_PURCHASE, ZOOM_LEVEL_NORMAL, BIT_DEPTH_32BPP) {
    template_flat_low_MASK(0,0, "gfx/houses07_32.png", "gfx/houses07_MASK.png")
}
The entire code would be this:
AuzWaterTest.nml
(8.99 KiB) Downloaded 87 times
This includes not being able to build on land and watersprite in purchasemenu

I hope this works for you too ;-)

Re: AuzObjects

Posted: 17 Aug 2020 00:45
by GarryG
Quast65 wrote: 16 Aug 2020 21:34 Yep, there was indeed an argument missing and indeed I used two templates.

But first:

Graphics, You do need to draw something into the 32bpp graphics that can be masked!!!
Apparently the mask will not show up over completely transparent pieces!!
When first tried it did not work .. it coded without any errors and when loaded it into the game, there was no animated water splashes.

Then I remembered .. whenever we copy a graphics file into the gfx folder to replace a older one for some reason NML doesn't register it. It still has the old information stored in the .nmlcache file and that file needs to be deleted so that NML will make a new one with the new information.

So now .. all is well and working great.

Got to visit immigration this morning and when I get home later today I will code the other 7 sets of houses that I made for the water.

Thank you so very much Quast65 for all your help .. what would I ever do without you as you have help me many times in the past.

Cheers

Re: AuzObjects

Posted: 17 Aug 2020 06:24
by GarryG
Success .. the houses on water has animated water splashing on the pylons.

The idea is you build from the shore line with the wide jetties found in AuzWaterObjects under "AuzWater: Jetty"

You then have the option to join the narrow jetties to the wide jetties. Houses will connect with either the wide or the narrow jetty.

Most of the houses and Jetties are shown in this image.
Houses on Water.png
Houses on Water.png (76.36 KiB) Viewed 3912 times
The narrow Jetty is found with the houses on water in "AuzWaterAddOn: Camp on Water"

There are some more row boats .. at moment these are with "AuzWaterAddOn: Camping" as I originally designed them so can be placed on the shore or in water.

Before I do more to these houses on water, will make up a list of what could look nice with them. Let me know of any suggestions you might have as well.

I've uploaded the game file and the source for you to try and if you want to code, maybe you can get some ideas from the source files.

Enjoy.

Re: AuzObjects

Posted: 17 Aug 2020 08:12
by Quast65
Nice!!! :))

Re: AuzObjects

Posted: 17 Aug 2020 08:30
by GarryG
There are a lot of houses on the water where I am in Philippines. Been taking some photos of them see if I can make some of these for game too.

Re: AuzObjects

Posted: 17 Aug 2020 10:01
by GarryG
Just made a few alterations to some of the small boats I have in the auzWaterObjects set.

Instead of the boats being in the center of the tile, I moved most of them to the edge and towards a corner .. this so that can be used in open ocean or tied up at their mooring on the Jetties.

Now those houses on the water can have a boat near them as well.
Boats at Moorings.png
Boats at Moorings.png (24.53 KiB) Viewed 3853 times

Re: AuzObjects

Posted: 17 Aug 2020 12:23
by GarryG
Would you like some seaplanes to tie up with the houses and boats? I dare say the owners would have their own private jetty for their plane .. that why I using the narrow jetty.
Seaplanes at Moorings.png
Seaplanes at Moorings.png (47.19 KiB) Viewed 3822 times
Just done those in image types so far. I like the wing over hanging the jetty like I seen in real on images on internet. Tried to make them separate from Jetty and you can place how you like, but the planes northern side of the jettys the wings would not over hang as they was overlaps. So I placing them next to the narrow jetty.

If like will do some more of these 2 planes in different colours. Not found any other small sea planes to add yet. If you know of any let me know where to find them.

This game file might interfere with the one I uploaded a few hours ago, so if you have a good game going with the other one, and this to the game at your own risk.

Cheers

Re: AuzObjects

Posted: 17 Aug 2020 15:52
by KahlilGibran
GarryG wrote: 17 Aug 2020 08:30 There are a lot of houses on the water where I am in Philippines. Been taking some photos of them see if I can make some of these for game too.
That's what I've planned to do. Thank you so much :bow:

Re: AuzObjects

Posted: 17 Aug 2020 20:30
by Bad_Brett
Such amazing work. This project is one of tre things that made me return to the community.

Re: AuzObjects

Posted: 18 Aug 2020 00:04
by GarryG
Thanks for the compliment. Hope add a few more planes today in different colours.

Re: AuzObjects

Posted: 18 Aug 2020 01:49
by GarryG
I just added some more planes to the narrow jetties.

These should give you a good variety for your game.
Seaplanes at Moorings 2.png
Seaplanes at Moorings 2.png (37.02 KiB) Viewed 3531 times
Unless a error is found, I not be doing any more to the houses on water for a while. Like to have a good think about it and create a to-do-list of anything else be nice to add.

Still thinking about adding people to the jetty and wharves, but not want to create so many pieces, yet still have a variety. :roll:

Since Quast65 shown me how to animate some of my objects, like to experiment for awhile with some other ideas I have.

So hope this is the last upload of AuzWaterAddOns for a few weeks.

Cheers

Re: AuzObjects

Posted: 19 Aug 2020 05:08
by GarryG
A chap called "Janssoni" has asked about "Give us traffic signs, please".

I do have some in my Auz Road Sets and and a separate set just of those signs over on my AuzRoad Set topic, but since those signs are objects thought I put a copy of them here too for those who prefer to use other types of roads.

There maybe a sign here suitable for your roads.
Road Signs.png
Road Signs.png (51.17 KiB) Viewed 3403 times
There are signs to indicate curve Ahead, Junction Ahead, finger boards to give directions, speed signs and some others.

If there is a sign you would like that I not included, send us a image of it and see if it can be added.

Re: AuzObjects

Posted: 19 Aug 2020 10:09
by GarryG
Experimenting with the Chimney that Emperor Jack uploaded in my forum and also some Forest Towers.

But you can't have just yet .. hope to add a few more things of interest before it be ready.

Re: AuzObjects

Posted: 20 Aug 2020 01:29
by KahlilGibran
What about hotels and landmarks?

Re: AuzObjects

Posted: 20 Aug 2020 04:36
by GarryG
KahlilGibran wrote: 20 Aug 2020 01:29 What about hotels and landmarks?
I know a person already looking at Hotels and the landmarks .. depend what your thinking of as there are some already made by others like special building.

Some tall items I been thinking of it town water supplies (was asked about those long time ago so have to see about doing some), air vents that go above mine shafts and railway tunnels.

In the mean time I gone back down to ground level .. looking at some fallen trees and a log to cross the creeks. The fallen trees can go on land and in water. The logs will only cross the rivers. When try going over a fake creek or fake road they glitch. I know what the problem is .. but not motivated to fix it just yet.