TheRealMissAmber Posted October 30, 2017 Author Share Posted October 30, 2017 Okay so can you please explain this to me. It accepted for copyeyes but not for copyrace. I don't understand Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted October 30, 2017 Share Posted October 30, 2017 Sorry for getting back at you that late. We were having a family feast at sunday and I was away from the PC. Hmm, those pictures so far are looking really impressive. And the aura is even animated, too? Wow! Oh, yes, that was my bad, the block type for a scripted effect spell ending is ScriptEffectFinish, not ScriptEffectEnd. But that's easily read up in the CS wiki, so I hope I didn't cause too much fuss. With OBME you can do even that? Eh, the more you know. I'm never learning out it seems. In general I wouldn't ever use FormIDs for parameters inside the CS script editor, unless the function used specifically demands for that to be done, and then it's not unlikely they should be typed in quotes "00ab3456". Every EditorID you use will be automatically converted into its respective FormID when the script is compiled. You should not be using 2 blocks with the same type either. It is possible they're both run, but it also isn't unlikely 1 or more will just be skipped.Of if you're having the 2nd block be "ScriptEffectStart" by error, then it would at least explain why nothing is happening when the spell runs out. Ah, now I see, CopyRace is a function of an OBSE beta release and is not yet documented in the function reference. I was trying to find it but couldn't and was beginning to wonder where it's from.It works fine on "Player" but not on an NPC's EditorId... Maybe you need to use the "ref" variable workaround I mentioned, like "let refMyNPC := AWSS1E" and then use it like so "refMyNPC.CopyRace Player". Sometimes the compiler is confused by an ID's variable type. Maybe type "NPC" or "actor" just wasn't added to the allowed variable type list for that function? "Player" is somewhat special anyways, so I wouldn't count on it being actor or NPC internally. Maybe that's why it works. It works just about everywhere, so it's likely rather something more generic. Does it really not work with just "Player", or maybe "PlayerRef", as the parameter? Does it have to be "00000007"? edit: It's because I'm not sure 00000007 is "the" player that you'll have to use here. If it's the FormID for the base player, I could imagine you're just going to copy "Bendu Olo"'s default race as set up in the Oblivion.esm, not the actual player's current race and eyes. Link to comment Share on other sites More sharing options...
TheRealMissAmber Posted October 30, 2017 Author Share Posted October 30, 2017 Wow. Okay that makes a lot of sense. I have a lot to try. I'm really hoping this works. Drake you are amazing. This will help a lot for one of the other plugins. I will give it a whirl and see if I can get this thing wrapped up. I will let you know Link to comment Share on other sites More sharing options...
TheRealMissAmber Posted October 30, 2017 Author Share Posted October 30, 2017 Okay no matter how I try to use that it gives me errors so IV been avoiding this because I wanted to try to type it out myself but can you show me what that would look like in script format. I even tried using ScriptName TestScript Ref AWSS1E Begin ScriptEffectStart "Let refMyNPC := AWSS1E" "refMyNPC.copyrace 00000007" Update3dEnd Exactly how I typed it and I get errors out the ass. But If I type it ScriptName TestScript Ref AWSS1E Begin ScriptEffectStart AWSS1E.CopyRace 00000007 Update3dEnd It will compile but nothing happens in game. Link to comment Share on other sites More sharing options...
TheRealMissAmber Posted October 30, 2017 Author Share Posted October 30, 2017 Okay this is starting to piss me off now. Went in game and clicked on AWSS1 Named Elf typed copyrace 00000007 same with copy eyes and copy hair then typed update 3d and left console and the high elf became a Breton like me with my hair and eyes so it can be done. He even had Breton voice and that's a +. The only thing odd is his form ID in CSE is 01006f91 and in game it's 01006f93 so I tried reloading save then typed CSE form ID copy race and nothing then game form ID and nothing then editor ID and nothing so idk. Maybe you should try this. Click any NPC and type copy race then 00000007 and they will become your race Link to comment Share on other sites More sharing options...
TheRealMissAmber Posted October 31, 2017 Author Share Posted October 31, 2017 Okay starting out. Then coping features to an NPC from 00000007 current player Link to comment Share on other sites More sharing options...
TheRealMissAmber Posted October 31, 2017 Author Share Posted October 31, 2017 Then copying race and eyes from Saiyan NPC to player is no problem so it can be done. So irritating Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted October 31, 2017 Share Posted October 31, 2017 Uh, sorry, I wasn't very detailed when I explained that. No, whole lines of code should not be enclosed in quotes. And no, one should also never re-assign an already existing EditorID for a variable in a scripts head. What I meant was to do it like so: ScriptName TestScript ref refMyNPC ; define variable of type ref with name refMyNPC Begin ScriptEffectStart let refMyNPC := AWSS1E ; this does not need any quotes, as AWSS1E already is a keyword the compiler will understand refMyNPC.CopyRace "00000007" ; this is the type of quoting I meant, just enclose the FormID Update3D End Your second script -compiled-, because you re-assigned "AWSS1E" to a variable of type "ref", but it couldn't function anymore, because said variable is now pointing to "0". Inside this script "AWSS1E" no longer is the NPC. Your ingame test run was interesting and useful at the same time. It verified both, the functions are all called using the "<reference>.<function> <parameter>" notation, not the 2nd "<function> <parameter> <reference>" type, and "00000007" will work as the reference to the player. But there's one more thing coming to mind. If you select an object inside the game while the debug console is open, you will never select the BaseObject but a reference created of it. One and the same NPC can, in theory, be put into the game world multiple times. Its ReferenceID will not be "AWSS1E" or anything, but usually the next free FormID for spawning a reference to it. I remember NPCs are handled somewhat special, but it's still not surprising to me that you get a different ID when you select them inside the game than the FormID they have inside the CS. You did place both NPCs into the game world already at some hidden away place, didn't you? If so, let's try right-clicking them and giving them a specific ReferenceID, not the record inside the NPC list but the actual actor you dropped into the world. The first is the BaseObject, the latter a reference to it. And if you give it a specific ReferenceID (e.g. "AWSS1Eref"), it will not create a new one on its own every time and you can use the one you entered to refer to it from inside scripts. I think herein lied the problem so far. As the ingame tests verified, ReferenceIDs are to be used, not BaseObjects. So using the "AWSS1E" BaseObject EditorID instead of a ReferenceID likely was what was bothering him. If that's the case, then maybe doing the above will fix it. edit: I'll have to take a look into the CS myself for the details, if you should be having trouble finding the dialog popup with the option I mean, but this I'm afraid I can only do after a good night's sleep. It's 4 AM here and I'm better off to bed now. Maybe the link for reference to the wiki will explain which one I mean. Link to comment Share on other sites More sharing options...
TheRealMissAmber Posted October 31, 2017 Author Share Posted October 31, 2017 YAY!!! But that's only 1/2 yay. It works but only if I set the script to target in the spell. For this to work the player must never make contact with the race holder NPC. Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted October 31, 2017 Share Posted October 31, 2017 I think we're getting there. What is the current state of your script? What is working now and what still isn't?The spell is meant to run on the player, if I got that right? If it needs to target the copy source NPC, it looks like the functions are called with the reference implicitly given by the spell, not explicitly via variables like above. And I see I forgot one important fix in the script I posted above. "Update3D" of course has to be called like "refMyNPC.Update3D", not without "refMyNPC", or it will update the source instead of the target that was changed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now