Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Dark Dreams of Furiae - a new module for NWN:EE! Buy now
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

Please help with horse script

So a couple years ago, I learned how to write scripts for NWN (Pre-Steam), and was able to create a really fun mod.

In this mod I have a horse market, with traders and horses of varying price and abilities... and some quirks ;P

It all worked perfectly.

When I ran the old mod, as is, in the new Steam NWN, it still worked, I could buy horses and mount them... etc.

But there were many other issues with the code not working, resulting in corruption of the mod.

So I broke down the whole mod, area by area and exported them individually.... started a new file in the new Steam NWN Aurora toolset, and imported each area individually.

That worked and I now have a good clean, uncorrupted mod I can work with.

However, some things at the micro level are now broken, including my horse market.

I can talk to a trader, he will take my money, but it no longer generates the horse....

Here is the script I was using, I am having to remember this all after not touching it for 2 years, and I am at a loss for why this isn't working now, when it did a couple days ago....


Script

// An existing horse with a tag of "HorseTemplate" is used to create a new horse
// with a tag of "NewHorse" near the PC, who becomes the owner of the new horse.
#include "x3_inc_horse"


void main()
{
// Remove some gold from the player
TakeGoldFromCreature(600, GetPCSpeaker(), TRUE);

object oPC = GetPCSpeaker();
//object oHorse = HorseCreateHorse(GetResRef(GetObjectByTag("HorseTemplate")), GetLocation(oPC), oPC, "NewHorse");

object oHorse = HorseCreateHorse("saddle_hrs_spot", GetLocation(oPC), oPC, "NewHorse");

Script


Thanks in advance for any and all help!

Comments

  • meaglynmeaglyn Member Posts: 87
    Did you export and re-import your blueprints? For example "saddle_hrs_spot".

  • SmithoresSmithores Member Posts: 10
    edited August 2020
    >>>>ADDITIONAL INFO<<<<<

    I saw on this forum, someone else having issues with the horse system, using older scripts... they eventually figured out it was some old incompatible code was causing the error, specifically:

    ( #include "x0_inc_henai )

    I have commented this out on all the scripts I could find that use it, this does NOT fix my issue.

  • SmithoresSmithores Member Posts: 10
    meaglyn wrote: »
    Did you export and re-import your blueprints? For example "saddle_hrs_spot".

    Thank you for your reply Meaglyn! I have not, I will do that! Once I figure out how lol! I think this may also be the key to other broken links... I noticed that none of the many custom items I created show up in the list, even though they appear in game, guessing it's a similar thing. I will look for a list of things I should export/import to the new module. THANK YOU!!!!

  • SmithoresSmithores Member Posts: 10
    meaglyn wrote: »
    Did you export and re-import your blueprints? For example "saddle_hrs_spot".

    Meaglyn.... I looked up "Blueprint", which seems more of a concept than a hard-coded thing.... for instance, in the old Aurora Toolset, when you modified a creature, it would be copied into the "Custom" tab. From there you could say, modify a warrior, turn it into a custom guard, and place them all over the map.

    To me, that's a blueprint, or template? I see both these terms used.

    Sadly, since I started using the new NWN (Steam) Aurora Toolset, none of my custom items/creatures appear in the Custom tab... perhaps this is what you mean?

    I am guessing I have to export each individual creature/item and re-import them into the new NWN Aurora Toolset. Then they will appear in the Custom tabs again?

    Thanks again for your help!

  • SmithoresSmithores Member Posts: 10
    meaglyn wrote: »
    Did you export and re-import your blueprints? For example "saddle_hrs_spot".

    Okay! I found it... took some digging around, but I found it! I am good for now I think, thanks again.

Sign In or Register to comment.