Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add telepathy range to language data #1982

Open
arbron opened this issue Dec 27, 2022 · 2 comments · May be fixed by #4875
Open

Add telepathy range to language data #1982

arbron opened this issue Dec 27, 2022 · 2 comments · May be fixed by #4875
Assignees
Milestone

Comments

@arbron
Copy link
Collaborator

arbron commented Dec 27, 2022

Many stat blocks include telepathy out to a certain range. It would be useful if telepathy could be a proper data field in languages rather than requiring the use of the custom field.

"traits": {
  "languages": {
    "value": [],
    "telepathy": {
      "value": 30,
      "units": "ft"
    }
    "custom": ""
  }
}
@p4535992
Copy link
Contributor

another thing inherent to languages that might be useful as additional information (for modules or standard game) is the ability to set a language with the option "can understand but can't speak".

@p4535992
Copy link
Contributor

p4535992 commented Jan 1, 2023

A counter proposal for language management based on needs read on forums and discord

"traits": {
    "languages": {
          /* manage text like 'any four languages usually Common' or 'any two languages' */
          generic: {
                "number": 4,
                "usually": "common"
          },
	  value: [
		"common": {
                        /* is the language active */
                        "active": true,
                       /* the id of the language (useful for loop or for some customize behaviour from external modules) */
                       "id": "common",
			/* the name of the language */
			"name": game.i18n.localize("DND5E.LanguageCommon"),
			/* can be useful to modules that want to limit certain chat functionality based on token distance */
			"distance": 0, 
			/* (not sure about this) unit used on the distance */
			"units": "ft",
			/* for manage things like can understand but can't speak, or spells like "tongues" and "comprehend languages" */
                       /* make sense for official rule "can understand but can't speak */
			"understand": true,
                       /* make sense for official rule "can understand but can't speak */
			"speak": true,
                       /* make sense for official rule "can speak but can't read */
			"read": true,
                       /* (not sure about this) can be useful for modules maybe ? */
                        "write": true,
			/* font displayed to himself and those who understand the language */
			"fontknown": CONFIG.fontFamilies[0],
			/* (not sure about this) font displayed to those who don't understand the language this can be useful for  module like polyglot ? */
			"fontunknown": CONFIG.fontFamilies[3]
		},
		...
		"telepathy": {
                        "active": true,
                        "id": "telepathy",
			"name": game.i18n.localize("DND5E.LanguageTelepathy"),
			"distance": 30, 
			"units": "ft",
			"understand": true,
			"speak": false,
			"read": false,
                        "write": false,
			"fontknown": "",
			"fontunknown": ""
		},
		"mycustomlanguage" : {
                        "active": true,
                        "id": "mycustomlanguage",
			"name": "My Custom Language",
			"distance": 0, 
			"units": "",
			"understand": true,
			"speak": true,
			"read": true,
			"fontknown": "",
			"fontunknown": ""
		},
		"myothercustomlanguage": {
                        "active": true,
                        "id": "myothercustomlanguage",
			"name": "My Other Custom Language",
			"distance": 0, 
			"units": "",
			"understand": true,
			"speak": true,
			"read": true,
                        "write": true,
			"fontknown": "",
			"fontunknown": ""
		}
	  ],
	  /* useful for spell like tounges or for set NPC more faster (the alternative is to check every language on the list */
	  "all": {
                "id": "all",
               "name": game.i18n.localize("DND5E.LanguageAll"),
                "active": false,
             	"understand": true,
		"speak": true,
	        "read": true,
                "write": true,
           }
    }
}

this structure can be useful for add and remove languages runtime with spells like "tongues" and "comprehend languages", With simple operations on the array of languages

@arbron arbron added this to the D&D5E 4.2.0 milestone Nov 27, 2024
@arbron arbron self-assigned this Dec 13, 2024
arbron added a commit that referenced this issue Dec 13, 2024
Adds `communication` data to the languages data model that tracks
distances and units for features like telepathy.

Also includes a large refactor of how trait data models are
constructed to match the custom field pattern the system has
adopted elsewhere.

Closes #1982
arbron added a commit that referenced this issue Dec 13, 2024
Adds `communication` data to the languages data model that tracks
distances and units for features like telepathy.

Also includes a large refactor of how trait data models are
constructed to match the custom field pattern the system has
adopted elsewhere.

Closes #1982
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants