Is it possible to attach a script to an actor base?

Post » Mon Jun 18, 2012 12:52 pm

The script section is grayed out on every actor except for the pre-set ambush ones. Is there no way to set custom scripts on an actor base?

edit: Scratch that. I can add scripts to NPCs based on player races, but I can't add scripts to, say, EncDraugr01Template, or any other non-ambush Enc actor.
User avatar
Julia Schwalbe
 
Posts: 3557
Joined: Wed Apr 11, 2007 3:02 pm

Post » Mon Jun 18, 2012 11:29 am

I expect this will be to do with templates. If an ActorBase is using another ActorBase as its template, and the "Use Script" flag is checked, you won't be able to attach scripts to it.

Cipscis
User avatar
Jhenna lee Lizama
 
Posts: 3344
Joined: Wed Jun 06, 2007 5:39 am

Post » Tue Jun 19, 2012 1:20 am

I expect this will be to do with templates. If an ActorBase is using another ActorBase as its template, and the "Use Script" flag is checked, you won't be able to attach scripts to it.

Cipscis
That's what I'm afraid of.. I wonder if there's any viable workaround? that template feature was exactly what I was hoping to capitalize on, to attach a script to all mobs of a certain type without editing each individual actor base...
User avatar
Katey Meyer
 
Posts: 3464
Joined: Sat Dec 30, 2006 10:14 pm

Post » Mon Jun 18, 2012 4:09 pm

You can't inherit from more than one template, unfortunately, so if an ActorBase already uses a template you won't be able to add your own. You could add your script to the template itself, but that'd come with the obvious compatibility issues...

Cipscis
User avatar
Lauren Dale
 
Posts: 3491
Joined: Tue Jul 04, 2006 8:57 am

Post » Mon Jun 18, 2012 7:37 pm

You can't inherit from more than one template, unfortunately, so if an ActorBase already uses a template you won't be able to add your own. You could add your script to the template itself, but that'd come with the obvious compatibility issues...

Cipscis
The template is actually what I was originally trying to edit, with no luck. EncDraugr01Template.
User avatar
Alessandra Botham
 
Posts: 3440
Joined: Mon Nov 13, 2006 6:27 pm

Post » Mon Jun 18, 2012 3:28 pm

Wonder if the daytime crew have any additional insights...
User avatar
Budgie
 
Posts: 3518
Joined: Sat Oct 14, 2006 2:26 pm

Post » Mon Jun 18, 2012 11:05 am

I've been able to take a look myself, and I see exactly what you mean. It's very strange, and possibly a bug.

Does anyone know why certain ActorBase objects, even ones that aren't using a template, have the Scripts section disabled? Does anyone know how to enable the Scripts section?

Cipscis
User avatar
Dagan Wilkin
 
Posts: 3352
Joined: Fri Apr 27, 2007 4:20 am

Post » Mon Jun 18, 2012 9:45 pm

Drop a script effect ability into their inventory.
User avatar
Quick draw II
 
Posts: 3301
Joined: Thu Nov 08, 2007 4:11 pm

Post » Mon Jun 18, 2012 2:44 pm

This doesn't seem to work. Any more precision about this please ? Has anyone managed to add script to actor template ?
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

Post » Mon Jun 18, 2012 7:18 pm

Bump anyone please ?
User avatar
Chrissie Pillinger
 
Posts: 3464
Joined: Fri Jun 16, 2006 3:26 am

Post » Mon Jun 18, 2012 9:45 pm

No luck here yet. Very frustrating issue, indeed.
User avatar
Alexx Peace
 
Posts: 3432
Joined: Thu Jul 20, 2006 5:55 pm

Post » Tue Jun 19, 2012 12:39 am

I HAVE FOUND IT - A TEMPORARY WORKAROUND

Example: You can't add scripts to the horse ActorBase "EncHorseSaddledBlack" initially.... but if you find something that uses that base say the "WhiterunPlayerHorse" add a script to that temporarily.... now you can add a script to "EncHorseSaddledBlack" because it has mysteriously been enabled (no more grey script box).... when done remove the script from "WhiterunPlayerHorse"
User avatar
Allison Sizemore
 
Posts: 3492
Joined: Wed Jul 19, 2006 6:09 am

Post » Mon Jun 18, 2012 3:04 pm

Update from JoelBurgess (a dev):

Oh, okay. Yes - this is a known limitation of the system, then. Here's an internal snippet that never made its way to the wiki:

You may not attach a script to an actor base if that script would be used by a leveled actor list.

For the most part the editor will prevent you from doing this by disabling the script UI and not listing scripted actor bases in the dropdown of actor bases to add to a leveled actor list, but it is possible to cheat the system, in which case the editor will warn you when you load the master file.

To hopefully better explain the limitation, here are a couple of scenarios:

1. Actor base A pulls data from Actor Base B:
a. Actor base A does NOT inherit scripts:
You may script both A and B. However your actor reference in the world will only pull scripts from A if it uses it as its base actor.
b. Actor base A DOES inherit scripts:
You may script B and the script UI on A will be disabled (just like the old system). Your actor reference in the world will pull scripts from B.
2. Actor base A has attached scripts:
The actor base will not show up in the list of actor bases to add on a leveled actor list
3. Leveled Actor List X has Actor Base A in it:
The script UI on A will be disabled. Your actor reference in the world will not pull scripts from its base actor.
4. Actor Base A pulls from Leveled Actor List X:
a. Actor base A does NOT inherit scripts:
You may script A and your reference in the world will pull scripts ONLY from A.
b. Actor base A DOES inherit scripts:
The script UI on A will be disabled. Your reference in the world will pull no scripts from its base actor or leveled list.
5. Leveled Actor List X has Actor Base A in it, which pulls data from Actor Base B:
a. Actor base A does NOT inherit scripts:
You may script B, but the actor reference using the leveled list will get no scripts from the base.
b. Actor base A DOES inherit scripts:
You may not script A or B and the UI will be disabled. Your reference in the world will get no scripts from the base.

There is a workaround for this in cases where you need actors to be both leveled and scripted - you can create a constant/self magic effect and apply that at the race level. For example, the FXDragonBloodDamageScript handles applying some special blood FX to dragons through combat. Since dragons are used to populate leveled lists, however, we attach this script to AbFXDragonBloodDamage, which is an effect on the AbDragonBloodFX spell. That's then assigned as a special racial ability on the DragonRace. You can look at a similar example in how the WispMothers work, too.

Hope this helps - I know it's unintuitive, but it's not a bug.

I'll add this information to the wiki.

Cipscis
User avatar
Shiarra Curtis
 
Posts: 3393
Joined: Thu Jan 04, 2007 3:22 pm

Post » Mon Jun 18, 2012 4:44 pm

Ok, so I did a script I put into an effect I put into a spell, But I cannot add the spell to the race, it doesn't save. Any Idea please ?
User avatar
phil walsh
 
Posts: 3317
Joined: Wed May 16, 2007 8:46 pm

Post » Mon Jun 18, 2012 10:30 pm

I'm glad I found this and thank you for posting. I was going nuts trying to figure out why sometimes when viewing the base forms the script ui would disable and other times it would show scripts.

-Mush-
User avatar
Jessica Colville
 
Posts: 3349
Joined: Wed Oct 18, 2006 6:53 pm


Return to V - Skyrim