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 
 
nwnx_funcs for windows
Goto page Previous  1, 2, 3, ... 27, 28, 29  Next
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Tue Apr 06, 2010 22:21    Post subject: Reply with quote

Sorry, I didn't even think about checking for compatibility issues. I only hit a bunch of hotkeys to compile and move the scripts Embarassed
But now that you mention it.
Since our server's using PRC I'm also having to use their script compiler since nwn's can't handle all the constants.
I assume that it's the same issue with the spacer as well. Thank you for fixing it.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Xylou



Joined: 06 Apr 2010
Posts: 7
Location: France

PostPosted: Wed Apr 07, 2010 9:14    Post subject: Reply with quote

>Terra_777
So should I understand that the Aurora limit is 511 characters (the length of the string declaration in your correction)?
With your solution, the spacer will have a length of 1022 characters (sSpacer += sSpacer), which is less than half the length MaxRock had originally determined (2048). Is it still enough to list all the feats?

>MaxRock
I'm relieved that it wasn't specific to my editor.
I also have bumped into the constants limit, and I wasn't aware that I could use the PRC compiler to get rid of it. So thanks for the info Wink
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Wed Apr 07, 2010 10:41    Post subject: Reply with quote

Code:
string MakeASpacer( int nLength ){

    string sSpacer = "";
    int nLoop;
    for( nLoop = 0; nLoop < nLength; nLoop++ ){

        sSpacer+=" ";
    }
    return sSpacer;
}


Code:
string sSpacer = MakeASpacer( 2048 );


Suppose that'd work too if you want your 2048. Razz
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Wed Apr 07, 2010 11:52    Post subject: Reply with quote

Oh! I misunderstood that the problem is that the toolset editor can't cope with the length of the line - I haven't used the toolset's script editor in years.
I thought the compiler was choking on it.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
VirgiL



Joined: 02 Apr 2010
Posts: 16

PostPosted: Sun Apr 11, 2010 15:33    Post subject: Reply with quote

hi max

i spot in linux port of this plugin, there are some 'quickslot' functions - do you think you will be able to make some functions that can set/get the current setup of player quickslots?

would be really great... even im not sure what those linux port functions do
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Apr 12, 2010 3:45    Post subject: Reply with quote

VirgiL wrote:
hi max

i spot in linux port of this plugin, there are some 'quickslot' functions - do you think you will be able to make some functions that can set/get the current setup of player quickslots?

would be really great... even im not sure what those linux port functions do


Not sure... To a certain extent maybe...
From what I've tried, I don't seem to need a call to update the quickslots (at least the icon does change right away). But items use coordinates for where they are in an inventory (and another set of coordinates if they're in a container/bag) which halted my save/restore quickbar ideas.
Saving and restoring spells should be possible though.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
VirgiL



Joined: 02 Apr 2010
Posts: 16

PostPosted: Mon Apr 12, 2010 12:27    Post subject: Reply with quote

i believe that the coordinates are there because it cannot be saved by object ID as it is always generated upon each module loading / player enter.. as bioware needed to ensure they wil lhave unique path to the items even after module is turned off and on again

but in our case, we dont need to ensure this, because we will amend changes while module is running

i have idea:
once it have to 'load' those items based on coordinates to the quickbar slots, is it possible to replace coordiantes parameter with object ID parameter?
then the plugin will 'get' the coordinates from the specifed item's structure? (now im not sure in which structure are the coordinates saved..)
with this, we can omit sometin like "GetItemByCoordinates()' and replace it with sometin like "GetCoordinates(oItem)" and use those returned cooridnates to store it into the quickbar

i think im not right, as my understanding of your issue with those coords is not clear - can you please further elaborate?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Apr 12, 2010 18:14    Post subject: Reply with quote

Mostly, I'm not sure how to update them (actually I haven't looked into getting them in the first place but I don't think that will be too big of a problem).
If you save the quickbar, then move the item around, the saved coordinates don't match anymore.
The only way around this would be to hand that responibility off to your players, or somebody can hook changes made to the inventory.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
VirgiL



Joined: 02 Apr 2010
Posts: 16

PostPosted: Mon Apr 12, 2010 21:31    Post subject: Reply with quote

to be honest, the prupose why i need it isnt really for items... i can survive without them

the need is custom tokens (such as chat messages), feats, spells and special abilities that can be assigned on it.. even if the items functionallity wont work, it will still fulfill my needs

does this change anything?
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Mon Apr 12, 2010 23:29    Post subject: Reply with quote

I probably shouldn't be answering anything before I had coffee Rolling Eyes

Shouldn't a call to save the quickbar OnClientLeave be enough? The inventory can't really change when the player's not on.

I'm gonna take apart the inventory list to find item coordinates tonight.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Zunath



Joined: 06 Jul 2006
Posts: 183

PostPosted: Wed Apr 14, 2010 17:55    Post subject: Reply with quote

I'm really interested in what changes you made to the source code to port it from Linux to Windows. Can you give some details on that?

Excellent work by the way.
Back to top
View user's profile Send private message
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Thu Apr 15, 2010 3:44    Post subject: Reply with quote

Zunath wrote:
I'm really interested in what changes you made to the source code to port it from Linux to Windows. Can you give some details on that?

Excellent work by the way.


Thank you.
I guess it depends on how "port" is defined...
Inspired by Terra's memory editor I wanted to find a way to edit spell effect properties and soon found the linux includes which basically gave me most of what I wanted.
Occasionally I have to make some changes to a struct - CNWSObject seemed to be off by 4 bytes at some point, and I get a headache every time I try to figure out why.
So all I'm doing is take the structs from the linux version and write functions for it.
This is also what makes me hit a wall a lot of times. All I'm doing is memory edits. I haven't figured out how to hook anything or call functions from the vtables of an object.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
VirgiL



Joined: 02 Apr 2010
Posts: 16

PostPosted: Thu Apr 15, 2010 13:13    Post subject: Reply with quote

MaxRock wrote:

Shouldn't a call to save the quickbar OnClientLeave be enough? The inventory can't really change when the player's not on.

I'm gonna take apart the inventory list to find item coordinates tonight.


not sure why is client leave for saving needed? is there some issue with saving the quickbars for tokens/feats?
and any luck with those item coords?
Back to top
View user's profile Send private message
Terra_777



Joined: 27 Jun 2008
Posts: 216
Location: Sweden

PostPosted: Fri Apr 16, 2010 0:45    Post subject: Reply with quote

Interested on functionality to get/set data in the level-list. Like, class, hp, feats, skills and abilities gained in each level/stat entry.

Is this possible to do in a good manner?
_________________
I dun have any signature, I'm happy anyway.
Back to top
View user's profile Send private message Send e-mail MSN Messenger
MaxRock



Joined: 24 Jan 2008
Posts: 196

PostPosted: Fri Apr 16, 2010 5:33    Post subject: Reply with quote

Terra_777 wrote:
Interested on functionality to get/set data in the level-list. Like, class, hp, feats, skills and abilities gained in each level/stat entry.

Is this possible to do in a good manner?


Some functions can already do that.
The last parameter of Addfeat for example determines the the position in the level list where the feat is added and there should be functions for your other examples (the ones ending in "ByLevel"). With the exception of Abilities.
The game doesn't track which ability is increased by how much each level but which ability is increased by 1.

There's no functionality to get/set the level stat lists exclusively. Since, for example, feats added to the featlists only won't be useable by the creature, this wasn't too high on my priorities list.
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, ... 27, 28, 29  Next
Page 2 of 29

 
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