Page 1 of 1

Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 2:01 am
by aguynamededward
Appreciate you and all you do, Tony. :)

Looking for any tips you have on best practices for this:

Currently working on an in-depth narrative game that uses cards (sourced from a collection of scriptable objects) in a variety of ways. Use Articy as the primary authoring tool.

We need a solid way to make assigning scriptable objects to a dialogue node easy for the designer / writer.

My thought was: write a plugin to import each scrob as a custom Entity inside Articy (storing the GUID # from Unity). Then, let the designers associate nodes with cards in a custom strip.

Then, upon exporting from Articy, I *don't* want to create Items or Actors for every card entity - in any node that references cards, I want extract and store all the GUID references into a single ';' delimited string inside the dialogue node.

Am I crazy for this approach? Is there something obvious I'm missing? Is there some method of extending the Articy importer to handle custom entity types?

Thanks again!

Re: Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 7:55 am
by Tony Li
Hi,

What if you were to define your cards entirely in articy (so you have one definitive source of truth for data) and then write an editor script that creates ScriptableObject assets out of them when you import into Unity?

If that sounds like a reasonable approach for your project, I can provide some guidance.

Re: Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 9:47 am
by aguynamededward
I'm not *sure* that would work (we're leveraging a lot of other scriptable objects inside the cards to make them work), but let's say it would, I'd love to hear your thoughts. :)

Re: Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 10:07 am
by Tony Li
In Articy, you could define an entity type for cards. Then your writers can just create card entities, drag them around, and assign them wherever they want.

The two challenges then would be:

1. Reading the articy data in Unity. You can use the Dialogue System to read the articy XML into an ArticyData object and then loop through the entities list and create or update ScriptableObjects for each card entity.

2. Connecting the card ScriptableObjects to other assets in the Unity project (e.g., sprites, audio clips).

Alternatively, you could define card entities in Articy to just contain the GUID of the corresponding existing ScriptableObject asset. For convenience you could also add an image property to make it easier for writers to identify cards. This will still allow your writers to drag around and assign cards in Articy. It would be your reponsibility as the programmer to make sure their GUID properties match the GUIDs of the ScriptableObject assets.

Re: Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 10:30 am
by aguynamededward
Yeah, that second option is exactly what I was thinking. I know I'll need to do some custom code on the Articy importer, and was wondering if there's a recommended method for that. Write an derived class and edit the editor reference to point to the new class, maybe?

Re: Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 10:47 am
by Tony Li
Hi,

Yes, that would be a good approach. In the next update, I'll make the ArticyConverter class's methods virtual so you can actually do that.

Re: Importing an Articy field as a pure string?

Posted: Thu Jan 18, 2024 1:22 pm
by aguynamededward
Appreciate you, Tony. :)