Those stock variants seem like the most useful. most other data types could technically be stored using one of those, at the cost of some memory and conversion.
The two use cases I have would be covered by storing strings, and storing an int.
Thanks again for contributing so much to our community!
TMap is a data structure that is not yet exposed to BP, but I’ve made a component-based solution for you so that you can use TMaps in BP!
**What's a TMap?**
A TMap is a data structure based on Key,Value pairs, where for any Key there is only one Value.
allows internal data structure look up times that are much faster than a regular dynamic array.
also allows for the association of dissimilar data types in a way that you organize.
For example, you can map a set of integers to a set of Vectors, so that each integer is related to exactly one vector.
Or, as I provide you with in my plugin, you can **relate a String to an Actor**!
means you can look up an Actor reference via a simple string input!
Or you can look up Vector data based on String data!
**The primary use of TMaps is for efficient lookup of data**, which dynamic arrays simply cannot do because there is no guarantee or assumption with dynamic arrays of anything like a key,value where each key has only 1 value.
**The rules of TMaps allow for efficient look up to speed up your game flow!**
Actor Component
My solution is component-based, which means you can have per-instance TMap data for your game’s actors!
You simply add my Victory TMap Component to any actor you want!
I used the My Character blueprint in my own tests!!!
You can use literally any actor you want, or make a new actor BP whose only role is to house the TMap Component
**Additional TMap Combinations**
If you find that you cannot use my existing set of TMap Combinations to fulfill your game's needs, let me know by posting in thread and I can add additional TMaps to the component.
Per Instance
Remember that what I providing you with is a component-based solution, so you can add TMap data to as many actors in your game as you want, and have per-instance variations in the data contained therein!
Hi - is a brilliant node (The image loader) that will make my life very much easier! I was using VaQuole to load images through a web address (to a local path) - is going to make my life so much easier!
Hello ,
Great piece of work!
I do have some requests on the tmap comp.
could you also provide a node to only add unique KV pair?
could you add a node wher value is Transform?
and a node where value is struct?
and lastly a node where value is targetpoint?
They key for value Transform could be an int.
I asked about unique kv pair, because i saw in the image you posted a comment that when you add a kv pair where key already exists, the value will be overwritten.
So i meant an extra node where adding will fail if key already exist, instead of overwrite the value.
I thought targetpoint could be handy, so that casting/ extra checking isn’t neccesary.
Using my new suite of BP nodes, you can create as many of your own custom config file sections as you want!
You can both create and retrieve ini variables with any name and fundamental type that you want!
**Supported Types:**
Bool
Int
Float
Rotator
Vector
Color
String
Why Use a Config Var?
Config vars have several benefits
Persistent data storage without using a SaveGame struct or GameInstance, store simple quantities of data and player customization way! Data is stored between level loads and even after the current instance of the game is shut down.
So in way config vars have greater persistence than the GameInstance class!
Player-Driven Customization, Players of your game can tweak the config vars that you make available for them on their hard disk, by editing the .ini file directly, just like AAA games! is the most significant advantage of using config files, and their real core purpose.
Simplicity, simpler to use than the BP SaveSystem (which is quite wonderful by the way), but not quite as powerful in that you can only store basic data types, not UObjects and Actors.
**Organization, **you can create as many config header sections as you want using my nodes, organizing your custom settings way!
**Game.ini**
of your custom created config vars and sections are stored in:
**Saved/Config/Windows/Game.ini**
Players can navigate to location on their harddrive to edit your ini files just like any AAA game would allow!
Here's what my **Game.ini** file looks like after running some tests!
```
[DebugWindows]
ConsoleWidth=160
ConsoleHeight=4000
ConsoleX=-32000
ConsoleY=-32000
[/Script/UnrealEd.ProjectPackagingSettings]
BuildConfiguration=PPBC_Development
StagingDirectory=(Path="E:/MYPROJECT_DELETE")
FullRebuild=True
ForDistribution=False
UsePakFile=True
UseOBB_InAPK=False
CulturesToStage=en
[Victory]
BoolVar=True
VectorVar=X=1.000 Y=2.000 Z=9000.123
StrVar=Yay For Custom Config Vars!!!
FloatVar=234.000000
```
**Now you have fully featured ability to use config variables entirely in BP!**
PS: Here's example usage!
![Usage.jpg|1280x960](upload://vJ8VyiQCZXj6G59JXlBNDrMdZow.jpeg)
Here are the 3 core BP nodes that I’ve been using to make of my complicated interacting UMG menus, including an in-game file browser and a menu that allows you to change the materials on any skeletal mesh, while in-game!
These nodes are available to you now!
**Get Widgets of Class**
Allows you to not have to store references everywhere to your widgets, making it easy to interact with the Player Controller and My Character blueprints :)
Also makes it easy to remove a loading screen after a level transition, without storing refs in Game Instance class
Remove Widgets Of Class
You can find and remove any widget any way, no matter where you are in BP! (here I am in the Level BP)
** Tip:**
If you make a general superclass for your widgets (Reparent to a blank UserWidget of your own making), you can clear your entire UI system from the viewport with a single call to RemoveAllWidgetsOfClass, supplying the class that is your super class for your user widgets!
So lets say you have 3 user widgets that you made, make a 4th that is blank, reparent your existing 3 to your new empty 4th widget (“WidgetMaster” for example).
Now you can just call RemoveAllWidgetsOfClass on your new 4th widget, WidgetMaster, and 3 of your existing widgets will be removed automatically from the viewport!
**Is Widget Of Class In Viewport**
Take action based on the dynamic lookup of whether a certain widget is currently visible!
No need to store refs or bools anywhere, just do a dynamic look up that is lightning fast!
♥
Hi ,
Thank you for your answer ! sorry I took my to respond and i did a lot of tests.
I understand your explication about power, but English is not my native language, and i will try to explain better what i want
In fact, I have updated my blueprint from v4.6.1 to current version and I discover a wonderful parameter in the Physics category : the “Override Mass” parameter.
It’s exactly what I want !!! but is it possible for you to create a blueprint node to be able to :
modify the “Mass in Kg” value
and optionnaly :
set true/false for “Override Mass”
be able to modify others parameters like “Center of Mass offset”
I hope it’s a better explication !
Let me know if it’s possible
Thanks a lot !
I hope someone solves because well… I’ve been messing around with your binding Bps and ohh boy! They work soo good! Here is a picture of my Menu. But I have one question. What if a input have 2 or more bindings asigned? For Example. SHOOT; Left Mouse Button and Gamepad Left Trigger. Next week I’m going to buy a compatible gamepad with ue4 and try it out but I would like to know your point about it.
About my experience with the bindings bp: The menu you see below is not a widget hud menu. They are indeed static meshes and the mouse is not a mouse, but another static mesh projected on a plane. Why? Because VR, that’s why. In short, I had to cheat the menu functionality. What does that means? well, I used the bindings with UE4 savegames for the strings and had no problem with them and also the info from the bindings BPs can be easily used anywhere.
In the other hand, I hope Epic Games will put more working on the localization management. I don’t remember where, but they said is not their main area because big companies use their own localization systems and they haven’t asked them to work on that but… what about the indies? I know a lot of developers don’t pay too much atention to localization but in a sales perspective… it is HUUUUGE.
Create Primitive Component, Added to Scene at Location!**
These two nodes let you create UObjects at runtime!
I recently needed to create UObjects in Blueprints for a special inventory system! Please note you can use my node to create UObjects that you make Blueprintable via C++ !
Please note you absolutely must save off the return value to a variable or UE4 will Garbage Collect your new UObject within a short!
Please especially note that if you create a Primitive Component, I actually add it to the world for you so it is visible and has collision!
**C++ Code For You**
Here's the code!
```
UObject* UVictoryBPFunctionLibrary::**CreateObject**(UObject* WorldContextObject,UClass* TheObjectClass, FName Name)
{
if(!TheObjectClass) return NULL;
//~~~~~~~~~~~~~~~~~
//using a context to get the world!
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
if(!World) return NULL;
//~~~~~~~~~~~
return StaticConstructObject( TheObjectClass, World, Name);
}
```
```
UPrimitiveComponent* UVictoryBPFunctionLibrary::**CreatePrimitiveComponent**(
UObject* WorldContextObject,
TSubclassOf<UPrimitiveComponent> CompClass,
FName Name,
FVector Location,
FRotator Rotation
){
if(!CompClass) return NULL;
//~~~~~~~~~~~~~~~~~
//using a context to get the world!
UWorld* const World = GEngine->GetWorldFromContextObject(WorldContextObject);
if(!World) return NULL;
//~~~~~~~~~~~
UPrimitiveComponent* NewComp = ConstructObject<UPrimitiveComponent>( CompClass, World, Name);
if(!NewComp) return NULL;
//~~~~~~~~~~~~~
NewComp->SetWorldLocation(Location);
NewComp->SetWorldRotation(Rotation);
NewComp->RegisterComponentWithWorld(World);
return NewComp;
}
```
♥