Investigate possibility of having different default attribute sets #68

Closed
opened 2026-04-11 23:01:36 +00:00 by Oliver · 1 comment
Owner

This would be useful to have for games where PCs/NPCs have different attribute sets.


Originally requested by FireVisor in Discord

This would be useful to have for games where PCs/NPCs have different attribute sets. --- Originally requested by FireVisor in Discord
Oliver added the
Kind
Feature
Priority
Medium
labels 2026-04-11 23:01:36 +00:00
Oliver added the
Reviewed
Won't Fix
label 2026-04-13 00:37:15 +00:00
Author
Owner

My official stance on this feature is that I will not be integrating a method to handle this within the system. My primary support for this is to create a new script macro for each "Template" that is desired, as it can be a super short macro that can be easily acquired by pulling the system.attr property out of an actor that has the templates you want

A simple macro example is this, which will create the actor with the pre-defined attributes coded into the macro.

Actor.createDialog(
	{
		type: `generic`,
		system: {
			attr: {
				attr_name_1: {
					name: `Attr Name 1`,
					value: 0,
					max: 20, // or null for no maximum
					isRange: true, // or false
				},
			},
		},
	},
	{},
	{ window: { title: `Create Actor From NPC Template` } },
);

A more advanced macro example would be this, which allows creating an NPC from an existing actor in the world collection.

const templateName = `NPC`;
const actor = game.actors.getName(templateName)?.toObject();
Actor.createDialog(
	{
		type: actor.type,
		system: actor.system,
		flags: actor.flags,
	},
	{},
	{ window: { title: `Create Actor from ${templateName} Template` } },
);
My official stance on this feature is that I will not be integrating a method to handle this within the system. My primary support for this is to create a new script macro for each "Template" that is desired, as it can be a super short macro that can be easily acquired by pulling the `system.attr` property out of an actor that has the templates you want A simple macro example is this, which will create the actor with the pre-defined attributes coded into the macro. ```mjs Actor.createDialog( { type: `generic`, system: { attr: { attr_name_1: { name: `Attr Name 1`, value: 0, max: 20, // or null for no maximum isRange: true, // or false }, }, }, }, {}, { window: { title: `Create Actor From NPC Template` } }, ); ``` --- A more advanced macro example would be this, which allows creating an NPC from an existing actor in the world collection. ```mjs const templateName = `NPC`; const actor = game.actors.getName(templateName)?.toObject(); Actor.createDialog( { type: actor.type, system: actor.system, flags: actor.flags, }, {}, { window: { title: `Create Actor from ${templateName} Template` } }, ); ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Foundry/taf#68
No description provided.