Aller au contenu

Photo

First Person NWN2


  • Veuillez vous connecter pour répondre
36 réponses à ce sujet

#1
countyoyo

countyoyo
  • Members
  • 9 messages
I am determined to find a way to play NWN 2 first person. I've tried the (Nearly) first person mod here: http://nwvault.ign.c...l.Detail&id=351 but the damn head in the way is annoying. I modified the appearance.2da file to change camera height over my character a bit...the head is gone now and it kinda looks first person (if I was an 8 foot tall human). This mod http://nwvault.ign.c....Detail&id=1358 for NWN 1 was awesome and almost exactly matches what I am looking for. I guess what I am asking is if anyone knows how to make this feasible. Can I make my characters head invisible somehow (without making him invisible as per game mechanics? Or maybe somehow move the camera from just behind the characters head to just in front? Am I just dreaming? Any help would be greatly appreciated. Thanks!

#2
MasterChanger

MasterChanger
  • Members
  • 686 messages
If you just want the Player-Character to disappear visually, then M. Rieder's Invisibility VFX might be of interest. If this works, there are various ways to script applying this to your character and removing it.

#3
countyoyo

countyoyo
  • Members
  • 9 messages
Oooo, thank you, I'll check that out

#4
countyoyo

countyoyo
  • Members
  • 9 messages
ok I'm looking at it, please pardon my lack of scripting ability....how would I go about adding this to just the currently controlled PC? Is that possible? Would I be able to hotkey turning it on/off? I assume I am to put the hak in the modules and the .sef in the override, but how do I associate it to the character? Once again, pardon my ignorance in all things technical beyond drag and drop and hex editors.

#5
MasterChanger

MasterChanger
  • Members
  • 686 messages
OK, the hak just contains the .sef--it's so a module author has a way of including the .sef in their adventure. For your own playthroughs, you won't need it. Just having the .sef in your override would be enough.

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 .


#6
MasterChanger

MasterChanger
  • Members
  • 686 messages
Here's a preliminary version of the script to apply the Invis VFX.

#7
countyoyo

countyoyo
  • Members
  • 9 messages
You, sir, are sublimely awesome. I would damn near beg for such scripts. Strategically, I think you correct, and the ability to turn it on/off is a plus. I am familiar with entering console parameters and I am great at following directions. I can deal with cutscenes, I just want more immersion, I guess. This whole thing started when I started playing NWN1 again after quite some time, and fell in love with playing it with this mod http://nwvault.ign.c...Detail&id=1358. IT still felt awkward because I could not map my mouse axis to my keyboard to give it that whole," look with mouse, just jam w to walk" kinda thing. I enjoyed being able to see the perspective of the room I was in, totally changed the dynamics of where my attention was drawn on screen. My young son and I played a Ghost Keep of Inverness mod and I loved that he could say, "I think we should open THAT door, daddy", or even just "go left". I soon re-installed nwn2 for graphical reasons, and attempted the same thing, and although it looked great, the best mod I could find was the (nearly) first person mod (which, don't misunderstand me, all these mods are terribly awesome and the modders and scripters - such as yourself - and general "know-what-they-are-doing" chaps who make them should be held as Gods.) http://nwvault.ign.c....Detail&id=351. Great mod, but the head in the flower frame just blew the immersion I was looking for. I read some where that that mod changes the height of the camera, so after some Google-Fu I edited the appearance.2da file in that mod and increased the "height" value by 0.5. That worked great, now the camera was squarely over that person's height, although now it look like I'm playing a 8 foot tall giant. Very High perspective. That's when I was hoping for a way to render the controlled character transparent only when controlled, or place the camera directly in front of characters head (which, in my limited knowledge, have begun to think is impossible in this game). Anyways, you have deepest thanks for helping me with this!

Modifié par countyoyo, 13 juillet 2011 - 05:13 .


#8
countyoyo

countyoyo
  • Members
  • 9 messages
Whoa, I write the above and BAM! you come back with something workable?! Gods, I tell you!

#9
countyoyo

countyoyo
  • Members
  • 9 messages
How do I apply it to the Invis VFX, exactly? Do I just open up the sef in notepad and paste in the script at the end? Or am I way off?

#10
MasterChanger

MasterChanger
  • Members
  • 686 messages
I just compiled (but did not test) a script to apply and a script to remove the VFX. I uploaded it to DropBox (unzip with WinRAR or 7zip).

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. :) Glad to help.

Modifié par MasterChanger, 13 juillet 2011 - 05:27 .


#11
countyoyo

countyoyo
  • Members
  • 9 messages
Beautiful! Thanks, gonna try right now.

#12
countyoyo

countyoyo
  • Members
  • 9 messages
I must be doing it wrong. Ok, I put the M. Rieder's invisibility sef in my override along with your scripts. Then, in game I bring up console, type debugmode 1, then "rs <Apply_Invis>" (without quotes, of course) and get an unsuccessful attempt error. I tried it like this too: "rs Apply_Invis" and get a successful attempt response, but notice no change and my character is still there. Would any of the mods I have installed conflict with this? I'm gonna remove the (nearly) first person mod just to check without that. Once again, you are too kind for helping me!

Modifié par countyoyo, 13 juillet 2011 - 06:43 .


#13
countyoyo

countyoyo
  • Members
  • 9 messages
Well I removed that mod and still no difference...I have lots of other mods installed, namely: Tony's Companion AI mod, OC Makeover patch SoZ edition, Spell Impovements v6.04, Universal Companions, Trees Textures Overhaul, Rod of Preparation, Feat Fixes, Kornstalxs_HotKeys_v1.05a, and a bumped terrain texture pack. Could any of these be causing a conflict with your script?

#14
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages
The script isn't correct. The main PC is not in the roster but the script is checking to see if the target is in the roster. These scripts will work:

// 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
MasterChanger

MasterChanger
  • Members
  • 686 messages
 Thanks for the fix, Kaldor. Since I've never actually done party-based scripting, I have a hard time remembering the owned/roster/party distinctions. And I didn't have the chance to actually test the scripts.

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
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Oh my god! I never thought of using that VFX to give the appearance of FPS! Great thinking! Can't wait to see how it works out. If you get a working copy, you should put it up on the vault because there are lots of people who want a NWN2 FPS.

#17
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
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.

#18
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages
You could still kill an invisible enemy with an AoE spell I suppose.

#19
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages
Hi All,

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. Posted Image In brief, when you "zoom in" to get as close to the PC as possible, you effectively "go inside" your PC, meaning you do not see the PC around you. However, to all other players and creatures, you remain visibile as normal.

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. Posted Image

Lance.

Modifié par Lance Botelle, 24 juillet 2011 - 06:12 .


#20
MasterChanger

MasterChanger
  • Members
  • 686 messages

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
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages
I've uploaded to the vault my new Character Visibility Context Menu UI enhancement. This will add to the context menu displayed when you right-click on a selected PC (or cohort) a menu option for altering the visibility to either transparent or ghostlike.

Get it here.

Regards

Modifié par Kaldor Silverwand, 26 juillet 2011 - 02:30 .


#22
Kaldor Silverwand

Kaldor Silverwand
  • Members
  • 1 585 messages
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

Modifié par Kaldor Silverwand, 26 juillet 2011 - 04:16 .


#23
MasterChanger

MasterChanger
  • Members
  • 686 messages
 Kaldor, using the context menu is a fantastic way to implement this! That combines ease of use with some parameters to limit the ability for things to go haywire. A number of other projects do override the context menu but merging should be easy enough.

Very clever! :wizard:

#24
M. Rieder

M. Rieder
  • Members
  • 2 530 messages
Hey, that's neat. I may try it out.

#25
Lance Botelle

Lance Botelle
  • Members
  • 1 480 messages

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 .