Questions about coding and drawing
Moderator: Graphics Moderators
Questions about coding and drawing
Hello everyone
I play OpenTTD for years. After GarryG contacted me with ideas for his new graphics, I decided to gradually start creating my own graphics. I started with objects (for me the simplest graphic). During the shopping, I realized that in the cities there are no shopping centers. So I've created two ones for now. I had no idea where to start, but in the end I created something. GarryG sent me folder with needed files and created .grf file for me, but In the future I'd like to do it alone.
I started this topic because if someone else wanted to create something of his own to know where to start.
My OpenTTD friend told me to install NML 5, but I lost in the 1st step. I downloaded ir from https://www.openttd.org/downloads/grfco ... atest.html , extract folder to D:\openttdgraphic\... , and now what?
I created websites in CSS and HTML so programming is not so far from me. But I never (maybe 2-5 times very earlier) code in Command Promt. Can somebody help me with it, please? I'm Windows 10 User.
My first graphics:
I play OpenTTD for years. After GarryG contacted me with ideas for his new graphics, I decided to gradually start creating my own graphics. I started with objects (for me the simplest graphic). During the shopping, I realized that in the cities there are no shopping centers. So I've created two ones for now. I had no idea where to start, but in the end I created something. GarryG sent me folder with needed files and created .grf file for me, but In the future I'd like to do it alone.
I started this topic because if someone else wanted to create something of his own to know where to start.
My OpenTTD friend told me to install NML 5, but I lost in the 1st step. I downloaded ir from https://www.openttd.org/downloads/grfco ... atest.html , extract folder to D:\openttdgraphic\... , and now what?
I created websites in CSS and HTML so programming is not so far from me. But I never (maybe 2-5 times very earlier) code in Command Promt. Can somebody help me with it, please? I'm Windows 10 User.
My first graphics:
Last edited by fridaemon on 04 Aug 2021 13:05, edited 1 time in total.
- Emperor Jake
- Tycoon
- Posts: 3427
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: Releasing New Object Graphic - Begginer Tutorial
You said you need NML, but what you actually downloaded there is GRFCodec. NMLC and GRFCodec are different programs, and while both are essential for any GRF creator, NMLC is the one you want, get it here: http://bundles.openttdcoop.org/nml/releases/0.4.5/ (I'm not sure where to find windows binaries for newer versions so if someone could point me in the right direction...) Everything's moved to github now so here: https://github.com/OpenTTD/nml/releasesfridaemon wrote: ↑04 Aug 2020 18:04 My OpenTTD friend told me to install NML 5, but I lost in the 1st step. I downloaded ir from https://www.openttd.org/downloads/grfco ... atest.html , extract folder to D:\openttdgraphic\... , and now what?
Here's now to install it: https://www.tt-wiki.net/wiki/NMLTutorial/Installation
Now NML doesn't need to be coded in the command prompt. Just use a text editor such as notepad++. The only command you'll be needing is something along the lines of
Code: Select all
nmlc -c --grf mygrf.grf mygrf.nml
Hope this helps
Last edited by Emperor Jake on 05 Aug 2020 11:34, edited 1 time in total.
-
- Traffic Manager
- Posts: 161
- Joined: 02 Mar 2009 02:07
Re: Releasing New Object Graphic - Begginer Tutorial
Nice shopping centers.
But flipping the image doesn't suffice because then shading is wrong. You will have to redraw and/or reshade.
But flipping the image doesn't suffice because then shading is wrong. You will have to redraw and/or reshade.
Re: Releasing New Object Graphic - Begginer Tutorial
Perfect! Love you! I've just created my first grf file
I had just one problem with downloading nml folder - I had to few times press resume in downloading beacouse of this error.
Re: Releasing New Object Graphic - Begginer Tutorial
Thanks for the warning, I honestly didn't think of that. I'll repair it.perverted monkey wrote: ↑05 Aug 2020 06:01 But flipping the image doesn't suffice because then shading is wrong. You will have to redraw and/or reshade.
If anyone have any advice, come with it
Re: Releasing New Object Graphic - Begginer Tutorial
The newer NML downloads are here: https://github.com/OpenTTD/nml/releases
Re: Releasing New Object Graphic - Begginer Tutorial
Hey, very nice shopping center !
I'm planning to create some shopping center/supermarket too for my new project "European Building Set" viewtopic.php?f=26&t=87346
I coded some grf file for me, with NML and particulary for house set. If you need help to code this building i can help you
I'm planning to create some shopping center/supermarket too for my new project "European Building Set" viewtopic.php?f=26&t=87346
I coded some grf file for me, with NML and particulary for house set. If you need help to code this building i can help you
Re: Releasing New Object Graphic - Begginer Tutorial
Thanks to you, Chataigne, and to all here ) I'm impatiently waiting for your graphics GarryG helps me with coding, Now I can create grf file, edit and add other buildings here, but only in 2x2 size. I need templates for other sizes - 1x1, 2x1, 1x2 for now. Can u send me them? And coding for these templates like an object. Or If you have any link with this informations, I'll be happy about it
Re: Releasing New Object Graphic - Begginer Tutorial
I know much more NML for house set than object. Here is the template i use for a 1x1 house size :
Making a 1x2, 2x1 or 2x2 is not quite different than the 1x1. just change "HOUSE_Size_1x1" by the one you want inand assume that your next house ID is the second part of the building. You will have
Making a 1x2, 2x1 or 2x2 is not quite different than the 1x1. just change "HOUSE_Size_1x1" by the one you want in
Code: Select all
item(FEAT_HOUSES, BUILDING001, 01, HOUSE_SIZE_1X1)
Code: Select all
item(FEAT_HOUSES, BUILDING001, 01, HOUSE_SIZE_1X2)
/* first part of the house*/
item(FEAT_HOUSES, BUILDING002, 02, HOUSE_SIZE_1X2)
/* second part of the house */
Last edited by Chataigne on 06 Aug 2020 12:41, edited 1 time in total.
Re: Releasing New Object Graphic - Begginer Tutorial
Or is here a way how to extract grf file to nml, gfx and lang files. I'd like to see source codes of objects and learn it.
Re: Releasing New Object Graphic - Begginer Tutorial
Unfortunately there is no way to extract a NML file from a GRF. You can extract to a NFO (i don't understand anything to NFO ) and gfx in png for exemple using grfcodec.
For object i can show you this exemple i do :
For object i can show you this exemple i do :
Re: Releasing New Object Graphic - Begginer Tutorial
If it's in NML, then most likely whoever wrote it still has the original source code. Just politely ask them if you can look at it.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
- 2TallTyler
- Route Supervisor
- Posts: 507
- Joined: 11 Aug 2019 18:15
- Contact:
Re: Releasing New Object Graphic - Begginer Tutorial
I learned nearly everything I know about NML from the NML specs on TT-Wiki.
Looking at other people's code is also helpful. My industry set includes objects of various sizes (code) and my town set replaces all base game houses and adds a lot of new logic (code). Both use built-in sprite numbers instead of new sprites, but the item definitions may help you.
Looking at other people's code is also helpful. My industry set includes objects of various sizes (code) and my town set replaces all base game houses and adds a lot of new logic (code). Both use built-in sprite numbers instead of new sprites, but the item definitions may help you.
Re: Releasing New Object Graphic - Begginer Tutorial
These might be of use to you guys .. when making objects and other things for OpenTTD the old way if the item was larger then 1x1 you had to cut it in pieces to code it is. Your template be something like this for a 2x1 object.
Now the templates be like this. We had them all uploaded on forum a few years ago but they be buried some where in all those pages of my objects and other locations, so if like here they are again.
This has 2x2, 2x3, 3x3 and 4x4 sizes.
Hope they help.
But some time back Quast65 and I worked on a way so no need to do that. Now the templates be like this. We had them all uploaded on forum a few years ago but they be buried some where in all those pages of my objects and other locations, so if like here they are again.
This has 2x2, 2x3, 3x3 and 4x4 sizes.
Hope they help.
- Attachments
-
- Sprite_Templates_Objects.rar
- (331.07 KiB) Downloaded 105 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
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
Re: Releasing New Object Graphic - Begginer Tutorial
Here the 2x1 I forgot to add to the others.
Also done similar for Industries as well in size1x2, 1x3, 2x2, 2x3, 3x3, 4x4, 6x6, 8x8 and 12x12. Let us know if want these as well.
Cheers
Also done similar for Industries as well in size1x2, 1x3, 2x2, 2x3, 3x3, 4x4, 6x6, 8x8 and 12x12. Let us know if want these as well.
Cheers
- Attachments
-
- ObjectsTest1x2_4views.rar
- (43.22 KiB) Downloaded 118 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
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
Re: Releasing New Object Graphic - Begginer Tutorial
If a GRF is licensed under GPL, then the source code must be readily/easily available. Ideally it should be included with the distribution, but as I understand it, it is also acceptable to substitute a link that points to the repository that includes the source code. Check the readme file that should also be included with the distribution.
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: Releasing New Object Graphic - Begginer Tutorial
Hello again, I'm back and working and testing. I have to go to work and do houseworks so my time here is limited
Now I have few shops, still demos. The first one is Tesco Market from Poland Building set. I combine my graphic with AuzCarParks and AuzObjects. viewtopic.php?f=26&t=75657
First - I have few questions, again:
Now I have few shops, still demos. The first one is Tesco Market from Poland Building set. I combine my graphic with AuzCarParks and AuzObjects. viewtopic.php?f=26&t=75657
First - I have few questions, again:
- 1. As you can see - Fridaemons: Shops. How can I change it? It's two different sets. See nothing in .lang and .nml.
- 2. How can I do in one grf file few submarks? For example In the set AuzAddons there are: OfficeBuildings / Terminals / Truck Bays / ...
- 3. How can I do only 1 or 2 views of object? My opinion is - num_views change to 1 or 2, delete spritelayout_blablablal_t1_view2-4;
}
- 4. How can I have non-snow versions? Just remove this code?
Code: Select all
building { sprite: spriteset_hotel_t1_SNOW(0); hide_sprite: nearby_tile_height(0, 0) < snowline_height; xoffset: 0; //from NE edge yoffset: 0; //from NW edge zoffset: 0; xextent: 16; yextent: 16; zextent: 16; }
Re: Releasing New Object Graphic - Begginer Tutorial
My plans till the end of 2020 with this project:
- create it as industrial addition set - accept (/produce?) goods, accepting and producing passengers - have no idea how to do it
- create underground parking addons
- create oldschool markets
- add shopping markets from other sets If I'll get permission from authors. There is some users which created some buildings and never release them.
Re: Releasing New Object Graphic - Begginer Tutorial
Now I'm working on underground garage entries. I wanted to create my markets first and after this garages for them. But I started with Industrial garages.
- Attachments
-
- coffee1_32.png (37.4 KiB) Viewed 3841 times
-
- garage2_32.png (35.99 KiB) Viewed 3841 times
Who is online
Users browsing this forum: Ahrefs [Bot] and 82 guests