Developer Applications
Moderator: Moderator
-
Grumalg
- Posts: 3
- Joined: Mon Dec 01, 2014 12:20 am
Re: DEV Help Wanted
I have a subsystem I wrote some years ago that might be of interest to the BG script coders. It's a 2d array package that allows the creation and use of 2D arrays on any object that can carry local vars, including module, area, player, item, etc. Columns in such arrays can be of any NWS data type that can be stored in a local var.
It supports insertion/deletion of array rows (at any location), searches, quicksort of arrays etc. It's pretty small consisting of three include files. One main one for normal use , an array debugging one that prints array contents in an ascii line char grid in the log so you can see what's happening/happened to an array during dev, and one very small one (single function) I reused from an earlier more limited array package from the vault.
It includes partially written documentation (MS word .doc), which I wasn't sufficiently satisfied with yet to release it on NWNVault, though it does have full info on each function. It's written as tight as I could get it and the overhead other than function calls doesn't amount to much more than doing some read/write to few local vars (assumeing you don't go nuts and use very large arrays).
If this sounds of interest, I'd be happy to send it to the team.
I've been pretty inactive with NWN dev for a few years, but most of my work has been with MySQL DB stuff, making systems that removed the need for a scripter to be DB savvy. During the early days of NWNX4 I determined what the problems with using stored procedures were, and pointed Papillon to why it wasn't working and it got fixed.
The 'PWSystem' stuff I worked extensively on did a lot of exotic DB things, like creation/deletion/use of stored procedures from NWS and allowing plugin extensions to dynamically modify table structure (add/remove columns in tables) from NWS.
I've had many working versions of 'PWSystem' and it's plugins, I never released it on the vault because I was always tinkering with added features. While I doubt you'd want to use my 'PWSystem' stuff directly in such a well established PW as BG, I may be able to help with DB work.
It supports insertion/deletion of array rows (at any location), searches, quicksort of arrays etc. It's pretty small consisting of three include files. One main one for normal use , an array debugging one that prints array contents in an ascii line char grid in the log so you can see what's happening/happened to an array during dev, and one very small one (single function) I reused from an earlier more limited array package from the vault.
It includes partially written documentation (MS word .doc), which I wasn't sufficiently satisfied with yet to release it on NWNVault, though it does have full info on each function. It's written as tight as I could get it and the overhead other than function calls doesn't amount to much more than doing some read/write to few local vars (assumeing you don't go nuts and use very large arrays).
If this sounds of interest, I'd be happy to send it to the team.
I've been pretty inactive with NWN dev for a few years, but most of my work has been with MySQL DB stuff, making systems that removed the need for a scripter to be DB savvy. During the early days of NWNX4 I determined what the problems with using stored procedures were, and pointed Papillon to why it wasn't working and it got fixed.
The 'PWSystem' stuff I worked extensively on did a lot of exotic DB things, like creation/deletion/use of stored procedures from NWS and allowing plugin extensions to dynamically modify table structure (add/remove columns in tables) from NWS.
I've had many working versions of 'PWSystem' and it's plugins, I never released it on the vault because I was always tinkering with added features. While I doubt you'd want to use my 'PWSystem' stuff directly in such a well established PW as BG, I may be able to help with DB work.
-
Moridin
- Retired Staff
- Posts: 582
- Joined: Thu Oct 18, 2012 10:14 pm
- Location: SK, Canada
Re: DEV Help Wanted
^ I request that you guys look into that, and Grumalg, I would like to work with you on something.
-
bartab
- Posts: 4
- Joined: Sat Dec 17, 2011 1:34 pm
Re: DEV Help Wanted
I've successfully threaded the game engine.
-
Grumalg
- Posts: 3
- Joined: Mon Dec 01, 2014 12:20 am
Re: DEV Help Wanted
Oh ye of little faith. This 2Darray package is *not* a joke. It exists, it works, and it's pretty fast. I wrote it back around '06-'07. I never put it on the IGN nwnvault because I never got around to completeing the doc file.bartab wrote:I've successfully threaded the game engine.
Do you remember the several array packages that were on the IGN NWNvault? I examined all of them, and they were typically things like 1D array of string only and such. It was obvious to me the techniques could be easily extended to provide 2D arrays of any datatype that can be held in a local variable on an object.
No it isn't an engine extension, it's written entirely in NWS.
Here's the function prototype section of the main array include file:
Code: Select all
//==============================================================================
// Array function prototypes
//==============================================================================
// Create an array named on oObj with nRows and nCols of datatypes sTypelist
// Return index number of array or ARR_ERROR if args bad.
int ARR_CreateArray(object oObj, string sName, int nRows, int nCols, string sTypelist);
// Destroy array sName on oObj (all local vars for sName are destroyed)
// Returns # of arrays left on oObj or ARR_ERROR if sName doesn't exist
int ARR_DestroyArray(object oObj, string sName);
// Set nCol to xValue per col type in nRow of sName array on oObj
void ARR_SetIntCol(object oObj, string sName, int nRow, int nCol, int nValue);
void ARR_SetFloCol(object oObj, string sName, int nRow, int nCol, float fValue);
void ARR_SetStrCol(object oObj, string sName, int nRow, int nCol, string sValue);
void ARR_SetLocCol(object oObj, string sName, int nRow, int nCol, location locValue);
void ARR_SetObjCol(object oObj, string sName, int nRow, int nCol, object oValue);
// Get xValue in nCol per col type of nRow in sName array on oObj
int ARR_GetIntCol(object oObj, string sName, int nRow, int nCol);
float ARR_GetFloCol(object oObj, string sName, int nRow, int nCol);
string ARR_GetStrCol(object oObj, string sName, int nRow, int nCol);
location ARR_GetLocCol(object oObj, string sName, int nRow, int nCol);
object ARR_GetObjCol(object oObj, string sName, int nRow, int nCol);
// Row/Col operations. Returns resulting # rows/cols or ARR_ERROR if args bad
int ARR_InsertRow(object oObj, string sName, int nInsRow);
int ARR_DeleteRow(object oObj, string sName, int nDelRow);
int ARR_InsertCol(object oObj, string sName, int nInsCol, string sType);
int ARR_DeleteCol(object oObj, string sName, int nDelCol);
// Search sName array on oObj for row containing xFValue in nFCol starting at nFStart row.
// Return nRow of first match *or* ARR_ERROR if nFindValue not found or bad arg.
int ARR_FindIntRow(object oObj, string sName, int nFCol, int nFValue, int nFStart);
int ARR_FindFloRow(object oObj, string sName, int nFCol, float fFValue, int nFStart);
int ARR_FindStrRow(object oObj, string sName, int nFCol, string sFValue, int nFStart);
int ARR_FindLocRow(object oObj, string sName, int nFCol, location locFValue, int nFStart);
int ARR_FindObjRow(object oObj, string sName, int nFCol, object oFValue, int nFStart);
// Sort sName array on oObj on values in nCol (nCol must be INT, FLO, STR type).
// Return ARR_ERROR if nCOL is LOC or OBJ type or sName doesn't exist on oObj.
int ARR_Sort(object oObj, string sName, int nCol);
// Get count of arrays in 'Index' array on oObj
int ARR_GetArraysCount(object oObj);
// Get 'Index' values for sName array on oObj
int ARR_GetArrayIndex(object oObj, string sName);
int ARR_GetArrayRows(object oObj, string sName);
int ARR_GetArrayCols(object oObj, string sName);
string ARR_GetArrayTypes(object oObj, string sName);
//------------------------------------------------------------------------------
// ***** private function prototypes - do not seperately call these *****
//------------------------------------------------------------------------------
void ARR_MoveCol(object oObj, string sName, int nSrcCol, int nDestCol);
void ARR_DestroyCol(object oObj, string sName, int nColNum);
void ARR_MoveRow(object oObj, string sName, int nSrcRow, int nDestRow);
void ARR_DestroyRow(object oObj, string sName, int nRowNum);
int ARR_InitIndex(object oObj, string sName);
int ARR_GetFreeIndex(object oObj, string sNewName);
void ARR_SwapRows(object oObj, string sName, int nRow1, int nRow2);
void ARR_QuickSortInt(object oObj, string sName, int nRowStart, int nRowEnd, int nCol);
void ARR_QuickSortFlo(object oObj, string sName, int nRowStart, int nRowEnd, int nCol);
void ARR_QuickSortStr(object oObj, string sName, int nRowStart, int nRowEnd, int nCol);
Array Package.zip is 29kb in size and includes: 2D Local Arrays.doc, array_2d.erf, local array results.txt (includes a bit of sample code and demonstration of the debug printing to log of array contents in an ascii line char grid display), and a Read me.txt with a bit more info.
Edit Added: PM me with a place to send it if you'd like to look at or test it...
-
Ivan38Rus
- Retired Staff
- Posts: 1417
- Joined: Sat Aug 08, 2009 11:44 pm
Re: DEV Help Wanted
I would like to take a look. 
-
Grumalg
- Posts: 3
- Joined: Mon Dec 01, 2014 12:20 am
Re: DEV Help Wanted
PM sentIvan38Rus wrote:I would like to take a look.
-
MagicalWisps
- Posts: 8
- Joined: Fri Jun 19, 2009 9:06 pm
- Location: California
Re: DEV Help Wanted
I have been working on NWN2 for years. I've had my fair share of PW designing. I put together a portfolio of some stuff I have done. Keep in mind they are just pieced together and I removed a lot of stuff to keep file size down. Jar'tale was the toughest and most rewarding build I have ever done. It isn't the best area in the world, but I am proud of it.
Tips
-Use the Boats to get to the other areas
-One quest for you at the "Abandoned House" red map note
-Example of an "Ambush" encounter in the Woods area at the point of interest map note.
Here you go, something to look at.
-MW
http://www.filedropper.com/magicalwisps ... gportfolio
Tips
-Use the Boats to get to the other areas
-One quest for you at the "Abandoned House" red map note
-Example of an "Ambush" encounter in the Woods area at the point of interest map note.
Here you go, something to look at.
-MW
http://www.filedropper.com/magicalwisps ... gportfolio
-
gedweyignasia
- Custom Content
- Posts: 1353
- Joined: Sat Nov 23, 2013 11:27 pm
- Location: EST/UTC-4
Re: DEV Help Wanted
Code: Select all
//Put this script OnUsed
void main()
{
object oPC = GetLastUsedBy();
if (!GetIsPC(oPC)) return;
object oTarget;
location lTarget;
oTarget = GetWaypointByTag("WP_<SOME_AREA>");
lTarget = GetLocation(oTarget);
//only do the jump if the location is valid.
//though not flawless, we just check if it is in a valid area.
//the script will stop if the location isn't valid - meaning that
//nothing put after the teleport will fire either.
//the current location won't be stored, either
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, ActionJumpToLocation(lTarget));
}-
MagicalWisps
- Posts: 8
- Joined: Fri Jun 19, 2009 9:06 pm
- Location: California
Re: DEV Help Wanted
I don't have a harbor master npc so a conversation doesn't appeal to me. A character talking to a rowboat. Also i like the thought of different boats going to different places and disembarking from other parts of the city.
As for scripting, it functions the same either way I do it. For me though I like having specific simple scripts. Plus my knowledge level of scripting forces me to do things that I know how to do. But I am not as good a scripter as I'd like to be.
I did just piece areas of mine together so script names and stuff isn't neatly named as I would have liked them to be.
Take care
-MW
As for scripting, it functions the same either way I do it. For me though I like having specific simple scripts. Plus my knowledge level of scripting forces me to do things that I know how to do. But I am not as good a scripter as I'd like to be.
I did just piece areas of mine together so script names and stuff isn't neatly named as I would have liked them to be.
Take care
-MW
-
LISA100595
- Retired Staff
- Posts: 5202
- Joined: Mon Aug 22, 2011 12:23 pm
Re: DEV Help Wanted
WISPS!! 
Lady Elvina Aira-S'efarro - The Order of the Silver Rose
Salaria - Bounty Hunter half-sister of Darius Brothers
Angelina Northstar - Holy Warrior of Tyr / Knight of the Silver Rose
Matilda Stonehold - Honorable Sheild Dwarf
Loriah Swift - Morninglord of Lathander
Salaria - Bounty Hunter half-sister of Darius Brothers
Angelina Northstar - Holy Warrior of Tyr / Knight of the Silver Rose
Matilda Stonehold - Honorable Sheild Dwarf
Loriah Swift - Morninglord of Lathander
-
MagicalWisps
- Posts: 8
- Joined: Fri Jun 19, 2009 9:06 pm
- Location: California
Re: DEV Help Wanted
Yup its me. Good to see you!
It was too tough being Dev and being admin of a PW world on your own. Too much work for me. Plus I suck at mysql database stuff, and the wife took my server computer for herself. I just want to do what I love doing and that is area design. It would be nice to focus on that again.
-MW
It was too tough being Dev and being admin of a PW world on your own. Too much work for me. Plus I suck at mysql database stuff, and the wife took my server computer for herself. I just want to do what I love doing and that is area design. It would be nice to focus on that again.
-MW
-
LISA100595
- Retired Staff
- Posts: 5202
- Joined: Mon Aug 22, 2011 12:23 pm
Re: DEV Help Wanted
Good to see you too!MagicalWisps wrote:Yup its me. Good to see you!
It was too tough being Dev and being admin of a PW world on your own. Too much work for me. Plus I suck at mysql database stuff, and the wife took my server computer for herself. I just want to do what I love doing and that is area design. It would be nice to focus on that again.
-MW
I can understand that, I'm still blissfully unaware of scripting myself LOL. I took a nostalgic run through your Mod. The Rodan cemetery is still my all time favorite.
Lady Elvina Aira-S'efarro - The Order of the Silver Rose
Salaria - Bounty Hunter half-sister of Darius Brothers
Angelina Northstar - Holy Warrior of Tyr / Knight of the Silver Rose
Matilda Stonehold - Honorable Sheild Dwarf
Loriah Swift - Morninglord of Lathander
Salaria - Bounty Hunter half-sister of Darius Brothers
Angelina Northstar - Holy Warrior of Tyr / Knight of the Silver Rose
Matilda Stonehold - Honorable Sheild Dwarf
Loriah Swift - Morninglord of Lathander
-
rick7475
- Posts: 3
- Joined: Wed Dec 14, 2016 4:18 pm
- Location: Ottawa
Re: Developer Applications
Hi folks, I haven't touched the toolset in a few years, but I worked and DM'ed (still do) for "A Land Far Away" but that place is dwindling in population. I recently came back last month after a few years absence and I am sure I could get back in to the toolset again. I was a C++ developer for 15 years and now currently am a Java developer. For the "A Land Far Away" group I built and hosted the NWN1 Daggerford server. For NWN2 I built > 50% of the current running "The Silver Marches Server".
I recently asked to come back to "The Silver Marches Server" to build or DM there, but they only offered my a provisional DM of their Baldur's Gate server. I was kind of disappointed over that. So I came here to play.
I am not sure of the rules, but if I build does that mean I cannot play?
I recently asked to come back to "The Silver Marches Server" to build or DM there, but they only offered my a provisional DM of their Baldur's Gate server. I was kind of disappointed over that. So I came here to play.
I am not sure of the rules, but if I build does that mean I cannot play?
-
Maecius
- Retired Admin
- Posts: 11639
- Joined: Sat May 16, 2009 4:24 pm
Re: Developer Applications
Hi Rick: To answer your question, we ask our developers to not show bias towards their characters or their guilds with regards to their custom content, but we do not ask them to stop playing their characters.
r e s o u r c e s :
- BG:TSCC Wiki
- Community News
- Server Rules and Information
- Supporting BG:TSCC