View previous topic :: View next topic |
Author |
Message |
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sun Jul 11, 2010 22:02 Post subject: build problems? |
|
|
Woot... I can build!!
2008 Really does work better than 2010... who'd a thought.
I had to remove the Post-Build event though, it was throwing up an error, because I dont have e:\Games\nwn on my hard drive. |
|
Back to top |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Sat Jul 17, 2010 0:42 Post subject: |
|
|
Figured I'd ask here since nwnx_funcs has a lot of effect-related functions. So here goes...
We've got a number of custom spells on our server but I've had to do a bunch of hacky workarounds to get them to work properly.
As far as I know there's not a way to add new effects (via 2das or whatever) because you can't call them from NWScript. But please, correct me if I'm wrong - and let me know how to do it
So my question is: Is it possible to add the effect icon to a player's screen without actually making the effect work? Basically, I just need the effect icon to display for a certain amount of time and then I'll handle the custom stuff behind the scenes.
I'm hoping this is possible but I couldn't make heads or tails of IDA. I think it's a little outside my skills at the moment. ><
Thanks for any help. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sat Jul 17, 2010 1:01 Post subject: Possible yes |
|
|
Yes, it would be possible,
I just checked in IDA, there are functions inside nwnserver.exe which directly handle the updating of icons on the HUD, as well as functions for clearing etc.
I believe a constructor would be needed just as the item properties are handled this way.
<Note - I did actually try to post the 6 functions I saw in IDA which looked promissing, but nwnx forums logged me out.....> |
|
Back to top |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Sat Jul 17, 2010 1:32 Post subject: Re: Possible yes |
|
|
Baaleos wrote: | Yes, it would be possible,
I just checked in IDA, there are functions inside nwnserver.exe which directly handle the updating of icons on the HUD, as well as functions for clearing etc.
I believe a constructor would be needed just as the item properties are handled this way.
<Note - I did actually try to post the 6 functions I saw in IDA which looked promissing, but nwnx forums logged me out.....> |
Okay, that's good to know at least. What's the next step now that we know it's possible? Sorry, I'm trying to learn but I'm really out of my element here |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sat Jul 17, 2010 1:34 Post subject: |
|
|
While I believe its possible, I myself have no experience at creating such things.
But from the looks of things, it would probably be similar to the creation of item properties constructors which I think is included in nwnx_funcs.
It would be up to Maxrock to determine if he wants to give it a try. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Jul 20, 2010 22:12 Post subject: Sound Object Modifications?? |
|
|
I've just realised it is possible to play sounds (wav) sounds in my module without the need for hak's.
By putting the sounds in the override folder, the sounds are playable, via PlaySound("my_sound");
However, I am unable to put these sound effects or sound files into placeable sound objects, because they apparently require them in hak's.
I 'think' nwnx_funcs, would be capable of doing behind the scene modifications, to push a filename into the sound object.
Eg - Even if the sound doesnt appear in the hak's bypass that, and just try to play whatever wav file is specified.
I mean, the sound plays via PlaySound, it should work from a placeable sound just as well. The only thing preventing it from working, is toolset not letting me select the wav file, that I know does infact work.
Any chance you could add a function/method or two for Placeable Sound objects.
I just checked, there doesnt appear to be any native nwn method to program the placeable sound objects, beyond toggling it on and off. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Jul 20, 2010 23:37 Post subject: Re: Sound Object Modifications?? |
|
|
Baaleos wrote: | I've just realised it is possible to play sounds (wav) sounds in my module without the need for hak's.
By putting the sounds in the override folder, the sounds are playable, via PlaySound("my_sound");
However, I am unable to put these sound effects or sound files into placeable sound objects, because they apparently require them in hak's.
I 'think' nwnx_funcs, would be capable of doing behind the scene modifications, to push a filename into the sound object.
Eg - Even if the sound doesnt appear in the hak's bypass that, and just try to play whatever wav file is specified.
I mean, the sound plays via PlaySound, it should work from a placeable sound just as well. The only thing preventing it from working, is toolset not letting me select the wav file, that I know does infact work.
Any chance you could add a function/method or two for Placeable Sound objects.
I just checked, there doesnt appear to be any native nwn method to program the placeable sound objects, beyond toggling it on and off. |
Nice to know, however client still needs that file because server send him play that file right? Or server send the whole sound - not very likely?
Btw isnt just possible to add it via override? That way you will be able to create the sound object and place it in toolset. Then I wonder if it will play . But if not its probably looking for 2da line - Set2da function could do the job. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Tue Jul 20, 2010 23:43 Post subject: |
|
|
I have tested this, it works.
I have audio file - umah_bloodis2.wav in override.
I make a placeable, usable, with script
Code: |
void main()
{
PlaySound("umah_bloodis2");
}
|
Click on the placeable, and guess what...
The audio plays.
I did experiment with 2da alterations in trying to get this to work, but found that 2da edits were not required, I do not have any edited 2das in my override beyond the ambientmusic.2da which is for area music, not placeables music.
As far as clients getting the music files, I have this covered.
I have created a c# application that updates my clients content required for my module.
As for audio files, I know these, as wav's are large download sizes, but I came up with a resolution for that.
I store them as mp3 on remote server, then the application downloads the mp3s to a temporary 'conversion' folder, and then processes the saved mp3's and converts them to wav, which then expands their filesize to the uncompressed pcm format, which then works in nwn.
I've tested this all,
I use the Application to allow my clients to install the custom
AmbientMusic.2da,
bmu files,
and the wav files for the placeable music and speech.
Note - Made the Application smart too.
It downloads a file list first, from the remote website, in xml, which has an md5 of the files required, and compares them to the local files.
If File doesnt exist,
or
MD5 does not match
Adds it to a download queue.
If the file is marked as DELETE (no longer required), the updater will check to see if this custom content file is present, and removes it as necessary.
The conversion of the audio, is made possible by ffmpeg.exe - open source tool. I bundle this with the file, so it gets used to process the mp3s, turning them into wavs.
The whole point of the conversion, is to prevent large download times.
26 seconds of wav file = 2mb
26 seconds of the same wav file as an mp3 = 127kb. |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Wed Jul 21, 2010 0:11 Post subject: |
|
|
Yea I understand, and random players will still be able to log in to your server. _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Jul 21, 2010 0:16 Post subject: |
|
|
Yip
Im using this method, because it makes the new content optional.
Where as haks would say
"Feck off... you need the haks to get in here" - Im sure someone could customize their tlk file to say that....
So far, the only custom content I use, besides cep2.3
is
bmu,
wav,
2da's.
And each of these, are voluntary, and will not block the players path should they decide not to download them.
Eg - They might not hear the music etc, but they can still play the game.
But anyway, with this in mind, surely it would be possible to modify a placeable sound objects soundfile parameter during a server session?
Perhaps although toolset does not support the wav files in the manner I am using them, but nwnserver with nwnx can support them.
I mean, it is wav files that the placeable sound objects use, and override folder more a less duplicates in a global scale, what a hak does anyway.
If PlaySound() can access these sounds, couldnt a sound object, if we told it what to play? |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Sat Jul 24, 2010 2:29 Post subject: |
|
|
I've changed the comments in nwnx_funcs.nss to be parsable by doxygen and uploaded the result (vault or my sourceforge page).
If nothing else, this should give at least an overview of what functions are there.
Edit: I'm still trying to figure out doxygen, especially how to get a sorted function index in the left frame.
Last edited by MaxRock on Sat Jul 24, 2010 3:18; edited 1 time in total |
|
Back to top |
|
|
Sethan
Joined: 04 Oct 2008 Posts: 47
|
Posted: Sat Jul 24, 2010 2:34 Post subject: |
|
|
I actually made a master list of the functions, based on your release notes, for our developers. I can post it here, or send it, if desired.
[Edit: Nevermind - what you made is better ] |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sat Jul 24, 2010 3:27 Post subject: bug? |
|
|
Possible bug?
I was testing my new module with some players, and the server kept crashing, and I think I narrowed it down to our whisper system, which uses the ApplyEffectsForPC (the subjective effects function).
There was 4 of us in the module at the time, myself being a DM.
Quote: |
o Error: ApplyVFXForPC used on invalid object.
- StrReq: "APPLYVFXFORPC" Params: "140 70.281204224 24.958147049 2.000000000"
- StrReq: "APPLYVFXFORPC" Params: "140 74.448974609 51.945522308 2.000000000"
- StrReq: "APPLYVFXFORPC" Params: "140 62.085998535 30.957481384 2.000000000"
- StrReq: "APPLYVFXFORPC" Params: "140 0.000000000 0.000000000 2.000000000"
|
Shortly after this, it crashed.
Im just wondering, would this cause a crash, if it tried to add a subjective effect for a player possessing a creature?
I have the script to apply the effect for all players who have a certain variable on them, I added the variable to this npc I was possessing, just to test things out.
When I sent a whisper (which is accompanied by the subjective effect) the server crashed.
Im noticing that for the 4th person/player, possibly myself in dm mode, possessing the npc, its X/Y coordinates are messed up.
Its my suspicion, that because the DM avatar essentially gets sent to limbo, when possessing someone, that the subjective effect will crash the server when trying to apply a visual effect in limbo.
So...
I guess the way to fix this, is to ensure that GetArea(oTarget) != OBJECT_INVALID or something.
To ensure the target is not in limbo? |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Sat Jul 24, 2010 23:37 Post subject: |
|
|
Yes, that is most likely it. The area is taken from the object the effect is applied to and I suppose Limbo isn't really an area |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sun Jul 25, 2010 0:42 Post subject: Cool |
|
|
The way I have resolved it, is to just edit my script to check if the target is DM or Non Player.
If it is either, then it will still try to send the 'whisper' but will avoid the visual effect.
This is a tutorial video of the module I am building. It is made possible by quite a few of the functions from your nwnx_funcs, as well as the nwnx_areas.
http://www.youtube.com/watch?v=JcYA5Sk5pX4
The Premonition effect, is a visual effect used by vampires to sense objects of interest, the aura is only visible to the vampire who uses it, so it simulates a perception power.
The tutorial areas themselves, where generated on the fly by the nwnx_areas plugin, because if one player joined the tutorial area while another player was going through it, it could cause interference with the first players experience. The resolution, was to give each player their own tutorial areas.
The areas also destroy themselves once the player exits them respectfully.
The nwnx_areas plugin, also allowed me to make special doors, which would automagically, create dynamically spawned interiors to the houses they are attached to. Allowing 100's of house interiors to be made in toolset, basically by painting the door as many times as needed.
The interiors are generated on the onDoor Open event, (only on the first door open event).
Just thought you might like to see what your plugins get used for.
Note - this module is still in development, myself and 2 other people are working away at area creation etc.
http://www.Nosgoth.azmodan.net |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|