Skip to content

GetHasSpell function does not work as on 1.69

I have a huge problem.
Most of the caster mobs in my module have a number of spells above the allowed number, and when i save the creature, the dialog box appears: "This creature's wizard class has a maximum of 12 level 9 spells, but has been assigned 40 spells, do you proceed? "
In this case, the gethasspell function in 1.69 returned TRUE whereas in the case of 1.74 it return FALSE with the consequence that AI does not work and casters do not cast spells! If i assign the recommended number of spells all goes back to normal.
But I can not limit to 12, the ninth level spells of the server's strongest boss!
In 1.69 everything worked perfectly, i never had this problem! I have always used the Jasperre AI package, but two days ago we realized that nothing works anymore.

Do you also have the same problem?

Comments

  • shadguyshadguy Member Posts: 154
    Please consider filing a bug report over here:

    https://support.baldursgate.com/projects/nwn-ee-public-bugs/issues/new

    -Dave
  • AlibertoAliberto Member Posts: 80
    done!, we hope they resolve as soon as possible because i have the module completely unusable. :-(
  • AlibertoAliberto Member Posts: 80
    edited March 2018
    open a report unfortunately did not have the desired effect. But i would like to understand something, no one has a non-player creature who must cast more than 15 spells of the same level? Has not anyone noticed that it does not work? O_O

    edit: (after a day of testing ..... )

    I did a very precise test
    - I created a new module
    - I created only one small area
    - I created a single 60 level wizard hostile creature and i put her in the area
    - I removed all the epic spells to the creature
    - I removed all normal spells
    - I entered in the creature's spell list only 12 meteor swarm and 12 sunburst
    - I set the creature's intelligence to 90
    - I modified a single script, nw_c2_default2 (onPerception event)
    and inserted the following lines:


    if (GetIsEnemy (oPercep)) {
    SpeakString ("SPELL_METEOR_SWARM" + IntToString (GetHasSpell (SPELL_METEOR_SWARM)), TALKVOLUME_SHOUT);
    SpeakString ("SPELL_SUNBURST" + IntToString (GetHasSpell (SPELL_SUNBURST)), TALKVOLUME_SHOUT);
    }

    the result printed in game log is that the gethasspell function returns 0 (ZERO) for both spells

    I did the exact same thing in version 1.69 and obviously it worked perfectly, the printed number is 12 for each spell

    it seems superfluous at this point to say that this is a very serious bug, all the scripts of the AI of the creatures are not working, i'm forced to put down the server, and after more than a month of work i feel really very frustrated :-(
    Post edited by Aliberto on
  • shadguyshadguy Member Posts: 154
    Please have patience, it'll probably take a while for someone to get to your report.

    Is it an option for you to continue to run in 1.69 while awaiting NWNEE? Now that Beamdog's talking about redoing all of the art assets, I don't expect a retail quality release for a very long time. At the moment, we're all unpaid volunteer beta testers.

    -Dave
  • AlibertoAliberto Member Posts: 80
    edited March 2018
    Thanks for the reply, we have publicly put down the server 1.69 and accepted the 1.74, we made every effort possible to converge the user on the new server, we have translated everything into English (the server was completely in Italian), worked to resolve the problems related to the lack of many features of NWNX, for example for the management of hardcoded feats, and many other things that i can not even remember now. Unfortunately we are at a point of no return, i tried for three days to rewrite in any way the management of the AI but this function is the basis of everything and is completely buggy. At first i thought it depended on too many spells, i tried to solve with NWNX but the functions that are now available have not helped me, i'm very disappointed at this time, i have not yet decided what to do.
  • GhoseGhose Member Posts: 1
    Hello everyone, unfortunately today i learned about this problem. Since 2012 i play on Nordock and i collaborate with Aliberto, i was the first to buy the 1.74 version, we are putting heart and soul into this project, i hope the beamdog can solve it as soon as possible.

    Thanks, Ghosè
  • leryus87leryus87 Member Posts: 1
    I had never seen Aliberto spend so many hours taking care of NWN :smiley: And if he says he can not do anything i know it's the truth.
    There are already about 10 active players on Nordock, some of which have left the 1.69 convinced by Aliberto and then i understand his disappointment
  • RaspiRaspi Member Posts: 1
    I discovered this server recently, I've been astonished by all the modifications made from vanilla NWN without hackpacks, and how well thought they are. The gameplay and progression on this server is very smooth and under-used classes got some nice buff (and I've played on a lot of servers since the first release of the game years ago).

    I hope this problem will be fixed soon so the development of the mod can continue!
  • AlibertoAliberto Member Posts: 80
    I partially solved it.
    The problem of the GetHasSpell function is that as already noted in other threads for other functions, if the object is omitted, OBJECT_SELF is not used as the default value, it must be written explicitly.
    The problem remains that if the number of spells set with the toolset exceeds the maximum allowed, the function returns an incorrect number.
  • ShadowMShadowM Member Posts: 573
    @Aliberto
    The engine is now following the rules with spell, your best bet is to add the extra spells under special abilities spells.
  • pscythepscythe Member Posts: 116
    edited May 2018
    What about adding a separate counter for the extra spells using local variables and writing your own GetHasSpell function that checks that?
  • ShadowMShadowM Member Posts: 573
    edited May 2018
    pscythe said:

    What about adding a separate counter for the extra spells using local variables and writing your own GetHasSpell function that checks that?

    Because the NPC still would not have the actual spell (the system cuts extra spells), so you have to run that through a system of fake casting ActionCastSpellAtObject / ActionCastSpellAtLocation. A system could be put together, but I just talking short term because this could be patched back in to work as it use too. GetHasSpell function is working in the above example instead log on as a DM and posses the creature with the extra spells you notice they are not there. In 1.69 they would be there.
    Post edited by ShadowM on
  • ShadowMShadowM Member Posts: 573
    @niv
    So any update on this Niv, best way to test it is with dm possession. Seem it knock out other spells from the NPC spell list/and cut spell number down. I notice this mainly with wizards.
  • nivniv Member, Moderator, Developer Posts: 410
    @ShadowM Unfortunately, there just wasn't time to get this in the stable patch that's coming soon. We'll have to address this in a followup beta patch.
  • ShadowMShadowM Member Posts: 573
    Ok, Just glad you guys know about. Thanks :smile:
Sign In or Register to comment.