Jump to content

Auto filling aliases


elezraita

Recommended Posts

Ok, I'm sorry to be a pain, but I'm a little confused again. I have a script that I'm trying to attach to an alias in a quest I've made to assign random quests to the player involving the actor that is filling a given alias in this quest. When I try attaching the script to the alias, all of the properties auto-fill the way they are supposed to, but the two actor properties don't. The alias names are the same as the property names. I'm not sure what I'm doing wrong.

 

 

ScriptName SurDelegate1 extends ReferenceAlias

Formlist property regraces auto
Formlist property BAraces auto
Formlist property ArMageQst auto
Formlist property ArBanditQst auto
Formlist property ArBanditCheifQst auto
Formlist property ArMageLeaderQst auto

Keyword property banditsur auto
Keyword property banditleadersur auto
Keyword property magesur auto
Keyword property mageleadersur auto

Actor property SurDelPlayer auto
Actor property SurDel1 auto

 

 

I've tried attaching the script to the quest and not the alias, and the same thing happens. What am I missing here?

 

Link to comment
Share on other sites

I figured out why the player one wasn't filling, and I think I fixed it so the script will work on the alias to which it is attached. However, even when I call "ReferenceAlias property something auto", the property won't auto-fill. I figured that the actor properties weren't auto-filling because the aliases weren't actually pointed at references because they are going to be filled conditionally. I thought that changing the property type to ReferenceAlias or just Alias would make them auto-fill, but no dice. What am I missing?

Link to comment
Share on other sites

You need to have an actual ReferenceAlias to point to or manually assign the ReferenceAlias within the script, if you are not using the exact ReferenceAlias name from a specific quest. Edited by Arron Dominion
Link to comment
Share on other sites

So...I am using the exact name of the ReferenceAlias. The ReferenceAlias property in the script has the exact name as the one I defined in the Quest - Alias tab. I figured that this went without saying. I mean, I have 11/12 properties auto-filling correctly. I understand that the property name in the script needs to be the same as the property defined in the CK for auto-fill to work. If that's not enough for this to work, I guess I don't understand what you mean. Do you mean that I just need to let the Story Manager fill the alias based on the conditions I set and then GetRef() as Actor in the script? In order to do that, don't I need something like

 

ReferenceAlias property myRefAlias auto

 

Actor myRefAliasActor = myRefAlias.GetReference() as Actor

?

 

I feel like I would still need the property to point to the quest alias, and I can't get it to do that, for some reason.

 

Or, do you mean that I need to have the alias already pointing to some reference in order for it to auto-fill. I can't just point to a specific actor because the alias should be filled by any NPC that fits the conditions defined in the quest alias tab.

Edited by elezraita
Link to comment
Share on other sites

I got confused about the auto-assign part of the original post, my bad. All of what I was talking about was that you needed the ReferenceAlias property to be pointing at something in your quest(s) in order to work. For your actor properties, you can use your Papyrus logic to assign the Actor properties.

 

These might be functions to look at ForceRefIfEmpty() and Clear() for the Aliases, but I am not sure if they would be what you are looking for.

Link to comment
Share on other sites

Yeah, that's kind of what I was afraid of. I think I can work around it using "self". The script compiled, but it's not ready to test in game. I'll have to write a simpler one that does the same thing, but that will allow me to check that aliases are being filled, cleared and refilled as needed. This will probably end up being pretty complicated. Do you know if the story manager will refill an alias that has been cleared by a scripted, or will I have to reset the quest once all the aliases I make have been filled and cleared? I could do an experiment to find out, but maybe you know off the top of your head. Anyway, thanks for tackling this question. I appreciate the help. Edited by elezraita
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...