View previous topic :: View next topic |
Author |
Message |
BelowTheBelt
Joined: 28 Jul 2010 Posts: 29
|
Posted: Fri Apr 24, 2015 17:19 Post subject: Port Function from Linux funcsext to Windows |
|
|
Would someone be willing to help port the linux function CreateGenericTriggerOnLocation from the linux funcsext plugin to windows? I'm happy to support/test/do whatever, but have no clue how to start.
(Thanks to Bhaal for finding this function in the linux version)
GitHub here
Essentially, I'm needing to be able to spawn a trigger from a script. THis seems to spawn a trap and then convert that trap into either a generic trigger or an area transition.
object CreateGenericTriggerOnLocation(location lLocation, float fSize=2.0f, string sTag="") {
object oTrigger = CreateTrapAtLocation(1, lLocation, fSize, sTag);
if(GetIsObjectValid(oTrigger)) {
SetLocalString(oTrigger, "NWNX!FUNCSEXT!SETISGENERICTRIGGER", " ");
DeleteLocalString(oTrigger, "NWNX!FUNCSEXT!SETISGENERICTRIGGER");
}
return oTrigger;
}
Thanks! _________________ www.arenthyor.com |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Wed Apr 29, 2015 14:06 Post subject: |
|
|
Do you have IDA infront of you with the nwserver symbols for win32?
Code: |
*(dword*)&pSetIsTrap = 0x081f3078;
*(dword*)&pSetIsAreaTransition = 0x081f2e5c;
void SetIsGenericTrigger(CNWSTrigger *pTrigger) {
pSetIsTrap(pTrigger, 0);
pSetIsAreaTransition(pTrigger, 0);
}
void SetIsAreaTransition(CNWSTrigger *pTrigger) {
pSetIsTrap(pTrigger, 0);
pSetIsAreaTransition(pTrigger, 1);
}
|
These linux addresses point to methods:
I dunno what the exact name of the methods are.
It seems that by setting a Trigger to be not a trap, or a transition, then it by default will be a Generic Trigger.
The key to a port, will be finding out what the official name of those methods are, and finding their counterparts in the win32 symbols. |
|
Back to top |
|
|
BelowTheBelt
Joined: 28 Jul 2010 Posts: 29
|
Posted: Sat May 02, 2015 0:03 Post subject: |
|
|
Thanks for the help!!
What is IDA? I'll get it, but need a little help in the right direction...
Regarding the symbols, from the below comment from the forum previously, it 'may' exist in the windows _funcs plugin? What file should I look in to pull it out? This is the best my google-fu has been able to turn up.
Posted: Mon Mar 14, 2011 19:10 Post subject: Reply with quote
Short answer: yes, there are 'official' symbols for nwserver.exe, they're just not embedded in the .exe itself. Contact me or any other NWNX developer to get them.
Regarding the Win32 version of Core-2.8 NWServer API: as far as I know, MaxRock already has something similar in his nwnx_funcs plugin.
I don't mind giving a go with a little bit (read that as 'a lot') of help.
Thanks! _________________ www.arenthyor.com |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu May 07, 2015 15:28 Post subject: |
|
|
IDA stands for Interactive Disassembler or something along those lines.
https://www.hex-rays.com/products/ida/
It is possibly one of the better ones to use with nwn and nwnx development.
There are symbols - I have a copy of them, I think the community tries to avoid posting them on public sites to avoid hacker/script kiddies from messing with other peoples PW.
I will see if I can host them somewhere for you to download from.
Try getting IDA free version, or dare I say it..... 'acquire' a full version through whatever means you want...
IDA can then open the symbols, and let you get the memory addresses of the methods within the nwserver executable. |
|
Back to top |
|
|
|
|
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
|