Difference between revisions of "User:Ichinin"
imported>Ichinin m ("Bye-bye PlaceAtMe and MoveTo, Hello Questscripts") |
imported>Ichinin m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
2007 Feb 17: | '''2007 Feb 17:''' | ||
''"Bye-bye PlaceAtMe and MoveTo, Hello Questscripts"'' | |||
FIRST POST!!! | |||
Ok, to start off this page (whatever its for) how about putting something useful here? Ok, so why not throw some light on Companion NPCs? Yeah, i'll do that for starters. | |||
First, i created two AIpackages: | First, i wanted to get rid of alot of scripting. The dialogue system is perfect for reducing scripting on the NPCs. First, i created two AIpackages: | ||
'''MyFollowPlayerPackage''' (Follow Player, indefinitly) | '''MyFollowPlayerPackage''' (Follow Player, indefinitly) | ||
'''MyStandStillPackage''' (Return to Editor Location, indefinitly) | '''MyStandStillPackage''' (Return to Editor Location, indefinitly) | ||
I Created 2 NPCs, draged them out into some cell and gave them one refence name each, NPC1Ref and NPC2Ref. (What a creative mind i got...) | I Created 2 NPCs, draged them out into some cell and gave them one refence name each, NPC1Ref and NPC2Ref. (What a creative mind i got...) | ||
Then i created a dummyquest with two topics "-Follow" and "-Stay". Then i went in on the "scripting" part of it and used | Then i created a dummyquest with two topics "-Follow" and "-Stay". Then i went in on the "scripting" part of it and used | ||
"AddScriptPackage MyFollowPlayerPackage" | "AddScriptPackage MyFollowPlayerPackage" | ||
"AddScriptPackage MyStandStillPackage" | "AddScriptPackage MyStandStillPackage" | ||
Under each topic, and did two of them and set a condition using "GetIsReference" with NPC1Ref and NPC2Ref respectively so you could assign these Packages to each NPC without the other getting the same one. | Under each topic, and did two of them and set a condition using "GetIsReference" with NPC1Ref and NPC2Ref respectively so you could assign these Packages to each NPC without the other getting the same one. | ||
Then i did a simple questscript that did Addtopic for the two topics i mentioned earlier (by using their ID). | Then i did a simple questscript that did Addtopic for the two topics i mentioned earlier (by using their ID). | ||
Voila.. i now have dialogue options for making a simple NPC follow or stay. | Voila.. i now have dialogue options for making a simple NPC follow or stay. | ||
Line 34: | Line 42: | ||
But there is more. What about '''Companion Share'''? | But there is more. What about '''Companion Share'''? | ||
If you are somewhat into the TES-CS you immediately say "PlaceAtMe" - or "MoveTo" if you are a bit smarter :D | If you are somewhat into the TES-CS you immediately say "PlaceAtMe" - or "MoveTo" if you are a bit smarter :D | ||
Well.. i had other plans. I did what i did earlier. | Well.. i had other plans. I did what i did earlier. | ||
I create a dummy cell, like others had done. I made sure i had a barrel with zero items and no respawn set and put | |||
I create a dummy cell, like others had done. I made sure i had a barrel with zero items and no respawn set and put an instance of this barrel into the dummy cell and gave it a ReferenceName. | |||
Then i made 4 NPCs and gave them references (as usual) Now, the nice part is that i figured that while the Quest script was doing its dialogue thing, it could also do the companion share thing so no NPC would have to have much or ANY scripting. | Then i made 4 NPCs and gave them references (as usual) Now, the nice part is that i figured that while the Quest script was doing its dialogue thing, it could also do the companion share thing so no NPC would have to have much or ANY scripting. | ||
I create a variable in the quest script and set the ID number of the NPC i had selected the "-Companion Share" topic for. Then the quest script would pick that up, set a reference variable to the choosen NPC and do the removeallitems... (forward and back). | I create a variable in the quest script and set the ID number of the NPC i had selected the "-Companion Share" topic for. Then the quest script would pick that up, set a reference variable to the choosen NPC and do the removeallitems... (forward and back). | ||
Line 48: | Line 60: | ||
i also did a dummy item that i used Additem, Equip, Removeitem to make them "dress up" again, but i realised that you could to | i also did a dummy item that i used Additem, Equip, Removeitem to make them "dress up" again, but i realised that you could to | ||
NPC.Disable | NPC.Disable | ||
NPC.Enable | NPC.Enable | ||
And they would "dress up" again too. However, the NPC would change its position so i thought it would be better to just use a dummy item. | And they would "dress up" again too. However, the NPC would change its position so i thought it would be better to just use a dummy item. | ||
Line 56: | Line 71: | ||
Anyway, that was my first entry on this site. I hope someone will read it and find it useful. | Anyway, that was my first entry on this site. I hope someone will read it and find it useful. | ||
--[[User:Ichinin|Ichinin]] 08:10, 17 February 2007 (EST) | --[[User:Ichinin|Ichinin]] 08:10, 17 February 2007 (EST) | ||
Feel free to | |||
Feel free to browse my [http://www.geocities.com/Ichinin/oblivion/ Oblivion] and [http://www.geocities.com/Ichinin/mwstuff.htm Morrowind] mods. |
Latest revision as of 08:29, 17 February 2007
2007 Feb 17: "Bye-bye PlaceAtMe and MoveTo, Hello Questscripts"
FIRST POST!!!
Ok, to start off this page (whatever its for) how about putting something useful here? Ok, so why not throw some light on Companion NPCs? Yeah, i'll do that for starters.
First, i wanted to get rid of alot of scripting. The dialogue system is perfect for reducing scripting on the NPCs. First, i created two AIpackages:
MyFollowPlayerPackage (Follow Player, indefinitly)
MyStandStillPackage (Return to Editor Location, indefinitly)
I Created 2 NPCs, draged them out into some cell and gave them one refence name each, NPC1Ref and NPC2Ref. (What a creative mind i got...)
Then i created a dummyquest with two topics "-Follow" and "-Stay". Then i went in on the "scripting" part of it and used
"AddScriptPackage MyFollowPlayerPackage"
"AddScriptPackage MyStandStillPackage"
Under each topic, and did two of them and set a condition using "GetIsReference" with NPC1Ref and NPC2Ref respectively so you could assign these Packages to each NPC without the other getting the same one.
Then i did a simple questscript that did Addtopic for the two topics i mentioned earlier (by using their ID).
Voila.. i now have dialogue options for making a simple NPC follow or stay.
Neat eh?
But there is more. What about Companion Share?
If you are somewhat into the TES-CS you immediately say "PlaceAtMe" - or "MoveTo" if you are a bit smarter :D
Well.. i had other plans. I did what i did earlier.
I create a dummy cell, like others had done. I made sure i had a barrel with zero items and no respawn set and put an instance of this barrel into the dummy cell and gave it a ReferenceName.
Then i made 4 NPCs and gave them references (as usual) Now, the nice part is that i figured that while the Quest script was doing its dialogue thing, it could also do the companion share thing so no NPC would have to have much or ANY scripting.
I create a variable in the quest script and set the ID number of the NPC i had selected the "-Companion Share" topic for. Then the quest script would pick that up, set a reference variable to the choosen NPC and do the removeallitems... (forward and back).
i also did a dummy item that i used Additem, Equip, Removeitem to make them "dress up" again, but i realised that you could to
NPC.Disable
NPC.Enable
And they would "dress up" again too. However, the NPC would change its position so i thought it would be better to just use a dummy item.
Anyway, that was my first entry on this site. I hope someone will read it and find it useful.
--Ichinin 08:10, 17 February 2007 (EST)