Aller au contenu

Photo

Community Patch discussion and development thread


  • Veuillez vous connecter pour répondre
919 réponses à ce sujet

#351
Shadooow

Shadooow
  • Members
  • 4 470 messages

I find one bug in the code that fixed the issue for me. I prepared an updated version of the 1.71 addon with additional features:

 

download on project page

 

new content:

 

- Find Traps spell on hardcore difficulty will now reveal trap position for everyone in party including all associates and even players in different area
- fixed the switch for controlling old henchman inventory which wasn't included in first release
- new henchman AI improvements:
-- improved henchman AI performancy
-- fixed henchman healing in certain situations where it was broken before
-- improved henchman command for dealing with traps - previously if the nearest trap from master was too far it failed, now in such case henchman will try to deal with traps related to his position
-- henchman will be now able to handle trap that only his master can see
-- when told to deal with trap from radial command, the henchman conversation option to not help with traps will be ignored now

 

NWNX_Patch and NWNCX_Patch updated:
- softcoded the Devastating Critical ability - builder is now able to edit and modify this ability entirely within NWScript, the new script name is "70_s2_devattk".
- fixed bug when Improved Sneak Attack didn't work for assassin's without at least 1d6 rogue or BG sneak attack.
- fixed bug in Deflect Arrow ability that determined the defender's weapon relative to the attacker creature size (thus when there was kobold shooting, if defender had a scimitar in hand this ability didnt worked before etc.)

 

 

 

few notes:

I havent changed the trap behavior because I think it is intented. If its in combat it should work, if its outside of combat (no enemies in sight) you should use radial menu if you wish to be healed by henchman. Because there might be a situation when there is a unlimited ground trap which you will cross and trigger and gets you almost killed - if the henchman automatically run to you in attempt to heal you he will trigger it again and you are both dead ;) .

 

I havent yet debugged the passive issue. When I loaded your saves there was no creatures in sight and when I went further in area Linu normally reacted. Havent noticed you two new saves, will try these then.

 

As for your bug with interrupting spellcasting. I really need some savegame where this happens soon after I load game. Currently all your savegames was "after-combat" and thats wont help me spot this exact issue.

 

And as for the disappear/hostile bugs in OC. I dont think I will be able to fix these as they might be controlled within the OC module which I have no intent to modify atm.

 

EDIT: your new saves are perfect, working on this


Modifié par Shadooow, 21 juin 2014 - 02:38 .

  • henesua aime ceci

#352
Bogdanov89

Bogdanov89
  • Members
  • 139 messages

Thanks for the super fast updates :)

It will be absolutely awesome if the AI passive bug was fixable as well!

 

I am sorry the first saves were not all that helpful, i thought they needed to be "after combat" so that you can read an AI log or something similar.

 

Next time i record i will make sure to do it during the battle and just as the last monster dies.



#353
Shadooow

Shadooow
  • Members
  • 4 470 messages

Thanks for the super fast updates :)

It will be absolutely awesome if the AI passive bug was fixable as well!

 

I am sorry the first saves were not all that helpful, i thought they needed to be "after combat" so that you can read an AI log or something similar.

 

Next time i record i will make sure to do it during the battle and just as the last monster dies.

Ive already looked into it and it wont be so easy. In last save, the character has a "im in combat" flag, that is normally present only during an attack or casting a spell. I dont know how this happened, it definitely shouldnt happen, might be related to saving/loading game or radial commands. Will take some time to find out.

 

Now I am working on further henchman healing AI improvements. Features I plan:

- to choose healing spell based the master lost hitpoints thus not wasting powerful heal spells when not needed

- to use defensive casting when surrounded or when he henchman has granted success based on his concentration skill

- to use harm spells if the master is undead (rare case but I suspect that if that happens, AI will use normal heals)

- possibly heal other henchman too

 

Oh please and after you run with the new AI please tell me your thoughts and results with it.



#354
MannyJabrielle

MannyJabrielle
  • Members
  • 229 messages

For the healing out of combat thing, perhaps this could be added as a switch if possible?  Some modules have limited resting (either only in specific areas, or time-restricted resting) so in those instances it would be better for the henchman to heal outside of combat only when directly ordered to.



#355
Shadooow

Shadooow
  • Members
  • 4 470 messages

For the healing out of combat thing, perhaps this could be added as a switch if possible?  Some modules have limited resting (either only in specific areas, or time-restricted resting) so in those instances it would be better for the henchman to heal outside of combat only when directly ordered to.

I think this is not needed. With the bug I fixed the healing should be more reliable now so the situation that you end up combat with low hp and your henchman will do nothing shouldnt happen at all.

 

The problem was in fact that when there was no enemy, the calculating the distance from an enemy failed and thus AI thought its too close to enemy to cast a healing spells. I fixed this so even if you kill last enemy and specially in that case, henchman should immediately heal you as long as he got spells or he heals you over the limit you told him.

 

So healing out of combat shouldnt be needed at all. Try the new AI and we will see.

 

BTW, there was one setting which I found out is not used at all. There was a switch probably intented to be changed in conversation to (dis)allow henchman to cast healing spells if he is in close combat. But the default value was disallow and this switch wasnt added into game at all. So whenever the henchman was in close combat he never healed master. I changed this behavior and now this depends on the combat casting feat. If the henchman has it he will be able to heal in close combat.


  • Rolo Kipp aime ceci

#356
Shadooow

Shadooow
  • Members
  • 4 470 messages

Some new goodies I made in last days:

 

- softcoded healer's kit

- fixed the healer's kit instant heal bug

- fixed holy avenger enhancement bonus issue

- allowed to place counterspell into quick slots

 

Now I have a question: Would anyone mind if I would changed the scripting in default AI scripts to be more efficient? I previously haven't considered this for a readability/comparable reasons, however since the AI scripts are called so often, the gain in efficiency could be significant enough to prevail these drawbacks.

 

And for now I would stick with small changes such as rewriting lines like "bSomething == FALSE" into "!bSomething", "bSomething == TRUE" to "bSomething".

 

Anyone against?


  • henesua aime ceci

#357
henesua

henesua
  • Members
  • 3 878 messages

that sounds great, Shadooow.

 

one question about those examples you give. That tends to be my practice, but I didn't realize it was more efficient to do that. I imagine the gains for such changes would be small, but I could be wrong.

 

One thought I had about these changes you are making… its almost like we need some kind of version control for your project so that we can track changes and more easily incorporate them into our own code. Are you at all interested in doing that? I'm an ignorant newb with setting such things up, but if you set it up for your project I would learn how to use it. Might even contribute if you are interested.



#358
Shadooow

Shadooow
  • Members
  • 4 470 messages

that sounds great, Shadooow.

 

one question about those examples you give. That tends to be my practice, but I didn't realize it was more efficient to do that. I imagine the gains for such changes would be small, but I could be wrong.

yes small and unnoticeable but there is like 200 such conditionals almost every AI pass which is in combat very very often, especially on higher levels where both player and creature has more than 4 attacks per round. Multiply this by time that each creature stands alive in combat and a number of creatures that dies in your module until you reset it or it crashes and this small unnoticeable gain might become noticeable.

 

One thought I had about these changes you are making… its almost like we need some kind of version control for your project so that we can track changes and more easily incorporate them into our own code. Are you at all interested in doing that? I'm an ignorant newb with setting such things up, but if you set it up for your project I would learn how to use it. Might even contribute if you are interested.

I dont have a good experiences with such tools. I have used svn once as a user but this github thing... Tried to use that for my nwnx_patch source but its needlessly hard to set it up and given how many peoples (few) are interested in this it seems to me like waste of time. As for incorporating latest news. Most of it is done within the nwnx_patch and nwncx_patch automatically, no setting there. There is only few script fixes now and most of them is included only because they needed to be recompiled. Actual change is done only in three scripts and its quite easy to compare the new files with the scripts in 1.71 builders resources.



#359
henesua

henesua
  • Members
  • 3 878 messages

no problem on the version control thing. i like it when its set up for me, but since I can't set it up I'm not going to be the one to insist you do it. I still need to set it up for myself….

 

For a project like yours though I can see the advantages for putting the code on GIT and making it collaborative. Until you have several people eager to help however… I agree that it is not worth your time.



#360
Shadooow

Shadooow
  • Members
  • 4 470 messages

So... I learned henchmans to resurrect their master. The question is whether is this good idea to do as it might make game too easy especially in HotU where the rod of resurrection is first item you get....



#361
Bogdanov89

Bogdanov89
  • Members
  • 139 messages

I have not been able to play NWN the last few days due to college exams.

 

About the passive AI problem, would it be somehow possible to make the "Attack Nearest" command be automatically send to all companions/henchmen when a player attacks a hostile monster (or changes targets between monsters)?

 

Either that or perhaps, if possible, make the command "Attack Nearest" automatically repeat (duplicate) itself every ~10 (or whatever time period) seconds after a player has manually ordered the "Attack Nearest" - in that way it acting as a "hostile mode" for the henchmen/companions?

 

Most of the passive AI issues get solved by manually clicking the "Attack Nearest" command (not always, but in most cases).

So i thought if the "Attack Nearest" command was somehow automatized so that it "sends itself" every couple of seconds, the henchmen/companion could be forced into a constant aggresive mode.

Such a mode would obviously be countered by clicking "Follow me" or "Guard Me", if you don't want your hench/companion to be aggresive at that moment.



#362
MannyJabrielle

MannyJabrielle
  • Members
  • 229 messages

Having henchmen attack nearest when the PC attack pretty much duplicates the "guard me" command, wouldn't it?  That too has them stay passive until the PC attacks, while 'attack nearest' would have the henchmen attack enemies on sight without the PC having to get directly involved in combat.

As for resurrecting henchmen.... I don't see this as an issue as in the OC's except for SoU.  In the OC and HotU, the player is automatically zoned to a temple of tyre/the gatehouse on death.  It's only in SoU where there's no respawning option (and even then just in the interlude and chapter 2.... chapter 1 has an auto-zone to Drogan's house).  Unless the henchmen manages to fire off a resurrection a split second after the PC dies, but before the ondeath script zones them to the safe-area, I don't see it really having any effect either way.

 

For player made modules that would be a different story, and it would go module by module.



#363
Shadooow

Shadooow
  • Members
  • 4 470 messages

Bogdanov - its definitely doable but thats a workaround and not a fix. I would like to fix it completely, not just workaround it. Still in my todo list, just give me time.

Having henchmen attack nearest when the PC attack pretty much duplicates the "guard me" command, wouldn't it?  That too has them stay passive until the PC attacks, while 'attack nearest' would have the henchmen attack enemies on sight without the PC having to get directly involved in combat.

As for resurrecting henchmen.... I don't see this as an issue as in the OC's except for SoU.  In the OC and HotU, the player is automatically zoned to a temple of tyre/the gatehouse on death.  It's only in SoU where there's no respawning option (and even then just in the interlude and chapter 2.... chapter 1 has an auto-zone to Drogan's house).  Unless the henchmen manages to fire off a resurrection a split second after the PC dies, but before the ondeath script zones them to the safe-area, I don't see it really having any effect either way.

 

For player made modules that would be a different story, and it would go module by module.

Well normally in OC/SoU you cant manage henchman inventory and Im sure that the companions in there doesnt possess any resurrect items or spells. So if player toggle a switch to control their inventory and equip them with resurrect scroll its his responsibility.

 

Thanks for HotU reminder, then its ok I guess.

 

As for player modules, if the henchman has such spell/item normally, I would assume that original author intented the henchman be able to use them. In case you give res scroll/rod to your henchman manually, that might be issue though. But still probably the player's responsibility right?



#364
MannyJabrielle

MannyJabrielle
  • Members
  • 229 messages

Yes, it would still be the players responsibility.  I actually am having trouble thinking of *any* SP module where henchmen being able to use resurrection/raise dead would be an issue.



#365
Bogdanov89

Bogdanov89
  • Members
  • 139 messages

I got some free time this weekend and i would like to help fix the AI bugs if possible.

 

ShadoOow, do you still need save games with the bugged AI?

If yes, then please tell me at which point is it best i do a save (during combat or after it, or something else?)

 

If i can help by doing something else, please let me know :)



#366
Shadooow

Shadooow
  • Members
  • 4 470 messages

I got some free time this weekend and i would like to help fix the AI bugs if possible.

 

ShadoOow, do you still need save games with the bugged AI?

If yes, then please tell me at which point is it best i do a save (during combat or after it, or something else?)

 

If i can help by doing something else, please let me know :)

saves wont help me anymore at this point but thanks



#367
MannyJabrielle

MannyJabrielle
  • Members
  • 229 messages

Has anything about healing kits been changed in the patch?

I'm curious because I was mucking about with SoU chapter 1 last night, and I noticed that the healing kits were not working as usual on the wounded NPCs in the starting town.  Usually when you use the kits on the three wounded halflings by the caravan and the two wounded humans in the town hall, you receive 25 XP, alignment shift towards good, and the NPCs stand up and say thanks.  However, with the community patch, the NPCs are healed, but I get no XP, no alignent shift, and stay down.



#368
Shadooow

Shadooow
  • Members
  • 4 470 messages

Has anything about healing kits been changed in the patch?

I'm curious because I was mucking about with SoU chapter 1 last night, and I noticed that the healing kits were not working as usual on the wounded NPCs in the starting town.  Usually when you use the kits on the three wounded halflings by the caravan and the two wounded humans in the town hall, you receive 25 XP, alignment shift towards good, and the NPCs stand up and say thanks.  However, with the community patch, the NPCs are healed, but I get no XP, no alignent shift, and stay down.

Not yet. I have softcoded healers kit but that wasnt yet released. Are you sure this works with healers kit normally? healers kit doesnt run any script normally so the only way to do that is in onheartbeat. If its at the start I can look into this and verify this.



#369
MannyJabrielle

MannyJabrielle
  • Members
  • 229 messages

Yes, it works normally (when I start SoU, it's one of the first things I do to get a level up before heading out of the town).

I'll open the chapter1 module in the toolset later tonight and see how exactly bioware set it up.  I was thinking it stopped working because of the community patch for some reason as that and kamiryn's customizer are the only two modifications I have on my NWN install at the moment, and Kam's does absolutely nothing with healing, it's just armor/pc appearance changing.



#370
Shadooow

Shadooow
  • Members
  • 4 470 messages

Yes, it works normally (when I start SoU, it's one of the first things I do to get a level up before heading out of the town).

I'll open the chapter1 module in the toolset later tonight and see how exactly bioware set it up.  I was thinking it stopped working because of the community patch for some reason as that and kamiryn's customizer are the only two modifications I have on my NWN install at the moment, and Kam's does absolutely nothing with healing, it's just armor/pc appearance changing.

Okay, seems you've found the first CPP bug. Thanks for report.

 

First I was wrong. This is something I had no knowledge about, healers kits are actually running the OnSpellCastAt event with the 503 spellid. Very interesting.

 

Second the problem is in the new default OnSpellCastAt script. Normally this script does an combat AI which causes weirdness in situations whether the creature is not commandable. The most usual case is repeated undead turning. When you turn the undead for second time, it forgets its turned and go attack you again. I effectively fixes this by canceling this script for non-commandable creatures. Thats the situation of those halfling as they are set up non commandable by script so player can't speak to them. And at the OnSpellCast event there is a line that fires OnUserDefault (where the xp is given). But in the CPP script version of the SpellCastAt the script won't reach this line in this situation at all so the OnUserDefined won't trigger.

 

Fix for this here: download, put into override and in case you have there 1.71 addon, replace it with this version. (Or in case you are a module builder, open module and put into modules/temp0) This will be added into 1.71 addon in next release.


  • MannyJabrielle aime ceci

#371
Bogdanov89

Bogdanov89
  • Members
  • 139 messages

I got two minor strange things to report, maybe they are bugs.

 

Been playing multiplayer original campaign with my brother over internet (cpp 1.71 final) and we could not progress through a couple of quests - however right now i only remember one such quest (i am stupid for not writing it all down :( ).

 

One was the "fight in the arena to win a tavern" quest in the first chapter (the fancy rich district where the crazy wizard took the nymph creature).

 

First my brother tried challenging the first contended to fight (some dwarf) and he defeated (killed?) him, but the quests did not update - every time he tried fighting again he fought against the same dwarf, instead of progressing through the fighters.

 

Then i tried it and got the same buggy result.

 

 

Separate question, would it be in any way possible if we could have combat modes like Defensive Casting and Power Attack mode last until we cancel them manualy - and not as soon as the mode itself chooses to turn off?

 

On my cleric i like casting in melee combat, but it is reaaaally annoying to constantly have to manually activate Defensive Casting (to skip AoO against me).

Also on my weapon master/barbarian i have a really high attack bonus, so usually i am guranateed to hit my enemy - so i would fancy having a constantly turned on Power Attack mode without having to click on it every damn time.



#372
Shadooow

Shadooow
  • Members
  • 4 470 messages

Separate question, would it be in any way possible if we could have combat modes like Defensive Casting and Power Attack mode last until we cancel them manualy - and not as soon as the mode itself chooses to turn off?

 

On my cleric i like casting in melee combat, but it is reaaaally annoying to constantly have to manually activate Defensive Casting (to skip AoO against me).

Also on my weapon master/barbarian i have a really high attack bonus, so usually i am guranateed to hit my enemy - so i would fancy having a constantly turned on Power Attack mode without having to click on it every damn time.

Yes, this is something I was considering to add as thats what I did for my personal PW some time ago already. Before I add this, please lets think about possible issues / personal preferences. Could this break something? Could someone not wanted this? And btw this would need the NWNX plugin to work.

 

One note, the defensive stance mode gets bugged when casting spell - it will not cancel itself but its deactivated in such case, this is unfortunately something I wasnt yet able to fix...

 

Will test the arena quest.



#373
Gruftlord

Gruftlord
  • Members
  • 350 messages

this auto toggle sounds more like something that should be a separate mod to me. or at the least a togglable option that is disabled by default

 

btw, currently hidden doors do spawn in a closed state for me now, but they do not open when activated. (possige CPP issue)

also i think i found a mesh error: the left pauldron of the Bone Golem is turned to the back instead of to the side (vanilla bug)



#374
MannyJabrielle

MannyJabrielle
  • Members
  • 229 messages

Defensive *stance*, or defensive casting?  Casting is a mode available to all spell casters.  Stance is the dwarven defender ability.



#375
Shadooow

Shadooow
  • Members
  • 4 470 messages

this auto toggle sounds more like something that should be a separate mod to me. or at the least a togglable option that is disabled by default

 

btw, currently hidden doors do spawn in a closed state for me now, but they do not open when activated. (possige CPP issue)

also i think i found a mesh error: the left pauldron of the Bone Golem is turned to the back instead of to the side (vanilla bug)

hmm, can you tell me why?

 

weird, I have tested the doors and they opened for me, but maybe this got messed up when I compiled model, will check EDIT: works for me with hidden doors I set up in toolset, can you post a savegame? might be different scripting there or something
I haven't messed with creatures in max yet - maybe you can fix it and send it to me?

 

Defensive *stance*, or defensive casting?  Casting is a mode available to all spell casters.  Stance is the dwarven defender ability.

right, I misread it


Modifié par Shadooow, 28 juin 2014 - 11:26 .