logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
nwnx_funcs for windows
Goto page Previous  1, 2, 3 ... 12, 13, 14 ... 27, 28, 29  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Mon Jul 05, 2010 15:47    Post subject: Reply with quote

Umm...

OK. Looked at the new source up in the svn, and it says the current version is 0.82 (with some nifty new stuff added).

...but I've not ever actually successfully compiled a windows .dll before. The day I spent beating on it (a ways back) was a miserable failure.

Can someone point me at a set of instructions?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Jul 05, 2010 20:20    Post subject: Reply with quote

Sethan wrote:
Umm...

OK. Looked at the new source up in the svn, and it says the current version is 0.82 (with some nifty new stuff added).

...but I've not ever actually successfully compiled a windows .dll before. The day I spent beating on it (a ways back) was a miserable failure.

Can someone point me at a set of instructions?


Sorry about that. I've updated the download on its nwvault page.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Sethan



Joined: 04 Oct 2008
Posts: 47

PostPosted: Mon Jul 05, 2010 21:21    Post subject: Reply with quote

No need to apologize, Maxrock - you're doing awesome stuff!

...and thank you for the update Smile
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Jul 09, 2010 0:54    Post subject: Does it require? Reply with quote

Hey Max,
Does the nwnx_areas plugin in your branch REQUIRE resman?

I tried compiling it, loading it up, and got the following error.

Quote:

* An error occured while loading extension areas (126: The specified module could not be found. )




Can you provide a compiled version of these dlls?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Fri Jul 09, 2010 1:13    Post subject: Reply with quote

It shouldn't depend on resman.
If possible, it grabs the resource path for resman from the nwnx.ini but that's about it.

I've uploaded my latests nwnx_areas.dll here:
http://sourceforge.net/projects/mrnwnxstuff/files/
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Fri Jul 09, 2010 1:17    Post subject: thats great Reply with quote

Cool,
I had just finished coding a system into my module, which would allow for a 'spectral realm'

Basically, you die.... respawn in a duplicate area of the area u are in, but it is empty of everything, and has different color scheme etc..

After defeating some enemies, the player can then, re-enter their corpse, to resurrect.

The error I was getting, obviously put a kink in my plans. Lol
I think it might have been due to the method I was compiling it.

I usually compile using Visual c++ 6.0

But the only thing I seem to be able to open your project/plugins with, is Visual Studio 2010, and it has never been good for nwnx plugins.

I had to comment out the MadCHook API declaration inside it, to get it to compile... it kept saying that it does not allow for overloaded external c++ functions or something....

Its possible this is why it wouldnt load up... Lol


What do you guys use to build your projects? So I can upgrade.
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Fri Jul 09, 2010 11:02    Post subject: Re: thats great Reply with quote

Baaleos wrote:
Cool,
I usually compile using Visual c++ 6.0

But the only thing I seem to be able to open your project/plugins with, is Visual Studio 2010, and it has never been good for nwnx plugins.



I use Visual Studio 2008 Express. Works fine if you can do without ATL and MFC and you can scroll with your mouse wheel!
I haven't seen 2010 but with 2008 there's only 2 settings that need to be changed after using the dll wizard:

- Project Settings->General->Character Set: "Use Multi-Byte Character Set"
Otherwise the nwnx core won't compile

- Project Settings->C/C++->Code Generation->Runtime Library: "Multi-threaded (/MT)"
Multi Threaded DLL requires (default) requires whoever wants to use the dll to have a some other dlls - which come with visual studio and probably some SDK.

BTW, Zebranky has started a thread about converting the windows trunk repository to VS2008.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Balanor



Joined: 13 Jun 2005
Posts: 29

PostPosted: Sun Jul 11, 2010 17:08    Post subject: NWNXFuncs_SetSoundSetID Reply with quote

Hey Max. First off - thanks so much for getting this over to Windows. It's going to have a big impact on our subrace systems and random NPC modification.

To randomize our NPCs a little bit more, I've been trying to use the NWNXFuncs_SetSoundSetID function and it doesn't appear to be working. Just throw this code in a trigger and run across it with a PC and the NWNXFuncs_SetSoundSetID always seems to set the sound ID to 0. Any idea why that could be happening? I'm using version 0.82.

Code:

#include "nwnx_funcs"

void main()
{
  object oNPC = GetEnteringObject();
  SendMessageToPC(oNPC, "Your current voice ID is "+IntToString(NWNXFuncs_GetSoundSetID(oNPC)));
  NWNXFuncs_SetSoundSetID(oNPC, 241); //Change to Aarin Gend voiceset
  SendMessageToPC(oNPC, "Your new voice ID is "+IntToString(NWNXFuncs_GetSoundSetID(oNPC)));
}
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Jul 11, 2010 18:46    Post subject: Not suer Reply with quote

Not sure, but I think you might have made a mistake with the SetEventScript


In the previous version I was using, it was
SetAreaEventScript or something like that, and it worked.

However, I just downloaded, the latest NSS, script, put replaced my old nss script for nwnx_funcs and updated the module, but now it wont set the Area Script.

The nss and the module came from the same rar file on vault, but the module/dll had the same file size and creation date as the old module I was using....

Quote:

- StrReq: "SETEVENT" Params: "0 spectral_hb"
o SetEvent: |0|0 spectral_hb|
o SetEvent: strspn [1], strlen [13]
o Error (SetEvent): New event script name contains invalid characters or is too long.



I mean, it worked before, with the SetAreaEventScript
I dont know why the string length would be considered too long for it now.
Unless it is not liking the underscore?

Found this in the most recent source, is it possible that the nwvault version is using this commented out source instead? Im kinda at a loss at how to build this project. Lol I cant seem to download VS C++ 2008, because my BITs part of windows doesnt wana download windows updates for some reason, and the project doesnt wana build in VS C++ 2010 because of the following error.
Quote:

error C2733: second C linkage of overloaded function 'CreateRemoteThreadEx' not allowed

Code:

/*
   int iEvent;
   sscanf(Params, "%dŽ%s", &iEvent, Params);
   _log(3, "o SetEvent: |%i|%s|\n", iEvent, Params);
   
   // check new event string for validity
   _log(3, "o SetEvent: strspn [%i], strlen [%i]\n", strspn(Params, "abcdefghijklmnopqrstuvwxyz012345679_"), strlen(Params));
   if ((strlen(Params) < 0 || strlen(Params)>16) ||
      (strspn(Params, "abcdefghijklmnopqrstuvwxyz012345679_") != strlen(Params)))
   {
      _log(2, "o Error (SetEvent): New event script name contains invalid characters or is too long.\n");
      sprintf(Params, "-1");
      return 0;
   }
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Sun Jul 11, 2010 20:38    Post subject: Reply with quote

Allright, I've changed the nwvault page to get the files from sourceforge. That way I don't have to wait for whatever their file approval (or whatever it is) to kick in.
The archive on the vault was still the old one; I just uploaded a new archive 3 times but on the download side it was trying to give me an old version.


Last edited by MaxRock on Sun Jul 11, 2010 20:43; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Jul 11, 2010 20:42    Post subject: ah that explains it Reply with quote

If you need any web hosting on the off chance.... I have several Webhost reseller accounts. Lol

Nothing like managing your own website/webspace.

I will give the sourceforge compiled dll a go.


Still cant get vs 2008 to install on my machine...
Its because MS make me use this stupid Web Installer, and it keeps crashing.

I managed to get VS 2010 C++ Express, which behaves just like 2006 does, except it gives the bad message about the overloaded c linkage with the hookapi call?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Sun Jul 11, 2010 20:50    Post subject: Re: ah that explains it Reply with quote

Baaleos wrote:

Still cant get vs 2008 to install on my machine...
Its because MS make me use this stupid Web Installer, and it keeps crashing.


Have you tried downloading the iso image?

http://www.microsoft.com/express/Downloads/
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Jul 11, 2010 21:00    Post subject: LOL Reply with quote

Downloading the ISO now... didnt see it..

In any case, the Sourceforge dll / nwnx_funcs rar file, which was uploaded today, actually contains the same version dll that I had before.

(created/modified on the 29th June)

I will give it a go, and see if it can set the event script.


edit====
Still getting the same errors about the event script length/invalid characters.
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Jul 11, 2010 21:18    Post subject: LMAO Reply with quote

Lol... got to 99% downloaded, when I realised it was downloading vs2010.....

I chose 2008, but the stupid browser refreshed when I allowed it to use the activeX thing.... so It made me inadvertintly choose vs2010 instead of reselecting 2008....

BALLZ.
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Sun Jul 11, 2010 21:57    Post subject: Reply with quote

Ok, one more try with uploading to sourceforge.
... I think I need a vacation, or a memory upgrade, or something.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Goto page Previous  1, 2, 3 ... 12, 13, 14 ... 27, 28, 29  Next
Page 13 of 29

 
Jump to:  
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