View previous topic :: View next topic |
Author |
Message |
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Mon Mar 22, 2010 10:03 Post subject: |
|
|
Excellent, keep it up _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Mon Mar 22, 2010 21:31 Post subject: |
|
|
Update 0.0.3: Added SetSkill functions.
I think I have everything to replace the letoscript level up process for our legendary level system and put it to a "real life" PW test. |
|
Back to top |
|
|
motu99
Joined: 24 Sep 2007 Posts: 16
|
Posted: Mon Mar 22, 2010 21:51 Post subject: Re: nwnx_funcs for windows |
|
|
MaxRock wrote: | I've started porting nwnx_funcs to windows:
|
Hurray! |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Mar 23, 2010 17:10 Post subject: |
|
|
Do i require some windows framework or something? Becase it doesnt work on my PC while it works at my laptop.
It writes: error 14001: launch failed because configuration of aplication is incorrect or something like that error is not in english language _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Tue Mar 23, 2010 17:30 Post subject: |
|
|
ok it seems it requires Microsoft Framework 3.5 problem solved _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Tue Mar 23, 2010 18:12 Post subject: |
|
|
Ugh, that's probably because I'm using Visual Studio 2008 to compile it.
I wonder if I can get around that as there shouldn't be anything actually requiring the .net framework.
Edit:
I think I got it. Dependency Walker shows no MSVCR90 anymore after switching from "Multi Threaded DLL" To "Multi Threaded" |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Sun Mar 28, 2010 6:09 Post subject: |
|
|
Added a few new functions:
GetTotalAreas
GetTotalLocalVariables
GetHasLocalVariable
ModAbilityScore
SetCreatureSize
Set/GetCreatureEventScript
And made some mostly cosmetic code changes. ...It's turning into spaghetti code, so much for OOP
From what I've seen in the linux source, all (most) functions making changes to strings carry a warning about memory leaks.
How can I tell if I've caused one? |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Sun Mar 28, 2010 11:42 Post subject: |
|
|
*Codegasm*
All needed now is RemoveFeat(), or did I miss that one in there someplace? _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
Fireboar
Joined: 17 Feb 2008 Posts: 323
|
Posted: Sun Mar 28, 2010 13:55 Post subject: |
|
|
MaxRock wrote: | GetTotalAreas
GetTotalLocalVariables |
Being a pedant, I'd like to suggest a slight grammatical change: I think better names would probably be GetAreaCount and GetLocalVariableCount. "GetTotalXs" doesn't really immediately imply that you're doing something with the number of Xs, whereas "GetXCount" does. Other than that, great job! |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Thu Apr 01, 2010 18:51 Post subject: |
|
|
Terra_777 wrote: | *Codegasm*
All needed now is RemoveFeat(), or did I miss that one in there someplace? |
Fireboar wrote: | MaxRock wrote: | GetTotalAreas
GetTotalLocalVariables |
Being a pedant, I'd like to suggest a slight grammatical change: I think better names would probably be GetAreaCount and GetLocalVariableCount. "GetTotalXs" doesn't really immediately imply that you're doing something with the number of Xs, whereas "GetXCount" does. Other than that, great job! |
Happy to oblige
Update 0.0.5
Added functions:- GetEquippedWeight
- ModSavedSkillPoints
- RemoveFeat
- GetFeatKnown
- RemoveAllFeats
- GetAllKnownFeats
- SetAllSkillsToZero
- AddKnownSpell
- RemoveKnownSpell
- GetKnowsSpell
- RemoveAllSpells
- ModBaseAttackBonusOverride
- GetBaseAttackBonusOverride
Fixed:- Set/ModSavedSkillPoints: Always set the amount of skillpoints to 10 times of what was specified regardless which function was used
Renamed Functions:- GetTotalAreas -> GetAreaCount
- GetTotalLocalVariables -> GetLocalVariableCount
- GetFirstLocalVar -> GetFirstLocalVariable
- GetNextLocalVar -> GetNextLocalVariable
- SetBaseAttackBonus -> SetBaseAttackBonusOverride
Other:- Renamed some parameters to make it more clear on what the function can be used (e.g.: oObject became oCreature if the function is supposed to be used on creatures)
- Fixed incosistencies between function declaration and its definition.
- nwnx.ini settings:
[FUNCS]
; DebugLevel=[0|1|2|3]; defaults to 0
debugLevel=3
; The number of the last line in skills.2da for when a module uses custom skills; defaults to 27
Last_Skill_Number=27;
There's no real consistency in what is printed to the nwnx_funcs log file but the higher the level the more is logged.
DebugLevel=0 only prints output from the dumplocal and dumpeffects functions. Level 1 should be informational stuff, level 2 should be errors
and level 3 should be for stuff that I'm trying to debug (and subsequently forget to remove)
This has actually been there since the beginning, I just forgot to mention it.
|
|
Back to top |
|
|
ShaDoOoW
Joined: 20 Aug 2005 Posts: 584
|
Posted: Thu Apr 01, 2010 21:36 Post subject: |
|
|
oooh spells managing, neat! you fullfilled my secret wish _________________ Community Patch / NWNX Patch / NWNX Files / NWNX Connect |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Fri Apr 02, 2010 6:18 Post subject: |
|
|
Had to drop in a hotfix because SetLastEffectCreator was crashing the server. |
|
Back to top |
|
|
Xylou
Joined: 06 Apr 2010 Posts: 7 Location: France
|
Posted: Tue Apr 06, 2010 20:25 Post subject: |
|
|
Hello MaxRock.
I've taken the last version (0.0.51) but unfortunately got a compilation error with the sSpacer of the function NWNXFuncs_GetAllKnownFeats.
It has 1024 blank characters with seems to much for my Aurora (don't know if it's normal or not). I've cut it in 4 (because 512 is also too much , but 256 is fine ) and I've added twice the line "sSpacer += sSpacer;" so it should have the same length at the end (2048).
Is there someone else also having the compilation error? |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Tue Apr 06, 2010 20:59 Post subject: |
|
|
Code: | string NWNXFuncs_GetAllKnownFeats(object oCreature, string sDelimiter=",") {
string sSpacer = " ";
sSpacer += sSpacer;
SetLocalString(oCreature, "NWNX!FUNCS!GETKALLNOWNFEATS", sDelimiter+GetStringLeft(sSpacer, GetStringLength(sSpacer)-GetStringLength(sDelimiter)));
string sRet = GetLocalString(oCreature, "NWNX!FUNCS!GETALLKNOWNFEATS");
DeleteLocalString(oCreature, "NWNX!FUNCS!GETALLKNOWNFEATS");
return sRet;
} |
The optimal token length. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
|