Player Question

Post » Sat May 07, 2011 6:07 pm

Player.PlaceAtMe 00000007 1 spawns a copy of your character, with a ref number in the FFxxxxxx range. It'll have all the inventory, stats, and whatnot that the base npc named 'player' has in the geck.
So technically, wouldn't it be possible to drop that npc into a cell and treat it as any other npc? Run a script on it? Possibly dialog? Make a follower out of yourself?
Or would those require making a copy of it first? And would making a copy mess up the FaceGen being applied?
Thanks
User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Sat May 07, 2011 4:11 am

You would need to be careful of script commands that affected the base object, I would think. There may be other surprises.
When you say 'make a copy first' - not sure what you mean - in the Geck? I think then you will have just another NPC.
User avatar
Jeremy Kenney
 
Posts: 3293
Joined: Sun Aug 05, 2007 5:36 pm

Post » Sat May 07, 2011 3:46 pm

Yep. Although any effects called on them or you which change the base form (addSpell, setfactionrank, SetAV, facegen stuff) will affect both of you. Plus as Ricker says, most scripts assume the only ID 7 actor is the player. Since Getself == player is an unreliable way of checking if a reference is the player, GetIsID 7 is often used.

In general, there's not much reason for it. Just make an NPC like Dad and use MatchRace and MatchFacegen or whatever the other command is if you want a twin.
User avatar
Beulah Bell
 
Posts: 3372
Joined: Thu Nov 23, 2006 7:08 pm

Post » Sat May 07, 2011 7:00 pm

That's what I feared, thanks. Yeah, by 'copy' I meant changing the ID in the geck for a new form, which is what brought up the question about FaceGen issues.

I had this idea to dump a script and a couple packages on the player base object, but set them both up with conditions of GetIsId != 7, or != Player (meaning NOT the users character). This would make the script and packages not affect the users character, but would work on PlaceAtMe copies because the ID would be different. Mind you this isn't for any serious project, just for something to mess around with when boredom takes over. The rest of it came about by thinking why can't I do other stuff as well if I can keep these things from affecting the player by excluding them by ID. Technically it should work, yes?
Thanks
User avatar
Bek Rideout
 
Posts: 3401
Joined: Fri Mar 02, 2007 7:00 pm

Post » Sat May 07, 2011 5:01 am

It works... works suprisingly well as a matter of fact. I used a simple ShowMessage follower menu, quest script to hold a variable, and a handfull of AI packages. Set 'no low level processing' and 'quest item' to keep the copy from being removed at cleanup, and the only condition in place is GetIsReference PlayerRef != 1 on the packages. PlaceAtMe copies function almost exactly like a legit follower/NPC, except that there's no voice recorded for combat lines and whatnot (so they end up using the default hit/fall cries the player normally does), and there's no dialog.
Except for staying away from base object-changing effects or functions (which there's not that many you cant work around), it looks pretty doable to me. A scriptable copy of the users character that you can put AI packages on seems like it would be great for cutscenes and whatnot.
User avatar
LADONA
 
Posts: 3290
Joined: Wed Aug 15, 2007 3:52 am


Return to Fallout 3