Server Totals
Elysia - (5)
Deglos - (0)
Le'Or - (0)
Ferrell - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 5
Gallery

Links Menu

APS/NWNX released

Avlis Headlines - www.avlis.org

Moderator: Dungeon Masters

PostAuthor: Papillon » Wed Feb 12, 2003 12:47 am

Dregan, I'm currently working (experimenting) on a new concept for NWNX that doesn't create this overhead.

Actually, I was quite suprised to see a rise in CPU usage when using NWNX, because we didn't notice anything like that on the Avlis servers. Oh well, things like that happen :)

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Pelemele » Wed Feb 12, 2003 3:21 am

Papillon,

Did you download my mod and database schema?

Thanks,
Pelemele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PostAuthor: Papillon » Wed Feb 12, 2003 10:57 am

Yes I did, but unfortunately, when running your mod my CPU hits 100% with and without NWNX, so I used something else (a simple for-loop) to test it.

As said, I'm working on something new (and even better), but it will take some time. APS won't change, btw, so you won't have to change anything in your mod.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Silk » Wed Feb 12, 2003 3:52 pm

Arakiel wrote:No I am not, should I be? I'll attempt that when I get home from work and see what happens.


Yes. Basically, any parameters you can send to nwserver.exe you can also send to nwnextender.exe for the same effect. The extender passes on the parameters to the server when starting it.
Silk

Member of the MadK@t lover's group.
User avatar
Silk
Co-Founder
 
Posts: 6665
Joined: Fri Sep 14, 2001 6:47 pm

PostAuthor: Pelemele » Wed Feb 12, 2003 4:13 pm

Papillon,

Just a fyi, for the first 5 minutes or so, the CPU will be pegged (100%) until the NESS system finishes. It will then begin its heartbeat procedure.

Thanks for your time,
Pele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PostAuthor: Papillon » Wed Feb 12, 2003 6:52 pm

Oh I see. Well, it doesn't make any difference, the problem is the same and I can test it with the loop I mentioned above.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Lafferty » Thu Feb 13, 2003 6:05 pm

Wanted to drop a big thanks for you guys for creating NWNX.

I just played around with it a little and it ROCKS :!:

Though still a question:

- What SQL db are you using?

:arrow: Whiney Peasant :idea:
Tool for crafters Do you want some human to your salt? nomanisanisland.monolar.de
User avatar
Lafferty
Scholar
 
Posts: 1130
Joined: Tue Feb 11, 2003 5:08 pm
Location: look at my hands... they are HUGE. And they cant touch themselves...

PostAuthor: Silk » Thu Feb 13, 2003 7:12 pm

We're using MySQL v3.23
Silk

Member of the MadK@t lover's group.
User avatar
Silk
Co-Founder
 
Posts: 6665
Joined: Fri Sep 14, 2001 6:47 pm

PostAuthor: slabar » Thu Feb 13, 2003 11:26 pm

I am getting this error constantly when trying to save players location while resting. (It does save the location and it works on reload)

o Got request: SELECT val FROM pwdata WHERE player='stevelabar' AND tag='Lomendu
il Danoles' AND name='i_TI_LastRest'
o Sent response (8 bytes): 11067192
o Got request: SELECT player FROM pwdata WHERE player='stevelabar' AND tag='Lome
nduil Danoles' AND name='Last_Location'
o Empty set
o Got request: INSERT INTO pwdata (player,tag,name,val,expire) VAL AND tag='Lome
nduil Danoles' AND name='Last_Location'
! SQL Error: [TCX][MyODBC]You have an error in your SQL syntax near 'VAL AND tag
='Lomenduil Danoles' AND name='Last_Location'' at line 1
o Got request: INSERT INTO pwdata (player,tag,name,val,expire) VALUES('stevelaba
r','Lomenduil Danoles','Last_Location','#AREA#dragon001#POSITION_X# 117.4851
83716#POSITION_Y# 36.915069580#POSITION_Z# 0.000000000#ORIENTATION#
208.174224854#END#',0)


Here's the line of script saving the location.
SetPersistentLocation(oPC, "Last_Location", lLoc, 0);

object oPC = GetLastPCRested();
location lLoc = GetLocation (oPC);

Can anyone tell me what I'm doing wrong please?

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Silk » Thu Feb 13, 2003 11:35 pm

slabar wrote: o Got request: INSERT INTO pwdata (player,tag,name,val,expire) VAL AND tag='Lomenduil Danoles' AND name='Last_Location'

! SQL Error: [TCX][MyODBC]You have an error in your SQL syntax near 'VAL AND tag='Lomenduil Danoles' AND name='Last_Location'' at line 1


Is this a custom routine? If so, could you post the entire script so we can see this code in context.

This SQL is wrong. It looks like it's missing the data and other important stuff.
Silk

Member of the MadK@t lover's group.
User avatar
Silk
Co-Founder
 
Posts: 6665
Joined: Fri Sep 14, 2001 6:47 pm

PostAuthor: slabar » Fri Feb 14, 2003 12:53 am

Silk,

I took it right out of the aps_include file and placed it into my resting script. Here's everything I'm using.

int GetHourTimeZero(int iYear = 99999, int iMonth = 99, int iDay = 99, int iHour = 99)
{
// Check if a specific Date/Time is forwarded to the function.
// If no or invalid values are forwarded to the function, the current Date/Time will be used
if (iYear > 30000)
iYear = GetCalendarYear();
if (iMonth > 12)
iMonth = GetCalendarMonth();
if (iDay > 28)
iDay = GetCalendarDay();
if (iHour > 23)
iHour = GetTimeHour();
//Calculate and return the "HourTimeZero"-TimeIndex
int iHourTimeZero = (iYear)*12*28*24 + (iMonth-1)*28*24 + (iDay-1)*24 + iHour;
return iHourTimeZero;
}

//:://////////
//:: Main Function
//:: Copyright (c) 2002 Brotherhood of Zock
//:://////////
/*
The Main Function of the resting script.
*/
//:://////////
//:: Created By: Timo "Lord Gsox" Bischoff (NWN Nick: Kihon)
//:: Created On: August 04, 2002
//:://////////

// The main function placed in the onRest event

#include "aps_include"
void main()
{
// This Script only affects Player Characters. Familiars, summoned creatures and probably henchmen WILL rest!
object oPC = GetLastPCRested();
// Get location of PC
location lLoc = GetLocation (oPC);
// The ammount of hours a player must wait between Rests (Default = 8 hours)
int iRestDelay = 8;
// The radius around the players that must be free of hostiles in order to rest.
int iHostileRange = 30;
// iHostileRange = 0: Hostile Check disabled
// iHostileRange = x; Radius of Hostile Check (x meters)
// This can be abused as some sort of "monster radar".

// ---------- Rest Event started ----------
if (GetLastRestEventType() == REST_EVENTTYPE_REST_STARTED)
{
// Check if since the last rest more than <iRestDelay> hours have passed.
if (GetHourTimeZero() < GetPersistentInt (oPC, "i_TI_LastRest") + iRestDelay) // i_TI_LastRest is 0 when the player enters the module
{
// Resting IS NOT allowed
AssignCommand (oPC, ClearAllActions()); // Prevent Resting
SetPersistentLocation(oPC, "Last_Location", lLoc, 0);
SendMessageToPC (oPC, "You must wait " + IntToString (iRestDelay - (GetHourTimeZero() - GetPersistentInt (oPC, "i_TI_LastRest"))) + " hour(s) before resting again.");
}
else // Resting IS possible
{
object oCreature = GetNearestCreature(CREATURE_TYPE_REPUTATION, REPUTATION_TYPE_ENEMY);
if (iHostileRange == 0 || (iHostileRange != 0 && GetDistanceToObject(oCreature) <= IntToFloat(iHostileRange)))
{
// If Hostile Check disabled or no Hostiles within Hostile Radius: Initiate Resting
// Place a static bedroll under the player
object oRestbedroll = CreateObject (OBJECT_TYPE_PLACEABLE, "plc_bedrolls", GetLocation (oPC), FALSE);
// Temporary "global" variable. Gets deleted after deletion of the bedroll.
SetLocalObject (oPC, "o_PL_Bedrollrest", oRestbedroll);
// Set Last Rest Time
SetPersistentInt (oPC, "i_TI_LastRest", GetHourTimeZero());
SetPersistentLocation(oPC, "Last_Location", lLoc, 0);

}
else
{
// Resting IS NOT allowed
AssignCommand (oPC, ClearAllActions()); // Prevent Resting
SetPersistentLocation(oPC, "Last_Location", lLoc, 0);
SendMessageToPC (oPC, "You can't rest. Hostile creatures are nearby");
}
}
}

// ---------- Rest Event finished or aborted ----------
if ((GetLastRestEventType() == REST_EVENTTYPE_REST_FINISHED || GetLastRestEventType() == REST_EVENTTYPE_REST_CANCELLED) && GetIsObjectValid(GetLocalObject (oPC, "o_PL_Bedrollrest")))
{
// If a bedroll was placed under the player: Delete it
DestroyObject (GetLocalObject (oPC, "o_PL_Bedrollrest"), 0.0f);
DeleteLocalObject (oPC, "o_PL_Bedrollrest");
}
}

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Papillon » Fri Feb 14, 2003 12:15 pm

This is the second time is see this error (someone else also posted about it in the bug thread). I tried to reproduce it, to no avail. Could you please send me a copy of the mod that shows this behaviour ? Send it to papillon@blackdagger.com (or send a link where I can download it) and I'll have a look.

Papillon
Team Member; Retired with Honors
 
Posts: 3155
Joined: Thu Jul 18, 2002 11:17 pm

PostAuthor: Silk » Fri Feb 14, 2003 3:19 pm

I spent time pouring over this script and the aps_include... until my eyes starting bleeding... For the life of me, I couldn't find anything wrong with it.
Silk

Member of the MadK@t lover's group.
User avatar
Silk
Co-Founder
 
Posts: 6665
Joined: Fri Sep 14, 2001 6:47 pm

PostAuthor: slabar » Fri Feb 14, 2003 9:27 pm

I even went so far as to do a brand new download of the zip file and that still didn't fix the problem. I sent Papillon my test module earlier today. Hopefully the cause can be found.

Thanks for all the help.

slabar
Whiney Peasant
 
Posts: 14
Joined: Sun Feb 02, 2003 1:08 am

PostAuthor: Blacksting » Sat Feb 15, 2003 8:49 am

I am having a problem with the extender failing to receive any queries after my module gets over the size of 45 meg. Does anyone have a module up to this point larger than 45? Will page file issues disrupt the way the extender reads the memory information necessary to execute a proper call? At first I thought it was a certain area of my module that was doing something nasty... but then I left that area in and took out other benign areas. Once my module went below 45 meg the queries once again started to hit the extender. Does anyone have an inkling of what may be the problem here?

Blacksting

Blacksting
Newbie
 
Posts: 4
Joined: Sat Feb 15, 2003 8:43 am

PostAuthor: Orleron » Sat Feb 15, 2003 2:59 pm

Our Mikona module is about 52 megs and it works fine.
User avatar
Orleron
World Advisor, Co-founder
World Advisor, Co-founder
 
Posts: 14905
Joined: Fri Sep 14, 2001 9:48 pm
Timezone: GMT-5

PostAuthor: Pelemele » Sat Feb 15, 2003 7:33 pm

NWNOnline is 62MB and we sometimes get problems retrieving data from the database. Especially when the mod is initializing.

Question: are either of you using NESS or another spawning system?

Thanks.
Pelemele.

Pelemele
Whiney Peasant
 
Posts: 15
Joined: Mon Jan 20, 2003 3:54 pm

PostAuthor: Orleron » Sat Feb 15, 2003 8:01 pm

No, we currently don't use any spawning system other than the generic Encounters included in NWN.
User avatar
Orleron
World Advisor, Co-founder
World Advisor, Co-founder
 
Posts: 14905
Joined: Fri Sep 14, 2001 9:48 pm
Timezone: GMT-5

PostAuthor: Blacksting » Sun Feb 16, 2003 6:29 pm

Has there been any serious testing as to why the initialization stage sometimes reports 0 bytes for requests? My module size problem now seems to be less of that and more of certain areas breaking the init phase. With hundreds of areas this is quite a bit of a pain to test. Why would the request bytes reserve break and not the send bytes reserve?

Blacksting

Blacksting
Newbie
 
Posts: 4
Joined: Sat Feb 15, 2003 8:43 am

Previous

Return to Avlis News

Who is online

Registered users: Bing [Bot], Google [Bot]