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 
 
TMI Plugin - Modification by me

 
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development
View previous topic :: View next topic  
Author Message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sat Jan 01, 2011 5:23    Post subject: TMI Plugin - Modification by me Reply with quote

Original version by Addicted2rpg

http://nwvault.ign.com/View.php?view=Other.Detail&id=1482


When its approved it should appear here.


I added the capability of the plugin to set the TMI Limit from nwnscript, as well as the already implimented method of setting it via the ini file.

Code:

void NWNXTMISetTMILimit(int nTMICap)
{
   SetLocalString(GetModule(),"NWNX!TMI!SET",IntToString(nTMICap));
   DeleteLocalString(GetModule(),"NWNX!TMI!SET");
}



Then call like so
Code:

NWNXTMISetTMILimit(4);  //Doubles the Bioware TMI Cap
NWNXTMISetTMILimit(8);  // Bioware x4
NWNXTMISetTMILimit(16);  // Bioware x8


I tried to get the unlimited cap working dynamically, but couldnt work it....
I left it commented out.


The source code is included in the download, once/if it gets approved.

Once again, This is just a derivitive work, based on Addicted2rpg's original.

I thought it might be useful for Window's Users to have it.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Sun Jan 02, 2011 13:20    Post subject: Reply with quote

I think the APIs for identical features should be consistent between platforms.
NWNX TMI plugin for Linux implements the same functionality, but with different API.
Could you change your API to be consistent with the Linux version?
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Jan 02, 2011 15:47    Post subject: Reply with quote

I've not had a look at the TMI plugin for Linux, I could give it a try I suppose.
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Sun Jan 02, 2011 18:58    Post subject: I've changed it Reply with quote

I've re-uploaded it to the vault.

Now uses the same calling conventions as in Linux.

eg

NWNX!TMI!SETLIMIT opposed to NWNX!TMI!SET

Also, re-added some of Addicted2rpg's code, I wasnt aware that the TMI Location was being stored persistently from the onCreate event, so now it gets re-used in the new functions I added in.


The only differences between this and the Linux version so far are.

1. Linux version takes actual instruction limit - Im just unsure how it works, in order to convert this one from taking multipliers, to actual limits.
2. Linux version allows the Getting of TMI Limit, I also currently dont know how to get that working in Windows yet, im still noob Smile. But its a work in progress.
Back to top
View user's profile Send private message
virusman



Joined: 30 Jan 2005
Posts: 1020
Location: Russia

PostPosted: Mon Jan 03, 2011 1:39    Post subject: Reply with quote

I have rewritten this plugin by porting the Linux version.

http://nwn.virusman.ru/trac/nwnx2-win32/changeset/88/
http://data.virusman.ru/nwn/nwnx_tmi-1.0.0-win32.rar

Now both versions are 100% compatible.
The ini settings code has been removed, although I doubt it'd be useful with the NWScript functions. Changing TMI permanently or removing it isn't a good idea anyway.
_________________
In Soviet Russia, NWN plays you!
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Wed Jan 05, 2011 3:10    Post subject: Reply with quote

the links you gave virusman they are for the windows version correct?

Also whats the diffrence between change/tmi one says nwnx2/ nwnx

I use nwnx2 wich is for windows nwn1. Is one for the old nwnx platform and the other nwnx2 plat form. do I have that right?


Last edited by Greyfort on Wed Jan 05, 2011 3:14; edited 1 time in total
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Jan 05, 2011 3:11    Post subject: Reply with quote

Im running the version in the rar, it works for windows, yes.
Back to top
View user's profile Send private message
Greyfort



Joined: 20 Jul 2010
Posts: 66

PostPosted: Wed Jan 05, 2011 3:59    Post subject: Reply with quote

whats the diff between the changeset and tmi change linux tmi window is that correct? EDITED I answered question changeset is web page that displays code, virusmans way of keeping file small is that correct Vman?

all that aside... With script on fly I longer need the nwnx_ini to have tmi sets, but lets say for lazy sake I want to leave it do I still have that option?
Back to top
View user's profile Send private message
Baaleos



Joined: 02 Sep 2007
Posts: 830

PostPosted: Wed Jan 05, 2011 10:22    Post subject: Reply with quote

I believe the ini functionality has been removed, so no.
Back to top
View user's profile Send private message
addicted2rpg



Joined: 01 Aug 2008
Posts: 106

PostPosted: Fri Aug 26, 2011 15:51    Post subject: Reply with quote

I think I check these forums about three times a year since 2008 but it feels like yesterday, really Smile I must be getting old....

Found this thread and just wanted to say awesome job on the modifications. Viva GPL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Windows development All times are GMT + 2 Hours
Page 1 of 1

 
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