Polyjuice Potion Problem

Post » Sun Nov 18, 2012 11:51 am

My mod team and I want to create what is essentially a polyjuice potion, a la Harry Potter (though we won't call it that of course). Basically we need this potion to make the player temporarily look like someone else.

Problem is, we have no idea how to make this happen. Is there a way to set faces on the fly without opening up the showracemenu?

If not, we'll have to think of something else, but it would be very useful if we could get this working.
User avatar
Pants
 
Posts: 3440
Joined: Tue Jun 27, 2006 4:34 am

Post » Sun Nov 18, 2012 4:27 pm

Have a look http://www.gamesas.com/topic/1394697-camera-control-has-anyone-experimented-with-this/ for some approaches to possessing an NPC.

if you can do that, it's just a matter of creating a temporary clone of the npc to possess. The trouble is the player's control may be a bit limited while morphed.

Alternatively, if you want to turn into specific NPCs (as opposed to arbitrary ones) you could make a custom race and try transforming werewolf style.
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Sun Nov 18, 2012 11:01 pm

It would be a specific one, I just don't know how the whole werewolf thing works. I can look though, and idea where to start?
User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Sun Nov 18, 2012 2:21 pm

II Ducey i have looked into the transformations before and from what little i know, i have seen the Set-Race function alot. Now what i have come up with is something like what DocClox said, make a new race with its facial settings and body and such then try implementing the SetRace Function using a spelleffect with a keyword on the potion. Im not sure if this might work since i never have tried it myself but thats what i would start with.
User avatar
Judy Lynch
 
Posts: 3504
Joined: Fri Oct 20, 2006 8:31 am

Post » Sun Nov 18, 2012 12:32 pm

Any ideas on how to make a race have a particular face?
User avatar
luke trodden
 
Posts: 3445
Joined: Sun Jun 24, 2007 12:48 am

Post » Mon Nov 19, 2012 1:18 am

Double click the race you want to edit and there is a tab there that lets you choose the presets. Im guessing that will allow you to delete and add new presets and if you were to put only one, that race will stay like that. Im not sure if it would work but then again i have never tried it myself im just learning all this stuff in case i need to do it later.
User avatar
Irmacuba
 
Posts: 3531
Joined: Sat Mar 31, 2007 2:54 am

Post » Sun Nov 18, 2012 11:21 am

Yeah, that's what I wound up doing. I just made it so that the available morph types of each facial element was limited to one option in my custom race. Basically every actor of PCKP_Race_THalmorCommander will look exactly the same.
User avatar
naana
 
Posts: 3362
Joined: Fri Dec 08, 2006 2:00 pm

Post » Sun Nov 18, 2012 10:06 pm

Any ideas on how to make a race have a particular face?

Check the Actor base SKSE functions, I think you can use get/set headpart, haircolor, facemorph.
User avatar
Dalton Greynolds
 
Posts: 3476
Joined: Thu Oct 18, 2007 5:12 pm

Post » Sun Nov 18, 2012 2:50 pm

Okay. so a small problem. I made a potion that setrace's to the custom race I have. Mostly working, but with a few kinks. Mainly, the body and hair don't switch. The face changes fine, but not the rest of it.
Any idea what's going on?
User avatar
Lizs
 
Posts: 3497
Joined: Mon Jul 17, 2006 11:45 pm

Post » Sun Nov 18, 2012 5:56 pm

Did you make a new npc and set it as the only preset in your race? That could be the problem or maybe its that on the SetRace function it reads below it that it can only be used with NPCs. I think that there was a function where you can set the player as a NPC or maybe it was AI. Try setting the player as so first then use the SetRace function. Its just and idea.
User avatar
Marcia Renton
 
Posts: 3563
Joined: Fri Jan 26, 2007 5:15 am

Post » Mon Nov 19, 2012 1:41 am

Actually, I'm trying the following right now:

Scriptname PCKP_FaceShiftScript extends activemagiceffect  event OnEffectStart(Actor Target, Actor Caster)int HeadPartsN = TargetB.GetNumHeadParts()int i = 0ActorBase CasterB = Caster.GetActorBase()ActorBase TargetB = Target.GetActorBase()	  while i <= HeadPartsNif TargetB.GetNthHeadPart(i)CasterB.SetNthHeadPart(TargetB.GetNthHeadPart(i), i)CasterB.SetFaceMorph(TargetB.GetFaceMorph(i), i)endIfi=i+1endWhileCasterB.SetWeight(TargetB.GetWeight())CasterB.SetHairColor(TargetB.GetHairColor())endEvent

But I can't get the SKSE functions to be recognized by my CK unfortunately...
EDIT: Duh, I extracted the SKSE wrong. Fixed now.
EDIT2: Huh, doesn't seem to do anything though. Weird. Nothing in my script log about it either, it just doesn't do anything.
User avatar
Alexis Estrada
 
Posts: 3507
Joined: Tue Aug 29, 2006 6:22 pm

Post » Sun Nov 18, 2012 11:53 pm

It appears there is some text missing on the functions and some properties are undefined i can try and help you fix while i try to figure out the error on my function. My script is very simple but i do not have the knowledge yet to figure script errors in a short time but it is so fun trying to figure it out then so satisfying when i do just let me know if you got it ok.
User avatar
Baby K(:
 
Posts: 3395
Joined: Thu Nov 09, 2006 9:07 pm

Post » Sun Nov 18, 2012 3:13 pm

Post your script and the errors/ problems you're having and I'll take a look. I'm getting pretty decent at scripting, but I've never used these functions before.

The worst part it, this script compiles fine and throws no errors in game. It simply doesn't do anything. It doesn't even play the hand effects like it should.

I've got nothing.

EDIT: I added to the script a line a the beginning that is just Caster.KillSilent() and it didn't trigger. I've officially no idea what's going on, but it doesn't seem to be an issue with the script.
EDIT2: I forgot to add a projectil because I am an idiom.
User avatar
^_^
 
Posts: 3394
Joined: Thu May 31, 2007 12:01 am

Post » Sun Nov 18, 2012 8:19 pm

Are you using the CK to script? I use another program and it highlites every function, object type, and pretty much eveything that is in the Papyrus language. Of course i had to set it up but it helps alot, specialy for a newbie like me. By the way, the program is telling me that most of the functions dont exist. I can not tell if its true but i use the CK wiki as reference and i can not find them there.
User avatar
J.P loves
 
Posts: 3487
Joined: Thu Jun 21, 2007 9:03 am

Post » Sun Nov 18, 2012 3:22 pm

Are you using the CK to script? I use another program and it highlites every function, object type, and pretty much eveything that is in the Papyrus language. Of course i had to set it up but it helps alot, specialy for a newbie like me. By the way, the program is telling me that most of the functions dont exist. I can not tell if its true but i use the CK wiki as reference and i can not find them there.
They are SKSE functions. Or are you talking about your own script?

Anyway, they are under ActorBase Script

In any case, I'm opening a new thread for the script, as I would like to know about whether or not these functions even work, or if I have something coded horribly wrong.
User avatar
Noraima Vega
 
Posts: 3467
Joined: Wed Jun 06, 2007 7:28 am

Post » Mon Nov 19, 2012 12:51 am

Alright i have found the function and it looks like both you and i are having the same problem. We tried using a functions that i think are supposed to be used with literals and both functions are acting the same way when i write the lines both with literals and without.
User avatar
Joe Bonney
 
Posts: 3466
Joined: Tue Jul 17, 2007 12:00 pm

Post » Sun Nov 18, 2012 2:40 pm

Literals?
User avatar
Kirsty Collins
 
Posts: 3441
Joined: Tue Sep 19, 2006 11:54 pm

Post » Sun Nov 18, 2012 1:48 pm

Anybody please correct me if im wrong for the sake of my script. When i write my function without bool in the beggining it fails to compile and does not recognize the function but when i use bool in the beggining the errors says . It leads me to believe that i need to cast a literal property on the function first. The problem is that even though i have read the whole article i do not understand how to use them. I do not even know if my third sentence makes sense lol. I have been following this idea for two days with no results.
User avatar
Tania Bunic
 
Posts: 3392
Joined: Sun Jun 18, 2006 9:26 am

Post » Sun Nov 18, 2012 3:57 pm

I have no idea what you mean by literals. Is that common programming parlance?
Also, once again, we need to see your script and the exact error, or we can't be of help.
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm

Post » Sun Nov 18, 2012 11:43 pm

Sorry i had to reset my network but ok here is my script.

Scriptname BottleWithWater Extends ObjectReference

ObjectReference Property melFSTWaterSneakRImpact Auto
Potion Property melBottleOfWater Auto
Actor Property PlayerRef Auto

Event OnActivate(Actor akTarget, Actor akCaster)

If PlayerRef.PlayImpactEffect(melFSTWaterSneakRImpact)
PlayerRef.AddItem(melBottleOfWater)

EndIf



EndEvent

Very short and simple but i can not get it to work i keep getting this same and only error when i put it in any line and with any combination of events, functions and extend properties i use. Even now with bool at the beggining it was misspelled lol.

Error:
User avatar
J.P loves
 
Posts: 3487
Joined: Thu Jun 21, 2007 9:03 am

Post » Sun Nov 18, 2012 10:45 am

Your impact effect is delcared as an ObjectReference, which I don't think it should be. Maybe that's it? I'd need to see what line of code the error is delcated on to know where the error is being thrown.

I'm also not sure that a PlayImpactEffect can be used as a conditional...have to ask Cipscis.
User avatar
Shannon Lockwood
 
Posts: 3373
Joined: Wed Aug 08, 2007 12:38 pm


Return to V - Skyrim