Problem creating henchman

I’m trying to create a creature to turn into a henchman and following the instructions in the Builders’ Manual. However, when I create my creature, open Properties, click on on Scripts tab and “load script set” there is no file entitled “set_xp1_henchmen.ini” to open.

I’m using a Mac on Wine but so far there have been precisely no issues in any aspect of the toolset so I’m confused. Has something changed in EE from the manual ?

They’re not in the same directory the EE toolset opens by default. In Windows (sorry, I can’t really help with a Mac) they should be in the installation …\Neverwinter Nights\data\scr directory. They aren’t the documents …\Neverwinter Nights\erf directory the toolset opens.

Alternatively, grab one of the NPCs from the toolset, e.g. Tomi, and save his script set, then you can load it to another companion. It might be better to grab one of the XP2 companions instead, but you’ll have to open one of the XP2 modules to grab them. I’d avoid the XP1 companions, there’s some buggy stuff in their scripts.

1 Like

Thanks, Wendigo. I know where I had to go after installation to find the .exe for the toolset so I’ll try that path.

Ok, found the file. It was in the Neverwinter Nights/ data/ scr file which is just in a different location. Moved it to the Win32 folder which is the one opened by the game when you choose “Load Scripts” and that seems to work on the Mac. However, getting the conversation right to hire him is proving elusive!

I like the idea of pinching the script set from an XP2 companion but have no idea

  1. which modules would have them (are these official ones or recently built ones?), and
  2. how to go about that.

I’m guessing they will be long protracted conversations if in an official module whereas I’m just looking to march up to someone and ask if he’s for hire and for him to say yes. I know, . . . it’s not gonna be that simple ! :grinning:

Any advice would be appreciated.

I think you can just load the, “set_xp2_henchmen.ini,” script set to get the HotU scripts. The campaign modules are in the installation Neverwinter Nights/data/nwm directory. If you’ve played through the campaigns in the EE you can access them from the toolset by selecting open module and clicking on the campaign modules check box. Otherwise you have to copy them from their directory to your modules directory and change the file extension from .nwm to .mod.

Adding them as a henchman isn’t too tricky. Write your own conversation for them and on the hiring response you add something like:

void main()
{
    object oPC=GetPCSpeaker();
    object oHench=GetObjectByTag("hench_tag");
    SetCommandable(TRUE, oHench);
    AddHenchman(oPC, oHench);
}

as the action script for the conversation node.

N.B. this is the super basic add henchman script. If you have multiple henchmen you might have to do other things, including: checking to see if the PC already has a henchman, firing henchmen who have been previously hired, raising the maximum number of henchmen (IIRC, it’s set to 1 by default), etc.

1 Like

Excellent! Thanks again. I’ll try the simple script tomorrow.

Ok, so I tried the suggested script (which compiled with no errors) but no cigar. I could easily be doing something very stupid as I’m completely out of my depth with scripting.

There were no other henchmen, he didn’t belong to anyone as I’d just put him into the game, my PC only has their Summon Creature which shouldn’t interfere I don’t think.

Loaded the script set (xp2) made up a very short trial conversation for the potential henchman ( a bandit mage I think) which works fine. However, it doesn’t seem to have resulted in a henchman ( although I confess I’m not sure how I’d know - a message at the bottom of the screen, following me) ? Anyway, screenshot of v short convo plus henchman script which was placed in the Actions taken tab.

Am I even close ?

Grab this tutorial. It is all about henchmen. It includes modules with pre-setup conversations and scripts. Just export them as erf files (look under file/export in the toolset) and import into your own modules.

Also, if you haven’t already got it and can use a .chm help file, grab a copy of the lexicon (there is a link to the online version on that project page if you can’t use a chm file). Also grab the scripting FAQ (Frequently Asked Questions with answers) as you’ll find answers to a large number of common scripting problems in it. Also the script generator is useful too.

Once you’ve grabbed stuff, actually take your time reading it. Such things do no good sitting ignored on your hard drive. The lexicon, for example, has a good number of tutorials as well as delineating the built-in script functions. For another example try my scripting primer and you might end up not be quite so out of your depth when it comes to scripting.

TR

3 Likes

You’re close, just where you have “hench_tag” in your conversation, put in the tag of your henchman.

As long as you use add_henchman on the henchman’s conversation node, you can use:

object oHench=OBJECT_SELF;

instead of

object oHench=GetObjectByTag("hench_tag");
1 Like

Perfect ! Thanks, Wendigo. That was an elementary error in not changing the tag, I’m afraid.

I notice that the xp2 scripts allow the PC to view his inventory as well which was another area that reading about seemed could be a problem.

I’m now working on a conversation to ensure that, once hired, I can change his tactics.

Thanks again.

Thanks, Tarot.

I had been using the Builders’ manual for a lot ( excellent manual btw) and now the henchmen section which is good but quite convoluted.

I’ve downloaded that tutorial you suggested to have a look. It looks to be exactly what I was hoping for. Interesting that it didn’t come up for me on a search in the Vault. That has actually happened a few times, that you or someone else has suggested something that didn’t show when I searched for it.

Scripting is still a big issue for me. I can now see better when I look at a script what it is trying to do but am still lost in terms of knowing how to construct one. I went through the Scripting for Noobs one and I’ve used the script generator for simple stuff like FirstTimeTalked etc. but I find that whole area just difficult to take in ( never took to Maths in school or even computer coding later on ).

Will look at your primer when I get a minute but I’m already spending far too much time on this game !!!

Please don’t think it’s a case of me leaving stuff on the shelf unloved - its more an overload situation atm. A quick look at summary of my activity frightens me . . . I only found the game a couple of months ago and have spent the majority of time learning the toolset which I do now have a decent knowledge of so I suppose I’m getting there slowly.

edit: For info in future, just working my way through that first tutorial. The link to the download of the lengthy hiring henchman conversation doesn’t work any more.

Further edit: Just finished this henchman tutorial which showed up in my original search. Really liked it and it worked well although I used the xp2 scripts rather than the suggested ones, just in case anyone asks in future. The Vault is really an unbelievable treasure trove of help and support. !

The actual conversation is included in one of the 2 modules in that download. That is why the link on the online lexicon (apparently - doesn’t show up with a google search) no longer has that particular part of the henchman tutorials but points to the one I linked to because the link was broken.

I am curious as to why you seem to be in quite such a rush to do things before you have a grasp of exactly how to. I realise that the ancient Chinese philosopher Kung Fu Tzu (aka Confucius) said

I hear and I forget
I see and I remember
I do and I learn

but I would advise stepping away for maybe five minutes and just breathe. Make time to slowly read that tutorial of mine (but be warned there are (currently) 3 others). Look I am almost completely a maths duffer which wasn’t helped by the way that I was taught it at school. It was initially teaching myself to program that helped me to understand basic algebra (what do you mean add 2 letters together…) but really I only just understand the simple stuff like Boolean algebra and Set theory (no, really they are simple :slightly_smiling_face:). But I digress. What I am trying to say that for most programming maths while useful is not an essential prerequisite. What is essential is the ability to know the order that things need to be done in. Example - write down, in the correct order, how to tie your shoe laces. Hey presto - you’ve just written a program. OK it’s not a computer program but is still a program.

Anyway, I am waffling again. Just one of other thing. If you find you use something from this site useful it wouldn’t hurt to give it a score on the project page even if the originator has left the community a long time ago. If nothing else it helps to let people know that it is useful (but remember not to remove more than one point for bad English [joke]).

TR

1 Like

:grinning:

There’s method in the madness. Tarot, and I like to think I still know a hawk from a handsaw !

I came across the game a couple of months ago and immediately thought of the Computing Dept. at my old school. While I was there we’d been looking at various avenues for game creation ( Rant incoming including the ill fated Project Spark - Microsoft can truly ruin anything no matter how promising ! ) but couldn’t find anything.

So, in January after finding the toolset I contacted my pal who is PT Computing at the school and asked if I could come up and show him what I’d found. To cut a long story short ( I started a blog on the site in case anyone followed in my footsteps with schools) he loved it and we decided to give it a try in the school next session with a couple of classes. The Games Design class was ideal as, for their course, they have to build a game of their own, import custom objects and involve some scripting. However, if we were going to develop materials we needed to do it quickly and get them tried out.

The only class suitable this year was the current Games Design class and they had coursework to finish by half way through March and exams after Easter. Not a lot of time in-between if we wanted them to trial the materials. So, I had to embark on a whirlwind getting to know the toolset adventure. Hence the frequent requests for help rather than sitting quietly taking my time. You helped with the floor decals which we will use ( along with maybe the custom shields?) with younger classes to get custom objects into their game, The Barbarian has very kindly offered to help us with Blender, which the school has, for custom objects for the older ones and everyone has generally been very helpful.

It may go well, it may not. I really don’t have a handle on the games kids play these days but we’re keen to give it a go. And I’ve thoroughly enjoyed learning to build from scratch.

You’re right that although I’ve been liking posts I really should go back and vote up the actual resources on the Vault and that I shall do, although I’ll be clear on this, there’ll be more than a single point deduction for poor English ( for native speakers obv. ) ! :stuck_out_tongue_winking_eye: