Jump to content


Photo

A technical question


  • Please log in to reply
28 replies to this topic

#1 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 01 July 2003 - 11:27 AM

As I continue to debug my mod, Weidu keeps throwing headaches at me. I have not heard from the guys that were going to debug for me in some while, so have to ask: Can anyone tell me what is wrong with this script? I am sure it is something I will slap myself for missing, but I can not find it.

APPEND MADAM
IF ~Global("JunaBought","GLOBAL",1)~ THEN BEGIN Junagiven
SAY ~something~
IF ~~ THEN DO ~CreateCreature("Juna", [1483.513], 0)~EXIT //these numbers are from NI
END
END

APPEND BODHIAMB
IF ~~ THEN BEGIN BhodiJuna1
SAY ~something~
IF ~~ THEN DO ~ClearAllActions()
StartCutsceneMode()
StartCutScene("JunaVampCut")~
END //weidu claims the error is here
END

EXTEND_BOTTOM BODHIAMB 6
IF ~GLOBAL("JunaRomanceActive",GLOBAL,2)
!InPartyAllowDead("Juna")
!Dead("Juna")~ THEN GOTO BhodiJuna1
IF ~~ THEN EXIT
END
END

#2 -Glad to be only your guest-

-Glad to be only your guest-
  • Guest

Posted 01 July 2003 - 01:38 PM

Somebody gives me a magnifying glass please,... I can't really see with so many mstkes. :)

1. ~EXIT should have a "space" between tilde and EXIT

2. EXTEND_BOTTOM only requires one END

3. EXTEND_BOTTOM BodhiAmb needs to be on top (something Juna probably does not need :lol: ) of APPEND BodhiAmb.

#3 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 01 July 2003 - 05:21 PM

That was fixed, thanks. Now, can anyone tell me the problems of the following? It is the PJuna file (Send her away). I only am giving the all importand script code, not the story element itself.

BEGIN PJuna

IF ~Global("JunaJoined", "GLOBAL",1)~ THEN BEGIN FREEDOM
SAY ~something~
IF ~~ THEN REPLY ~something.~ GOTO InLine
IF ~~ THEN REPLY ~something~ GOTO Freedom2
END

BEGIN InLine
IF ~~ THEN DO ~JoinParty()~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN Freedom2
SAY ~Something~
IF ~~ THEN REPLY ~something.~ GOTO slaveagain
IF ~~ THEN REPLY ~something.~ GOTO Freedom3
END

IF ~~ THEN BEGIN Freedom3
SAY ~something~
IF ~~ THEN EXIT
END

IF ~~ THEN BEGIN slaveagain
SAY ~something~
IF ~~ THEN DO ~JoinParty()~ EXIT
END

#4 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 02 July 2003 - 04:15 AM

BEGIN InLine needs a SAY line. EXIT should be after ~JoinParty()~ and not on a separate line.

#5 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 02 July 2003 - 10:59 AM

It, as well as a thousand other things (In my NPC file...grr..I find appends and extends to be hard), has been changed. Now, I have another question. How do I add a raise from vamperism script? I looked at kelsey, and could not find it, I looked in NI and can not find it. I mean this: I bring the charecter (Juna) to the Temple of Amunator. I want someone there to meet the PC, at the statue. What Area file and coordinates would I change in the TP2? and what coordenates would raising at the statue be? I seriously need another modder to answer these questions. My cheat codes never work, so I can not get that info in game. I am hopeing this is the last question I will have to ask....I should have listened to gray, do NOT start with .D scripting.

#6 -Guest-

-Guest-
  • Guest

Posted 02 July 2003 - 11:58 AM

Look at Solaufein. He's turned into a vampire and restored.

In Cleanse.bcs you'll need to extend:
MoveGlobal("AR1401","Juna",[2565.1677])

#7 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 03 July 2003 - 05:31 PM

I have two more questions, sadly. I will NEVER try a mod like this again, as it is almsot impossible to me.

1: How can I add, if it is possible, to a area only in a specific chapter (That is, add something to an area file only in chapter 6)

2: What the heck is wrong with this? I can not figure it out. I am sure it is cock full of mistakes, but what?

BEGIN VithRoth

IF ~NumTimesTalkedTo (0)
HavePartyItem("Junaamu")~ THEN BEGIN FirstMeetingVithRoth //I am looking up this code, I know it is worng.
SAY ~? ~
IF ~~ THEN REPLY ~?~ GOTO Name
IF ~~ THEN REPLY ~ ?~ GOTO Want
IF ~~ THEN REPLY ~?~ GOTO Veldren
END

IF ~~ THEN BEGIN Name
SAY ~?~
IF ~~ THEN GOTO Want
END

IF ~~ THEN BEGIN Veldren
SAY ~?~
IF ~~ THEN GOTO Want
END

IF ~~ THEN BEGIN Want
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO guess
IF ~~ THEN REPLY ~?~ GOTO notdrow
END

IF ~~ THEN BEGIN guess
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO guess2
END

IF ~~ THEN BEGIN notdrow
SAY ~?~
IF ~~ THEN GOTO notdrow2
END

IF ~~ THEN BEGIN guess2
SAY ~?~
IF ~~ THEN GOTO bargan
END

IF ~~ THEN BEGIN notdrow2
SAY ~?~
IF ~~ THEN GOTO bargan
END

IF ~~ THEN BEGIN bargan
SAY ~ ?~
IF ~~ THEN REPLY ~?~ GOTO bargan2
IF ~~ THEN REPLY ~?~ GOTO bargan3
END

IF ~~ THEN BEGIN bargan2
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO bargan4
IF ~~ THEN REPLY ~?~ GOTO bargan5
IF ~~ THEN REPLY ~?~ GOTO bargan6
END

IF ~~ THEN BEGIN bargan3
SAY ~?~
IF ~~ THEN GOTO bargan2
END

IF ~~ THEN BEGIN bargan4
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO bargan7
IF ~~ THEN REPLY ~?~ GOTO bargan8
IF ~~ THEN REPLY ~?~ GOTO bargan9
END

IF ~~ THEN BEGIN bargan5
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO bargan7
IF ~~ THEN REPLY ~ ?~ GOTO bargan8
IF ~~ THEN REPLY ~?~ GOTO bargan9
END

IF ~~ THEN BEGIN bargan6
SAY ~?~
IF ~~ THEN GOTO bargan5
END

IF ~~ THEN BEGIN bargan7
SAY ~?~
IF ~~ THEN REPLY ~? GOTO bargan8
IF ~CheckStatGT("Player1", "INT", 16)~ REPLY ~?~ GOTO INTPASS
IF ~CheckStatGT("Player1", "WIS", 12)~ REPLY ~?~ TO WISPASS
IF ~CheckStatGT("Player1", "DEX", 13)~ REPLY ~? GOTO DEXPASS
IF ~CheckStatGT("Player1", "STR", 15)~ REPLY ~?~ GOTO STRPASS
IF ~CheckStatGT("Player1", "CHA", 17)~ REPLY ~!~ GOTO CHAPASS
IF ~CheckStatLT("Player1", "INT", 17)~ REPLY ~?~ GOTO INTFAIL
IF ~CheckStatLT("Player1", "WIS", 13)~ REPLY ~?~ GOTO WISFAILD
IF ~CheckStatLT("Player1", "DEX", 14)~ REPLY ~*.~ GOTO DEXFAIL
IF ~CheckStatLT("Player1", "STR", 16)~ REPLY ~*.~ GOTO STRFAIL
IF ~CheckStatLT("Player1", "CHA", 18)~ REPLY ~!~ GOTO CHAFAIL
END

IF ~~ THEN BEGIN bargan8
SAY ~.~
IF ~~ THEN DO ~TakePartyItem("JunaBody")
TakePartyItem("JunaAmu")
CreateCreature("Juna3",[2565.1677],1).~ EXIT
END

IF ~~ THEN BEGIN yousure?
SAY ~.~
IF ~~ THEN REPLY ~.~ GOTO bargan8
IF ~~ THEN REPLY ~?~ GOTO yousure?2
END

IF ~~ THEN BEGIN yousure?2
SAY ~...~ DO ~Enemy()~ EXIT
END

IF ~~ THEN BEGIN INTPASS
SAY ~.~
IF ~~ THEN GOTO INTPASS2
END

IF ~~ THEN BEGIN INTPASS2
SAY ~?~
IF ~~ THEN REPLY ~!~ GOTO yesmaster1
IF ~~ THEN REPLY ~?~GOTO yesmaster2
END

IF ~~ THEN BEGIN INTFAIL
SAY ~!~
IF ~~ THEN REPLY ~!~ GOTO bargan8
IF ~~ THEN REPLY ~.~ GOTO yousure?
END

IF ~~ THEN BEGIN WISPASS
SAY ~?~
IF ~~ THEN REPLY ~".*~ GOTO WISPASS2
END

IF ~~ THEN BEGIN WISPASS2
SAY ~~
IF ~~ THEN REPLY ~!~ GOTO yesmaster1
IF ~~ THEN REPLY ~.~ GOTO yesmaster2
END

IF ~~ THEN BEGIN WISFAIL
SAY ~?~
IF ~~ THEN REPLY ~.~ GOTO bargan8
IF ~~ THEN REPLY ~.~ GOTO yousure
END

IF ~~ THEN BEGIN DEXPASS
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO yesmaster1
IF ~~ THEN REPLY ~.~ GOTO yesmaster2
END

IF ~~ THEN BEGIN DEXFAIL
SAY ~.~
IF ~~ THEN REPLY ~.~ GOTO bargan8
IF ~~ THEN REPLY ~.~ GOTO yousure?
END

IF ~~ THEN BEGIN STRPASS
SAY ~?~
IF ~~ THEN REPLY ~?~ GOTO yesmaster1
IF ~~ THEN REPLY ~.~ GOTO yesmaster2
END

IF ~~ THEN BEGIN STRFAIL
SAY ~.~
IF ~~ THEN REPLY ~.~ GOTO bargan8
IF ~~ THEN REPLY ~.~ GOTO yousure?
END

IF ~~ THEN BEGIN CHAPASS
SAY ~?~
IF ~~ THEN REPLY ~!~ GOTO yesmaster1
IF ~~ THEN REPLY ~.~ GOTO yesmaster2
END

IF ~~ THEN BEGIN CHAFAIL
SAY ~~
IF ~~ THEN REPLY ~.~ GOTO bargan8
IF ~~ THEN REPLY ~.~ GOTO yousure?
END

IF ~~ THEN BEGIN yesmaster1
SAY ~~
IF ~~ THEN DO ~TakePartyItem("JunaBody")
TakePartyItem("JunaAmu")
CreateCreature("Juna3", [2565.1677], 1)
JoinParty()~ EXIT
END

IF ~~ THEN BEGIN yesmaster2
SAY ~.~
IF ~~ THEN DO ~TakePartyItem("JunaAmu")
TakePartyItem("JunaBody")
JoinParty()~ EXIT
END

#8 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 05 July 2003 - 06:29 AM

Hey there Phntok, 2 hints for you
1) To set a character, appearence or whatever in a chapter will depend on the letter used. Look at any joining script for example and you'll get something like ("xjoined","locals",3). The three in the end will indicate the chapter that the action will happen earliest. You could also specifiy what it is that you want to do.

2) In regards to the script, if you try converting it via Weidu and u run into an error, it will specify where it is. What text editor are u using?

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#9 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 05 July 2003 - 02:05 PM

I was not meaning joined, persay, but appeared. or is that what you mean?

I am using Context, and Weidu does NOT tell me what the problem is, that is why I posted it.

#10 MagusWizardo

MagusWizardo

    Don't ask... please don't ask.

  • Member
  • 201 posts

Posted 05 July 2003 - 10:42 PM

I was not meaning joined, persay, but appeared. or is that what you mean?

I am using Context, and Weidu does NOT tell me what the problem is, that is why I posted it.

It will give you a line number, so you can give us a better indication of *where* it is. ;)

#11 -jcompton-

-jcompton-
  • Guest

Posted 06 July 2003 - 02:02 PM

Hey there Phntok, 2 hints for you
1) To set a character, appearence or whatever in a chapter will depend on the letter used. Look at any joining script for example and you'll get something like ("xjoined","locals",3). The three in the end will indicate the chapter that the action will happen earliest. You could also specifiy what it is that you want to do.

Seifer, this doesn't make any sense whatsoever.

If something happens in a particular chapter, there are specific checks for it. A SetGlobal action of the form ("xjoined","LOCALS",3) would simply set the local variable "xjoined" to 3 for that particular object.

#12 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 06 July 2003 - 02:09 PM

I thought Ghrey's tutorial on adding NPC's mentioned something about that

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#13 Seifer

Seifer

    The best Anti-Paladin weapon is a tin opener...!

  • Member
  • 4505 posts

Posted 06 July 2003 - 02:14 PM

Before he changed it anywayz...!

Point taken JC, the scripting I'm well aware of the use of local variables but I had considered that the values were different or NPC addition.

Oh well..

how come you always look so damn cool in every photo I see you in?!?


Speaking of modding, I listened to IER 3 yesterday, so you can have another quote for your signature: how come you sound so damn cool, as well as look it? It's unfair. Seriously.


Still a cyberjock, still hacking the matrix, still unsure of what that means.

TeamBG member - http://www.teambg.eu

#14 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 09 July 2003 - 02:01 PM

So, can anyone answer my questions?

and, Weidu say's is the problem is at line 106 (And then it will choose another, I have little doubt, as it has before, those I could fix, this is confusing), namely:
IF ~~ THEN BEGIN yousure?

#15 Kismet

Kismet

    Mild Thang

  • Member
  • 348 posts

Posted 09 July 2003 - 02:40 PM

My guess is that WeiDU doesn't like the ? in the statename. Try taking it out.

#16 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 09 July 2003 - 05:02 PM

I allready have, and it does no good. First thing I thought of.

#17 -Guest-

-Guest-
  • Guest

Posted 10 July 2003 - 02:48 AM

IF ~CheckStatGT("Player1", "INT", 16)~ REPLY ~?~ GOTO INTPASS

See something wrong here? THEN it's upto to you.

#18 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 11 July 2003 - 03:58 PM

Ok, I have fixed the file save for 1 thing, and it is a hard one. I want you to have a new item for a conversation to begin, but I do not have a string refferance for the hasitem trigger. How would I do this?

#19 MagusWizardo

MagusWizardo

    Don't ask... please don't ask.

  • Member
  • 201 posts

Posted 11 July 2003 - 04:45 PM

Ok, I have fixed the file save for 1 thing, and it is a hard one.    I want you to have a new item for a conversation to begin, but I do not have a string refferance for the hasitem trigger.   How would I do this?

Have you tried using the file name ?? It would be logical for S:ResRef* to mean Resource Reference rather than String Reference.

EDIT: To clarify,
HasItem(S:ResRef*,O:Object*)
By the looks of it, S:ResRef* would be the item, O:Object* would be the character.
Thus, it would look like:
HasItem("WA2ROBE","Aerie")
To check if Aerie has the Robe of Vecna.

Edited by MagusWizardo, 11 July 2003 - 04:49 PM.


#20 Dark Phantom

Dark Phantom

    Juna's true master

  • Member
  • 85 posts

Posted 11 July 2003 - 08:07 PM

What if I just want to make sure the PARTY has the item?  Does anybody know how to do this, i guess, is my question.