View previous topic :: View next topic |
Author |
Message |
Zunath
Joined: 06 Jul 2006 Posts: 183
|
Posted: Sun Jun 13, 2010 7:57 Post subject: |
|
|
In regards to my earlier comments, I think it was related to the way I was handling the code.
Without going into great detail, I was trying to set the PC's hit points for levels he didn't have which resulted in crashes. You might consider checking to see if they have the level and if they don't then don't make the change.
I'll keep on testing and let you know of any problems I find. Thanks again for porting these awesome tools. It's really helped me make NWN my own game
EDIT: Also, I was looking to use the timing bar functions but they don't seem to be in the include script. The prototypes are there but not the actual function. Any chance I could grab those from you? |
|
Back to top |
|
|
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Sun Jun 13, 2010 12:23 Post subject: Re: Yes |
|
|
Baaleos wrote: |
As far as I know -NO to xp64 or vista64.
64Bit OS's are not compatible with the MADCHook.dll I think, and if the dev were to make one that is, it would require special working being done on all the released dll's. |
Really? I have this .dll in my nwn folder yet im not experiencing any problems with nwnx... And the letoscript does work. (Im rookie, no idea if they are even related)
So... This wouldnt work on my vista64bit? |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Sun Jun 13, 2010 14:40 Post subject: |
|
|
Unless changes were made recently to nwnx modules to make them compatible with xp64. My desktop is xp64, I'm having to test modules on virtualbox, last time I tried nwnx with 64 bit was a year or so ago, didn't work then. Might give it a go. |
|
Back to top |
|
|
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Sun Jun 13, 2010 19:19 Post subject: |
|
|
Well I downloaded this for the hell of it, and first of all, this is easily MUCH better then letoscript and simpler to use. (Simpler to me at least, since this already has all the functions I need)
SO
I wrote a simple script that throws these at an entering object...
Code: | NWNXFuncs_RemoveAllFeats(oPC);
NWNXFuncs_SetAllSkillsToZero(oPC);
NWNXFuncs_AddFeat(oPC, FEAT_EPIC_DODGE);
NWNXFuncs_SetClassByPosition(oPC, 1, CLASS_TYPE_DRUID);
NWNXFuncs_ModSkill(oPC, SKILL_DISCIPLINE, 30);
NWNXFuncs_SetMaxHitPoints(oPC, 66);
NWNXFuncs_SetClassLevel(oPC, 1, 10);
NWNXFuncs_SetAbilityScore(oPC, ABILITY_STRENGTH, 66);
NWNXFuncs_SetCurrentHitPoints(oPC, 6); |
And guess what, it works!
...Somehow...
Everyone of those worked except SetMaxHitPoints (Didnt change the max hitpoints at all)
I ran the script multiple times and it didnt crash and always did the same. (Everything works except the maxHP)
However, as I disconnected (client), the server crashed (Not NWNX).
The crash was of the most annoying nature, windows crying out ''NWN server has encountered a problem..."
(Annoying in that NWNX still thinks the server is running until I press 'close program' in the useless windows 'solution searcher' thing, seriously, has anyone had ANY use of this windows 'service'?)
In addition the character was not saved, and I tried both local and server vault characters. (If that even makes any difference)
(The server is on that Vista 64bit)
EDIT
Added the ExportSingleCharacter function under the previous script... The crash happens because the character is exported instead of logging off. |
|
Back to top |
|
|
ArielT
Joined: 26 Jan 2010 Posts: 30
|
Posted: Sun Jun 13, 2010 21:24 Post subject: |
|
|
Yes. It crashes when people log out with 64bit systems. You should try a 32 bit emulator. |
|
Back to top |
|
|
Sethan
Joined: 04 Oct 2008 Posts: 47
|
Posted: Mon Jun 14, 2010 2:42 Post subject: |
|
|
Man, every time I log in here I check this thread and its like Christmas |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Mon Jun 14, 2010 2:45 Post subject: Merry Christmas |
|
|
We Wish you a Merry Christmas.... lalalalaaaaa.
Ok, that was pointless. Lol
But yes, I agree, the features granted by funcs is beyond brilliant.
Its like multiple christmas's all at once, and hes still adding more if im not mistaken.
Im wondering if its possible to do a Possession one?
Eg - Script in Possession (like DM's can do) but make it so that players possess the npc that they are assigned to by the script.
I remember it being discussed on here before for linux, but never heard where it went.
If it were possible, I would imagine onDeath scripts would need to be capable of handling it.
But would it be onDeath for creatures, or OnDeath for player that controls the creature..... confusion.... |
|
Back to top |
|
|
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Mon Jun 14, 2010 13:08 Post subject: |
|
|
ArielT wrote: | Yes. It crashes when people log out with 64bit systems. You should try a 32 bit emulator. |
Wanna name one?
Google has betrayed me... |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Mon Jun 14, 2010 14:47 Post subject: |
|
|
Virtualbox works well. You just need a windows 32 bit install disc, but they are easilly acquired, enough said on that subject. Lol |
|
Back to top |
|
|
xardex
Joined: 02 Mar 2010 Posts: 40
|
Posted: Mon Jun 14, 2010 16:08 Post subject: |
|
|
Just before I go about hassling with the box, will I be able to host with it?
Does it affect performance and/or pings? |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Mon Jun 14, 2010 16:25 Post subject: Depends on your specs |
|
|
If you have a good spec Host machine. eg the physical Box.
Then you can set the virtual box settings to anything you want, up to the max of the host machine.
Eg - Got 4 Cores on ur processor, u can assign, 1,2,3, or 4 of them to virtual box.
Got 4 GB Ram, you can assign any amount of ram to your virtual machine.
I have mine set to Single Core, and 1gb Ram
Single Core being an AMD 6400+ 3.2GHZ Dual Core Processor, so it does me.
Not forgetting that nwnserver works properly only with single core affinity, so assigning more cores, is pointless.
Pefrormance wise, sometimes I notice the Virtual Machine reacting faster than my host machine, because the virtual machine ONLY has the applications running that are needed.
Eg - nwnserver etc.
Unfortunately I cannot guestimate ping etc,
I have my internet connection in my house set up in a weird way
Internet connection - > Wireless Router - Broadcasts to whole house
But I also have an ethernet going out of the router, into -> Powerline Network Adapter which connects to my other Powerline Network Adapter in my bedroom connecting to my Router for my bedroom connecting to my Desktop PC which then hosts my Virtual Machine
Essentially, I have my virtual machine , behind 2/3 routers, and have it in the DMZ of both.
Well... I have the second router, in the dmz of the first, and then the virtual machine, in the dmz of the second.
Which works
Ping wise - depends on the client connecting, someone in the UK would get ping of around 50-60ms
Someone in america might get 300+
If you intend to use a virtual machine for nwn, you should set your network adapter in virtualbox to be a bridged adapter, and select your physical adapter from the list.
This will make it so that VirtualBox has access to whatever comes through on that adapter.
It will also get an ip address in the same subnet, allowing ping to and from the network.
Means you can also specify that ip address for port forwarding and dmz.
eg - My Physical Machine is
192.168.2.7
Virtual Box is - 192.168.2.10 |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jun 17, 2010 18:33 Post subject: Timing Bar |
|
|
The code for the Timing Bar is in the dll source, I've had a look.
Im working on getting the function declaration working myself.
I am gonna give this a go.
Code: |
void NWNXFuncs_StartTimingbar(object oPC, int iDuration, int iLabel)
{
SetLocalString(oPC, "NWNX!FUNCS!TIMEBARSTART", IntToString(iDuration)+" "+IntToString(iLabel));
DeleteLocalString(oPC,"NWNX!FUNCS!TIMEBARSTART");
}
|
Had a look at the functionlookup file, and I think this is the function lookup identifyer it uses, the only question is, whether these are the correct syntax for the parameters.
Think this should work... had another look.
Code: |
int CNWNXFuncs::TimebarStart() {
if (!GetIsCreature()) {
_log(2, "o Error: TimebarStart used on non-creature object.\n");
sprintf(Params, "-1");
return 0;
}
nwn_TimebarStart((CNWSCreature*)oObject, P1, P2);
return 1;
}
|
Its expeceting P1 and P2.
Im assuming all the parameters get parsed before they get to this point. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jun 17, 2010 18:56 Post subject: Good news |
|
|
Good News is that with a simple function like that, you can trigger the Start and Stop functions for the timing bar,
However, I dont think I passed the parameters into it the correct way.
I tried to get a 15 second time bar, and it filled up within 1 second, then stayed on screen for 15 seconds, then dissappeared.
So this means that the Stop Timing bar function I wrote in my module works... it can accept any value.
I used the value "blah" in the SetLocalString
However, the StartTiming Bar didnt seem to work correctly, since it didnt make the bar fill up slowly, instead insta filled it. |
|
Back to top |
|
|
Baaleos
Joined: 02 Sep 2007 Posts: 830
|
Posted: Thu Jun 17, 2010 19:13 Post subject: SetMaxHP didnt work... :-( |
|
|
As someone has already said.
SetMaxHP doesnt seem to be working.
Quote: |
- StrReq: "TIMEBARSTART" Params: "15 9"
- StrReq: "SETABILITYSCORE" Params: "0 5 1"
- StrReq: "SETABILITYSCORE" Params: "1 2 1"
- StrReq: "SETABILITYSCORE" Params: "2 2 1"
- StrReq: "SETABILITYSCORE" Params: "3 2 1"
- StrReq: "SETABILITYSCORE" Params: "4 2 1"
- StrReq: "SETABILITYSCORE" Params: "5 2 1"
- StrReq: "SETMAXHITPOINTS" Params: "24"
- StrReq: "TIMEBARSTOP" Params: "blah"
- StrReq: "SETMAXHITPOINTS" Params: "16"
|
Im experimenting with a custom leveling up system, so its kinda crucal. Lol
Player had 12 hp, they were to gain d12(1) hp , which is what bought it up to 24 (it never moved though) and then on top of that, if the level they are leveling to, is even, then gain 10+10% of their current max hp or something or other, but that explains the 16 instance. It didnt raise to 16 either though. |
|
Back to top |
|
|
MaxRock
Joined: 24 Jan 2008 Posts: 196
|
Posted: Fri Jun 18, 2010 6:50 Post subject: |
|
|
Sorry about all the bugs, guys.
I'll try to get to it within the next couple of days. |
|
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
|