1.8 and FormLists

Post » Tue Nov 20, 2012 8:12 am

So, I think 1.8 might have utterly destroyed the functionality of the scripting behind my No Permanent Essentials mod.

I keep telling myself that that's silly, since I tested the beta and my mod worked fine during that. But it's not working now.

So, since I know that the change location events are running and the scripting for clearing essential aliases still works, here's what I conclude: it has something to do with FormLists.

See, the way it works: actors who are tagged essential on the base actor record are added to a list of base actors when the control quest starts. When their essential tag is removed, they are removed from the list.

The addition is done with AddForm() and the removal with RemoveAddedForm(). The list as defined within the CK is empty.

One way or the other, the script's not working, so it could be a problem with
  • adding the base actors
  • removing the base actors
  • checking whether the list contains the actor (HasForm())
  • saving the list in the saved game

Thoughts?
User avatar
Naomi Lastname
 
Posts: 3390
Joined: Mon Sep 25, 2006 9:21 am

Post » Tue Nov 20, 2012 7:45 pm

As far as I know, form lists have always been a bit iffy going by some of the posts I've read in this forum. Could you not do the same thing with an array instead?

- Hypno
User avatar
Kay O'Hara
 
Posts: 3366
Joined: Sun Jan 14, 2007 8:04 pm

Post » Tue Nov 20, 2012 4:57 pm

Have you tried clearing your properties, saving, and then filling your properties again?

Worth a try :shrug:
User avatar
leni
 
Posts: 3461
Joined: Tue Jul 17, 2007 3:58 pm

Post » Tue Nov 20, 2012 6:28 am

http://www.creationkit.com/Talk:RemoveAddedForm_-_FormList
User avatar
Chris Guerin
 
Posts: 3395
Joined: Thu May 10, 2007 2:44 pm

Post » Tue Nov 20, 2012 9:35 am

When I saw the thread tittle I hoped they could have fixed removeaddedform. It seems they haven't. A shame.
User avatar
Tikarma Vodicka-McPherson
 
Posts: 3426
Joined: Fri Feb 02, 2007 9:15 am

Post » Tue Nov 20, 2012 5:29 am

Wait -- it's not a problem with RemoveAddedForm() because the essential tags aren't being removed; if they were still in the list, it would run, just multiple times.

How do you remove from an array property, and is their a simple way to check if so-and-so actor is in the array (like HasForm(), almost)?
User avatar
Samantha Mitchell
 
Posts: 3459
Joined: Mon Nov 13, 2006 8:33 pm

Post » Tue Nov 20, 2012 7:13 pm

You can just write your own functions or you can use http://www.gamesas.com/topic/1365378-exampleresourcegeneral-purpose-array-functions (ArrayAddForm() is in there). He's got http://www.gamesas.com/topic/1413790-resource-beyond-128-extended-array-functions-to-go-to-512-and-up/ explaining how to make huge arrays (goes a bit over my head that one, I'm planning another read of it eventually :P )

- Hypno
User avatar
Francesca
 
Posts: 3485
Joined: Thu Jun 22, 2006 5:26 pm

Post » Tue Nov 20, 2012 5:33 pm

The problem with RemoveAddedFrom is not that it didn't remove items. It does once. then stops working. But that's not the main problem. The problem is that the list is destroyed. The size goes to -1 and you can't add or remove more items. Anyway, formlists are yet a good choice for your mod. The system I use for this cases is adding the removed items to a new lists. So, instead of checking them being in the list of essentials, you check that they are in the list of esssentias and not in the list of non-essentials.

In case there is a NPC that does recover the essential state, you would need to copy the list and use revert() to erase all elements then copying all except the one you want to remove. In this case you may want to use another system.
User avatar
Jonathan Windmon
 
Posts: 3410
Joined: Wed Oct 10, 2007 12:23 pm

Post » Tue Nov 20, 2012 1:21 pm

Okay, so, assuming that I change it from "add to list, remove from list when essential tag removed so that it doesn't happen multiple times" to "empty list added to whenever a tag is removed," would having a mod-added actor in the list and then uninstalling the mod cause serious problems (I am referring to the Dawnguard add-on, in case anyone junks that DLC; I'm not interested in being harangued for "breaking the game" or something)?
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Post » Tue Nov 20, 2012 3:31 pm

Formlists stored values aren't the values itself. I mean, if you store an actor, the ID is stored as a generic number. There is no problem in moving raw meanningless nubers from one list to another one or checking if the ID of an actor is equal to one of the stored numbers. Should you use arrays of actors, you could have some problems in this case (not sure, but most likelly).
User avatar
Chloe :)
 
Posts: 3386
Joined: Tue Jun 13, 2006 10:00 am


Return to V - Skyrim