edited June 2015 in ORK Scripting
Hi,

I am trying to figure out if I can make this work.

In the ORKFrameworkCore there is the attribute named ORKEditorInfoAttribute. If I do something like this:
[ORKEditorHelp("Faction", "Select a faction associated with this extension data.", "")]
[ORKEditorInfo(ORKDataType.Faction)]
public int factionID = 0;
I get a drop down showing me all of the factions. This is a great feature :).

Looking at the class with Visual Studio class viewer I can see that I must define a ORKDataType and since the core framework to add a new datatype myself I am wondering is there a way to do the same in a plugin using custom data like this one:
public class Disposition : BaseData
{
[ORKEditorHelp("Disposition name", "This is the name of the disposition.", "")]
[ORKEditorInfo("Disposition name", "This is the name of the disposition.", "")]
public String name = "Disposition name";

[ORKEditorHelp("Dispostion ID", "Insert and ID value to be used in disposition game logic.", "")]
[ORKEditorLimit(0, false)]
public int dispositionID = 0;

[ORKEditorHelp("Disposition Weigth value", "Set a weigth value for the disposition game logic. This float field is limited from 0 to 10.", "")]
[ORKEditorLimit(0.0f, 10.0f)]
public float weightValue = 0;

public Disposition()
{

}
}
I would create a bunch of arrays to store disposition data(the above is not the complete class with all the data) then I would would need to create another similar class derived from the BaseData(I think) and I would like to do something like this:
[ORKEditorHelp("Disposition", "Select a dispostion associated with this extension data.", "")]
[ORKEditorInfo(ORKDataType.Disposition)]
public int ID = 0;
Of course the dispostion datatype does not exist, am I just trying to convey what I would like to achieve :).

I am asking this to avoid unnecessary code. One thing I could do is to override the ORKEditorInfoAttribute class and figure out how to find the custom data in a different manner than using the ORKDateType but this might be tricky and time consuming.

Anyway if there is some pre-existing mechanism that would be great :).

Thanks to anyone for any hints, tips and help in advance :).
  • No, that's not possible - the ORKDataType as well as handling the drop down fields for them is part of the closed source, so you don't have access to it.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ok, there is no work around, nou problem. I'll just just a different manner to pass on a reference. Thanks for the confirmation.
Sign In or Register to comment.