Post reply

Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?:

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: Kulyok
« on: May 17, 2014, 12:26:26 AM »

XP code is easy - if you download Branwen tutorial NPC mod from http://www.pocketplane.net/oneday , you'll see XP adjustments in her main script(everything is commented, you'll find it easily).

As for custom items, this is my preferred way of dealing with these: install them in the game first, then open your NPC's cre file via Near Infinity or DLTCEP, and choose these items(since they're installed already, you'll be able to equip them). This way you needn't add them to the .cre via .tp2(you can, but it's more of a headache. But that's just me).
Posted by: tibicina
« on: May 16, 2014, 01:34:13 PM »

Two questions. I created a working, installable NPC. Got her to spawn correctly, created and assigned her a kit, and have created custom items for her. I've read that they can be assigned to her (and installed) via the tp2, but want to be sure that it'll work to have the actual item files in an internal "items" folder inside my mod folder when I install. The game, essentially, will be adding the items to the override at install, but I'm anxious about whether the tp2 will look for the items.

The other question, which may really not be a beginner question is how to get her to "level up" at joining if she's brought into the party after level 1. I've observed other NPC mods do this and am willing to take a stab at messing with coding if necessary. She has a kit assigned to her already installed, so the game knows what to do with her as she levels, but I don't know how to code the actual command to add levels similar to my PC, if that makes sense...

Thanks!!  ;D
Posted by: Anonymous Mouser
« on: March 12, 2013, 02:51:01 PM »

Awesome! Thank you for the tips. And setting the global variable worked like a charm.
Posted by: Kulyok
« on: March 12, 2013, 01:33:34 PM »

NumTimesTalkedToGT(0) is what you need, yes. It definitely works for me in Assassinations, for one.  However, while it works well for non-joinable quest NPCs, with a joinable NPC, you might run into problems with keeping score later(not to mention your current problem). I would rather advise you

1) to use a Global variable for that:
IF ~Global("PrefixedVariableFirstDLG","GLOBAL",0)~ f
SAY ~Hello~
++ ~Hi.~ DO ~SetGlobal("PrefixedVariableFirstDLG","GLOBAL",1)~ + control
++ ~Go away.~ DO ~SetGlobal("PrefixedVariableFirstDLG","GLOBAL",1)~ +  gamble
IF ~~ THEN REPLY ~I don't have time for such a stupid person.~ DO ~SetGlobal("PrefixedVariableFirstDLG","GLOBAL",1)~ EXIT
END

IF ~Global("PrefixedVariableFirstDLG","GLOBAL",0)~ second
...

2) Try use shorthand for scripting(the sort I wrote above; also, if you go to http://www.pocketplane.net/oneday and download, say, Coran, his code is a good template, too).

3) If you're serious about your NPC, at some point you might need to register a unique prefix for ALL your filenames and variable names here to prevent incompatibilities:
http://forums.blackwyrmlair.net/index.php?showtopic=113
You definitely shouldn't be using M#, because it's a conflicting prefix, unfortunately.


EDIT: And you probably will get better results if you post EXACT code you have a problem with, because rephrasing it probably loses something in the process(perhaps the very error).
Posted by: Anonymous Mouser
« on: March 12, 2013, 12:36:54 PM »

Very helpful tutorial. I used it in conjunction with other tutorials to make a workable joinable NPC.

However, I'm running into an irritating issue. The NumTimesTalkedTo(0) and NumTimesTalkedToGT(0) variables aren't working for me. My NPC will start the same, first conversation every time she's clicked on without going to the NumTimesTalkedToGT(0) block of text.


Here are some examples of my code, the text obviously changed.

This is the first block:

Code: [Select]
BEGIN M#JUlbra

APPEND ~M#JUlbra~
IF ~NumTimesTalkedTo(0)~ THEN BEGIN Greeting
SAY ~Hello~
IF ~~ THEN REPLY ~Hi.~ GOTO control
IF ~~ THEN REPLY ~Go away.~ GOTO gamble
IF ~~ THEN REPLY ~I don't have time for such a stupid person.~ EXIT
END

This is the last block that should be the second conversation:

Code: [Select]
IF ~NumTimesTalkedToGT(1)~ THEN BEGIN Second
SAY ~My, my, is curiousity eating you yet?~
IF ~~ THEN REPLY ~What did you do exactly?~ GOTO explain
IF ~~ THEN REPLY ~Still not sure.~ GOTO goodbye
IF ~~ THEN REPLY ~What are your talents exactly?~ GOTO talents
END
END

The last block/second conversation is not firing, even when I change the code to this:

Code: [Select]
IF ~NumTimesTalkedToGT(0)~ THEN BEGIN Second
SAY ~My, my, is curiousity eating you yet?~
IF ~~ THEN REPLY ~What did you do exactly?~ GOTO explain
IF ~~ THEN REPLY ~Still not sure.~ GOTO goodbye
IF ~~ THEN REPLY ~What are your talents exactly?~ GOTO talents
END
END

A little help would be greatly appreciated.
Posted by: Kulyok
« on: January 13, 2013, 11:28:33 PM »

It is workable, if you just try to "turn off" your head and just do every line in the tutorial diligently, without thinking - i.e. create a blank text file in the Notepad, later rename it to jondo.dlg via Total Commander, then open and edit it via F4, and do all the other instructions in the tutorial to the letter - not thinking, not criticizing, not trying to do better, just doing. It's tedious, yes, but it's a very good start.
Posted by: Kaeloree
« on: January 13, 2013, 05:10:28 PM »

Perhaps if you asked some questions, we'd be able to help you?
Posted by: Pomacanthus
« on: January 13, 2013, 01:38:37 PM »

Baffling. Sorry, this is not a noobs guide at all. It is quite obvious that a lot of assumptions are made about the new 'modders' knowledge here.
Posted by: Mobius572
« on: November 25, 2010, 12:48:08 PM »

I'm not sure on the TP2 though, somebody help me out?-
Posted by: AJ
« on: September 23, 2010, 01:31:20 AM »

and now im confused...it didnt work i got lost at the .CRE file maybe im not supposed to try making NPC's...
Posted by: YouMustGatherYourParty
« on: August 19, 2010, 02:51:36 PM »

Quote
GlobalLT("Chapter","GLOBAL",1)
Not possible. The game starts in chapter 1 - there's no chapter 0/prologue.

Aha, i see, thanks for the explanation.  :)

/YouMustGatherYourParty
Posted by: Ipsy
« on: August 18, 2010, 04:36:53 PM »

Quote
GlobalLT("Chapter","GLOBAL",1)
Not possible. The game starts in chapter 1 - there's no chapter 0/prologue.
Posted by: YouMustGatherYourParty
« on: August 18, 2010, 02:34:32 PM »

Hi, new poster here!

I have been following this tutorial(love it btw!) and my problem is this:

My NPC spawns in AR1000 at the cords i have specified in the AR1000.BAF file and also starts walking towards/trying to initiate dialogue(According to initdlg.bcs in my CRE file) with my PC but then nothing happens. My NPC is "blue"/neutral and the code of my .d file, provided by Ghrey, is slightly modified as to fitting my NPC using my prefix Q? and the name of my NPC "Zero":

BEGIN Q?Zero

IF ~NumTimesTalkedTo(0)~ THEN BEGIN FirstMeeting
SAY ~Greetings! My name is Zero.~
IF ~GlobalLT("Chapter","GLOBAL",1)~ THEN REPLY ~Hey Zero, you seen Irenicus around here?~ GOTO InquireIrenicus
IF ~~ THEN REPLY ~Heya.~ GOTO Greet
IF ~Class(Player1,PALADIN)~ THEN REPLY ~I know a paladin when I see one!~ GOTO BothPaladins
IF ~~ THEN REPLY ~Go away.~ GOTO GoAway
END  //Only posting this part, please tell me if you need the rest

I set the third parameter of GlobalLT("Chapter","GLOBAL",1) to "1" since i wanted to test my new NPC from a new game(I assumed this was ok), and then used CLUAConsole:MoveToArea("AR1000") straight out of the Irenicus dungeon, thats all the details i can think of atm.

Would be greatful for some pointers!

/YouMustGatherYourParty
Posted by: SixOfSpades
« on: July 25, 2010, 08:04:20 PM »

Sorry, my bad: PowerObsidianSphere is a GLOBAL, not area-based. Everything works now. Thanks, everyone.  :)
Posted by: Echon
« on: July 25, 2010, 04:56:43 PM »

Is my mistake that I'm trying to access a variable local to AR0413 from AR0412?

No. Area variables can be seen by all other scripts.