Riding horses in NWN2


Baldurs Gate has a stock magic item called the Tuigan Bow. The Tuigan Bow gets an extra attack every round. The Tuigan are very specifically the Faerun version of Mongols. The bow itself is a shortbow.


Will the rideable horses be available separately from the classes and feats and such? That would make them more widely usable.


Yes of course. The only thing is that at least one rank in riding will be required.


The Bow that is shown in the video was not used until the 17 century and it is not like any other bow ever used. It has only been around about 400 years. This bow is very long on top and short on bottom. Also my understanding is that it took 15 to 20 years to learn to use it with the skill these people do. I am basing my information on what a man that I met in Japan told me when I lived in Japan. I never suggested that the longbow should not be available to horseman. There were Archers that road to battle and dismounted to fight. Also a longbow was found in the Alps on Otzi the mummy and that bow was 72 inches long and made of Yew also. They estimate that bow to be 5300+ years old.


A Welsh longbow can be canted to fire from horseback. It’s probably not as accurate that way though.


Quick update: the main scripts are now compiled and tested, and they work as expected. :grinning:

All playable races will also have the possibility to ride, both male and female:

But as you can see on the half-orc to the left, sometimes there are still clipping / intersect issues. I’d also add that I didn’t test all cloaks and robes possibilities, so there will certainly be some missing.




Next step: export all the animations (only hhf and hhm are complete, oo?, dd? and gg? are ready but not in gr2 format yet).


In order to avoid conflicts with modified contextmenu.xml files, I also added an active feat for the horse menu. So you could either right-click on your character, on the feat or even move the feat to the quickbar (see screenshots here below - the icon is not flying, it’s just that the mouse pointer was not captured) and press the corresponding key/click on the slot to get the horse actions menu:

And yes, I admit it’s more fun adding features than reexport all the animations after the cloak glitches are fixed. But what I could add right now is probably only core classes and prestige classes, and these are not required for the mod so I’m really going to work on the animations right away.


Something strange happened lately: the context menu stopped working. I mean, the menu is still there, but the script won’t fire. I suspect the culprit is the number of functions in the library: when I remove the #include line (and of course all functions using anything from the ride library) from the gui script, the SendMessageToPC show again.
The spell option (with the feat) still works, but then I can only have five subspells. The idea was to use the “spell way” for the attacks and the context menu for the mount/dismount actions, but it looks like I’ll have to use the spell solution for everything. Unless someone knows if there’s a limit in constants, functions or line number in a library (and which it is) that prevents GUI from firing? The wiki says we cannot have more than 8192 identifiers, but I’m way below that value (and there’s no included library in my library, so there are normally no other identifiers in use).


i’ve found that gui-scripts are much more touchy than regular scripts. Apparently gui-scripts compile on the fly, which means they’re (very likely) using a different compiler than the toolset’s – a compiler that is not as robust.

Something that may be relevant, that i found, is that constants whose integer-literals are the same are bad[tm]. The gui-script just fails. eg:

const int INIT_NONE  = 0;
const int INIT_DONE  = 1;
const int INIT_READY = 2;

followed by

const int MATERIAL_NONE = 0;
const int MATERIAL_SKIN = 1;
const int MATERIAL_HIDE = 2;
// etc

has caused gui-scripts to fail consistently on me. I won’t duplicate integer-literals for constants anymore,

[only for gui-scripts, regular scripts are fine.]


There were no duplicates, except for two const float values. I changed one, and removed a lot of the const int that were not in use yet. Recompiled and it worked once again!
If it really is a number of constants limitation, I’ll reduce the messages (most of the constants are actually strref in the tlk table), I’ll keep you posted.
If on the other hand it’s because two floats had the same value, well that’s fixed for now.
Thanks KevL




Does it mean that gui-scripts fail to run without source code files?


should be. I think the engine also checks for a compiled file but ignores it.

The only real test i’ve done of this was with an add-on whose author included a ‘backup’ directory with an obsolete #include that the engine seemed to grab before the proper #include. The obsolete functions caused the gui-script to fail and the fix was simply to remove the backup dir.


Yep, I suppose it’s not using the ncs version of the script: I simply put the non-working version of the #include in the override, and the GUI stopped working. I copied the correct #include from the module to the override, overwriting the incorrect version, and it worked again.
I’m not sure yet if the problem comes from a duplicate float const value, or from the number of constants. I’ll check later.


Almost done!
The PC can now give horses to party members, and provided they have at least one rank in riding (and have a size matching their mounts’), they’ll mount and dismount when given the corresponding order.





Thanks to KevL’s (see thread here), I now think the scripts and interactions between player characters and their mounts are good enough for a beta release.
I just noticed some combinations (dwarf + white horse for example) are missing, so even if I won’t test each one after the other, I’ll at least fix the problems I found before I upload the hak.


As soon as it’s uploaded I’ll test it. Pretty excited about this.


It is impressive how one man is putting something into this game that should have been in there from the beginning. Great job, 4760!


Thanks FaerzressSparkles! :grinning:

There’s something I don’t understand regarding the animations for the female version: the cloak is higher in game, whereas in 3ds max it’s well positioned. I don’t want to use the trial and error method to fix it (in case the issue also appears in other races), so I’m checking the differences in skeletons at the moment. That’s why I can’t give any update this week, but I’m still working on it.