Author Topic: I'm Accepting Short Term / Small Project Request...  (Read 683 times)

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« on: September 15, 2011, 12:01:36 am »


               I'm accepting request for short term / small projects...

I'm not going to script you anything intensive like a forge or module event scripts, but I'm willing to help you guys while I got the time this week!

So get your request posted below and I'll snap you out a fix ASAP!
               
               

               
            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #1 on: September 15, 2011, 10:44:48 pm »


               Hi there,

I'm in the process of creating scripts so servervault PCs can be modifed in-game (a PW), without having to edit their Bic files directly.  I've got a fair bit working, but can't seem to get soundsets to change.  If you have any ideas on this, or could knock something up that would allow this to be done, that would much appreciated!

Thanks, AK
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #2 on: September 16, 2011, 05:53:27 pm »


               I'm not aware of any way to change a creature's soundset in game without using NWNX2 + Leto, which indeed would require you to edit the bic file...

I know there is a resource on the nwvault.ign.com which is already premade for something like this.

Anyways, making a system like this is beyond my abilities, as I do not code in nwnx, sorry.
               
               

               
            

Legacy_Xardex

  • Sr. Member
  • ****
  • Posts: 414
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #3 on: September 16, 2011, 06:04:05 pm »


               nwnx_funcs allows you to change any and every aspect of a PC character without booting them, including soundsets. In my opinion there is no reason to use nwnx leto unless you are a masochist.
               
               

               


                     Modifié par Xardex, 16 septembre 2011 - 05:04 .
                     
                  


            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #4 on: September 16, 2011, 06:13:56 pm »


               

Xardex wrote...

nwnx_funcs allows you to change any and every aspect of a PC character without booting them, including soundsets. In my opinion there is no reason to use nwnx leto unless you are a masochist.


Excuse me, nwnx_funcs would require you to be hosting a nwnx server, correct? 

I don't know how to use nwnx functions, unfortunately.
               
               

               


                     Modifié par _Guile, 17 septembre 2011 - 04:36 .
                     
                  


            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #5 on: September 16, 2011, 07:13:42 pm »


               You can certainly edit characters without leto in-game.  I'm trying to use nwnx_funcs to get and set the soundset files (ie NWNXFuncs_SetSoundSetID), but the windows version doesn't seem to work.  Unless it's something I'm doing wrong.  Has anyone used the Windows version of nwnx_funcs and been able to modify soundsets on the fly?
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #6 on: September 16, 2011, 09:13:36 pm »


               I used this code, but it didn't work for me either..

#include "nwnx_funcs"

void main()
{
   object oPC = GetLastUsedBy();
   FloatingTextStringOnCreature(IntToString(NWNXFuncs_GetSoundSetID(oPC)), oPC, TRUE);
   NWNXFuncs_SetSoundSetID(oPC, 241);
}

It shows My Voice Set was 0...
It did however change my voiceset, lol althought it wasn't 241...

Don't know why it's not working correctly...

Also I don't understand why it sets & deletes the integer in the custom functions in the same function, that in itself seems like bad scripting..

void NWNXFuncs_SetSoundSetID(object oCreature, int iSoundSetID) {
    SetLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID", IntToString(iSoundSetID));
    DeleteLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID");
}

This is what the Log File read...

Windows NWNX Funcs plugin v.0.0.8.4 [log level: 3]
[09/16/2011 15:37:42] * CreateLookupTable
[09/16/2011 15:37:42] * CreateNewGeometry hooked
[09/16/2011 15:37:42] * CustomEffect function hooked
[09/16/2011 15:37:42] * CNWVirtualMachineCommands__ExecuteCommandGetItemPropertyType hooked
[09/16/2011 15:37:42] * CNWVirtualMachineCommands__ExecuteCommandItemPropertyEffect hooked
[09/16/2011 15:37:42] * CNWSMessage__TestObjectVisible hooked
[09/16/2011 15:37:42] * CNWSCreatureStats__GetEffectImmunity hooked
[09/16/2011 15:37:42] * CServerExoAppInternal__RemovePCFromWorld hooked; script to run: onplayerleaving.nss
[09/16/2011 15:38:20] - StrReq: "GETSOUNDSETID"           Params: "-"
[09/16/2011 15:38:20] - StrReq: "SETSOUNDSETID"           Params: "189"
[09/16/2011 15:38:25] o CServerExoAppInternal__RemovePCFromWorldHOOK running
[09/16/2011 15:39:30] - StrReq: "GETSOUNDSETID"           Params: "-"
[09/16/2011 15:39:30] - StrReq: "SETSOUNDSETID"           Params: "189"
[09/16/2011 15:39:47] o CServerExoAppInternal__RemovePCFromWorldHOOK running


So it should be working (Technically), but it's not working correctly, unfortunately, though it will change the sound set one time...(to the same soundset, but the wrong one)
               
               

               


                     Modifié par _Guile, 16 septembre 2011 - 08:42 .
                     
                  


            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #7 on: September 16, 2011, 09:50:56 pm »


               This is about where I got to.  Steps to test:

~ Create a bog standard fighter PC and choose one of the standard voices
~ Use an editor to view the Bic file (GFF for instance) - the soundset will show as a number - 218 for instance
~ Use the NWNXFuncs_GetSoundSetID(oPC) function in a script to get the soundset

Now ... this should return 218, but what it actually seems to do is set the soundset to 0.  You can test this by logging out and using GFF to examine the Bic file again - and it shows the soundset at 0.

So - doing nothing but trying to obtain the soundset ID actually sets it.  Something's wrong there.

My current thoughts are that nwnx_funcs (and in particular the soundset functionality) only works on Linux based servers, and the Windows port (which isn't complete) has some bugs.

Perhaps if someone has a Linux NWNX setup, they could test this theory!?

An alternative is to look at the Leto system, which in my limited understanding means making the change to the PC, then forcing a relog in order that the change takes effect.  Not sure if a "servervault save" would do the same.  Also, if the soundset can't be changed on-the-fly, it's a tricky one for PCs to use, as they can't preview it and choose another if they don't like it.

Wonder what happens if the NWNXFuncs_GetSoundSetID functions are used on NPCs - does that work, and it's only PCs it fails on??  ...... ':huh:'
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #8 on: September 17, 2011, 05:33:56 am »


               If you do a search on the nwvault.ign.com for the word "carmen" you will find a nwnx module (it's old) that can change the soundset in game, I looked at his scripting & it just blows my mind, really.

I'm not a nwnx scriptor, as I stated above, and yes, it's clear to me that this nwnx functions is either bugged or improperly setup by the both of us.

Maybe the wise guy above can shed some light on us on how he can get "anything" to work in nwnx. lol.
               
               

               


                     Modifié par _Guile, 17 septembre 2011 - 04:34 .
                     
                  


            

Legacy_Failed.Bard

  • Hero Member
  • *****
  • Posts: 1409
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #9 on: September 17, 2011, 06:26:27 am »


               It looks like the Set and Get calls are backwards in the routines.  I just did a quick test, making these changes in nwnx_funcs, and it seems to work now. (Lines 1508-1518 in mine)

int NWNXFuncs_GetSoundSetID(object oCreature) {
   SetLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID", "-");
   int ret = StringToInt(GetLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID"));
   DeleteLocalString(oCreature, "NWNX!FUNCS!SETSOUNDSETID");
   return ret;
}

void NWNXFuncs_SetSoundSetID(object oCreature, int iSoundSetID) {
   SetLocalString(oCreature, "NWNX!FUNCS!GETSOUNDSETID", IntToString(iSoundSetID));
   DeleteLocalString(oCreature, "NWNX!FUNCS!GETSOUNDSETID");
}


 If someone else could try that little "fix" to confirm, I'd appreciate it.  It'll obviously need a proper dll fix for it eventually if that's what the problem is, as it seems to be in my testing.
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #10 on: September 17, 2011, 08:25:50 am »


               Thanks a lot failed bard, I tested this, it is indeed working. '<img'>

I made two scripts for a conversation to change the PC's Voiceset (next & previous voicesets)


//----------------------------------------------------------
//next_vs  (Next Voice Set)

//This script goes in the Action Taken of the line that will give the PC The Next Voiceset...

#include "nwnx_funcs"

void main()
{
  object oPC = GetPCSpeaker();

  //Stop here if oPC is Invalid Object.. (Just in case!)
  if(oPC == OBJECT_INVALID) {return;}

  int nVoiceSet = NWNXFuncs_GetSoundSetID(oPC);

  nVoiceSet +=1; //Next!

   //Give the PC the next Voiceset from the 2da File
   NWNXFuncs_SetSoundSetID(oPC, nVoiceSet);
}

//----------------------------------------------------
//prev_vs (Previous Voice Set)

//This script goes in the Action Taken of the line that will give the PC The Previous Voiceset...

#include "nwnx_funcs"

void main()
{
  object oPC = GetPCSpeaker();

  //Stop here if oPC is Invalid Object.. (Just in case!)
  if(oPC == OBJECT_INVALID) {return;}

  int nVoiceSet = NWNXFuncs_GetSoundSetID(oPC);

  nVoiceSet -= 1; //Previous!
 
  //Prevent error!
 if(nVoiceSet <1)
 {
  nVoiceSet =1;
  SendMessageToPC(oPC, "You have reached the first voiceset and can go back no further!!");
 }

   NWNXFuncs_SetSoundSetID(oPC, nVoiceSet);
}

//-------------------------
 I tested both of these scripts, they are both working flawlessly. '<img'>

Hope that helps your venture in voice set changing.
               
               

               


                     Modifié par _Guile, 17 septembre 2011 - 07:50 .
                     
                  


            

Legacy_Aradan Kir

  • Jr. Member
  • **
  • Posts: 57
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #11 on: September 17, 2011, 10:26:08 am »


               YES!  This works!  Thanks so much guys - really helpful and very much appreciated! :happy:
               
               

               


                     Modifié par aradankir, 17 septembre 2011 - 09:26 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #12 on: September 17, 2011, 02:08:42 pm »


               I could use a hand with a improving default item appearance crafting convo:
- if possible not to use 2da so be compatible with any custom content
- allow change appearance of a shield

are you willing to help me with this? its for my patch project. Thanks.
               
               

               
            

Legacy_Taino

  • Sr. Member
  • ****
  • Posts: 268
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #13 on: September 17, 2011, 02:53:44 pm »


               Would you like to do a subrace/creature faction script? Like how you stated in the post I posted... =)
               
               

               
            

Legacy__Guile

  • Hero Member
  • *****
  • Posts: 1308
  • Karma: +0/-0
I'm Accepting Short Term / Small Project Request...
« Reply #14 on: September 17, 2011, 02:59:23 pm »


               

ShaDoOoW wrote...

I could use a hand with a improving default item appearance crafting convo:
- if possible not to use 2da so be compatible with any custom content
- allow change appearance of a shield

are you willing to help me with this? its for my patch project. Thanks.

I acutally have most of the crafting done, for 1.69 & CEP 2.4, never used 2das..

You just want 1.69 or also CEP 2.4?

Naturally I'm going to have to make a bunch of text files and put them in a .rar file
so you can download it and rip the code you want.
It would be to lengthy to post the code here in this thread.

I sent you a message with the scripts for shields, that should give you an idea of how I scripted crafting.

Taino wrote...
Would you like to do a subrace/creature faction script? Like how you stated in the post I posted... =)

A system like that is rather complex, it would be very time consuming just to plan it, unfortunately. '<img'>
I don't have that much extra time.  Just a week or two to help with small projects, so I want to keep them small.
               
               

               


                     Modifié par _Guile, 17 septembre 2011 - 02:17 .