Page 3 of 3

Re: Celtx - Actor Fields

Posted: Mon Feb 27, 2023 8:38 pm
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.

Re: Celtx - Actor Fields

Posted: Tue Feb 28, 2023 1:08 pm
by jay
Thanks! Is that something that might be in the next update?

Re: Celtx - Actor Fields

Posted: Tue Feb 28, 2023 3:22 pm
by Tony Li
Yes, I'll try to get that into the next update, scheduled for Monday.

Re: Celtx - Actor Fields

Posted: Tue Feb 28, 2023 8:36 pm
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.)

Re: Celtx - Actor Fields

Posted: Wed Mar 08, 2023 9:00 pm
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.

Re: Celtx - Actor Fields

Posted: Wed Mar 08, 2023 9:30 pm
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.

Re: Celtx - Actor Fields

Posted: Fri Mar 10, 2023 6:30 pm
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.

Re: Celtx - Actor Fields

Posted: Fri Mar 10, 2023 8:38 pm
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 899 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".