Parameter to disable certain names in a town name GRF?

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Parameter to disable certain names in a town name GRF?

Post by SimYouLater »

How exactly would I go about doing this? Here's what I have:

FicTownNames.nml

Code: Select all

text("Halloween Town", 1),
		
		/* Nobilis */
		text("Clegyr", 1),
		text("Locus Araunah", 1),
		text("Locus Qamamir", 1),
		text("Locus Thegri", 1),
		text("Locus Zannannim", 1),
		text("Mud Falls", 1),
		
		/* Nobilis.me */
		text("Locus Apepi
		text("Locus Automne
		text("Locus Axio
		text("Locus Barakiel
		text("Locus Caviel
		text("Locus Elaios
		text("Locus Laxara
		text("Locus Luthiel
		text("Locus Maxiel
		text("Locus Medan
		text("Locus Murthe
		text("Locus Odylla
		text("Locus Praxael
		text("Locus Raemiel
		text("Locus Seth
		text("Locus Shekoliel
		text("Locus Troy
		text("Locus Zein
		
		/* Noel's House Party */
		text("Crinkley Bottom", 1),
english.lang

Code: Select all

##grflangid 0x00
# This is the English language file

# GRF name and description definitions
STR_GRF_NAME        		:FicTown Names 0.0.6a
STR_GRF_DESCRIPTION 		:A continually-expanding list of fictional cities, towns and villages, licensed under WTFPL.

# GRF
STR_STYLES					:Fictional Names

#PARAMETERS
STR_PARAM_NAME_NOBILISME	:Extra FicTownNames: nobilis.me
STR_PARAM_DESC_NOBILISME	:Default: Off Includes additional names from the Nobilis tabletop RPG, created by the fandom and made available at http://nobilis.me/
I want all town names under /* nobilis.me */ to be off when the parameter is in its default state (1, off), and on when it is in in the other boolean state (0, on), so that people can choose whether or not to use fandom names. I would reuse this schema for similar situations as required.

Can anyone explain how to do this? The tutorial (https://www.tt-wiki.net/wiki/NMLTutorial/Train_recolour) was kind of unhelpful. Thanks in advance.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Parameter to disable certain names in a town name GRF?

Post by frosch »

The GRFs that I know do not do this via parameters. Instead they provide multiple naming schemas to select from.

Take a look at German Town Names:
https://dev.openttdcoop.org/projects/ge ... repository
in particular:
https://dev.openttdcoop.org/projects/ge ... rules.pnml

Or look here for the complete preprocessed source:
http://bundles.openttdcoop.org/german-t ... nnames.nml
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
NekoMaster
Tycoon
Tycoon
Posts: 4001
Joined: 16 Aug 2008 22:26
Skype: neko-master
Location: Oshawa, Ontario, CANADA

Re: Parameter to disable certain names in a town name GRF?

Post by NekoMaster »

I think there would be too many parameters to code and change in game to be worthwhile for a town name GRF.

Though if you only want certain names you could probably just edit the NML code your self and compile your own modified GRF for personal use (unless the GRF is released under GPL license which then you could technically release it so long as due credit is given)
Image Proud Canadian Image
Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Parameter to disable certain names in a town name GRF?

Post by SimYouLater »

NekoMaster wrote:I think there would be too many parameters to code and change in game to be worthwhile for a town name GRF.

Though if you only want certain names you could probably just edit the NML code your self and compile your own modified GRF for personal use (unless the GRF is released under GPL license which then you could technically release it so long as due credit is given)
Actually, it's released under the WTF licence, by me: viewtopic.php?f=67&t=75348

So technically I own the content, but anyone can use and modify it with no restrictions whatsoever.

I'm hoping to upload the latest version to BaNaNaS, but to do that I first need to finish programming in the parameters, if at all possible. This will be the first version to contain fan-made content for any of the fictional works included in the FicTownNames NewGRF. The fan content was posted on a tabletop RPG fan-wiki with no license for the content, with the intent that anyone could use the content in their own game sessions. As long as I make sure to note the licence of, and get the permission of the original creator when using town names from, other sources in the future, it should be fine. If there is something I haven't accounted for, notify me in the topic about the NewGRF release itself, preferably before the new version is added.

Back on topic, I see no problem using parameters because all I'm doing is giving the user the option of turning off things not from official material. The intention is to create a big list of fictional towns to be used for playing large maps, not a small map which could be required to use a smaller list. In the future I could include parameters for individual genres instead, but this would have a default option that would leave everything enabled save for fandom-created town names.

However, I am unaware of the technical requirements to do so. Is it even possible to restrict town names via parameter?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Parameter to disable certain names in a town name GRF?

Post by SimYouLater »

Bump because by the time this topic was moved to the proper forum, it was no longer on the first page.

Can anyone assist me with this?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Parameter to disable certain names in a town name GRF?

Post by Alberth »

How is the suggestion by Frosch not working for you?
Being a retired OpenTTD developer does not mean I know what I am doing.
SimYouLater
Chief Executive
Chief Executive
Posts: 675
Joined: 03 Apr 2016 20:19

Re: Parameter to disable certain names in a town name GRF?

Post by SimYouLater »

Alberth wrote:How is the suggestion by Frosch not working for you?
Oh! I misinterpreted it! I thought he was telling me he didn't think it was possible. Now I remember naming schemes. I'll take a look and see what can be done.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests