diff --git a/InkpotDemo/Content/InkpotDemo/Maps/Test/CheckSetAndGetTest.umap b/InkpotDemo/Content/InkpotDemo/Maps/Test/CheckSetAndGetTest.umap
new file mode 100644
index 0000000..b052bea
Binary files /dev/null and b/InkpotDemo/Content/InkpotDemo/Maps/Test/CheckSetAndGetTest.umap differ
diff --git a/InkpotDemo/Plugins/Inkpot/Inkpot.uplugin b/InkpotDemo/Plugins/Inkpot/Inkpot.uplugin
index 6eb1386..440ab30 100644
--- a/InkpotDemo/Plugins/Inkpot/Inkpot.uplugin
+++ b/InkpotDemo/Plugins/Inkpot/Inkpot.uplugin
@@ -1,7 +1,7 @@
{
"FileVersion": 1,
"Version": 1,
- "VersionName": "1.10.21",
+ "VersionName": "1.11.21",
"FriendlyName": "Inkpot",
"Description": "A container for Ink in Unreal.",
"Category": "Scripting",
diff --git a/InkpotDemo/Plugins/Inkpot/README.md b/InkpotDemo/Plugins/Inkpot/README.md
index 416baa1..060b910 100644
--- a/InkpotDemo/Plugins/Inkpot/README.md
+++ b/InkpotDemo/Plugins/Inkpot/README.md
@@ -1,7 +1,7 @@
# Inkpot
**Inkpot** - A container for **Ink** within the Unreal Engine developed by [The Chinese Room](https://www.thechineseroom.co.uk/).
This is a plugin for Unreal Engine 5.4 or later.
-This is version **1.10.21** of the plugin.
+This is version **1.11.21** of the plugin.
The head revision contains work in progress towards the upcoming release.
Inkpot is a wrapper for the wonderful narrative scripting language **Ink** developed by [Inkle Studios](https://www.inklestudios.com/ink/).
@@ -13,6 +13,16 @@ For general support and chat with other users, check out [Inkle's discord](https
## Changelog
+### Changes in 1.11.21
+Added tools menu section for inkpot, for easier launching of the blotter.
+Blotter QoL, list value update in blotter now more streamlined, items now have check box entries.
+Exposed VisitCountAtPathString to Inkpot Story.
+Added library functions to test the type of an Inkpot value.
+Added delegate to allow notify when a line has finished being displayed.
+Fixed bad plugin declarations, no more dependency warnings.
+Refined blotter update, list values are now updated rather than being replaced for each update.
+Set is now SetText on blotter strings.
+
### Changes in 1.10.21
Introducing the Blotter! or Inkpot Debugger, an Unreal editor utility widget that allows the viewing of and setting of Ink variables at runtime.
Full support for Ink List creation & manipulation in blueprints.
@@ -23,7 +33,7 @@ Fixed crash when calling begin story with a null asset.
Fixed crash when calling function with empty variable declarations.
### Changes in 1.03.21
-Added new abstract factory creation for stories, youclass UInkpotStory can now be subclassed on a per project basis.
+Added new abstract factory creation for stories, class UInkpotStory can now be subclassed on a per project basis.
Switched settings back to regular UDeveloperSettings as backed by CVAR version did not seem to work.
Fixed for 5.4 compilation error, template instantiation context error in InkPlusPlusTest.cpp(738).
Fixed compiler warnings in 5.4.
diff --git a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotStory.cpp b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotStory.cpp
index 4b69ec8..0ec5a10 100644
--- a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotStory.cpp
+++ b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotStory.cpp
@@ -78,6 +78,12 @@ void UInkpotStory::ChoosePathString( const FString &InPath, const TArrayGetStoryState()->VisitCountAtPathString(Path);
+ return count;
+}
+
TSharedPtr UInkpotStory::GetListOrigin(const FString& InOriginName, const FString& InItemName)
{
TSharedPtr definitions = StoryInternal->GetListDefinitions();
diff --git a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotValueLibrary.cpp b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotValueLibrary.cpp
index 6453e34..3d54110 100644
--- a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotValueLibrary.cpp
+++ b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Private/Inkpot/InkpotValueLibrary.cpp
@@ -6,14 +6,24 @@ FInkpotValue UInkpotValueLibrary::MakeBoolInkpotValue(bool bInValue)
return FInkpotValue( MakeShared(bInValue) );
}
+bool UInkpotValueLibrary::IsInkpotValueBool(const FInkpotValue &InValue)
+{
+ return (*InValue)->HasSubtype();
+}
+
bool UInkpotValueLibrary::InkpotValueAsBool(const FInkpotValue &InValue)
{
- if( (*InValue)->HasSubtype() )
+ if( IsInkpotValueBool(InValue) )
return (*InValue)->GetSubtype();
INKPOT_ERROR( "Value is not a bool, returning default (false)");
return false;
}
+bool UInkpotValueLibrary::IsInkpotArrayValueBool(const TArray &InValues, int InIndex )
+{
+ return IsInkpotValueBool( InValues[InIndex] );
+}
+
bool UInkpotValueLibrary::InkpotArrayValueAsBool(const TArray &InValues, int InIndex )
{
return InkpotValueAsBool( InValues[InIndex] );
@@ -24,14 +34,24 @@ FInkpotValue UInkpotValueLibrary::MakeIntInkpotValue(int32 InValue)
return FInkpotValue( MakeShared(InValue) );
}
+bool UInkpotValueLibrary::IsInkpotValueInt(const FInkpotValue &InValue)
+{
+ return (*InValue)->HasSubtype();
+}
+
int32 UInkpotValueLibrary::InkpotValueAsInt(const FInkpotValue & InValue)
{
- if( (*InValue)->HasSubtype() )
+ if( IsInkpotValueInt(InValue) )
return (*InValue)->GetSubtype();
INKPOT_ERROR( "Value is not a int, returing default (0)");
return 0;
}
+bool UInkpotValueLibrary::IsInkpotArrayValueInt(const TArray &InValues, int InIndex)
+{
+ return IsInkpotValueInt( InValues[InIndex] );
+}
+
int32 UInkpotValueLibrary::InkpotArrayValueAsInt(const TArray &InValues, int InIndex )
{
return InkpotValueAsInt( InValues[InIndex] );
@@ -42,16 +62,26 @@ FInkpotValue UInkpotValueLibrary::MakeFloatInkpotValue(float InValue)
return FInkpotValue( MakeShared(InValue) );
}
+bool UInkpotValueLibrary::IsInkpotValueFloat(const FInkpotValue &InValue)
+{
+ return (*InValue)->HasSubtype();
+}
+
float UInkpotValueLibrary::InkpotValueAsFloat(const FInkpotValue &InValue)
{
- if( (*InValue)->HasSubtype() )
+ if( IsInkpotValueFloat(InValue) )
return (*InValue)->GetSubtype();
- else if( (*InValue)->HasSubtype() )
+ else if( IsInkpotValueInt(InValue) )
return (float)((*InValue)->GetSubtype());
INKPOT_ERROR( "Value is not a float, returing default (0.0f)");
return 0.0f;
}
+bool UInkpotValueLibrary::IsInkpotArrayValueFloat(const TArray &InValues, int InIndex)
+{
+ return IsInkpotValueFloat( InValues[InIndex] );
+}
+
float UInkpotValueLibrary::InkpotArrayValueAsFloat(const TArray &InValues, int InIndex )
{
return InkpotValueAsFloat( InValues[InIndex] );
@@ -62,29 +92,49 @@ FInkpotValue UInkpotValueLibrary::MakeStringInkpotValue(const FString &InValue)
return FInkpotValue( MakeShared(InValue) );
}
+bool UInkpotValueLibrary::IsInkpotValueString(const FInkpotValue &InValue)
+{
+ return (*InValue)->HasSubtype();
+}
+
FString UInkpotValueLibrary::InkpotValueAsString(const FInkpotValue &InValue)
{
- if( (*InValue)->HasSubtype() )
+ if( IsInkpotValueString(InValue) )
return (*InValue)->GetSubtype();
INKPOT_ERROR( "Value is not a string, returing default (\"\")" );
return FString();
}
+bool UInkpotValueLibrary::IsInkpotArrayValueString(const TArray &InValues, int InIndex)
+{
+ return IsInkpotValueString( InValues[InIndex] );
+}
+
FString UInkpotValueLibrary::InkpotArrayValueAsString(const TArray &InValues, int InIndex )
{
return InkpotValueAsString( InValues[InIndex] );
}
+bool UInkpotValueLibrary::IsInkpotValueList(const FInkpotValue &InValue )
+{
+ return (*InValue)->HasSubtype();
+}
+
FInkpotList UInkpotValueLibrary::InkpotValueAsList( const FInkpotValue &InValue )
{
FInkpotList list;
- if( (*InValue)->HasSubtype() )
+ if( IsInkpotValueList(InValue) )
list = *InValue;
else
INKPOT_ERROR( "Value is not an ink list, returing default ()" );
return list;
}
+bool UInkpotValueLibrary::IsInkpotArrayValueList(const TArray &InValues, int InIndex)
+{
+ return IsInkpotValueList( InValues[InIndex] );
+}
+
FInkpotList UInkpotValueLibrary::InkpotArrayValueAsList( const TArray &InValues, int InIndex )
{
return InkpotValueAsList( InValues[InIndex] );
diff --git a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotStory.h b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotStory.h
index ab91417..7e5650d 100644
--- a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotStory.h
+++ b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotStory.h
@@ -237,6 +237,15 @@ class INKPOT_API UInkpotStory : public UObject
UFUNCTION(BlueprintCallable, Category="Inkpot|Story")
void ChoosePathString( const FString &Path, const TArray &Values );
+ /**
+ * VisitCountAtPathString
+ * Returns the number of times the content at the given path has bee visited
+ *
+ * @returns Visit Count.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Story")
+ int VisitCountAtPathString( const FString &Path );
+
/**
* SetValue
* Sets the value of a variable in the story.
diff --git a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotValueLibrary.h b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotValueLibrary.h
index 42962bd..accf155 100644
--- a/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotValueLibrary.h
+++ b/InkpotDemo/Plugins/Inkpot/Source/Inkpot/Public/Inkpot/InkpotValueLibrary.h
@@ -32,6 +32,16 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FInkpotValue MakeBoolInkpotValue(bool bValue);
+ /**
+ * IsInkpotValueBool
+ * Tests if the Value is a boolean.
+ *
+ * @param Value - The Inkpot value to test.
+ * @returns true if the value is a a boolean.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotValueBool(const FInkpotValue &Value);
+
/**
* InkpotValueAsBool
* Cast an Inkpot value to a boolean.
@@ -42,6 +52,17 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API bool InkpotValueAsBool(const FInkpotValue &Value);
+ /**
+ * IsInkpotArrayValueBool
+ * Tests if the array Value is a boolean.
+ *
+ * @param Values - The array of Inkpot values.
+ * @param Index - The indexed value in the array to test.
+ * @returns true if the value is a a boolean.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotArrayValueBool(const TArray &Values, int Index = 0);
+
/**
* InkpotArrayValueAsBool
* Cast an Inkpot array value to a boolean.
@@ -53,8 +74,7 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API bool InkpotArrayValueAsBool(const TArray &Values, int Index = 0);
- /* Create an Ink Value from an integer */
- /**
+ /*
* MakeIntInkpotValue
* Create an Inkpot Value from an integer.
*
@@ -64,6 +84,16 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FInkpotValue MakeIntInkpotValue(int32 Value);
+ /**
+ * IsInkpotValueInt
+ * Tests if the Value is an integer.
+ *
+ * @param Value - The Inkpot value to test.
+ * @returns true if the value is an integer.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotValueInt(const FInkpotValue &Value);
+
/**
* InkpotValueAsInt
* Cast Inkpot value to an integer.
@@ -74,6 +104,17 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API int32 InkpotValueAsInt(const FInkpotValue &Value);
+ /**
+ * IsInkpotArrayValueInt
+ * Tests if the array Value is an integer.
+ *
+ * @param Values - The array of Inkpot values.
+ * @param Index - The indexed value in the array to test.
+ * @returns true if the value is an int.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotArrayValueInt(const TArray &Values, int Index = 0);
+
/**
* InkpotArrayValueAsInt
* Cast an Inkpot array value to an integer.
@@ -95,6 +136,17 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FInkpotValue MakeFloatInkpotValue(float Value);
+ /**
+ * IsInkpotValueFloat
+ * Tests if the Value is a floating point number.
+ *
+ * @param Value - The Inkpot value to test.
+ * @returns true if the value is a float.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotValueFloat(const FInkpotValue &Value);
+
+
/**
* InkpotValueAsFloat
* Cast Inkpot value to a floating point number.
@@ -105,6 +157,17 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API float InkpotValueAsFloat(const FInkpotValue &Value);
+ /**
+ * IsInkpotArrayValueFloat
+ * Tests if the array Value is a floating point value.
+ *
+ * @param Values - The array of Inkpot values.
+ * @param Index - The indexed value in the array to test.
+ * @returns true if the value is a float.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotArrayValueFloat(const TArray &Values, int Index = 0);
+
/**
* InkpotArrayValueAsFloat
* Cast an Inkpot array value to a floating point number.
@@ -126,6 +189,16 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FInkpotValue MakeStringInkpotValue(const FString &Value);
+ /**
+ * IsInkpotValueString
+ * Tests if the Value is a string.
+ *
+ * @param Value - The Inkpot value to test.
+ * @returns true if the value is a string.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotValueString(const FInkpotValue &Value);
+
/**
* InkpotValueAsString
* Cast Ink value to a string.
@@ -136,6 +209,17 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FString InkpotValueAsString(const FInkpotValue &Value);
+ /**
+ * IsInkpotArrayValueString
+ * Tests if the array Value is a string.
+ *
+ * @param Values - The array of Inkpot values.
+ * @param Index - The indexed value in the array to test.
+ * @returns true if the value is a string.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotArrayValueString(const TArray &Values, int Index = 0);
+
/**
* InkpotArrayValueAsString
* Cast an Inkpot array value to a string.
@@ -147,6 +231,16 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FString InkpotArrayValueAsString(const TArray &Values, int Index = 0);
+ /**
+ * IsInkpotValueList
+ * Tests if the Value is a List.
+ *
+ * @param Value - The Inkpot value to test.
+ * @returns true if the value is a List.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotValueList(const FInkpotValue &Value);
+
/**
* InkpotValueAsList
* Cast Inkpot value to an InkpotList.
@@ -157,6 +251,17 @@ class UInkpotValueLibrary : public UBlueprintFunctionLibrary
UFUNCTION(BlueprintPure, Category="Inkpot|Value")
static INKPOT_API FInkpotList InkpotValueAsList( const FInkpotValue &Value );
+ /**
+ * IsInkpotArrayValueList
+ * Tests if the array Value is a list.
+ *
+ * @param Values - The array of Inkpot values.
+ * @param Index - The indexed value in the array to test.
+ * @returns true if the value is a list.
+ */
+ UFUNCTION(BlueprintPure, Category="Inkpot|Value")
+ static INKPOT_API bool IsInkpotArrayValueList(const TArray &Values, int Index = 0);
+
/**
* InkpotArrayValueAsList
* Cast Inkpot array value to an InkpotList.