Author Topic: nwnx_leto problem  (Read 688 times)

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
nwnx_leto problem
« on: April 21, 2015, 07:27:40 pm »


               

Okay so currently we have a PRC, CEP mod.


This module runs at about 2-3% load.


As soon as we add nwn_leto pluggin the load hits 100%, at idle..


Does anyone have any info on this? I'm stumped..


It doesn't appear to be any resource or duplicate conflicts, database corruption shouldn't be a problem since it works without the plugin enabled. Help please '<img'>



               
               

               
            

Legacy_kuronue bloodlust

  • Full Member
  • ***
  • Posts: 217
  • Karma: +0/-0
nwnx_leto problem
« Reply #1 on: April 22, 2015, 12:09:29 am »


               

Umm isnt leto a Player modifyer tool? i think its kinda obsleate now unless you have a known list of current resorce codes. speaking of if you do that can be ued for a more sesfic body talior please share links?



               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
nwnx_leto problem
« Reply #2 on: April 22, 2015, 12:30:12 am »


               

Leto is a player modification tool - yes


nwnx_leto is the plugin that allows offline modifications of a players bic file. (offline as in the player needs to be logged out for a second etc)


 


Interestingly enough, Leto and nwnx_leto are basically just  gff editors, to it can in theory alter items, creatures, waypoints, placeables, as well as character files.


 


nwnx_leto  - is somewhat redundant, but it in itself can never go out of date functionality wise, as the nwscript you feed through to it allows you to specify what modifications to make.


So nwnx_leto will always work - but it is just not as popular as nwnx_funcs - which can do the modifications online.


 


The resource nodes can be viewed from the leto application in advanced mode.


Eg: its like something like


 


/cha


/int 


/str    etc


 


/feats/featlist/0/ 


 


I used to be pretty good at nwnx_leto scripting, but havent needed to use it for years because nwnx_funcs does everything I need.


 


 


In response to the original poster-


Have you tried using nwnx_profiler - to see what scripts are being invoked so regularly.


Also - do you have nwnx_leto and Letoscript.dll


I think they are both needed.



               
               

               
            

Legacy_Savagefool

  • Jr. Member
  • **
  • Posts: 92
  • Karma: +0/-0
nwnx_leto problem
« Reply #3 on: April 22, 2015, 11:11:21 am »


               

ConvoCC for PrC requires Letoscript, that was my reason for asking. I'll suggest it to the back-end guy, I think if he doesn't figure it out he'll create a more indepth post here somewhere. Thank you for the quick reply!



               
               

               
            

Legacy_Halgroth

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
nwnx_leto problem
« Reply #4 on: April 30, 2015, 09:38:56 pm »


               

I'll attempt to provide more detail. Any help on the matter would be greatly appreciated.


 


 


System specifications


 


OS: Ubuntu 14.04 x86_64


NWNX: Compiled from sources (github.com/NWNX/nwnx2-linux)

NWNX plugins:        nwnx_funcsext.so          nwnx_reset.so


nwnx2.so                   nwnx_funcs.so               nwnx_resman.so

nwnx_areas.so          nwnx_functions.so         nwnx_serverlist.so

nwnx_chat.so            nwnx_hashset.so           nwnx_spells.so

nwnx_connect.so      nwnx_leto.so                  nwnx_structs.so

nwnx_defenses.so    nwnx_mnx.so                 nwnx_system.so

nwnx_dmactions.so  nwnx_names.so             nwnx_tmi.so

nwnx_events.so        nwnx_odbc.so                nwnx_tweaks.so

nwnx_extend.so        nwnx_optimizations.so   nwnx_visibility.so

nwnx_fixes.so           nwnx_profiler.so             nwnx_weapons.so

Module haks: PRC3.5, CEP2.4a, Worms tileset


PRC switches: Default


Library dependencies:


$ ldd nwnx_leto.so



linux-gate.so.1 =>  (0xf7704000)

libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76db000)

libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xf75f2000)

libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7443000)

/lib/ld-linux.so.2 (0xf7705000)

libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf73fd000)

libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf73e0000)

 


$ ldd LetoScript.so 

linux-gate.so.1 =>  (0xf777e000)

libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf76d5000)

libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf76d0000)

libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7521000)

/lib/ld-linux.so.2 (0xf777f000)

 



 


Problem description


 


Basically what savage said, but I'll elaborate slightly. At first, running server startup script without nwnx_leto.so in serverdir starts the server perfectly and everything runs fine. No errors reported in the logs. However, upon login the following error shows up in nwserverLog.txt:

 


Error: Letoscript is not setup correctly or it cannot find your bic file. Check nwnx_leto.log for error messages.


 


The attempted client connection is consequently booted. Thus, even though nwnx_leto may be deprecated by nwnx_funcs, I can only conclude the leto plugin is required by PRC as it's the plugin used in the scripts. Next, when we add leto plugin by placing nwnx_leto.so and LetoScript.so in serverdir, we get the behavior that savage described.


 


Startup script also contains the line


export LD_PRELOAD="./nwnx2.so ./LetoScript.so"


 


 


stdout:


NWNX2lib: Init


NWNX2lib: org SetString() at 81f41b4, new SetString() at f7723d96

NWNX2lib: org GetObj() at 81f40bc, new GetObj() at f7723dbd

* Parsing configuration...

NWN Extender v2.8-dev

© 2004 by the APS/NWNX Linux Conversion Group

© 2007-2010 by virusman and Acaos

Based on the Win32 version © 2003 by Ingmar Stieger (Papillon)

and Jeroen Broekhuizen


 

 

Based on the Win32 version © 2003 by Ingmar Stieger (Papillon)

and Jeroen Broekhuizen


 

* Searching for signatures...

* Loading modules...

EVENTS plugin registered.

PROFILER plugin registered.

CHAT plugin registered.

FIXES plugin registered.

AREAS plugin registered.

TMI plugin registered.

SPELLS plugin registered.

TWEAKS plugin registered.

WEAPONS plugin registered.

MNX plugin registered.

OPTIMIZATIONS plugin registered.

RESMAN plugin registered.

FUNCTIONS plugin registered.

SYSTEM plugin registered.

CONNECT plugin registered.

ODBC plugin registered.

HASHSET plugin registered. 

SERVERLIST plugin registered.

FUNCS plugin registered.

DEFENSES plugin registered.

NAMES plugin registered.

FUNCSEXT plugin registered.

STRUCTS plugin registered.

LETO plugin registered.

RESET plugin registered.

DMACTIONS plugin registered.

EXTEND plugin registered.

VISIBILITY plugin registered.

* NWNX2 activated.

Neverwinter Nights Server

Build:8109

Copyright BioWare Corp 1998-2004

 

Server: Loading...

Server: Running...

 

Server: Loading module "test_server"...Killed

 

After those three dots I end up sending kill -9 pid since it'll just stay there at 100% forever. Since the module never finishes loading, there is no plugin log output other than

 


NWNX-Leto Linux module (build 03)

© 2004 by David Frauzel (dragonsong), dragon@weathersong.net

Information and support: http://weathersong.infopop.cc

* Loading LetoScript.so...

* LetoScript plugin activated.

 

Any ideas?



               
               

               
            

Legacy_niv

  • Jr. Member
  • **
  • Posts: 62
  • Karma: +0/-0
nwnx_leto problem
« Reply #5 on: May 04, 2015, 06:52:53 pm »


               

As a first step, try removing all nwnx plugins you are not using. If all you want to have is leto support, move all plugins except nwnx_leto.so out of the server directory. See if it still hangs.


 


After that, see if the module load finishes and OnModuleLoad runs, or if it still hangs while instancing areas.



               
               

               
            

Legacy_TemplarDrake

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
nwnx_leto problem
« Reply #6 on: May 11, 2015, 06:58:16 pm »


               

All right guys thanks for all the feedback! We seem to have killed the above problem! We have a new one now!


 

In the logs we get this error:

 

* Loading LetoScript.so...

* Failed loading LetoScript.so! ./LetoScript.so: undefined symbol: ScriptDll.so

 

Any ideas?

 

- Drake


               
               

               
            

Legacy_TemplarDrake

  • Newbie
  • *
  • Posts: 34
  • Karma: +0/-0
nwnx_leto problem
« Reply #7 on: May 26, 2015, 04:11:03 pm »


               

So we managed to figure out the above problem! But another has popped up!



Here is the refined problem.

We need to set the subrace field to setrace if such a value is inputted.

As ConvoCC is disabled we cannot easily select races. However, the workaround for it was to setrace based on the value set in subrace.

The constants for the races are integer numbers so setting the subrace to say.. 84 for hound archon in order for StringToInt should in theory work.

This needs to happen at the right time otherwise we have numerous problems.

Where can we inject the following code:

 



#include "inc_nwnx_funcs"
/* Check Subrace and set race based on this.
*/
void main()
{
    {
    object oPC = GetFirstPC();
    string sRace = GetSubRace(oPC); //grab the subrace
    int nRace = StringToInt(sRace); //convert to int, use numbers so this goes smoothly.
    if (nRace != 0) //if this returns 0, assume error and no number was input.
        {
        PRC_Funcs_SetRace(oPC, nRace); //set race via funcs.
        }
    }
}


Any ideas?