Using SK to permanantly alter BP-derived instance data

I use the Workbench a lot when prototyping, for example; adjusting UI elements or actor variables during runtime:

//This command adjusts the Player's current weapon's rate of fire
playerWeapon<>TestWeapon.@rof := 500

The ability to quickly make changes to instance data in this manner helps to avoid tons of recompiles.
The only issue is that the changes are temporary; I have to hunt down the variables and change them to what I found was desired.

Would it be possible in the future, with the way that SK handles data members, to have such runtime modifications reflected in the UE editor? I understand that SK is modifying instances, but such functionality would greatly help in prototyping UI elements, among other complex systems.

A related request that would help in the above case would be the ability to specify a line/section of code that would be run whenever any other line of code is executed in the workbench. An example of said code would be this:
//Reopens the currenly open level
GameLib.open_level(@@world GameLib.current_level_name>>)

The ability to reload the level (and with it all UI elements) automatically would remove the need to switch between the PIE window and the IDE when modifying dynamic UI.

1 Like

Sleeping Dogs used SkookumScript and each game object had properties for:

  • current values (values as the runtime progresses)
  • initial values (the values when an object is first created/spawned)
  • default values (and most defaults inherited from various object types)

While the game was running you could right click on an object in the world editor, get a context menu and then select “Make current values initial values”.

It sounds like this is similar to what you would like.

It would be possible to make this though it might be tricky.

You say these are BP-derived raw data members?

This would also be possible for variables that are just SkookumScript data members.

It could theoretically be possible for either.

A context menu would be nice, though a command in the SkookumIDE workbench might be easier to start. We would eventually like to add these special SkookumScript overlays:

  • SkookumIDE for SkookumScript IDE and meta language commands
  • UE4Editor for world editor specific commands

They both would probably only be available during development/debug and not be compiled for shipping builds.

We’ll make sure they are on our to do list. :madsci:

We have many planned workbench features on our to do list.

  • multiple workbenches
  • project specific workbenches
  • ability to specify a receiver/this for a workbench. Currently, the default Master mind is the target receiver / this for all the code snippets run in the workbench. The idea is that you could specify some arbitrary code to be run before any code snippet is evaluated and have the result be the this. It could be the player, all the NPCs within a certain radius of the player. All the NPCs within the current camera view, etc. Since this would be any arbitrary amount of code it could also contain extra code such as reloading the level as you suggest, orienting the camera, etc.
1 Like

Blueprint variables are accessible from SkookumScript, and changing them immediately affects the Blueprint & editor. Is this what you are looking for?

I’m looking for a way to make changes to BP variables during runtime, using the workbench and having those changes be permanent.
For example, I would use a command to alter a weapon’s rate of fire during runtime in order to see the changes without needing to recompile. The weapon’s BP class’ rate of fire variable would also be modified to the correct value so that it would not have to be changed in the UE editor.

I like to adjust UI elements during runtime because I find it easier when working in context; this usually involves tweaking a lot of parameters on one or more widgets. After having made my adjustments, I have to locate the appropriate BP classes and replicate my changes; it feels like doing the same thing twice.