View previous topic :: View next topic |
Author |
Message |
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Jan 23, 2005 22:38 Post subject: |
|
|
Areas are loaded on module load, so I am not sure if they can be replaced at run time. If I had to guess I would say no.
Placeables, doors, and 2das are also routed through that function, so it might be possible to load them externally as well. This has not been tried yet, so I can not really comment on this.
Even if certain resources are only requested once, it would still be able to load them externally, just not to replace them while the module is running.
Creatures and items are handled by ODBC2 through SCO/RCO.
Well, keep the ideas coming and tell me how you plan to use this plugin. This certainly helps my motivation to improve this stuff _________________ Papillon
Last edited by Papillon on Mon Jan 24, 2005 0:03; edited 1 time in total |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Sun Jan 23, 2005 22:39 Post subject: |
|
|
Btw, try loglevel 2 to see what is routed through the scripter plugin.
Did anybody have success with the demo module yet ? I would like to know if we run into the same problems as we did with ODBC2... _________________ Papillon |
|
Back to top |
|
|
Alosynth
Joined: 06 Jan 2005 Posts: 24
|
Posted: Sun Jan 23, 2005 23:48 Post subject: |
|
|
I did have success with the demo module. I modified the nwnx.nss to report a different string and recompiled it with clcompile.exe all while the server was running and the client was connected. I was able to see the change in the string being sent to the PC immediatly after recompiling.
One issue I came across in my brief testing was trying to point an impact script from the spells.2da to use an external script. I first modified the .2da to change the impact scripft from scriptname to !scriptname which would not call the script. The scripter log reported the following:
Code: |
o Error - File not found: c:\NeverwinterNights\nwn\scripts\scriptname
|
Obviously, it wasn't sending the extension through so it was looking for scriptname instead of scriptname.ncs.
I then tried adding the .ncs to the scriptname in the in the 2da. I changed the entry to !scriptname.ncs. Doing this, I recieved a similar error in the log:
Code: |
o Error - File not found: c:\NeverwinterNights\nwn\scripts\scriptname.
|
Finally, I tried surrounding the 2da entry with quotes, "!scriptname.ncs", hoping it would then pass the extension through. Unforutnalty, I get the exact same error as above, it sees scriptname. but not the ncs.
Would it be possible to have the plugin assume .ncs if no extension is given? |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Sun Jan 23, 2005 23:53 Post subject: |
|
|
"Creatures and placeables are handled by ODBC2 through SCO/RCO."
You meant creatures and items correct? |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Jan 24, 2005 0:02 Post subject: |
|
|
Alosynth, this is one of the rough edges that still needs to be rounded. The solution with the "!" is not ideal either, because most dialogs in the toolset will not accept that character.
I guess a better solution would be to check if the resource has already been loaded, and if not, let the scripter plugin load it. If it can not find the resource, the normal Bioware routine would get a chance to load it. That means one extra file or database operation for each resource, but only once, on first load. It would also make the plugin more plug-and-play, since you could just remove the scripts from the module and put them into the sourcepath folder.
Blacksting, yes, of course I meant items, not placeables. _________________ Papillon |
|
Back to top |
|
|
Alosynth
Joined: 06 Jan 2005 Posts: 24
|
Posted: Mon Jan 24, 2005 0:07 Post subject: |
|
|
Well, I look forward to when I will be able to execute my 2da impact scripts from an external source. But even as it is now, it will greatly reduce my testing cycles when it comes to troubleshooting new scripts, which I greatly appreciate.
I probably could've save myself at least an hour or two if I had had this plugin yesterday.
Thanks for the great work Papillion and iselweo. |
|
Back to top |
|
|
isilweo
Joined: 29 Dec 2004 Posts: 22 Location: poland
|
Posted: Mon Jan 24, 2005 1:50 Post subject: |
|
|
i've tested plugin and it worked correctly (sco/rco crashes) so i think there'll be no problem withi this.
Too bad that areas are not loaded with this function, but it's only matter of time to find the right function that loads areas I've done some work on that subject today but it seems i've found only a function which loads values of given name from gff files.i can't see any use of it (maybe someone have idea what we could use it for?) |
|
Back to top |
|
|
Themicles
Joined: 23 Jan 2005 Posts: 30 Location: Wolverine Lake, MI
|
Posted: Mon Jan 24, 2005 10:32 Post subject: |
|
|
Well, if it turns out areas can't be loaded on the fly, it would still be nice to have them loaded externally for a code vault type system on the module.
I'd still like to see an on-the-fly area replacement tried, but it's your show, so I wont beg too much.
-Themicles _________________ World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Mon Jan 24, 2005 10:48 Post subject: |
|
|
"Too bad that areas are not loaded with this function..."
They ARE loaded with this function, just not when someones enters the area, but statically when the module is first beeing loaded.
Btw, I had the same crash problems as with SCO/RCO in ODBC2 when I dynamically allocated memory for the script. Now I just allocate 100KB statically. Someone needs to figure out how to correctly allocate dynamic memory soon _________________ Papillon |
|
Back to top |
|
|
isilweo
Joined: 29 Dec 2004 Posts: 22 Location: poland
|
Posted: Mon Jan 24, 2005 12:26 Post subject: |
|
|
I don't know if that's good thread to discus area loading but.
About areas
After area is loaded on module load only few (2 as i remember) gff values are loaded from area content. If only two of them are loaded you can still exchange area content in memory and when player enters area it should show new area. I can check that in a moment (and i will). The only thing is to find somehow pointer to area content. I've done basic research on area object in memory but we can't depend on memory pointer cause they can change.
btw. maybe all that technical discusions could have their own reverse forum? |
|
Back to top |
|
|
JeroenB
Joined: 31 Dec 2004 Posts: 228 Location: Netherlands
|
Posted: Mon Jan 24, 2005 13:45 Post subject: |
|
|
And what about the reload when empty functionality of the server? Does that reload also the area's? If so, there is still a possibility to locate the reload function and call that one |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Mon Jan 24, 2005 21:55 Post subject: |
|
|
Even if we can't load areas on the fly it still would be nice to have seasonal tilesets loaded at module start. The idea of dynamic persistent worlds (even if not on the fly) would be a HUGE draw to keep players currently leaving NWN for other things from heading that way I think. Leto could be used to keep .are and .git files in a folder "updated" to current happenings like an NWNX "save game" file that can be loaded after a crash or reset. |
|
Back to top |
|
|
Themicles
Joined: 23 Jan 2005 Posts: 30 Location: Wolverine Lake, MI
|
Posted: Thu Jan 27, 2005 14:54 Post subject: |
|
|
Blacksting wrote: | Even if we can't load areas on the fly it still would be nice to have seasonal tilesets loaded at module start. The idea of dynamic persistent worlds (even if not on the fly) would be a HUGE draw to keep players currently leaving NWN for other things from heading that way I think. Leto could be used to keep .are and .git files in a folder "updated" to current happenings like an NWNX "save game" file that can be loaded after a crash or reset. |
That's a lot of work to duplicate areas with seasonal versions.
Not something a PW like Avlis would do, considering the size. heh.
Unless someone wants to write an area converter to do this... but even then, not all the tilesets have a seasonal counterpart that is exactly the same except for the textures.
-Themicles _________________ World Leader of Tairis'nądur http://www.tairisnadur.com
Member World of CoPaP http://www.copap.org |
|
Back to top |
|
|
isilweo
Joined: 29 Dec 2004 Posts: 22 Location: poland
|
Posted: Tue Feb 01, 2005 1:20 Post subject: |
|
|
One thing i've noticed and it's quite useful. You can group your scripts in directories and invoke them using !directory/script. Don't use \ cause nwscript handles it quite badly and it won't work.
Example
Directory: dlgs
Directory: city1
and so on... and use: !dlgs/dialog1 or city1/maindoor
of course you can make more directories in depth
!city1/guards/onpercp |
|
Back to top |
|
|
Blacksting
Joined: 03 Jan 2005 Posts: 107
|
Posted: Tue Feb 01, 2005 3:23 Post subject: |
|
|
ExecuteScript("!language_listen.ncs",GetLastSpeaker());
SourcePath = D:\Games\NWN\Scripts\
o Error - File not found: D:\Games\NWN\Scripts\language_listen
I can not seem to make the plugin find the scripts. Am I missing something. Since the full path is in the .ini I used backslashes.... although I tried forward slashes too.
Am I missing something? |
|
Back to top |
|
|
|