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 
 
Resource Manager Plugin
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Sun Jul 02, 2006 22:07    Post subject: Reply with quote

To use the folder extension option - put this in NWNX.ini in the [RESOURCEMANAGER] section

Folders = 1

All resources will then be taken from sub folders from the SourcePath by extension (ncs, uti, utc, etc.) For advanced users you can even place are, git, gic files in the resource folder and they will override the current module files on boot up (only.) To make this a little easier the are, git, and gic files must all be filed in the "are" subfolder, git and gic subfolders should not exist.


To use GFF editing - before using the CreateObject() function set the nwnx resman SETRESPARAMS string. The string must start with the resref of the object, a space, and then the string of changed parameters.

SetLocalString( GetModule() ,"NWNX!RESMAN!SETRESPARAMS" , resref + " " + changelist );
CreateObject(type,resref,location)

NOTE: Only resources in the resource folder can be modified. A resource passing through resman from the normal module appears to be in a different format than GFF and can not be modified. In my case I have most of my palette of utc, uti, and utp in the resource folder now anyway.

The changelist is set up as pairs of GFF Fields and data separated by a |

FirstName Oooga|LastName Booga|Str 18|Dex 15|CurrentHitPoints 300

Any and all GFF fields can be modified (for those of you who do not have it the GFF editor from the Bioware website is a must.) As of patch 1.67 many of the uses for this have actually made it in to nwnscript: naming of creatures, placeable lock options, etc. but many have not (descriptions for one.)
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sat Jul 08, 2006 18:55    Post subject: Reply with quote

This seems amazing and I really like the concept. However, for the life of me I can't get items and creatures to show up dynamically.

Area overwrites work fine, but nothing else seems to work right.

I load the base module ScriptMod as a server then open module001 in the toolset and create an item. I transfer the item file over to my dynamic_updates folder in my NWN directory. In my nwnx.ini file, I have it set pointing towards that folder.

When I come on as a DM, the areas load fine but the items and creatures aren't in the creator. I have tried restarting the server to see if that worked, but nothing happens.

I am using Blacksting's .dll file.

Thanks for any help. Smile

EDIT: I just read that it OVERRIDES files in the module. Does it not allow the actual creation of new placeables, items, creatures, etc etc?
Back to top
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Sun Jul 09, 2006 21:46    Post subject: Reply with quote

Unfortunately Resman does not affect the palette at all. Files in the resource folder are not counted when the palette is built/loaded. The resources can be called from scripts but that is about it.

However.......

The itp files (palette files) also can be put in the resource folder (and override like the area files do.)

There is a HUGE problem though. Loading itp files for some reason is highly unstable especially if you "manually" edit them to include resources created outside the module. In my experiences 90 percent of the time it causes the palette to crash when used. I do not know if I can fix this or not. My current estimation is that this is a brick wall because it involves some kind of palette loading check with ACTUAL files in the module. Since the palette is trying to validate a file that does not exist (in module terms) crashes abound.

As for the technicalities of how areas work:

The .are file = tiles and environment data
The .git file = placeables, creatures, etc in the area

It is possilbe to overwrite an entire area completely(tiles and objects) but both the .are and .git file must exist in the \are folder (or root resource folder if you are not using subfolders.)
Back to top
View user's profile Send private message
RedOne



Joined: 15 Oct 2006
Posts: 4

PostPosted: Tue Dec 19, 2006 15:08    Post subject: Reply with quote

Is there any place to still download your modified dll, blacksting?
I was thinking to use it for some projects i had in mind...
Back to top
View user's profile Send private message
Blacksting



Joined: 03 Jan 2005
Posts: 107

PostPosted: Tue Dec 19, 2006 20:43    Post subject: Reply with quote

http://members.cox.net/blacksting/NWN/nwnx_resman.dll

I had removed it... but now it is back up.
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Jul 12, 2007 16:59    Post subject: Reply with quote

Well, i can't find it here, but i heard from Funky (bioware forum), that the RM caching is done and that it's better!

So it's that LRU cache? And is there any options?

thx
ShaDoOoW
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Thu Jul 12, 2007 23:55    Post subject: Reply with quote

You did?!? I don't remember saying anything of the kind. In fact, the only post I remember dealing with this is this one:
http://nwn.bioware.com/forums/viewtopic.html?topic=573818&forum=47
Where vman responded saying he'd stopped development on it.
Funky
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Jul 13, 2007 1:12    Post subject: Reply with quote

it was there: http://nwn.bioware.com/forums/viewtopic.html?topic=570701&forum=47
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
FunkySwerve



Joined: 02 Jun 2005
Posts: 377

PostPosted: Fri Jul 13, 2007 1:27    Post subject: Reply with quote

No, lol, I was referring to Bioware's resource manager, the one that handles script caching.
Funky
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Fri Jul 13, 2007 1:35    Post subject: Reply with quote

Hmm, ok i maked a mistake... Anyway your tips are very useful.
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
ShaDoOoW



Joined: 20 Aug 2005
Posts: 584

PostPosted: Thu Oct 11, 2007 22:50    Post subject: Reply with quote

I dont know but i think that gff editing loaded resources do not working.

I changing NPC name but no change is made at all. Get Same result with placeable (LocName field).

And i tryed both way with and without that file in module.

here are logs and nwscript code, so tell me what im doing bad

nwnx.ini
Code:
[RESOURCEMANAGER]
MaxLogSize = 512 ; in KByte
LogLevel   = 2 ; 0= nothing, 1=Resource Manager specific info, 2=list of all loaded resources
; Where Resource Manager loads the scripts from. Note the trailing backslash.
SourcePath = externalsources\
Folders = 1


of course in nwn/externalsources/utc/ is system_npc.utc file

nwscript script
Code:

string GetCustomToken(int nCustomTokenNumber)
{
SetLocalString(GetModule(),"NWNX!RESMAN!SETRESPARAMS","system_npc  FirstName <CUSTOM"+IntToString(nCustomTokenNumber)+">");
object oTemplate = CreateObject(OBJECT_TYPE_CREATURE,"system_npc",GetStartingLocation());
string sName = GetName(oTemplate);
DestroyObject(oTemplate);
return sName;
}

void main()
{
SetCustomToken(123,"custom token 123");
sText = "[DebugString] "+"getcustomtoken"+": "+GetCustomToken(123);
WriteTimestampedLogEntry(sText);
FloatingTextStringOnCreature(sText,GetFirstPC());
}


nwserverlog1.txt
Code:
[Thu Oct 11 22:39:56] [DebugString] getcustomtoken: SYSTEM NPC


"SYSTEM NPC" is default first name of system_npc

ShaDoOoW
_________________
Community Patch / NWNX Patch / NWNX Files / NWNX Connect
Back to top
View user's profile Send private message
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sun May 25, 2008 2:24    Post subject: Reply with quote

I just had a bit of a crazy idea and wanted to throw it out there to see what ya'll think.

With some modifications to the code, couldn't you create a sort of "Instancing" system? What I was thinking is having a bunch of tiny blank areas in the module and then having the areas be stored in an outside folder.

When a player enters an instanced area, the appropriate outside area file is loaded.

I think something like this would help do a bunch of things like:

- Cut down on module size (small areas don't contribute to module size that much - do they?)
- Allow groups of players access to their own private dungeon

I'm able to do a bit of scripting in NWN now, but C++ is something I'm not that familiar with. But if I had some help learning I'm sure this could be done.

Thoughts? Opinions?
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun May 25, 2008 10:38    Post subject: Reply with quote

I did this a while ago with NWNX Areas 'proof of concept' plugin. It's possible to create an area dynamically.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Sun May 25, 2008 22:17    Post subject: Reply with quote

Oh nice, can you link me please?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Fri Jun 20, 2008 20:01    Post subject: Reply with quote

ShaDoOoW wrote:
I dont know but i think that gff editing loaded resources do not working.

I changing NPC name but no change is made at all. Get Same result with placeable (LocName field).

And i tryed both way with and without that file in module.

here are logs and nwscript code, so tell me what im doing bad


*bump*
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, 4, 5, 6, 7  Next
Page 4 of 7

 
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