Player Resource Consortium
Neverwinter Nights => Help => Topic started by: Complex on October 25, 2011, 04:06:49 PM
-
Hi guys, we have been experiencing some issues related to PRC in the past and have become more often now that mod became bigger, so we did a Profiler query and got some PRC output:
PRC AI related:
prc_ai_sum_heart 1738 msec 586 calls |
prc_ai_mob_heart 1600 msec 355 calls |
prc_ai_mob_rest 361 msec 1 calls |
prc_ai_sum_damag 521 msec 211 calls |
prc_ai_sum_combt 860 msec 204 calls |
prc_ai_sum_conv 1046 msec 531 calls |
PRC related:
prc_npc_hb 682 msec 355 calls |
prc_switchesc 2477 msec 143 calls |
prc_onunaquire 2081 msec 1125 calls |
prc_onhb_indiv 575 msec 384 calls |
prc_onaquire 18786 msec 12923 calls *|
prc_npc_death 1217 msec 561 calls |
prc_onhitcast 5193 msec 811 calls |
prc_onheartbeat 159891 msec 2666 calls |
prc_unequip 5122 msec 2858 calls |
prc_equip 6212 msec 1597 calls |
These are not prc (except hifs) but are conected via script execute:
hif_onacquireite 62700 msec 12790 calls *|
hif_onplayerequi 5567 msec 519 calls |
hif_onplayeruneq 2788 msec 277 calls |
hif_onunaquireit 3320 msec 1125 calls |
hif_onheartbeat 161033 msec 2666 calls |
mod_on_load 2613 msec 10 calls |
dmfi_onclienter 3718 msec 35 calls |
mod_player_rest 803 msec 180 calls |
Any ideas on how we can optimice this to make things work back again without making module smaller?
we are NOT using cached scripts since i read somewhere that this is not needed, please help us out to have things working back again :)
example:
when having intuitive attack, after user equips an intuitive attack supported weapon, nothing happens, user has to reequip several times to trigger intuitive attack. Same happens to some spells that run over time, like Creeping Doom, which does not stack damage or does not apply correct effects, i know all of these work on smaller modules, so its NOT a PRC bug, but our issue, maybe u know some tips we can follow to optimice stuff or imagine we are missing something to run things as they should.
Our system: Windows server 2008
We use: nwnx
we do not use any data base nor leto, we do not know how lol...
Other haks: CEP 2.4
ACP 4.0
custom hak: this hak contains our creature npc and some prc alterations (2 2da and 3 or 4 scripts)
-
Pretty sure you do need to cache the PRC scripts.
-
so i could cache these scripts in order to get some optimization on our end?
this brings me to a doubt, say i have script X which calls with a ScriptExecute(); my other script Y which taks for ever to execute
should i cache script X or Y ? my guess is i should cache Y, but id like some pr0 opinion
-
i tried adding some of the conflicting scripts, their parents and childs to the cached scripts, it helped a bit, still, for instance, Intuitive Attack is taking about 3 to 4 seconds to trigger (sometimes it does not trigger at all).
any other usefull tip i could use to help these scripts run faster?
-
Intuitive Attack is taking about 3 to 4 seconds to trigger (sometimes it does not trigger at all).
Do you mean resetting after rest or while attacking?
Also, how fast is your server rig & if the lag is occurring OnRest, what else do you have running OnRest?
-
when i switch weapons for example, to a intuitive attack valid weapon it takes about 3 to 4 secs to trigger the additional AB.
I was testing this on my own computer, so no server used, i tried both, by opening module via singleplayer and as a multiplayer emu with homebrew server.
have not tried OnRest tho, OnPlayerEquip uses only prc stuff and some ILR with descriptions, there is a hif script created which calls both scripts, fist prc one.
we have over 1k maps on our module and tons of creatures, i know this is a lot and oversized, but its needed for this is a pw rol playing mod. we did some heavy optimization and helped this from not triggering at all to trigger within 5 seconds (15% of time fails tho).
i guess if i rest it might take the same amount of time but i would not notice due to animation and fade to black, so i wouldt mind if there was some delay on it.
i know this is no prc issue, but our oversized module with tons of stuff on it, still u might know some techs to help optimization