Page 2 of 16

Re: [CODER NEEDED]Station tiles - Fences

Posted: 03 Nov 2010 23:10
by Dante123
planetmaker wrote:As I said earlier: In order to make your fences compatible with all kind of ground tiles (and you want that! :-) ), you should actually provide your fences on a blue background - and not drawn over existing tiles. I.e. any programmer will need graphics which show your fence alone without anything else - on a transparent blue background. See http://wiki.ttdpatch.net/tiki-index.php ... oordinates - first colour entry in that palette.
i added the line in the first post.
all sprites are drawn on transparent/blue backgrounds. within photoshop i always work with multiple layers. this way i can easy switch to some tiles to also see how they will look like on the tile. here on the forum i therefore put them without blue backgrounds so that you can better see how it will show up ingame :)
planetmaker wrote:But yes, your examples look like it could make for interesting tiles - even though I have to agree with what Dwight_K._Schrute mentioned above: it would IMHO make more sense to code it as NewObjects than as station tiles.
but newobjects can only be used in scenario editor right ? although i do hear some rumors that it will be implanted soon to be used during the game too ? in that case it doent matter for me anymore if it will be station or newobjects, as long as i can build them during the gameplay and not only in scenarioeditor.
some ideas that i already have for the next thing after the fences would be road traffic noise reducing barriers. after all, those will look great at heavy traffic parts in or close to a city :)

Re: [CODER NEEDED]Station tiles - Fences

Posted: 03 Nov 2010 23:42
by planetmaker
Dante123 wrote: but newobjects can only be used in scenario editor right ?
NewObjects are part of the game for several weeks so far. They can be placed by the player at any time (provided the object is allowed to be placed there and then and sufficient money is availabe - properties the object's newgrf author decides).
Summary: (svn r20670) -Add: support for feature F
And if you actually attach the sprites which would need coding, any person who feels like, could grab and code them without much fuss ;-)

Re: [CODER NEEDED]Station/NewObject tiles - Fences

Posted: 04 Nov 2010 04:24
by Nite Owl
Just out of curiosity (and I may be way off base on this) but should the sprites not be placed on the edges of the tiles instead of in the middle of them? If you go with Planetmaker's blue transparent ground idea and you place a fence tile up next to say a gray ground tile of the Industrial Station Renewal Set then there would be a gap of default ground between the gray ISR ground and the actual fence sprite. I am not saying that this would be a bad thing (it might actually look good) but it seems to me that the fence line should parallel the edge of the tile it is placed next to without such a gap.

Re: [CODER NEEDED]Station/NewObject tiles - Fences

Posted: 04 Nov 2010 06:35
by Dante123
Nite Owl wrote:Just out of curiosity (and I may be way off base on this) but should the sprites not be placed on the edges of the tiles instead of in the middle of them? If you go with Planetmaker's blue transparent ground idea and you place a fence tile up next to say a gray ground tile of the Industrial Station Renewal Set then there would be a gap of default ground between the gray ISR ground and the actual fence sprite. I am not saying that this would be a bad thing (it might actually look good) but it seems to me that the fence line should parallel the edge of the tile it is placed next to without such a gap.
fully true and it is on my to-do list already.
i started off with the middle ones just becasue it is my first go at newgrf and it seemed more easy at the beginning. to name some of the ideas on my to-do list:
-side tile fences
-use industrial station renewal ground sprite to make it fit to a middle fence
- (this is a maybe) make also the diagonal ones (horizontal/vertical on screen)
- sound barriers with multiple versions (wood/steel/concrete/modern/design)

i will put up the blue tiles when the sprites are also shaded and ready for used. till that time i provide them to coder onm request.
also i will still do my best to see if i can get the newobject programming myself. but its hard.

Re: [CODER NEEDED]Station/NewObject tiles - Fences

Posted: 04 Nov 2010 11:52
by michael blunck
Dante123 wrote: (im just a total n00b in coding, and i dont like all that coding crap. the drawing i can learn easy and am willing to put effort in)
That´s a most popular fallacy.

I´ve been drawing and coding newgrfs for years, and I´d like to tell you that "coding" might be tedious but it´s understandable after a relatively short learning phase, whereas drawing skills can only be acquired "the hard way" and most probably only to a certain degree. But o/c, the most difficult thing in that "newgrf" business is to set up a sound concept.

While "fences" could be a candidate for "new objects", it´d be appropriate IMO to include them where needed, i.e. directly within station and industry sets. At least, I´m doing it this way.

One reason for this is that it´s possible then to place them on tiles where they belong (and not beneath them), a second reason would be that a (mostly complicated) case-by-case analysis (where to place which sprite) would already be present in those sets. In this way, it´d be possible to place them automatically, i.e. without introducing a massive user GUI.

regards
Michael

Re: [LEARNING CODING]Station/NewObject tiles - Fences

Posted: 04 Nov 2010 19:23
by Dante123
currently i am learning how to code them as stations or newobjects.

only good argument now that i can think of why stations should be better than newobjects is because of the interface. i use improved station GUID and therefore can quickly see the one i need. for newobjects you have a lot of text and only 1 preview at the time.
So for new objects i should strongly recommend a new GUID similar to that new patch here: http://www.tt-forums.net/viewtopic.php?f=33&t=41222 (improved station GUID)
(i hate to just browse trough text when it is graphical objects you want to make)

Re: [OTTD](V0.1)Station/NewObject tiles - Fences

Posted: 06 Nov 2010 17:04
by Dante123
First post updated. version 0.1 is out as station tiles (see comment on first post why not yet as newobjects)

Re: [OTTD](V0.1)Station/NewObject tiles - Fences

Posted: 06 Nov 2010 17:55
by RL Conroy
Nice! I hope to see more!
And thanks for Referencing me! :wink: :mrgreen:

Re: [OTTD](V0.1)Station/NewObject tiles - Fences

Posted: 06 Nov 2010 18:00
by Kogut
It may be better to attach file directly on forums, not 3rd party site.

Re: [OTTD](V0.1)Station/NewObject tiles - Fences

Posted: 06 Nov 2010 18:19
by Dante123
Kogut wrote:It may be better to attach file directly on forums, not 3rd party site.
its my own personal site ;)

Re: [OTTD](V0.1)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 15:51
by Dante123
V0.2 out 07-11-2010
post 1 updated: http://www.tt-forums.net/viewtopic.php?p=911187#p911187

again as station tiles, still need to learn how the NewObjects work, or someone willing to code them as NewObjects too, please PM me =)

Re: [OTTD](V0.1)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 16:01
by planetmaker
Dante123 wrote:
Kogut wrote:It may be better to attach file directly on forums, not 3rd party site.
its my own personal site ;)
That doesn't invalidate Kogut's statement. As it stands, nearly all external sites are less reliable to work than this forum ;-) - and if it's only that you move the files. Or do you guarantee (how?) to keep the link around for ... another 8 years (the age of this forum?) But I guess... as long as it's on BaNaNas it doesn't matter ;-) - in those cases I do the same.

But indeed nice to see what you link :-)

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 16:09
by Dante123
i already have that website for 3 years now, and well as long as i keep paying for that website, it will be there :) its not some free webhosting thing :) but it is on bananas too so its safe :P

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 16:14
by planetmaker
Dante123 wrote:i already have that website for 3 years now, and well as long as i keep paying for that website, it will be there :) its not some free webhosting thing :) but it is on bananas too so its safe :P
yes... but that's indeed important: savegames can be considered lost, if not at least a compatible newgrf can be found. And that happens... E.g. it's virtually impossible to load the savegames from the beginning of the #openttdcoop PublicServer with the _exact_ newgrf versions as back then. And if we hadn't kept the grfpack, it'd probably be difficult to find even compatible ones for quite a few of them. And it's a shame if you come back after some time and find yourself not being able to reasonably load an old albeit nice savegame.

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 18:57
by Dante123
mm strange thing.
i want to use some company colors too, now i have this pallet:

Image

so i use those blue colors where the orange "company" is linking to, but i dont see them turn into company colors :/

any1 got any idea ?

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 22:21
by Lakie
In the tile layout defintions, do you mark the intended sprites for recolouring? (Bit 15 iirc).

~ Lakie

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 22:46
by Dante123
Lakie wrote:In the tile layout defintions, do you mark the intended sprites for recolouring? (Bit 15 iirc).

~ Lakie
that doesn't ring any bell. looking just at the pallet, i thought using 1 of those colors will always become company color ?

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 07 Nov 2010 23:54
by Lakie
It doesn't do it by default, you have to tell Transport Tycoon to apply recolouring to the sprite, it should be in the Action0 for stations, property 09?

~ Lakie

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 08 Nov 2010 17:13
by Dante123
Company colors fixed!


1 more thing.
if i look at this table: http://www.ascii.cl/conversion.htm
i see the max is 255 lines ?
but when i decompile some other big grf, i see 959 lines. how do i do this with sprite 1 to tell the total number of lines ?

Re: [OTTD](V0.2)Station/NewObject tiles - Fences

Posted: 08 Nov 2010 17:24
by Lakie
That table is an example going up to the maximum byte value, effectively each digit of hexadecimal represents a number between 0 and 16.
Therefore you can break down the hexadecimal, for example.

Code: Select all

0x123
0x100 = 1 * 16 * 16 = 1 * 256 = 256
 0x20 =      2 * 16 = 2 *  16 =  32
  0x3 =             = 3 *   1 =   3
All added together, you get 291.
Most operating systems' calculators should also provide the ability to convert numbers between hexadecimal, decimal and binary.

You could also use escape sequences such as \b<num> (byte), \w<num> (word) and \d<num> (dword).
Where <num> is a decimal number which will automatically translate to the correct hexadecimal and specified number of bytes.

For example, the first sprite could be wrote as such:

Code: Select all

    0 * 0      \d959
Lastly, one very useful tool for nfo writing is (nfo)renum (now packaged as part of grfcodec) which will renumber sprites, correct sprite lengths, update total sprite count and flag any errors it finds. :wink:

Hope that helps,
~ Lakie