Jump to content

dagobaking

Premium Member
  • Posts

    235
  • Joined

  • Last visited

Posts posted by dagobaking

  1. I am able to successful clone my player character with this:

    PlayerRef.PlaceActorAtMe(PlayerRef.GetLeveledActorBase())

    But, the clone appears wearing a vault suit.

     

    I know that I can run some processes list my equipment and put it on them one at a time. But, before I do that, does anyone know if there is an easier way to make the clone appear with the exact same equipment already on?

  2. Runtime created forms all start with FF in their ref IDs.

     

    I think what needs to be done here is check for the base objects, by calling GetBaseObject().GetFormID() on those items. Of if you don't need the ID, just stick with GetBaseObject(), then you can do whatever comparison checks you need to do after that.

     

    Edit: Ok I see that you mentioned this function not picking up runtime created forms, which seems..strange to me.

     

    I thinking now that on the workshop form, it checks through a formlist or perhaps an array.

     

     

    FindAllReferencesOfType definitely works on items created in a Workshop, so long as you use a Formlist that has the right EditorIDs inside. Could you post the code that you are using?

     

    I think I see the issue. It's right there in front of us in that function. :)

     

    I am casting the incoming objects as Furniture. So, when they are actually Furniture that is ok. But, when they are Static objects, casting them as Furniture breaks the search for that item.

     

    SO, the next question is, how can I resolve that? I tried changing it to ObjectReference and then none of the searches worked. I CAN set things up to cast the forms differently based on a passed in type variable. But, I would rather not keep track of an assigned type variable if there is a more elegant solution.

     

    Do you see a way to re-write my function so that it will scan whatever type of object shows up via the form/source variables?

  3. Static items also definitely work with the function. However, you might be running into an issue regarding precombined objects. The function won't find any objects that are within the precombined system.

     

    What are precombined objects?

     

    I am testing this with PoolTable01. I can build that in the workshop, run it through this function and it does not appear in the search. Additionally, when I click on the item via the console, the form ID it shows is not the form ID of the Static that is searched for.

     

    But, even further than that, PoolTable01 can be placed into the world via the CK and it still does not get detected by this function.

  4. Runtime created forms all start with FF in their ref IDs.

     

    I think what needs to be done here is check for the base objects, by calling GetBaseObject().GetFormID() on those items. Of if you don't need the ID, just stick with GetBaseObject(), then you can do whatever comparison checks you need to do after that.

     

    Edit: Ok I see that you mentioned this function not picking up runtime created forms, which seems..strange to me.

     

    I thinking now that on the workshop form, it checks through a formlist or perhaps an array.

     

    I have new information. It turns out that workshop created items work ok as long as they are Furniture items and I am searching for them with the Furniture formID. If they are Static items and I search for them with the Static formID, they are not found.

     

    Should I be using a different form ID for static items? I see that there are some helper-looking forms related to them (a transform?).

     

    FindAllReferencesOfType definitely works on items created in a Workshop, so long as you use a Formlist that has the right EditorIDs inside. Could you post the code that you are using?

     

    I have some new info, see above. It doesn't appear to be workshop created items that are the issue. But, rather Static items.

     

    Here is the function that does the search:

     

    Function OnGetLocationData(Var[] furnitureForms, Var[] furnitureSources)
    
    
    AAF_FurnitureSearchList.Revert()
    
    
    Int i = 0
    While i < furnitureForms.Length
    Furniture f = Game.GetFormFromFile(furnitureForms[i] as int, furnitureSources[i] as String) as Furniture
    AAF_FurnitureSearchList.AddForm(f)
    i = i + 1
    EndWhile
    
    
    ObjectReference[] kLocationArray = PlayerRef.FindAllReferencesOfType(AAF_FurnitureSearchList, wizard_search_area)
    
    
    Var[] locationData = new Var[0]
    i = 0
    While i < kLocationArray.Length
    if(kLocationArray[i].GetAngleX() + kLocationArray[i].GetAngleY() == 0.0)
    locationData.Add( Utility.VarArrayToVar(makeLocationData(kLocationArray[i])) )
    EndIf
    i = i + 1
    EndWhile
    
    
    Var[] sendData = new Var[1]
    sendData[0] = Utility.VarArrayToVar(locationData)
    
    
    sendEvent("SEND_LOCATION_DATA", sendData)
    EndFunction

    The inputs are arrays of the form ID and sources for items that could really be anything. But, mainly either Furnitures or Static items. Furnitures work ok. Static do not.

  5. I am using FindAllReferencesOfType to search for certain items.

     

    It works great on items that have been placed in the game via plugins in the CK. However, the same items, for example PoolTable01, created through the Workshop are given weird form ID numbers starting with "ff". So, they don't match the CreationKit form ID for that item and thus do not get picked up by FindAllReferencesOfType calls.

     

    Does anyone know a solution for this?

     

    Is there some way to know ahead of time what the Workshop created form ID for specific items will be?

     

    Or, maybe is there a base object that can be scanned for instead of the static form ID number?

     

    Thank you for any help.

  6. It can be a little tricky getting the paths set up right. But, switching between CK and an editor is a steep price. Plus, it is at built time that the editor does a lot of the help by highlighting any lines that have errors along with details.

     

    I haven't tried Notepad++. But, Sublime was pretty easy to set up and I'm very happy with it. Now I have it publishing from a separate mod folder so that every file for the mod is by itself in one folder.

     

    I'll walk anyone through setting it up if interested.

  7. I tried using ApplyHavokImpulse to a few Actors and they didn't appear to be affected.

     

    Here is the code:

     

    int i = 0
    While i < args.Length
    Actor targetActor = Game.GetForm(args[i] as int) as Actor
    targetActor.ApplyHavokImpulse(0.5, 0.5, 1.0, 150.0)
    i = i + 1
    EndWhile

    Am I missing something? Or, is there a better way to apply an explosion-like force to a group?

  8. I could be wrong. But, I think it's possible that further edits are supposed to be made to that debug file and they just didn't clarify it in the wiki.

     

    It is painful for me to imagine coding through the CK!

     

    I highly, highly recommend that you switch to Sublime Text. I think they list it as not being free. But, there is a free version that simply has an occasional nag window.

  9. Ok. Those are areas I don't have much direct experience in. So, hopefully someone else who does can point to some good tutorials.

     

    But, I would say that you can get a head start by reading through the CreationKit wiki. You can probably read the entire thing in a half day: https://www.creationkit.com/fallout4/index.php?title=Main_Page

     

    That will at the very least give you some search terms to use for the subjects you are interested in. Also, a very good approach to learning, once you have basic tools installed, is to look at existing mods that do close to what you want to do.

  10. For most users, my mod is working. But, there are a few that are having issues. This error has shown up in their logs:

    no native object bound to the script object, or object is of incorrect type

    Here is the full log entry:

    [04/25/2018 - 10:31:53PM] error: Unable to call ForceStart - no native object bound to the script object, or object is of incorrect type

    The line that uses ForceStart is this:

    AAF_WalkToAndWaitScene[sceneKey].ForceStart()

    SO, I gather from this information that the problem is that Fallout, for some reason, has not populated AAF_WalkToAndWaitScene which is a Scene array populated through the CK.

     

    Has anyone seen this issue before and have any ideas on how to fix?

×
×
  • Create New...