Author Topic: My NPC Mod needs help  (Read 14653 times)

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #25 on: April 01, 2006, 01:45:57 PM »
The romance timer should be in the NPC's dialog file. Associated with each dialog.

For the timers. the check would be:
IF
    GlobalTimerExpired("TNORomance","GLOBAL") or
    RealGlobalTimerExpired("TNORomance","GLOBAL")

You can also use !GlobalTimerExpired("TNORomance", "GLOBAL") or
GlobalTimerNotExpired("TNORomance", "GLOBAL")
To see if the timer is still running.

But to set the timer it would be:

THEN
    RESPONSE #100
        SetGlobalTimer("TNORomance", "GLOBAL", 28800) or
        RealSetGlobalTimer("TNORomance", "GLOBAL", 28800)

And you would put the Set at the end of each dialog, so the engine knows how long before the next dialog.

To add items to a .cre (I assume you are using NI) go the the Edit tab (NOT under Items/Spells, the top right tab is Edit) and click on the Add button (bottom left)

Choose Item and it will create a blank item for you.
View/Edit the newly created item, and you can choose from a list of all the items currently in the game. Plus you can add flags, such as Undroppable or Not Stealable. To add an item that you created, you would have to install it first, THEN do this.

Once you have the item you want selected, close the view/edit item window and return the the Edit creature page, now you have to tell the game where the item is. Below the newly created item will be a long list of possible places to put items (armor, helm etc), each of these fields will generally have a -1 in it. (-1 is for null) To actually have the .cre use or carry an item, you have to replace the -1 with the item number (this is NOT the resource reference).
The first item a .cre is given is item 0. So if you added the armor first, under the armor slot you would put a 0. The second a 1, the third a 2, and so forth. What the newly added item is called is it's number. (The left field will say Item 0, Item 1, Item 2 etc)

I'm going to include this here in case you don't know about it:
http://iesdp.gibberlings3.net/main.htm

IESDP is a list of pretty much everything that is known about BG2's functions and their syntax. Click the Actions:BG2 ToB to see all of the possible actions you can use. (actions are things that go under RESPONSE). Trigger:BG2 ToB has all of the possible triggers you can use (triggers are things that go under IF). You can ignore Identifiers for the most part.

Hope that helps.
« Last Edit: April 01, 2006, 02:01:40 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #26 on: April 01, 2006, 04:38:29 PM »
Hmm, when I was working on the romance, I followed the romance guide. It told me to put this into my override file, which I assume is the dialog file:

IF
 ~Global("S-TNOMatch","GLOBAL",1)
 Global("S-TNORomanceActive","GLOBAL",1)
 Global("LoveTalk","LOCALS",1)
 GlobalTimerExpired("S-TNORomance","GLOBAL")
 !AreaType(DUNGEON)
 !StateCheck(Player1,STATE_SLEEPING)
 !StateCheck(Player1,STATE_STUNNED)
 !StateCheck(Player1,STATE_SLEEPING)
 Gender(Player1,FEMALE)
 InParty(Myself)
 See(Player1)
 !StateCheck(Myself,STATE_SLEEPING)
 !StateCheck(Myself,STATE_STUNNED)
 !StateCheck(Myself,STATE_SILENCED)~
THEN
  RESPONSE #100
  IncrementGlobal("LoveTalk","LOCALS",1)
  INTERACT(Player1)
END

When I install it, WeiDU is telling me something is wrong with the area from THEN to END, but I can't tell what. Its saying there is a parse error and syntax error near #100... so I inserted ~ around Response and ended the ~ after Player1), but it said the same error was near END, so I figured that was wrong... I can't figure it out. :(

And just to make sure I'm on the right track, in my banter file, here is the first romance talk (if anyone could look it over for oddities, that would be awesome):

IF ~Global("S-TNORomanceActive","GLOBAL",1)Global("LoveTalk","LOCALS",2)Global("S-TNOMatch","GLOBAL",1)GlobalTimerExpired("S-TNORomance","GLOBAL")~
THEN BEGIN RomanceTalk1
SAY ~Hey, <CHARNAME>, I was wondering... you don't have anything against me being a thief, right?~
IF ~~ THEN REPLY ~What? No, of course not. You have benefited our group in many ways already.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine1
IF ~~ THEN REPLY ~Well, I don't really appreciate your life style, but I respect you, and you... nevermind.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine2
IF ~~ THEN REPLY ~No, you are a thief, and I think that is a fine profession. I also think that you are a fine person. You aren't "good", but you are certainly... well, you get the idea.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine2
IF ~~ THEN REPLY ~You steal me things and kill me things, and that is as useful as you'll ever be. Go away.~ DO ~SetGlobal("S-TNORomanceActive","GLOBAL",3)~ THEN GOTO RomanceEnd1
END

IF ~~ THEN BEGIN ThanksLine1
SAY ~Oh, well, I am glad I can benefit the party. I just hope that in the future I can also benefit... us.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN ThanksLine2
SAY ~Thanks, that really means a lot to me, especially coming from you...~
=
~*Cough* Well, I think we'd better get moving. I am glad we had this nice, albeit brief, talk.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN RomanceEnd1
SAY ~Oh, I thought I meant something more to you. Well, I am sorry you feel that way.~
=
~*Cough* Eh, lets go. I have things to kill, people to rob.~
IF ~~ THEN EXIT
END
« Last Edit: April 01, 2006, 04:50:28 PM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #27 on: April 01, 2006, 04:43:42 PM »
There should be spaces between all the global() on the banter file.

What romance guide are you refering to?
I'm not sure what the override file that they are refering to is, but I assume that it is the NPC's override script, which is not a dialog file.
Working on that assumption, since that is not a dialog file, and just a script, then you don't need the ~'s. Take them both out and it should work.
« Last Edit: April 01, 2006, 04:52:27 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #28 on: April 01, 2006, 04:51:25 PM »
It is a dialogue file... isn't that where I am supposed to put that stuff? I look in other Mods' romance files, but couldn't find anything like this.

Erg, now its telling me the error is near (. It is the first one after the first Global.


And I'm talking about Rastor's guide... how do I make an override script, and what do I put in it, then?

http://www.rpgdungeon.net/cms/content/view/87/79/
« Last Edit: April 01, 2006, 04:53:53 PM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #29 on: April 01, 2006, 05:01:18 PM »
Ah, yes, it is the override script and not dialog that you want.
An override script is a list of various conditions/actions that you want associated with a NPC. Because it is attached to the NPC, it will only run while they are in the party or on the screen.

To add a override script, edit your NPC in NI, scroll waaayyy down, and you will see four variables, override, class, race, default. They are scripts that are executed in that order.
The engine runs through the override script looking for conditions that are currently true, if it finds none, it moves on the the class script, then race, then default. Usually, the override script is the AI (for enemies) and the various quest/romance options for a NPC. Default is generally something simple like, see enemy? kill it.
The others are used as you see fit.

To add the script you want, just select the override slot, and select your script. Much like the custom items, you have to have had the scripts installed to be able to choose them.
Name the script myNPC.baf (or whatever). Then copy that block of code into it. I suspect that your problem is because you have the file named blah.D and not blah.BAF.

In your .tp2 you need this:
COMPILE ~myMod/scripts/blah.BAF~
Or whatever the path is.

To successfully complete your mod, you will have to learn how to script as well as do dialog files.
Well, maybe not, but you wont be able to do much other then dialog without scripting.
« Last Edit: April 01, 2006, 05:17:00 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #30 on: April 01, 2006, 05:19:10 PM »
I have (in the override script section of the .cre) S-TNO.BCS... so I should create a file called that, then have the .tp2 compile it... at the top, do I need to say:

BEGIN S-TNO

Or can I just insert my

IF
Global...

Into it?

Yeah, scripting is a tong more difficult, and it is something I haven't been able to grasp yet... is there a scripting tutorial (I know that is quite broad...)?

Also, now WeiDU is telling me there is a problem with my banter file... I have an IF section in which there is nothing like CHAIN or APPEND in front of it. What do I need to put there? It is just a dialogue, not written as banter. This also occured with the romance talk, after I tried removing the bad section.
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #31 on: April 01, 2006, 05:22:53 PM »
No BEGIN's needed in a script file, just IF blocks.

Is the banter in question part of a BEGIN whatever? It's sort of hard to tell without seeing it. If you want, you can send it to me and I'll take a look at it.
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #32 on: April 01, 2006, 05:29:42 PM »
This is in my banter file exactly as is shown. Thats what rastor told me to do... It has a problem with something around IF.


IF ~Global("S-TNORomanceActive","GLOBAL",1) Global("LoveTalk","LOCALS",2) Global("S-TNOMatch","GLOBAL",1) GlobalTimerExpired("S-TNORomance","GLOBAL")~
THEN BEGIN RomanceTalk1
SAY ~Hey, <CHARNAME>, I was wondering... you don't have anything against me being a thief, right?~
IF ~~ THEN REPLY ~What? No, of course not. You have benefited our group in many ways already.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine1
IF ~~ THEN REPLY ~Well, I don't really appreciate your life style, but I respect you, and you... nevermind.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine2
IF ~~ THEN REPLY ~No, you are a thief, and I think that is a fine profession. I also think that you are a fine person. You aren't "good", but you are certainly... well, you get the idea.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine2
IF ~~ THEN REPLY ~You steal me things and kill me things, and that is as useful as you'll ever be. Go away.~ DO ~SetGlobal("S-TNORomanceActive","GLOBAL",3)~ THEN GOTO RomanceEnd1
END

IF ~~ THEN BEGIN ThanksLine1
SAY ~Oh, well, I am glad I can benefit the party. I just hope that in the future I can also benefit... us.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN ThanksLine2
SAY ~Thanks, that really means a lot to me, especially coming from you...~
=
~*Cough* Well, I think we'd better get moving. I am glad we had this nice, albeit brief, talk.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN RomanceEnd1
SAY ~Oh, I thought I meant something more to you. Well, I am sorry you feel that way.~
=
~*Cough* Eh, lets go. I have things to kill, people to rob.~
IF ~~ THEN EXIT
END
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #33 on: April 01, 2006, 05:39:19 PM »
At the top, you need a:

BEGIN nameOfNPC

The nameOfNPC will be the name of the dialog file. It can be called anything, I just find it easier to name the NPC's dialog file after the NPC.
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #34 on: April 01, 2006, 05:46:21 PM »
I have that at the top of the banter file. I have
BEGIN S-BTNO

which is the name of the banter file.
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #35 on: April 01, 2006, 06:00:40 PM »
Apparently, I am functionally blind.
There shouldn't be a THEN before the GOTO's.

Rastor needs to modify his tutorial...
« Last Edit: April 01, 2006, 06:04:08 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #36 on: April 01, 2006, 07:59:20 PM »
That still didn't fix the problem  :-\

For most other banters, I have had to put CHAIN or APPEND BJAHEIR or something, and its worked fine. I think its just because the IF is there without something above it. But, I have no idea what that could be :(
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #37 on: April 01, 2006, 10:24:10 PM »
It's most likely a problem with whatever is directly above the
IF ~Global("S-TNORomanceActive","GLOBAL",1) ......~

I copied the entire thing into a new .d file, and it compiled and installed fine. Which means that whatever is above is causing problems.
This is generally true, if you get an error and can't find it, look at the previous line, it's almost always there.
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #38 on: April 01, 2006, 11:13:00 PM »
Here is my ENTIRE banter file (yes, for all to see):

BEGIN ~S-BTNO~

APPEND BJAHEIR
IF ~InParty("S-TNO")
See("S-TNO")
!STATECHECK("S-TNO",STATE_STUNNED)
!STATECHECK("S-TNO",STATE_SILENCED)
!STATECHECK("S-TNO",STATE_SLEEPING)
!Dead("S-TNO")
Global("TNOWhy","LOCALS",0)
("TNOBanter","GLOBAL",0)~ THEN BEGIN WhyTalk
SAY ~TNO, I have noticed that you claim you aren't evil, yet you steal and kill willingly and gladly. Can you justify your actions?~
IF ~~ THEN DO ~SetGlobal("TNOWhy","LOCALS",1) SetGlobal("TNOBanter","GLOBAL",1)~ EXTERN S-BTNO WhyTalk
END
END

APPEND S-BTNO
IF ~~ THEN BEGIN WhyTalk
SAY ~And I notice that you tend to favor the good side of things. There needs to be a balance between good and evil, and between the neutrals who act 'good' and those who act 'evil.'~
=
~You should learn to control your good actions, Miss 'Cities Can Kiss Nature's Ass,' if you want people to think you're neutral. Now leave me alone.~
IF ~~ THEN EXIT
END
END

CHAIN
IF ~InParty("Jaheira")
See("Jaheira")
!STATECHECK("Jaheira",STATE_SLEEPING)
!STATECHECK("Jaheira",STATE_STUNNED)
!STATECHECK("Jaheira",STATE_SILENCED)
!Dead("Jaheira")
InParty("Minsc")
See("Minsc")
!STATECHECK("Minsc",STATE_SLEEPING)
!STATECHECK("Minsc",STATE_STUNNED)
!STATECHECK("Minsc",STATE_SILENCED)
!Dead("Minsc")
Global("MinscBash","LOCALS",0)
("TNOBanter","GLOBAL",1)~ THEN S-BTNO MinscGetsBashed
~Minsc, why must you incessantly talk to that rodent? And don't you ever do anything besides fight for justice, poor people, and little kids?~
DO ~SetGlobal("MinscBash","LOCALS",1) SetGlobal("TNOBanter","GLOBAL",2)~
== BMINSC
~What?! How dare you insult poor Boo! And doing good is right! And, uh, good!~
== BJAHEIR
~TNO, you didn't need to say that. You should learn to be more accepting of people.~
== BMINSC
~Yes! Listen to Jaheira, she knows what is good and right in this world!~
== S-BTNO
~Ah, the dimwit proves my point, Jaheira. You could look at things from a more neutral perspective. I am accepting, I just don't accept imbeciles.~
== BJAHEIR
~Helping someone isn't necessarily 'good,' TNO. Minsc has helped me in the past, I am repaying the favor. Perhaps you shouldn't be so closely bound to your sense of neutrality.~
== BMINSC
~And leave Boo out of this!~
== BJAHEIR
~You need to open your mind to good and evil. Just because you aren't either of them doesn't mean you have to hate them. Learn about them, and figure out a way to balance them. That is what neutrality is.~
== S-BTNO
~*Sigh* Perhaps... perhaps I should... learn more about them. I thought... Eh, nevermind.~
=
~Minsc, I apologize for insulting your lifestyle... and Boo.~
== BMINSC
~Do not worry. Boo and I forgive you.~
== S-BTNO
~Eh, lets... lets get moving. But, just because you have shown me a self-fault doesn't mean I will change my ways. I take what I want if I need it.~
EXIT

APPEND BJAN
IF ~InParty("S-TNO")
See("S-TNO")
!STATECHECK("S-TNO",STATE_SLEEPING)
!STATECHECK("S-TNO",STATE_STUNNED)
!STATECHECK("S-TNO",STATE_SILENCED)
!Dead("S-TNO")
Global("JanInquiry","LOCALS",0)~ THEN BEGIN JanQuestion
SAY ~You know, TNO, you remind me of my great-great-great-great-great half aunt, who married my father's father, despite their vast age difference. She was sort of, you know, "anti-social," like you, which, if you think about it, it quite uncommon for someone in my family. Then again, she was always the oddball. She didn't like parties, didn't enjoy our company, and she most certainly did not like turnips. Oh dear, oh dear, she was quite the oddball. Perhaps she had some halfling in her, or maybe some dwarf... she lived an awfully long time, don't you think? Well, I guess you can't say, because--~
IF ~~ THEN DO ~SetGlobal("JanInquiry","LOCALS",1)~ EXTERN S-BTNO JanTNOStop
END
END

APPEND S-BTNO
IF ~~ THEN BEGIN JanTNOStop
SAY ~ENOUGH! Enough of your incessant drivel! Why can't you leave me in peace?~
IF ~~ THEN EXIT
END
END


CHAIN
IF ~InParty("Yoshimo")
See("Yoshimo")
!STATECHECK("Yoshimo",STATE_SLEEPING)
!STATECHECK("Yoshimo",STATE_STUNNED)
!STATECHECK("Yoshimo",STATE_SILENCED)
!Dead("Yoshimo")
InParty("Jaheira")
See("Jaheira")
!STATECHECK("Jaheira",STATE_SLEEPING)
!STATECHECK("Jaheira",STATE_STUNNED)
!STATECHECK("Jaheira",STATE_SILENCED)
!Dead("Jaheira")
AreaType(CITY)
Global("YoshimoMystery","LOCALS",0)
("TNOBanter","GLOBAL",2)~ THEN S-BTNO YoshMyst
~Yoshimo, why do you keep looking over your shoulder? No one is following us, I have checked.~
DO ~SetGlobal("YoshimoMystery","LOCALS",1) SetGlobal("TNOBanter","GLOBAL",3)~
== BYOSHIM
~What do you mean?~
== S-BTNO
~I can see the fear you have in your eyes... fear of what, though? Or of whom?~
== BYOSHIM
~I am not scared of anything or anyone in this city. Now leave me be.~
== S-BTNO
~Fine... but, would you mind telling us of your past? So far, you've mentioned nothing to <CHARNAME> or the rest of us. Why so mysterious?~
== BJAHEIR
~Hmm, the same could be said of you, TNO. Is that even your real name? Nobody has simple initials for their name.~
== S-BTNO
~I was talking to Yoshimo, Jaheira. And if you must know, TNO stands for... The Nameless One. My real name has been forgotten by everyone except me. TNO is what I go by.~
=
~But Yoshimo, can't you tell us something about you?~
== BYOSHIM
~*Mutters under his breath and walks ahead of TNO and Jaheira*~
== S-BTNO
~Hmmm, interesting, wouldn't you say?~
== BJAHEIR
~Yes... I wonder why he is so mysterious about himself. He's more mysterious than even you, TNO.~
== S-BTNO
~I guess so...~
== BJAHEIR
~But now that you mention it, he did appear scared... scared of what, though?~
== S-BTNO
~In time, things will unfold. We shall wait and see.~
EXIT

CHAIN
IF ~InParty("Edwin")
See("Edwin")
!STATECHECK("Edwin",STATE_SLEEPING)
!STATECHECK("Edwin",STATE_STUNNED)
!STATECHECK("Edwin",STATE_SILENCED)
!Dead("Edwin")
Gender("Edwin",FEMALE)
Global("EdwinaTNO1","LOCALS",0)~ THEN S-BTNO EdwinaMock
~Hmmm, Edwin, I'd have to say, I like your rump much better when you're... female. *Snickers*~
DO ~SetGlobal("EdwinaTNO1","LOCALS",0)~
== BEDWIN
~How dare you, you tiny, insignificant man!~
== S-BTNO
~Chauvanistic, too, right?~
== BEDWIN
~Yes, chauv-- wait, no! I will not fall for your trap!~
== S-BTNO
~Heh, just don't get your panties in a bunch. You complain enough. *Laughs*~
== BEDWIN
~I won't! Now leave me be. I have things to do.~
== S-BTNO
~Ah, yes, 'things.' Let me know how those girly things go, alright?~
== BEDWIN
~Maybe I will, maybe I won't... Hey!~
EXIT



IF ~Global("S-TNORomanceActive","GLOBAL",1) Global("LoveTalk","LOCALS",2) Global("S-TNOMatch","GLOBAL",1) GlobalTimerExpired("S-TNORomance","GLOBAL")~
THEN BEGIN RomanceTalk1
SAY ~Hey, <CHARNAME>, I was wondering... you don't have anything against me being a thief, right?~
IF ~~ THEN REPLY ~What? No, of course not. You have benefited our group in many ways already.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ GOTO ThanksLine1
IF ~~ THEN REPLY ~Well, I don't really appreciate your life style, but I respect you, and you... nevermind.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ GOTO ThanksLine2
IF ~~ THEN REPLY ~No, you are a thief, and I think that is a fine profession. I also think that you are a fine person. You aren't "good", but you are certainly... well, you get the idea.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ THEN GOTO ThanksLine2
IF ~~ THEN REPLY ~You steal me things and kill me things, and that is as useful as you'll ever be. Go away.~ DO ~SetGlobal("S-TNORomanceActive","GLOBAL",3)~ GOTO RomanceEnd1
END

IF ~~ THEN BEGIN ThanksLine1
SAY ~Oh, well, I am glad I can benefit the party. I just hope that in the future I can also benefit... us.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN ThanksLine2
SAY ~Thanks, that really means a lot to me, especially coming from you...~
=
~*Cough* Well, I think we'd better get moving. I am glad we had this nice, albeit brief, talk.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN RomanceEnd1
SAY ~Oh, I thought I meant something more to you. Well, I am sorry you feel that way.~
=
~*Cough* Eh, lets go. I have things to kill, people to rob.~
IF ~~ THEN EXIT
END




And thanks so much Duality for helping :)
« Last Edit: April 01, 2006, 11:20:47 PM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #39 on: April 01, 2006, 11:29:40 PM »
Here you go, all set:
There were a few problems, a couple of lines involving ("TNOBanter","GLOBAL",2) were missing the Global at the start.
The final block you wrote is now at the begining, the compiler needs to know that it goes right in the dialog file, as it is not being appended or chained to anything.


BEGIN ~S-BTNO~

IF ~
Global("S-TNORomanceActive","GLOBAL",1)
Global("LoveTalk","LOCALS",2)
Global("S-TNOMatch","GLOBAL",1)
GlobalTimerExpired("S-TNORomance","GLOBAL")~
THEN BEGIN RomanceTalk1
SAY ~Hey, <CHARNAME>, I was wondering... you don't have anything against me being a thief, right?~
IF ~~ THEN REPLY ~What? No, of course not. You have benefited our group in many ways already.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ GOTO ThanksLine1
IF ~~ THEN REPLY ~Well, I don't really appreciate your life style, but I respect you, and you... nevermind.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ GOTO ThanksLine2
IF ~~ THEN REPLY ~No, you are a thief, and I think that is a fine profession. I also think that you are a fine person. You aren't "good", but you are certainly... well, you get the idea.~ DO ~SetGlobalTimer("S-TNORomance","GLOBAL",28800)~ GOTO ThanksLine2
IF ~~ THEN REPLY ~You steal me things and kill me things, and that is as useful as you'll ever be. Go away.~ DO ~SetGlobal("S-TNORomanceActive","GLOBAL",3)~ GOTO RomanceEnd1
END

IF ~~ THEN BEGIN ThanksLine1
SAY ~Oh, well, I am glad I can benefit the party. I just hope that in the future I can also benefit... us.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN ThanksLine2
SAY ~Thanks, that really means a lot to me, especially coming from you...~
=
~*Cough* Well, I think we'd better get moving. I am glad we had this nice, albeit brief, talk.~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN RomanceEnd1
SAY ~Oh, I thought I meant something more to you. Well, I am sorry you feel that way.~
=
~*Cough* Eh, lets go. I have things to kill, people to rob.~
IF ~~ THEN EXIT
END

APPEND BJAHEIR
IF ~InParty("S-TNO")
See("S-TNO")
!STATECHECK("S-TNO",STATE_STUNNED)
!STATECHECK("S-TNO",STATE_SILENCED)
!STATECHECK("S-TNO",STATE_SLEEPING)
!Dead("S-TNO")
Global("TNOWhy","LOCALS",0)
Global("TNOBanter","GLOBAL",0)~ THEN BEGIN WhyTalk
SAY ~TNO, I have noticed that you claim you aren't evil, yet you steal and kill willingly and gladly. Can you justify your actions?~
IF ~~ THEN DO ~SetGlobal("TNOWhy","LOCALS",1) SetGlobal("TNOBanter","GLOBAL",1)~ EXTERN S-BTNO WhyTalk
END
END

APPEND S-BTNO
IF ~~ THEN BEGIN WhyTalk
SAY ~And I notice that you tend to favor the good side of things. There needs to be a balance between good and evil, and between the neutrals who act 'good' and those who act 'evil.'~
=
~You should learn to control your good actions, Miss 'Cities Can Kiss Nature's Ass,' if you want people to think you're neutral. Now leave me alone.~
IF ~~ THEN EXIT
END
END

CHAIN
IF ~InParty("Jaheira")
See("Jaheira")
!STATECHECK("Jaheira",STATE_SLEEPING)
!STATECHECK("Jaheira",STATE_STUNNED)
!STATECHECK("Jaheira",STATE_SILENCED)
!Dead("Jaheira")
InParty("Minsc")
See("Minsc")
!STATECHECK("Minsc",STATE_SLEEPING)
!STATECHECK("Minsc",STATE_STUNNED)
!STATECHECK("Minsc",STATE_SILENCED)
!Dead("Minsc")
Global("MinscBash","LOCALS",0)
Global("TNOBanter","GLOBAL",1)~ THEN S-BTNO MinscGetsBashed
~Minsc, why must you incessantly talk to that rodent? And don't you ever do anything besides fight for justice, poor people, and little kids?~
DO ~SetGlobal("MinscBash","LOCALS",1) SetGlobal("TNOBanter","GLOBAL",2)~
== BMINSC
~What?! How dare you insult poor Boo! And doing good is right! And, uh, good!~
== BJAHEIR
~TNO, you didn't need to say that. You should learn to be more accepting of people.~
== BMINSC
~Yes! Listen to Jaheira, she knows what is good and right in this world!~
== S-BTNO
~Ah, the dimwit proves my point, Jaheira. You could look at things from a more neutral perspective. I am accepting, I just don't accept imbeciles.~
== BJAHEIR
~Helping someone isn't necessarily 'good,' TNO. Minsc has helped me in the past, I am repaying the favor. Perhaps you shouldn't be so closely bound to your sense of neutrality.~
== BMINSC
~And leave Boo out of this!~
== BJAHEIR
~You need to open your mind to good and evil. Just because you aren't either of them doesn't mean you have to hate them. Learn about them, and figure out a way to balance them. That is what neutrality is.~
== S-BTNO
~*Sigh* Perhaps... perhaps I should... learn more about them. I thought... Eh, nevermind.~
=
~Minsc, I apologize for insulting your lifestyle... and Boo.~
== BMINSC
~Do not worry. Boo and I forgive you.~
== S-BTNO
~Eh, lets... lets get moving. But, just because you have shown me a self-fault doesn't mean I will change my ways. I take what I want if I need it.~
EXIT

APPEND BJAN
IF ~InParty("S-TNO")
See("S-TNO")
!STATECHECK("S-TNO",STATE_SLEEPING)
!STATECHECK("S-TNO",STATE_STUNNED)
!STATECHECK("S-TNO",STATE_SILENCED)
!Dead("S-TNO")
Global("JanInquiry","LOCALS",0)~ THEN BEGIN JanQuestion
SAY ~You know, TNO, you remind me of my great-great-great-great-great half aunt, who married my father's father, despite their vast age difference. She was sort of, you know, "anti-social," like you, which, if you think about it, it quite uncommon for someone in my family. Then again, she was always the oddball. She didn't like parties, didn't enjoy our company, and she most certainly did not like turnips. Oh dear, oh dear, she was quite the oddball. Perhaps she had some halfling in her, or maybe some dwarf... she lived an awfully long time, don't you think? Well, I guess you can't say, because--~
IF ~~ THEN DO ~SetGlobal("JanInquiry","LOCALS",1)~ EXTERN S-BTNO JanTNOStop
END
END

APPEND S-BTNO
IF ~~ THEN BEGIN JanTNOStop
SAY ~ENOUGH! Enough of your incessant drivel! Why can't you leave me in peace?~
IF ~~ THEN EXIT
END
END


CHAIN
IF ~InParty("Yoshimo")
See("Yoshimo")
!STATECHECK("Yoshimo",STATE_SLEEPING)
!STATECHECK("Yoshimo",STATE_STUNNED)
!STATECHECK("Yoshimo",STATE_SILENCED)
!Dead("Yoshimo")
InParty("Jaheira")
See("Jaheira")
!STATECHECK("Jaheira",STATE_SLEEPING)
!STATECHECK("Jaheira",STATE_STUNNED)
!STATECHECK("Jaheira",STATE_SILENCED)
!Dead("Jaheira")
AreaType(CITY)
Global("YoshimoMystery","LOCALS",0)
Global("TNOBanter","GLOBAL",2)~ THEN S-BTNO YoshMyst
~Yoshimo, why do you keep looking over your shoulder? No one is following us, I have checked.~
DO ~SetGlobal("YoshimoMystery","LOCALS",1) SetGlobal("TNOBanter","GLOBAL",3)~
== BYOSHIM
~What do you mean?~
== S-BTNO
~I can see the fear you have in your eyes... fear of what, though? Or of whom?~
== BYOSHIM
~I am not scared of anything or anyone in this city. Now leave me be.~
== S-BTNO
~Fine... but, would you mind telling us of your past? So far, you've mentioned nothing to <CHARNAME> or the rest of us. Why so mysterious?~
== BJAHEIR
~Hmm, the same could be said of you, TNO. Is that even your real name? Nobody has simple initials for their name.~
== S-BTNO
~I was talking to Yoshimo, Jaheira. And if you must know, TNO stands for... The Nameless One. My real name has been forgotten by everyone except me. TNO is what I go by.~
=
~But Yoshimo, can't you tell us something about you?~
== BYOSHIM
~*Mutters under his breath and walks ahead of TNO and Jaheira*~
== S-BTNO
~Hmmm, interesting, wouldn't you say?~
== BJAHEIR
~Yes... I wonder why he is so mysterious about himself. He's more mysterious than even you, TNO.~
== S-BTNO
~I guess so...~
== BJAHEIR
~But now that you mention it, he did appear scared... scared of what, though?~
== S-BTNO
~In time, things will unfold. We shall wait and see.~
EXIT

CHAIN
IF ~InParty("Edwin")
See("Edwin")
!STATECHECK("Edwin",STATE_SLEEPING)
!STATECHECK("Edwin",STATE_STUNNED)
!STATECHECK("Edwin",STATE_SILENCED)
!Dead("Edwin")
Gender("Edwin",FEMALE)
Global("EdwinaTNO1","LOCALS",0)~ THEN S-BTNO EdwinaMock
~Hmmm, Edwin, I'd have to say, I like your rump much better when you're... female. *Snickers*~
DO ~SetGlobal("EdwinaTNO1","LOCALS",0)~
== BEDWIN
~How dare you, you tiny, insignificant man!~
== S-BTNO
~Chauvanistic, too, right?~
== BEDWIN
~Yes, chauv-- wait, no! I will not fall for your trap!~
== S-BTNO
~Heh, just don't get your panties in a bunch. You complain enough. *Laughs*~
== BEDWIN
~I won't! Now leave me be. I have things to do.~
== S-BTNO
~Ah, yes, 'things.' Let me know how those girly things go, alright?~
== BEDWIN
~Maybe I will, maybe I won't... Hey!~
EXIT

if you want, I can delete your text from my post once you have it working  :)
« Last Edit: April 01, 2006, 11:38:02 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #40 on: April 01, 2006, 11:43:14 PM »
Thanks! So, for the rest of the Romance talks, they should go directly after the first one, right? And any other banter follows that?

If so, spectacular...

Lets see what else WeiDU can tell me I did wrong  :P ;)

Haha! Nothing! We (you) have foiled WeiDU!


Now, to test it.

Hmm, when I clicked on one of the weapons in the quickslot, the game crashed, and it brought up a message. I don't remember what it said, but it had something to do with a .cpp file...
« Last Edit: April 02, 2006, 12:00:03 AM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #41 on: April 01, 2006, 11:48:52 PM »
Thanks! So, for the rest of the Romance talks, they should go directly after the first one, right? And any other banter follows that?

Yep  :)
I think so. I don't know much about dialog files, I know more about scripting. But if you don't run into any problems then...   ;D
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #42 on: April 02, 2006, 11:50:09 AM »
Alright, since he is working (kind of, the game crashed when I clicked on his sword in the quickweapon slot), I am going to have a bunch more questions about modding.

1. How do I get a weapon so it can cast Improved Invisibility once per day? I tried to find it in DLTCEP, but I couldn't.

2. How do I make items so they come identified?

3. How do I script quests? (This one will be difficult for me to understand, as I know very little about scripting)
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #43 on: April 02, 2006, 12:44:51 PM »
The sword crashing might be a problem with the .bam. Whenever I have had a weapon crash the game from just selecting it, the problem always seems to have stemmed from a wrongly defined .bam or an ability that is always active.

The easiest way to make an item generally is too make a duplicate of an item that is already in existance. (say you wanted a long sword, make a copy of the blade of roses or something)
Then, find another item that has the same ability that you want (in this case, the ring of improved invis would do nicely) and copy and paste the effect into your item.

If you want to do it yourself, read below. (I'd advise against it, but if you want an effect that you can't find on another item..) The only reason I'd advise against it is because there are a lot of fields, and a wrong one can easily crash the game, leaving you with no idea which field is wrong.

1. I don't know how to use DLTCEP since I use a mac, but in NI you would:
Open the item view window.
Add -> Item ability
view/edit the item ability
Add -> effect
view/edit effect
select "cast spell"
the resource should be improved invis, the other fields are relatively self explanitory

2. When you add an item to a .cre, there are a number of flags that you can check. One of the fields is called "itemflags", there you can set and item to be identified, undroppable, etc. These will make the item identified or undroppable. Strange huh?  ;D

3. Overly broad. What kind of quest? In the end, you will need scripting for areas, your NPC, enemy scipts if you have combat, cutscenes, etc. The easiest way to go about this is to generally start small. Have something simple happen when the party goes to a certain area. Then add.

This is a very good scripting guide. (or at least, I found it to be) It explains fairly clearly most of what you need to know. (ignore however, the "SetTokenObject" explanation, as it is wrong)
http://www.pocketplane.net/tutorials/simscript.html
« Last Edit: April 02, 2006, 12:49:13 PM by Duality »
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #44 on: April 02, 2006, 01:06:34 PM »
Where would I do this so-called copying of items? Using which program? I've been looking in DLTCEP for items, but they have some confusing spell effects with color changes and stuff, so I'll stick to what I know (basic DLTCEP item making).

As for the quest, I'll get back to you.


EDIT: Nevermind


Alright, I tested out a place where I knew he had an interject (I_C_T2). The game froze. Perhaps I used I_C_T2 incorrectly, or perhaps it was because it was at Kalah's death. the Interject fired before the small cutscene, and it froze right away. How can I make the interject fire when the other characters interject?
« Last Edit: April 02, 2006, 02:57:31 PM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #45 on: April 02, 2006, 03:21:14 PM »
The easiest way to do item copying is to select the item you want in NI, and export it. Then, just edit the exported item. That way you wont be modifying the original items.

Are you sure you don't have "unusuable" checked? As there is no "usable by" field. The other thing to check is to make sure that you don't have any kits rendered unusuable.

As for DLTCEP, someone else will have to answer the question. (I wonder how hard it would be to port it...)
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #46 on: April 02, 2006, 08:21:49 PM »
I figured out what the useability problem was... for some reason, in NI, it added a flag in that said "Unuseable by: All (no kit)," and because he is a straight thief, that wouldn't allow him to use it. So, I did some quick clicking, and ta-dah! He can use it!


Unfortunately, my Interjects are acting up (see previous post).
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Duality

  • Planewalker
  • *****
  • Posts: 147
Re: My NPC Mod needs help
« Reply #47 on: April 02, 2006, 10:00:57 PM »
Generally you should use INTERJECT_COPY_TRANS, and not INTERJECT_COPY_TRANS2.

Here's an explanation of the differences:
http://forums.rpgdungeon.net/index.php?topic=685

To paraphrase:
"I_C_T2 does exactly the same thing as I_C_T except that DO actions will not be carried over." Thus, DO actions wont affect someone you don't want them to. But if a DO action doesn't follow, use I_C_T.

Can't tell you what's wrong unless I see the block in question.
"I'll try being nicer if you try being smarter."

"There is a certain freedom in being totally screwed. It means that nothing you do is going to make it any worse."

"Eagles may soar, but weasels don't get sucked into jet engines."

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #48 on: April 02, 2006, 10:04:23 PM »
Damn, all my stuff is at my dad's, so I'll have trouble giving it to you... next weekend, though.


I thought I_C_T2 made it possible to interject when other (Bioware) NPCs have interjects... The interject guide I used (see the tutorial forum here) just use I_C_T2...


Ah, I see... when a cutscene occurs, it says to use I_C_T... I thought I was supposed to use I_C_T2. I will remedy that this upcoming weekend. Thanks so far for all the help you've given me...
« Last Edit: April 02, 2006, 10:06:09 PM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

Offline Saber

  • Planewalker
  • *****
  • Posts: 47
  • Gender: Male
Re: My NPC Mod needs help
« Reply #49 on: April 10, 2006, 05:07:20 PM »
I was sick, so I haven't been able to work on it at all.

But my question (to anyone, since Duality seems to be the only one who has answered recently):

If I_C_T2 fixes the problem with actions being carried over, then why doesn't it work in a cutscene like Kalah's? Theoretically, if I used I_C_T, shouldn't the PC die? I haven't had time to test it, but still... this seems kind of odd.

EDIT: Well, the Kalah thing worked, nobody but Kalah died. I guess I don't understand the logic of I_C_T.

In most cases, I use I_C_T2. Is that alright? Or are there certain situations that ONLY need I_C_T2, and will I_C_T2 screw the game up if I put it somewhere that I_C_T normally goes, but doesn't have to...?
« Last Edit: April 10, 2006, 05:50:46 PM by Saber »
"Who is the more foolish... the fool, or the fool who follows him?"

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
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)?: