First Person NWN2
#1
Posté 11 juillet 2011 - 06:24
#2
Posté 12 juillet 2011 - 03:30
#3
Posté 13 juillet 2011 - 02:54
#4
Posté 13 juillet 2011 - 03:06
#5
Posté 13 juillet 2011 - 04:31
The way to apply the .sef to your character would probably be to use a script (I or someone else can write you one) that you call using the console * . Strategically, it might be best to have it check for your currently selected target, make sure that target is part of your current party, and then apply the visual effect. A second script could be used for removing it.
I'll work on such scripts in a bit. There would be some limitations involved. I could see it being a problem when you enter a cutscene for example, and the camera swings around.
* You can enter the console by pressing the ` which shares the ~ key on most English-language keyboards.
Modifié par MasterChanger, 13 juillet 2011 - 04:33 .
#7
Posté 13 juillet 2011 - 04:51
Modifié par countyoyo, 13 juillet 2011 - 05:13 .
#8
Posté 13 juillet 2011 - 04:52
#9
Posté 13 juillet 2011 - 04:55
#10
Posté 13 juillet 2011 - 05:24
These would work by dropping them in your override along with the SEF. You can run them by using the runscript console command: "rs <name_of_script>" (with no file extension, just what comes before the period).
Also, you might find this reference useful. It lists what file format does what, like what an SEF is.
countyoyo wrote...
You, sir, are sublimely awesome.
Aw, shucks.
Modifié par MasterChanger, 13 juillet 2011 - 05:27 .
#11
Posté 13 juillet 2011 - 05:35
#12
Posté 13 juillet 2011 - 06:26
Modifié par countyoyo, 13 juillet 2011 - 06:43 .
#13
Posté 13 juillet 2011 - 06:47
#14
Posté 24 juillet 2011 - 02:01
// Apply_Invis
void main()
{
object oPC = GetOwnedCharacter(GetFirstPC());
object oTarget = GetPlayerCurrentTarget(oPC);
if (GetIsObjectValid(oTarget))
{
effect eVfx = SupernaturalEffect(EffectNWN2SpecialEffectFile("total_invisibility"));
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eVfx, oTarget);
}
}
// Remove_Invis
void main()
{
object oPC = GetOwnedCharacter(GetFirstPC());
object oTarget = GetPlayerCurrentTarget(oPC);
if (GetIsObjectValid(oTarget))
{
RemoveSEFFromObject(oTarget, "total_invisibility");
}
}
Edit the nss files in the override folder to match the above. Then open the toolset and use the File Open Script command to open them and the compile them.
The scripts apply the effect to the targeted creature. Which means you have to right-click on the creature, not left-click. Since you cannot target an invisible creature, to target your invisible PC you will need to right click his/her portrait.
The console commands to turn on invisibility are:
debugmode 1
rs apply_invis
debugmode 0
To turn it off:
debugmode 1
rs remove_invis
debugmode 0
Regards
#15
Posté 24 juillet 2011 - 03:13
One question: I don't see a check for the target being in the main PC's party. This means you could turn an enemy invisible, making it difficult to re-target them and remove the effect. I've recently read that ginc_companion might have a function to check if a creature is in a party with another creature?
Thanks for your expertise. :-)
#16
Posté 24 juillet 2011 - 03:50
#17
Posté 24 juillet 2011 - 04:29
You could also just make a widget Item that would toggle it on and off. That would be easier, but it wouldn't be as clean.
#18
Posté 24 juillet 2011 - 05:46
#19
Posté 24 juillet 2011 - 06:11
Matt ... many months ago I did try doing something similar to you (total invisibility effect) and tried applying it as an effect to allow a FPS gaming effect. If I recall correctly, while toggling helped with the problem, managing the PC in question in the game while fully invisible became quite difficult to control. And, again if I am remembering correctly, I could not apply the invisibility without it impacting on the game itself. Lastly, if designing a MP game (as I am), having PCs become truly invisible makes MP gaming more difficult.
In the end, I opted for something similar to my NWN1 module, Soul Shaker, and simply raised the height of the camera (which was controlled by a script command in those days) by editing the appearance.2da (as I see someone else has done) for the equivilent effect in NWN2. (It's really annoying that the camera commands I used in NWN1 do not work in NWN2.)
The ideal solution would be (if someone has the ability to do this) to do something similar to the way DDO (D&D Online) works. This online game is free to play for a few dungeons by the way, and so if you want to see what I mean, download the game and try it. Don't abandon NWN though.
The real question is, is there any way that the camera can be made to "go inside" a NWN2 PC? And if so, does "going inside" (or maybe "just in front" of the PC) allow the player to see the game without being affected by the PC itself?
I would be interested if anybody knows how to do this. i.e. Manually alter the camera "Zoom in" in a manner like the height can be altered in the appearance.2da. HOWEVER, even if that was possible, not being able to control that function via scripting means a player would have to make the decision to sacrifice one camera mode for the sake of this permanent zoomed in feature.
Personally, unless camera scripts can be written to compensate and improve on those once found in NWN1, I do not think a FPS camera effect will be easily possible beyond those already made available.
Yet, I would still love for this to be achieved ... so I hope someone susses it out.
Lance.
Modifié par Lance Botelle, 24 juillet 2011 - 06:12 .
#20
Posté 24 juillet 2011 - 08:16
Kaldor Silverwand wrote...
You could still kill an invisible enemy with an AoE spell I suppose.
You can cycle through nearest enemies as long as your character (not the player) can perceive them (Tab key by default).
M. Rieder wrote...
If I were to make a FPS for NWN2, I would alter the XML for the character view so that it added the total invisibility VFX. Then I would also alter the XML for the exploration or strategy view so that they removed the VFX.
You could also just make a widget Item that would toggle it on and off. That would be easier, but it wouldn't be as clean.
The reason I didn't suggest an item with a tag-based script is that every character you were planning to control would need one for it to work smoothly. Both this and the method I came up with are pretty kludgy. An XML approach would probably be good, but I was concerned with what happens when you change characters. The only way that I can think of to capture a character switch "event" is by overriding the portrait GUI (and the F-keys as well) but even that wouldn't catch forced switches or anything like that.
Lance Botelle wrote...
The real question is, is there any way that the camera can be made to "go inside" a NWN2 PC? And if so, does "going inside" (or maybe "just in front" of the PC) allow the player to see the game without being affected by the PC itself?
I would be interested if anybody knows how to do this. i.e. Manually alter the camera "Zoom in" in a manner like the height can be altered in the appearance.2da. HOWEVER, even if that was possible, not being able to control that function via scripting means a player would have to make the decision to sacrifice one camera mode for the sake of this permanent zoomed in feature.
Personally, unless camera scripts can be written to compensate and improve on those once found in NWN1, I do not think a FPS camera effect will be easily possible beyond those already made available.
My suspicion is that affecting the engine in this way would take something on the level of NWNX plugins. I remember that Pain mentioned that NWNX2 (for NWN1) had actually been advanced to the point where it could be used for single-player, unlike NWNX4 (for NWN2). I'm not sure why that is, except to guess that it has something to do with differences in the server-client split in NWN1.
#21
Posté 25 juillet 2011 - 04:29
Get it here.
Regards
Modifié par Kaldor Silverwand, 26 juillet 2011 - 02:30 .
#22
Posté 26 juillet 2011 - 04:15
Regards
Modifié par Kaldor Silverwand, 26 juillet 2011 - 04:16 .
#23
Posté 26 juillet 2011 - 03:29
Very clever!
#24
Posté 26 juillet 2011 - 04:24
#25
Posté 26 juillet 2011 - 09:38
Kaldor Silverwand wrote...
My Character Visibility Context Menu Option UI enhancement does not address the camera issues discussed above. It only allows the currently selected character to alter their visibility. Because it uses the player context menu it cannot be used against enemies and does not require the console or an item. It should be fully compatible with the OC. MotB, and SoZ.
Regards
Hi Kaldor,
Looks good!
Does altering PC "visibility" this way affect the ability for NPCs to spot the PC? If you are using a SEF, then I am guessing not, but would like to know how NPCs react to the PC when using this effect on themselves.
Cheers!
Lance.
MasterChanger wrote...
My suspicion is that affecting the engine in this way would take something on the level of NWNX plugins. I remember that Pain mentioned that NWNX2 (for NWN1) had actually been advanced to the point where it could be used for single-player, unlike NWNX4 (for NWN2). I'm not sure why that is, except to guess that it has something to do with differences in the server-client split in NWN1.
Hi MC,
If it were ever possible to do this, then it may be the ideal solution. I have no idea about this kind of thing though, and have only considered those options currently being investigated.
Lance.
Modifié par Lance Botelle, 26 juillet 2011 - 09:43 .





Retour en haut






