scrivener07 Posted December 6, 2012 Share Posted December 6, 2012 I have a lot of actors I need to disable but they dont have a REF name. Adding REF names is off the table but finding and filling all these actors one by one would be error prone. Is there a way I can use the REF ID number to auto fill a property? Link to comment Share on other sites More sharing options...
acidzebra Posted December 6, 2012 Share Posted December 6, 2012 (edited) By "they don't have a ref name" you mean the editor ID field is empty? If that is the case the easiest would be to go into actors\actor, sort by editor ID, this will cause them all to end up on top, and delete the bunch. Then save, exit, go into tes5edit, and do an 'undelete and disable references'. Not sure if I'm understanding you correctly though. You could also find them with the formID, if your plugin is the only one loaded in CK the should all start with 01000 I think, so sorting by formID in actors\actor would also cause them to come up on top. Edited December 6, 2012 by acidzebra Link to comment Share on other sites More sharing options...
scrivener07 Posted December 6, 2012 Author Share Posted December 6, 2012 I forgot about getters :) In situations where you can give a Reference a REF name you can normally make it the same as the editor ID and the property will autofill its self. Take Ralof for example.Actor property RalofRef autoThis will autofill to the game world reference on the properties window. But what if bethesda didnt give Ralof a REF name and the form only had an ID? actor property NamelessREF actor function get() actor actorRef = Game.GetForm(0x0002BF9E) as actor return actorRef endFunction endProperty event oninit() NamelessREF.disable() endevent This is the work around. :psyduck: Seems like it might cause extra overhead but it sure beats my personal overhead of keep track of these nameless refs as my scripts get moved around at this point. Link to comment Share on other sites More sharing options...
scrivener07 Posted December 6, 2012 Author Share Posted December 6, 2012 Maybe I spoke too soon. Not working for me anymore. Must have overlooked another function that was disabling my actors. Link to comment Share on other sites More sharing options...
acidzebra Posted December 6, 2012 Share Posted December 6, 2012 (edited) The creation kit wiki gives this warning for game.getform: Scripts should always be blind to the contents of data files, and rely on properties as the interface through which they access data from data files. As such, this function should only ever be used for debugging purposes.Maybe getformfromfile? (blithely ignoring the advice just given :thumbsup:) http://www.creationk...FromFile_-_GameThe ID for a form changes based on the load order of the file it loaded from. So a form which shows up as 0101ABCD in the editor may show up as 0401ABCD in game depending on how many other files load before it. This function lets you blindly grab a form based on the lower bytes of its ID and the expected file which created the form. ...which may be the problem you are having. Edited December 6, 2012 by acidzebra Link to comment Share on other sites More sharing options...
Recommended Posts