Celtx - Actor Fields

Announcements, support questions, and discussion for the Dialogue System.
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: Celtx - Actor Fields

Post by Tony Li »

Hi,

I'm looking into that. Ideally, we'll get Celtx to add info to the JSON export so we can read the image names from the Celtx catalog info for the character. Barring that, we'll adopt standard naming convention such as MARCUS, MARCUS_2, MARCUS_3, MARCUS_4, etc., for images.
jay
Posts: 13
Joined: Tue Feb 07, 2023 2:03 pm

Re: Celtx - Actor Fields

Post by jay »

Thanks! Is that something that might be in the next update?
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: Celtx - Actor Fields

Post by Tony Li »

Yes, I'll try to get that into the next update, scheduled for Monday.
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: Celtx - Actor Fields

Post by Tony Li »

Hi,

The Dialogue System Extras page now has a patch (direct download) that can import all images that you've assigned to a character in the Celtx catalog. (Future readers: If you're using a version newer than DS 2.2.34, these changes are already in the Dialogue System.)
jay
Posts: 13
Joined: Tue Feb 07, 2023 2:03 pm

Re: Celtx - Actor Fields

Post by jay »

Hi! Could you explain how this patch works? Is there a naming convention we need to follow in Unity with the sprites when importing GVR3? Is it using the CHARACTER_2 naming convention you suggested in the previous post? Are we importing a different file besides the Script JSON exported from Celtx's Script page? I am still not sure how to bring in all portraits right now.
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: Celtx - Actor Fields

Post by Tony Li »

With the latest update to Celtx Gem 3, you can add one or more images to your characters in the Catalog section.

Put these same images (with the exact same filenames) in a folder in your Unity project, and point the importer window's Portrait Folder to it. When you click Import, it should find the images.
jay
Posts: 13
Joined: Tue Feb 07, 2023 2:03 pm

Re: Celtx - Actor Fields

Post by jay »

I am still having the same issue as before. The JSON I get from Celtx does not have any information about the names of the images attached to the character in the catalog. I will ask Celtx as well.
User avatar
Tony Li
Posts: 22134
Joined: Thu Jul 18, 2013 1:27 pm

Re: Celtx - Actor Fields

Post by Tony Li »

Hi,

EDIT -- Sorry, I was mistaken. A new Celtx Gem 3 project will not have the image filenames in the catalog. I was testing a project that was upgraded from Celtx GVR 2. I'll need to follow up with Celtx on this, too, since it appears pure Gem 3 exports don't include image filenames.

However, if the Portrait Folder contains a sprite whose name exactly matches the actor's name, it will use that portrait image. Make sure you've set the import settings on the image file to Sprite (2D and UI).

--
(Disregard below until I get info from Celtx.)

When you select Export JSON from this menu:

celtxExportJson.png
celtxExportJson.png (21.46 KiB) Viewed 924 times

The JSON should contain "character" elements, like this one:

Code: Select all

 "character":{
	"j9fd8173-9ca1-402a-b4a1-00df7d4fbbda":{
	   "id":"j9fd8173-9ca1-402a-b4a1-00df7d4fbbda",
	   "kind":"catalog_item",
	   "name":"MARCUS",
	   "desc":"",
	   "created":1677201984306,
	   "createdUser":"",
	   "lastModifiedUser":"",
	   "lastModified":1677201984306,
	   "custom_id":"",
	   "customIDData":{
		  "convention":"",
		  "generatorData":[
			 
		  ]
	   },
	   "counter":null,
	   "lock":{
		  "isLocked":false,
		  "lockedBy":null,
		  "lockedTime":null
	   },
	   "item_data":{
		  "character_type":"pc",
		  "media":[
			 {
				"name":"Marcus.png",
				"thumbPath":"https://www.celtx.com/feeds/download/resource/export/e672a590bc7eb4cb304333d12ac007c6722b362i?size=medium",
				"sourcePath":"https://www.celtx.com/feeds/download/resource/export/e672a590bc7eb4cb304333d12ac007c6722b362i",
				"file_id":"e672a590bc7eb4cb304333d12ac007c6722b362i",
				"selfPath":"https://www.celtx.com/feeds/default/private/full/e672a590bc7eb4cb304333d12ac007c6722b362i"
			 }
		  ],
		  "description":"Marcus is the player character, a Roman legionary soldier returned from battle to find his father murdered.",
		  "dev_notes":""
	   },
	   "type":"character",
	   "media_ids":[
		  
	   ]
	},
In the item_data -> media section, you should see one or more elements with a "name" field that names the image file. In the example above, the image filename is "Marcus.png".
Post Reply