Scripting problem...

Discussion in 'Modding and Scripting Support' started by Anonymous, Jun 10, 2002.

Remove all ads!
Support Terra-Arcanum:

GOG.com

PayPal - The safer, easier way to pay online!
  1. Anonymous

    Anonymous Guest

    It seems I can't get my scripts working. I've done everything right, (or atleast I done everything like was said in that Amtut tutorial) but...
    I mean ANY of my scripts don't work, even those which teleport triggerer to some map to some coordinates. When I try that script in the game, nothing happens. Anyone knows why?
     
  2. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Do you have an "scr" directory where your scripts are? If so, was it there already, or did you make it yourself? Basically, I'm asking which version of WorldEd are you using? 1074 or 1070? Do you have the latest Arcanum patch?
     
  3. Anonymous

    Anonymous Guest

    Worlded 1074, and I have that Arcanum patch.
     
  4. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    1074, right. That's why making that "scr" directory didn't help one iota. I've finally updated Part 1 of the tutorial to fix that (I now mention that the latest patch isn't the patch Amtut is written for.) Anyway, to follow Amtut properly, read and follow this:
    http://users.senet.com.au/~dbschah/amtu ... nstall.htm

    What that does is change WorldEd to the old 1070 version. That means the files and folders will now be there in the proper place. Now, when you do this, it's most likely that you won't be able to open your current module in WorldEd 1070, as your current module should be a '.dat' file and 1070 can't read '.dat' files. So...... To undat your mod, download one of the "undat" utilities from the downloads section of Terra-Arcanum. Undat your mod, then open that in WorldEd 1070.

    Of course, if you haven't done much work on your mod, you could also start again.
     
  5. Anonymous

    Anonymous Guest

    OK, then I should try again with older editor.
     
  6. Anonymous

    Anonymous Guest

    It didn't work even with the older editor. I tried that dwarven smithy's dialog, made the script 0.Dialog1 1.Return and SKIP default, copied the dialog from tutorial, saved, of course, went to worlded, edited dwarf, tied script 1 to dialog. Then saved, started Arcanum, tried to talk with dwarf, but no dialog appears. Am I doing something wrong?
     
  7. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Well, if it's not working, it usually means you are :D

    I need you to tell me the following things:
    1) What is the filename of the ".dlg" file?
    2) What directory is the ".dlg" file in?
    3) What is the filename of the ".scr" file?
    4) What directory is the ".scr" file in?
     
  8. Anonymous

    Anonymous Guest

    1) dlg
    2) C:/sierra/arcanum/modules/(name of my mod)
    3) scr (it was there already)
    4) C:/sierra/arcanum/modules/(name of my mod)
     
  9. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    No no no.....

    What are the FULL file names? And what are the FULL directories?

    IE:
    1) 00001johnny.dlg
    2) C:/sierra/arcanum/modules/(name of my mod)/dlg
    3) 00001johnny.scr
    4) C:/sierra/arcanum/modules/(name of my mod)/scr

    Is it something like that?
     
  10. Anonymous

    Anonymous Guest

    oh...

    1)00001Dwarven_Smithy.dlg
    2)C:/sierra/arcanum/modules/(my mod)/dlg
    3)00001Dwarven_Smithy.scr
    4)C:/sierra/arcanum/modules/(my mod)/scr

    So, yes it is like that.
     
  11. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Hmmmmm......

    *scratches head*

    Hmm......

    *ponders for a while*

    Hmmm......

    I'll have to run through it with you from the begginning and see what happens.

    First of all, you're using version 1070 of WorldEd. So you shouldn't have a compressed "NAME OF MOD.dat" file in you modules directory. (This is most likely the problem, check this first.) If you have got a "NAME OF MOD.dat" file, delete it. All you want are all the files and folders in the "NAME OF MOD" directory. You shouldn't compress your mod when you test it, it's okay to leave it as seperate files and folders.

    Now, the "00001Dwarven_Smithy.dlg" file in the "C:/sierra/arcanum/modules/(my mod)/dlg" directory looks like this (We'll start from the start.):

    {1}{Hello sir. I am a Dwarven Smithy and you are male.} {Hello ma'am. I am a Dwarven Smithy and you are female.}{}{}{}{}
    {2}{That is correct sir. I am indeed male.}{1}{5}{}{100}{}
    {3}{Why sir, you are very perceptive. I AM a female!}{0}{5}{}{200}{}
    {4}{You rite! Me man!}{1}{-4}{}{150}{}
    {5}{Me woman! You smart!}{0}{-4}{}{250}{}
    {6}{E:}{}{1}{}{0}{}

    {100}{You are a very smart man!}{}{}{}{}{}
    {101}{E:}{}{1}{}{0}{}

    {150}{Go away you stupid man!}{}{}{}{}{}
    {151}{E:}{}{1}{}{0}{}

    {200}{ }{You are a very smart woman!}{}{}{}{}
    {201}{E:}{}{1}{}{0}{}

    {250}{ }{You're not a very bright woman!}{}{}{}{}
    {251}{E:}{}{1}{}{0}{}

    Even if it is exactly the same as the above, could you post it into your next reply? Just to confirm?

    Moving on, your "00001Dwarven_Smithy.scr" file in the in "C:/sierra/arcanum/modules/(my mod)/scr" directory should look like this:
    0. dialog 1
    1. return and SKIP default

    Nice 'n simple. You've already confirmed that, so no need to look any closer.

    In WorldEd, if you right-click on your dwarf and go to his script attachment points, there should be a "1" in the box when "dialog" is ticked.

    That *should* work. I think that's all.... Anyway, I think (hope) the problem is the "NAME OF MOD.dat" file.
     
  12. Anonymous

    Anonymous Guest

    No, there wasn't (name of my mod).dat file.

    {1}{ Hello sir. I am a Dwarven Smithy and you are male.} {Hello ma'am. I am a Dwarven Smithy and you are female.}{}{}{}{}
    {2}{That is correct sir. I am indeed male.}{1}{5}{}{100}{}
    {3}{Why sir, you are very perceptive. I AM a female!}{0}{5}{}{200}{}
    {4}{You rite! Me man!}{1}{-4}{}{150}{}
    {5}{Me woman! You smart!}{0}{-4}{}{250}{}
    {6}{E:}{}{1}{}{0}{}

    {100}{You are a very smart man!}{}{}{}{}{}
    {101}{E:}{}{1}{}{0}{}

    {150}{Go away you stupid man!}{}{}{}{}{}
    {151}{E:}{}{1}{}{0}{}

    {200}{ }{You are a very smart woman!}{}{}{}{}
    {201}{E:}{}{1}{}{0}{}
    {250}{ }{You're not a very bright woman!}{}{}{}{}
    {251}{E:}{}{1}{}{0}{}

    Yes, in worlded smithy's dialog is ticked and there's number 1.
     
  13. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Hmmmmm........ Well.... This has well and truly got me buggered. :/

    Do you have someway I could contact you? Maybe get you to zip up your mod and e-mail it to me? (I'd have to give you my work address somehow, as my hotmail account can't take big attachements)

    I'd really like to nail this down and find out what's going on. Ultimately because I'm re-writing Amtut...... THe dialouge seciton has created a few problems for people, and if I can figure out what's wrong with this, I can hopefully explain it all better in the tutorial.

    Anyway, if you could e-mail me darkunderlord@hotmail.com then I can reply with my work e-mail address (I'm not posting that on these forums) then you can e-mail your mod to my work address and I can take a look-see.

    I should be able to figure out the problem (hopefully) and then get back to you with a solution.
     
  14. Anonymous

    Anonymous Guest

  15. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Problem Solvered

    Fixed, easy. First of all, can I say what a pleasure it was to see a mod that's been made as a result of the Amtut tutorial. It warms the cockles of my heart, it really does. :)

    Now, onto the problem. Basically, it was pretty simple. There were two basic things wrong with it which is why it wouldn't work.


    1) The dialogue file.
    The dialogue file was fine EXCEPT for it's name. Open up "Windows Explorer" or whatever file browsing software you use, find your mod directory, find the "dlg" directory and look at the file. As you should see, it's "00001Dwarven_Smithy.txt". The problem with that is that the extension should be ".dlg"

    IF you can't see the file extension, then in Windows Explorer, go to the "View" menu and click "Folder Options". Click the "View" tab in the box that pops up and make sure that "Hide file extensions for known types" is NOT ticked. if it is ticked, then click on it to remove the tick and click "ok". You should then rename the file in Windows Explorer as "00001Dwarven_Smithy.dlg". It will ask "Are you sure you want to do this" (or something like that) just click yes.

    "00001Dwarven_Smithy.txt" SHOULD BE "00001Dwarven_Smithy.dlg"


    2) The script file.
    I presume you used Grant Davies script maker to make the script? How do I know? Well, there's a slight problem with it. It can't handle numbers. If you open up Arcanums' Sock Monkey ScriptMaker (scrmaker.exe in your Arcanum directory), browse to "00001Dwarven_Smithy.scr" abnd open it, you'll see that your script is NOT correct. What you'll see is this:

    0. Dialog Counter 1

    1. Return and SKIP default

    Which is wrong. To fix it, click on the first line "Dialog Counter 1" and press the delete key on your keyboard. That will get rid of the line. Now, goto the "Line" menu up the top and choose "Action". In the box that pops up, scroll down until you find "dialog (num)" and then click ok. In the next box that appears, MAKE SURE that "Number" is chosen from the drop-down menu at the top, then click in the text box at the bottom and type in the number "1" and click ok. Your script should now look like this:

    0. Dialog 1

    1. Return and SKIP default

    Now, goto the "File" menu and choose "save". Then close the SockMonkey Script Maker. Now, fire up your module and talk to your Dwarven_Smithy. He should now chat to you.

    "0. Dialog Counter 1" SHOULD BE "0. Dialog 1"


    NOTE: If that doesn't fix the problem, then you're doing something wrong. Check it again, read this all VERY carefully as THESE ARE THE ONLY TWO THINGS THAT ARE WRONG. Once you fix these two things, it'll work fine. Also, because you made it into a ".dat" to send it to me, make sure there is no "my mod.dat" file sitting in the modules directory, make sure you delete that and are left with just the files and directories.

    Tell me once you get it working.
     
  16. Anonymous

    Anonymous Guest

    What's Windows Explorer? And where it can be found?

    I fixed script, that is only problem now.
     
  17. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Ummm.... Windows Explorer. If you're using Microsoft Windows 95, 98, 2000, ME etc... You'll have it in the start menu.

    If you're NOT using Microsoft Windows as your operating system, then just open up whatever file-browsing application you normally use and change the file extension that way.
     
  18. Anonymous

    Anonymous Guest

  19. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
  20. Lore Development Team

    Lore Development Team New Member

    Messages:
    39
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    Excellent DarkUnderlord!

    *****Fixed, easy. First of all, can I say what a pleasure it was to see a mod that's been made as a result of the Amtut tutorial. It warms the cockles of my heart, it really does.*****

    You'll be glad to know that the LORE Team, when formed in November, was using the AMTUT Tutorial to learn about WorldEd. :) DarkUnderlord please drop us a line at LoreTeam@hotmail.com, the LORE Team requested I speak to you.

    Sincerely,

    Nicholas Freedman
     
Our Host!