(StringUtil.SubString(Target as String, 10, 2) =ff

Post » Thu Jun 20, 2013 12:14 pm

All of the sudden I am now seeing actors that should be excluded (actors placed by hand in the world via the CK) from getting copied and placed (getting multiplied by my mod as extra actors to fight).

I thought that this had been working fine for many weeks, but either I was wrong or something has changed.

Anyone know anything about this code not working as I think it should?

if Target.GetLeveledActorBase() != (Target.GetBaseObject() as ActorBase) ; true for all leveled actors, this actor is likely from a LL so this is a actor ok to spawn.
if (StringUtil.SubString(Target as String, 10, 2) == "FF") ; True for actors that are not hand placed from the CK (am I wrong about this?)
User avatar
Lillian Cawfield
 
Posts: 3387
Joined: Thu Nov 30, 2006 6:22 pm

Post » Thu Jun 20, 2013 6:32 am

FF is the save. So that should cover any Actors placed at runtime.

What about vanilla, CK placed actors (00)?

EDIT: should look in "mods" section first, just realised what this was for :P

wouldn't something like the following cover most spawned actors:

If (myActor.HasKeyword(ActorTypeNPC)) && (myActor.GetActorBase().IsUnique() == false)   ; do stuffEndIf
No idea why FF is mucking you about though :shrug:

- Hypno
User avatar
Lillian Cawfield
 
Posts: 3387
Joined: Thu Nov 30, 2006 6:22 pm

Post » Thu Jun 20, 2013 6:08 am

Not sure I follow the logic. About HALF spawned actos do have the NPC Keyword.

And I do use IsUnique() (as well as a bunch of other checks) and that did not seem to cover most cases either when I first started testing the script long ago.

That is why I had yo then use if (StringUtil.SubString(Target as String, 10, 2) == "FF")

Maybe it is a problem elsewhere in my script, once I get home I will look at it again if you are sure that if (StringUtil.SubString(Target as String, 10, 2) == "FF") should be doing what I intended.

User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Thu Jun 20, 2013 1:21 pm

The first statement is looking for them to have the NAC keyword, but you say only half do? Well that throws a spanner in the works then anyhow.

I haven't really been much help then have I?

Sorry, consider these posts bumps :P

- Hypno
User avatar
Andrew Perry
 
Posts: 3505
Joined: Sat Jul 07, 2007 5:40 am

Post » Thu Jun 20, 2013 6:01 am

The real surprise is that is unique will not work as you would expect.

That is the same reason the author of the Nightmare mod has a manual list of actors to exclude from his spawn mod. And he asks for users to give him names and has a spell to tag actors in game. I did not like that (it is too late by the time you cast the spell). So I made my own extra spawns code. As I said it worked great for a long time but something has changed either in my mod (some mistake) or in the game environment (mod conflict?)

User avatar
Solina971
 
Posts: 3421
Joined: Thu Mar 29, 2007 6:40 am


Return to V - Skyrim