View previous topic :: View next topic |
Author |
Message |
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Tue Apr 06, 2010 22:21 Post subject: |
|
|
Sorry, I didn't even think about checking for compatibility issues. I only hit a bunch of hotkeys to compile and move the scripts
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 |
|
|
Xylou
Joined: 06 Apr 2010 Posts: 7 Location: France
|
Posted: Wed Apr 07, 2010 9:14 Post subject: |
|
|
>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 |
|
Back to top |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Wed Apr 07, 2010 10:41 Post subject: |
|
|
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. _________________ I dun have any signature, I'm happy anyway. |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Wed Apr 07, 2010 11:52 Post subject: |
|
|
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 |
|
|
VirgiL
Joined: 02 Apr 2010 Posts: 16
|
Posted: Sun Apr 11, 2010 15:33 Post subject: |
|
|
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 |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Mon Apr 12, 2010 3:45 Post subject: |
|
|
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 |
|
|
VirgiL
Joined: 02 Apr 2010 Posts: 16
|
Posted: Mon Apr 12, 2010 12:27 Post subject: |
|
|
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 |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Mon Apr 12, 2010 18:14 Post subject: |
|
|
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 |
|
|
VirgiL
Joined: 02 Apr 2010 Posts: 16
|
Posted: Mon Apr 12, 2010 21:31 Post subject: |
|
|
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 |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Mon Apr 12, 2010 23:29 Post subject: |
|
|
I probably shouldn't be answering anything before I had coffee
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 |
|
|
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Wed Apr 14, 2010 17:55 Post subject: |
|
|
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 |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Thu Apr 15, 2010 3:44 Post subject: |
|
|
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 |
|
|
VirgiL
Joined: 02 Apr 2010 Posts: 16
|
Posted: Thu Apr 15, 2010 13:13 Post subject: |
|
|
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 |
|
|
Terra_777
Joined: 27 Jun 2008 Posts: 216 Location: Sweden
|
Posted: Fri Apr 16, 2010 0:45 Post subject: |
|
|
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 |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Fri Apr 16, 2010 5:33 Post subject: |
|
|
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 |
|
|
|