Change spell name to include variable...

Post » Thu Jun 21, 2012 10:24 pm

I am brainstorming some ideas for a project and ran into one question I was hoping someone could help with.

Part of the mod will add a spell to the player's list. I want to be able to rename that spell dynamically using the string contents of a certain variable.

For example, a teleport spell. To be able to set a marker, add a spell called "Teleport to $variable" to the player list, and rename it so that the "$variable" destination matches the cell name where you set the marker.
User avatar
Jade Barnes-Mackey
 
Posts: 3418
Joined: Thu Jul 13, 2006 7:29 am

Post » Thu Jun 21, 2012 5:26 pm

Use SKSE's http://www.creationkit.com/SetName_-_Form.

SpellProperty.SetName("Teleport to " + TeleportMarkerREF.GetParentCell().GetName())

Haven't tried it, but it might be worth a shot.

Edit: It works
User avatar
jennie xhx
 
Posts: 3429
Joined: Wed Jun 21, 2006 10:28 am

Post » Thu Jun 21, 2012 11:26 pm

Thanks! Perhaps a foolish question, but how would I access SKSE functions in the CK?
User avatar
KIng James
 
Posts: 3499
Joined: Wed Sep 26, 2007 2:54 pm

Post » Thu Jun 21, 2012 4:30 pm

Assuming it's the same as previous script extenders, you need to open the Creation Kit via the SKSE loader executable by adding the " -editor" command line parameter at the end. The easiest way to do this is to create a shortcut to skse_leader.exe and, in the "Target" section of its properties, add " -editor" (without quotes) at the very end (after the quotes).

Cipscis

EDIT:

Ignore that, do what *Mofakin* said instead :)

Cipscis
User avatar
Jamie Lee
 
Posts: 3415
Joined: Sun Jun 17, 2007 9:15 am

Post » Thu Jun 21, 2012 8:52 am

Thanks! Perhaps a foolish question, but how would I access SKSE functions in the CK?

Just copy the SKSE scripts into the data folder, you will have automatic access to them in the CK. IsKeyPressed in script works like this for example:

If Input.IsKeyPressed(SuperDuperHotkey)

The input in front of .IsKeyPressed directly comunicates with the corresponding input.pex file from the SKSE scripts folder.

As far as I understand SKSE just extends functions with inside the original script files.
User avatar
Steven Hardman
 
Posts: 3323
Joined: Sun Jun 10, 2007 5:12 pm

Post » Thu Jun 21, 2012 9:21 pm

I see, that is convenient.

Looking on http://skse.silverlock.org/ the current version doesn't include these scripts, however the "beta" release does.

Does anyone know if it would be safe to use the current SKSE with the scripts included in said beta version?

I would assume it would only be functions exclusive to the beta version that wouldn't be accessible.


EDIT: I see the latest version now has the scripts included. :)
User avatar
Miguel
 
Posts: 3364
Joined: Sat Jul 14, 2007 9:32 am


Return to V - Skyrim