Jump to content

Actors As Workshop Furniture?


DocClox

Recommended Posts

It's definitely possible. If you think about it, the vanilla game does it with turrets.

 

Where the wheel comes off is trying to get settlers to interact with the 'bot as if it were furniture. I think the engine sees an actor under the crosshairs and that overrides the assignment. There's probably a keyword that'll change the behavior, but damned if I can find it.

Link to comment
Share on other sites

It's definitely possible. If you think about it, the vanilla game does it with turrets.

 

Where the wheel comes off is trying to get settlers to interact with the 'bot as if it were furniture. I think the engine sees an actor under the crosshairs and that overrides the assignment. There's probably a keyword that'll change the behavior, but damned if I can find it.

 

Yeah, I forgot about the "workshopObjectActorScript". A created some workshop mods but I've never tried turning actors to workshop objects. Sounds like fun though :smile:

 

Well, the workshopNPCScript handles these assignmenets. Take a look at the lines below "state assigned". The relevant part is in the OnCommandModeGiveCommand event. You can see that the system uses the "command mode". A modified variant of the "usual" command mode used for followers. Maybe the problem is that the engine can't allow you to command NPCs to "activate" another (living) actor (as if it were an object like a furniture).

 

The command mode is mostly hardcoded and you can see the actual "command types" (aeCommandType == x) in the FollowersScript. An actor can be "activated" of course but maybe not in the way you'd like. As I wrote it in my first post, workshop objects need to owned by actors. This is how assignment works. I guess actors can't be owned by another actor. Unfortunately, I don't know if there's a way to bypass this.

Edited by LarannKiar
Link to comment
Share on other sites

Okay, an actor can be an owner of another actor.. I've managed to make Paladin Danse own one of my Settlers :smile: He is now assigned to a "Settler". Everything looks fine in Workshop Mode (green outline, assigned state...).

 

I used the SetActorRefOwner and GetActorRefOwner console commands..

Edited by LarannKiar
Link to comment
Share on other sites

I'm not entirely clear what your requirements for the mentioned rotation are, but there is David J Cobb's rotation library, which can rotate things around other things.

Basically, I want to rotate a settler 90 degrees around the y axis so they're on their back and floating about three foot in the air. And then to be able to move them around in that position. Along with the furniture. I just had a look to see if I could find a save with a working version of the MK1 frame, and you could have had a link to a picture. Anyway, the problem is that the engine won't let me rotate actors off their feet, and takes it as request for head tracking, I think. Certainly their feet stay very much on the ground.

 

 

Okay, an actor can be an owner of another actor.. I've managed to make Paladin Danse own one of my Settlers :smile: He is now assigned to a "Settler". Everything looks fine in Workshop Mode (green outline, assigned state...).

 

I used the SetActorRefOwner and GetActorRefOwner console commands..

Hmmm. OK. So maybe part of the problem has been that I've been trying to force the bot to be a workshop object and I should have been using the actor script. That's interesting.

Edited by DocClox
Link to comment
Share on other sites

 

Hmmm. OK. So maybe part of the problem has been that I've been trying to force the bot to be a workshop object and I should have been using the actor script. That's interesting.

 

 

I think it's necessary. (But these functions are in the Object Reference script).

 

The workshop interface (Workshop.swf) detects whether you're pointing to an actor or an object and it won't allow you to assign an actor to another actor. (I'm don't know much about interface files though).

 

So instead of using the workshop mode, you can try creating a perk with a perk entry point that adds a new "Activate" button. The button is visible when you approach the NPC. I used it many times before and it's a pretty reliable way to edit actors and their linked references. You can edit your actor however you like: you can start the "usual" command mode and then assign that actor to any workshop object (just like when you command a companion to pick up something).

 

There's a similar vanilla script function. It's from a TopicInfo fragment script. (From the new settlers' introduction scene. FormID: 212B7F)

(akSpeaker as WorkshopNPCScript).StartCommandState()

On a perk fragment, it should look like this:

(akTargetRef as WorkshopNPCScript).StartCommandState()

But maybe it's better if you use a quest script as it gives you more options. Note that this workshopNPCScript function will start the workshop command mode (but without opening the settlement build interface). You can of course start the "normal" command mode: SetDoingFavor() with abWorkShopMode = false.

Edited by LarannKiar
Link to comment
Share on other sites

I think a big part of what I've been missing is the WorkshopParent BuildObjectPUBLIC method. If I call that on my papyrus placed objects, they seem to initialize properly. I placed a floor tile with a furniture animation on it, and it would work as furniture, but I couldn't assign settlers to it. Now I'm calling BuildObjectPUBLIC on it and suddenly I can assign settlers.

 

This is probably what I was missing from the bot in the first place. That and workshopObjectActorScript. This seems promising.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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