Incompetent Programmer...
Moderator: OpenTTD Developers
Incompetent Programmer...
Hello folks!
Well, after two days of trying to follow directions for NML and GRF and town creation, I have come to the conclusion (and probably 215 viruses from downloading every program to try and figger this out), I have to succumb to asking significant help in how to create a file so I can implement my original town names (from my fantasy world). I have downloaded python and have cut and pasted w.minchin's code, but I can't get it compiled as it has issues with line 10 probably because line 9 isn't right either. .... Sooo.. a huge favor to ask.. can someone cut and paste this into one of their already working town creation lists, rename it "Raden" so I can download it from the on-line catalog? I loved this game since it was released back in the day and was glad to stumble on this and wish I had some tech savvy.... Thanks in advance.
//
// Raden Town Names for OpenTTD
// Copyright 2019 by Thomas Caputo
// Wm = 57-6D (in Hex)
// Version 1, 2019-12-26
//
grf {
grfid: "\57\6D\AB\03";
name: string(STR_GRF_NAME);
desc: string(STR_GRF_DESCRIPTION);
version: 3;
min_compatible_version: 1;
}
town_names(A) {
styles: string(STR_GAME_OPTIONS_TOWN_NAME_RADEN);
{
text("Aluhs", 10),
text("Blackwood Springs", 1),
text("Dekoll", 1),
text("Northshore", 1),
text("Northwood Hamlet", 1),
text("Trall", 1),
text("Vestid", 1),
text("Woodwind Pass", 1),
text("Boledoon", 10),
text("Delgar", 10),
text("Arkrock", 1),
text("Crushstone", 1),
text("Deepforge", 1),
text("Dulagrar", 1),
text("Flintstock", 1),
text("Graniterock", 1),
text("Ironstone", 1),
text("Kamestone", 1),
text("Kevvelkor", 1),
text("Ronfrok", 1),
text("Silverhammer", 1),
text("Torok", 1),
text("Blackhammer", 1),
text("Breggid Rolk", 1),
text("Drunakal", 1),
text("Firehammer", 1),
text("Granitehome", 1),
text("Iron Ram", 1),
text("Sheerstone", 1),
text("Trukkanstone", 1),
text("Erenenlea", 10),
text("Glitterhome", 10),
text("Burrolan", 1),
text("Greenburrow", 1),
text("Isle of Laurren", 5),
text("Lakeshore", 10),
text("Blackstag", 1),
text("Madroo", 10),
text("Rantor", 1),
text("Sordren", 1),
text("Oran", 10),
text("Hill Home", 1),
text("Parrash", 1),
text("Vididar", 1),
text("Ulthorak", 10),
text("Bloodshade", 1),
text("Corisk's Bastion", 1),
text("Darkgate", 1),
text("Deddik Falls", 1),
text("Felkrax Drop", 1),
text("Frung Hall", 1),
text("Grimstone", 1),
text("Kusk", 1),
text("Lednar", 1),
text("Midpost", 1),
text("Rankwood", 1),
text("Rasp", 1),
text("Redwheat", 1),
text("Trulk", 1),
text("Walrin", 1),
text("Skorport", 10),
text("Illerdam", 1),
text("Lyone", 1),
text("Rintorin", 1),
text("Rional", 1),
text("Stockdale", 1),
text("Woodland", 1),
text("Naeth Everun", 1),
text("Benre Kroll", 1),
text("Hyacinth", 1),
text("Grellion Feryl", 1),
text("Fesceril", 1),
text("Uvae Laerith", 1),
text("Esperil Gala", 1),
text("Senterial", 1),
text("Davuth", 1),
text("Nuyutul", 1),
text("Duspis Perenth", 1),
text("Tuyil Rae", 1),
text("Alarantae", 1),
text("High Sigil", 1),
text("Crysalin", 1),
text("Lorimar Alista", 1),
text("Pillis Frea", 1),
text("Fallshaven", 1),
}
}
Well, after two days of trying to follow directions for NML and GRF and town creation, I have come to the conclusion (and probably 215 viruses from downloading every program to try and figger this out), I have to succumb to asking significant help in how to create a file so I can implement my original town names (from my fantasy world). I have downloaded python and have cut and pasted w.minchin's code, but I can't get it compiled as it has issues with line 10 probably because line 9 isn't right either. .... Sooo.. a huge favor to ask.. can someone cut and paste this into one of their already working town creation lists, rename it "Raden" so I can download it from the on-line catalog? I loved this game since it was released back in the day and was glad to stumble on this and wish I had some tech savvy.... Thanks in advance.
//
// Raden Town Names for OpenTTD
// Copyright 2019 by Thomas Caputo
// Wm = 57-6D (in Hex)
// Version 1, 2019-12-26
//
grf {
grfid: "\57\6D\AB\03";
name: string(STR_GRF_NAME);
desc: string(STR_GRF_DESCRIPTION);
version: 3;
min_compatible_version: 1;
}
town_names(A) {
styles: string(STR_GAME_OPTIONS_TOWN_NAME_RADEN);
{
text("Aluhs", 10),
text("Blackwood Springs", 1),
text("Dekoll", 1),
text("Northshore", 1),
text("Northwood Hamlet", 1),
text("Trall", 1),
text("Vestid", 1),
text("Woodwind Pass", 1),
text("Boledoon", 10),
text("Delgar", 10),
text("Arkrock", 1),
text("Crushstone", 1),
text("Deepforge", 1),
text("Dulagrar", 1),
text("Flintstock", 1),
text("Graniterock", 1),
text("Ironstone", 1),
text("Kamestone", 1),
text("Kevvelkor", 1),
text("Ronfrok", 1),
text("Silverhammer", 1),
text("Torok", 1),
text("Blackhammer", 1),
text("Breggid Rolk", 1),
text("Drunakal", 1),
text("Firehammer", 1),
text("Granitehome", 1),
text("Iron Ram", 1),
text("Sheerstone", 1),
text("Trukkanstone", 1),
text("Erenenlea", 10),
text("Glitterhome", 10),
text("Burrolan", 1),
text("Greenburrow", 1),
text("Isle of Laurren", 5),
text("Lakeshore", 10),
text("Blackstag", 1),
text("Madroo", 10),
text("Rantor", 1),
text("Sordren", 1),
text("Oran", 10),
text("Hill Home", 1),
text("Parrash", 1),
text("Vididar", 1),
text("Ulthorak", 10),
text("Bloodshade", 1),
text("Corisk's Bastion", 1),
text("Darkgate", 1),
text("Deddik Falls", 1),
text("Felkrax Drop", 1),
text("Frung Hall", 1),
text("Grimstone", 1),
text("Kusk", 1),
text("Lednar", 1),
text("Midpost", 1),
text("Rankwood", 1),
text("Rasp", 1),
text("Redwheat", 1),
text("Trulk", 1),
text("Walrin", 1),
text("Skorport", 10),
text("Illerdam", 1),
text("Lyone", 1),
text("Rintorin", 1),
text("Rional", 1),
text("Stockdale", 1),
text("Woodland", 1),
text("Naeth Everun", 1),
text("Benre Kroll", 1),
text("Hyacinth", 1),
text("Grellion Feryl", 1),
text("Fesceril", 1),
text("Uvae Laerith", 1),
text("Esperil Gala", 1),
text("Senterial", 1),
text("Davuth", 1),
text("Nuyutul", 1),
text("Duspis Perenth", 1),
text("Tuyil Rae", 1),
text("Alarantae", 1),
text("High Sigil", 1),
text("Crysalin", 1),
text("Lorimar Alista", 1),
text("Pillis Frea", 1),
text("Fallshaven", 1),
}
}
Re: Incompetent Programmer...
Did you also create a lang\english.lng file which defines the name and description strings? It should look like this:
Code: Select all
##grflangid 00
STR_GRF_NAME :Raven's Town Names
STR_GRF_DESCRIPTION :Description as seen in the NewGRF list
STR_GAME_OPTIONS_TOWN_NAME_RAVEN :Raven's Town Names
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
Re: Incompetent Programmer...
Nope.
If I cut and paste that and toss into a python file, that should do the trick?
If I cut and paste that and toss into a python file, that should do the trick?
Re: Incompetent Programmer...
No, that goes into a file named "english.lng" in a subfolder named "lang". It's not Python code, it's an OTTD language definition file. (NML inherits the language file syntax from OTTD.)
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Incompetent Programmer...
Grab the source of an existing NewGRF and adopt it for your purpose... (mind to use the same/appropriate license, if you do)
https://dev.openttdcoop.org/projects/townnames
Also checkout the tutorial / introduction: https://www.tt-wiki.net/wiki/NMLTutorial
https://dev.openttdcoop.org/projects/townnames
Also checkout the tutorial / introduction: https://www.tt-wiki.net/wiki/NMLTutorial
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Incompetent Programmer...
You don't need any python scripting to do this. It's simple. Take your file (call it raven\raven.nml), and the code I just posted (raven\lang\english.lng). Run the NML compiler on the raven directory. Done.
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
Re: Incompetent Programmer...
You don't even NEED to use an English.lng file - just put the strings directly into the NML code
It's not ideal in terms of the fact it doesn't allow for easy translation of the strings, but if you don't care about translations then it will work
It's not ideal in terms of the fact it doesn't allow for easy translation of the strings, but if you don't care about translations then it will work
Jon
Re: Incompetent Programmer...
Yeah, that's not really good advice imo.
Re: Incompetent Programmer...
Why not?
It's quick enough to change if anyone wants to provide a translation later, but saves OP some effort at this stage while they're starting out.
The vast majority of GRFs never receive any translations, as far as I can tell
It's quick enough to change if anyone wants to provide a translation later, but saves OP some effort at this stage while they're starting out.
The vast majority of GRFs never receive any translations, as far as I can tell
Jon
Re: Incompetent Programmer...
This may just be my futureproofing OCD talking but I feel like just ignoring i18n because it saves a bit of effort is not really a good practice.
And in order to enable it later the code would need to be available, as far as I understand it.
And in order to enable it later the code would need to be available, as far as I understand it.
Re: Incompetent Programmer...
Why are we digging up an old topic where the OP gave up two years ago?
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
Re: Incompetent Programmer...
Apologies, I think I found this thread in a search and then forgot I had it open, then replied later when browsing the forum more generally
Jon
Who is online
Users browsing this forum: Google [Bot] and 36 guests