Giving Items To NPC/Player

Discussion in 'Modding and Scripting Support' started by Anonymous, Dec 18, 2002.

Remove all ads!
Support Terra-Arcanum:

GOG.com

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

    Anonymous Guest

    I'd like to know, how an NPC transfers, or gives, and item to the player, and vice versa, the Player Giving an NPC an item.

    A good example of what I'm talking about is near the beginning of the Arcanum Adventure, Raffle will agree to talk to you about P & Physcler Sons if you give him a camera. You usually find it near the Zypher Wreck.

    You sell it to him via text, he gives you money and your Camera Dissapears from your inventory. That's what I'd like to know how to do, is to transfer and item from a player to an NPC, and an NPC to a player. (Now, how'd he do that without me seeing it?)

    -RunAwayScientist[ASF]
     
  2. Ray Stryke

    Ray Stryke New Member

    Messages:
    169
    Likes Received:
    0
    Joined:
    Nov 27, 2002
    you would have to know more about dialog, because the actual transfer happens in there, using the item number...6605 for example...is...I don't know at the moment, but those numbers are used. The dialog checks to see if you have(or don't have) the items, and takes them(or gives) depending on the situation. To clear up any misconceptions, I don't mean the script, the item transfer all happens in the dialog, even the shops do.
     
  3. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Undat my Grayhills mod and check that. I use it quite a bit in there. I would explain it now... But umm... I have to go.
     
  4. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    I, while not the expert DU is, will offer what help I can. Several steps are necessary prior to actaully working through the dialogue.

    I dont have arcanum in front of me, so I will be making references to commands you find int he worlded manual. Read it yet? Go to page 94 (in MS word) to find the result field options.

    STEP ONE: Create the item, and be sure you give it an internal name. This is done in (i believe) the OEMES directory, and is titled gameoname.mes. There are two things crucial here--one, that you give the item the name you want, and two that you remember the number that you assign it in this file! write it down, or make it poart of the items name so you don't forget it.

    STEP TWO: give it a name in gamedesc.mes, as this is what the player will see of it.

    STEP THREE: Create the item in worlded, giving it the assigned internal names and such as you desire. Now, take a bite out of this next part, becasue here is where it gets beefy.

    DIALOGUE: FOr the sake of simplicity, iam only going to model how this works as far as the commands you will need to trasnfer the item. Say we have an item, a dagger, with internal number 455.

    First the NPC will greet us...
    {1}{G:}{G:}{}{}{}{}
    {2}{I would like to give you a dagger.}{}{1}{in 455}{10}{in -455}

    The key to this dialogue is the "in" followed by the number. The number is the internal number of the item that you have. CHECK THE MANUAL: I cant remember here at work if you want a negative number or a postiive one to give the item away, but it tells you clearly on pages 95-96 (can you tell i read thriough this thing alot? :grin: ) notice the "in" code in the test field? This makes certain you have the dagger before you go and offer it to somebody! Important step. NPC's, when you make them, must have the item, there's no real way without complicated scripting to test if they have it and then alter the dialogue accrodingly, although if this is something you really wanted, I could help yuo through it.

    Say you want to get an item for a price, from an NPC. I will offer another example. The robe he is wearing has an internal number 678
    {1}{G:}{G:}{}{}{}{}
    {2}{I need to buy that robe you're wearing.}{}{1}{}{10}{}

    {10}{Do you have 100 gold?}{Miss, I require 100 gold for my attire!}{}{}{}{}
    {11}{indeed, here it is.}{}{1}{$$ 100}{0}{$$ -100, in 678}
    {12}{I lack the coin just now. Sorry.}{}{1}{$$ -99}{0}{}
    {13}{You're nuts. I'll find it cheaper elsewhere!}{}{1}{}{0}{}

    And so on and so forth. You can of course add extra options for haggling and the like.

    Does this help? Try it out, and if you are still really, really lost, post here again and I will see what else I can offer you.

    Good luck
    Ruelz
     
  5. Ray Stryke

    Ray Stryke New Member

    Messages:
    169
    Likes Received:
    0
    Joined:
    Nov 27, 2002
    Good job ruelz, I think you covered the give part, but what about the take?
     
  6. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    See the above part where the PC asks the NPC for his robe. The only difference between give and take is dialog (of course, you dont want to say "Here, take this!" when you are actaully taking soemthing away) and the negative sign on the number that is the item's internal name. That's all that determines give and take.
     
  7. Anonymous

    Anonymous Guest

    Thanks!

    Thank you for your help.


    I needed to inquire about this for my orginally thought mod, or so I believe, "Rplay Mod", bringing a new and unuiqe style of play to Arcanum. Become Banker, or beggar, Officer or Layman, it's totally up to you.

    This was for buying an apartment, from the ol' NPC who would have you sign the correct documents, but, I never had the knowledge to get him to hand you a key to any one of the apartments.

    Thank you, you've enabled new doors to open (Door clicks shut). If you're interested in my mod "Rplay" let me know. Otherwise, I'm using banwitdth... Hmmm, you really are quite the expert, isn't he eh?

    Once again, Thanks:

    -RunAwayScientist[ASF](Cheese Please!)
     
  8. Anonymous

    Anonymous Guest

    Oh, No...Gone

    It's gone...I read your suggestion tip, and went to load WorldEd...It greeted me with, "WorldEd has detected a previous Crashed Version, would you like me to Restore it?". I said yes and, "Error: Too many Errors exiting WorldEd". I restarted it, clicked on RolePlay, clicked on "Allow Multiplayer", hit OK then a message popped- up saying "Error: Mod too many errors, exiting WorldEd".


    Now I can't seem to find it....the only thing left was something I was working on right when it crashed, and that was the Apartment Keepers Dialogue....All my work is gone...Gone...


    Any way to help me? PLease? With Cheese? Cheesey Pleasey...Aww man...

    -RunAwayScientist[ASF]
     
  9. DarkUnderlord

    DarkUnderlord Administrator Staff Member

    Messages:
    4,315
    Likes Received:
    5
    Joined:
    Nov 10, 2001
    Ummm.... Unless you backed up your work elsewhere... Probably not.

    *DU braces for the loss of another modder*
     
  10. Ray Stryke

    Ray Stryke New Member

    Messages:
    169
    Likes Received:
    0
    Joined:
    Nov 27, 2002
    Yeah, backing up your work is the first thing you do, and, by the way you make it sound, looks as though that one had some serious problems, think of that as a message from heaven and start from scratch, pay more attention to the details, and make sure everything works as you make it, not afterwards (although I hate the fact arcanum makes it so obnoxious to do so) and don't forget to back it up as often as possible...oh, and don't use the 1.0.7.4. world ed, it sucks balls if you really want to make good shit.
     
  11. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    Unfortunately, all I can offer is encouragement, although i wish i had a magic trick or two to help you out.

    I ended up formatting a harddrive and losing amod also. If you really are into it, the second time is a lot easier, becasue a lot of what slows you down is learning how to do all the stuff you;ve been trying for in the original mod. Seriously, my new mod is speeding along a LOT quicker, becasue I have a lot of the codes and stuff memorized (I dream in dialog sequences containing 8 brackets now). Stick with it, and retry from start. It is the bane of all modders that worlded is inherently unstable, especially on the better machines and newer operating systems. It is not logical, but it is often true.

    I do suggest using the 1070 version of Worlded--I have bever had worlded completely ace a mod for me, although it will occasionally randomly crash. (All you have to do is save eafter every accomplishment, and its not so bad.) Actually, if you are running 1074, you might try and open the mod with 1070 and see what you get. Or undat your mod, then delete the .dat file, and THEN try it with 1070. Yeah, that might help!

    But if it doesn't, hang in there! The reward for all this is someone playing your mod someday and posting awesome feedback for it becasue of how free the character is to interact ina literal world!

    Best of luck,
    Ruelz
     
  12. Ray Stryke

    Ray Stryke New Member

    Messages:
    169
    Likes Received:
    0
    Joined:
    Nov 27, 2002
    I have a little bug with my 1070 version of world ed, it doesn't remember when I put a start point in, so I can't test it without having to switch versions.
     
  13. Ruelz

    Ruelz New Member

    Messages:
    75
    Likes Received:
    0
    Joined:
    Jun 25, 2002
    there are 10000 things that could be the problem there--switching versions back and forth makes all sorts of problems, particularly when you edit things in 1070 and there is already a .dat file. Any changes you make, unless you manually compress the module each and every edit, will not take effect. So in other words, if you work between versions, you might have fixed the problem, but there's no way of knowing unless you get rid of the old .dat file and make 1070 load up from the module folder in arcanum. Did that make any sense?

    Another thing to try, along the same lines--you realize choosing "Set as start location" in worlded is only for multiplayer, right? In order to set a single player start location you have to edit the map.mes file (or somesuch name... I cant remember right off but it is in part two of AMTUT.) If you've done this before, and havent done the 1070 switch with the .dat file, the change wont take until you either compress the module again, or get rid of the file.

    I hope some of this helps...there's not much I can advise you on without actually seeing what's going on. But try some of this if you havent already, and let me know how it goes.

    Regards,
    Ruelz
     
  14. Ray Stryke

    Ray Stryke New Member

    Messages:
    169
    Likes Received:
    0
    Joined:
    Nov 27, 2002
    Interesting, I think I'll try and find that mes file you were talking about.
     
  15. Anonymous

    Anonymous Guest

    No Lost Modder

    Heh, DU I don't think you're gonna loose another modder. I'm still...He-re....*ahem*...(Runs for the cheese)....

    Well, my mod has come back to haunt me (Freaky). And yes, I know about improving upon yourself. My RolePLay mod was a Growth Spurt for my learning curve, thanks to DU's Tutorials. Before that, I didn't even want to look at Sock-Monkey Script Editor. I had no idea how to work it, now I under-stand it just like Cheese Pie.

    As I had said, my Mod has come back to haunt me. I was going to decide to make my "Island" more elaborate, and start buildin' Roleplay City from the Docks, instead of the Town Center. SO, I built a huge elaborate dock for a huge elaborate city, saved for the day, exited...


    The next day I came back, and looked in the "Select a Mod" screen, and guess what I see? Nothing....

    It seems my "Haunting" Roleplay Mod has come back to "Haunt" any future version of it. I can aviod this, if I use a Different name for the mod, maybe when I enter in the name, it's ol' .Dat files and ect. attach to it, along with the errors, and wipe it out. I've got no clue. Maybe my World Ed is bugged, and no new Mods will work.

    Errr, any idea? And, I consider myself a pretty good modder...THis is the 3rd Roleplay map I've made for any-game, that is, I've got one for Half-Life (Another Game), Operation Flashpoint (Another Game), and Arcanum (THis Game) which seems to have kicked the bucket, and gone to a better modding...Mapping PLace...Yeah....

    -RunAwayScientist ( What you see can't hurt you, but I sure can!)
     
  16. Anonymous

    Anonymous Guest

    Ah ha!

    Well, I found out what went wrong! And, Mr. underlord, you can add it to your "Things to Tell People Not To Do" list. Installing arcanum on my laptop, I head South to Key-West. From the West Coast of Florida, to the Key-Lime capital of Khakai Pants and bad hair-cuts.

    I stopped in at my nice little beach-house, and set up my laptop. I re-built Role Play, when, I ran into my same problem.

    Here's exactly what I did, and what you shoudn't do:

    - Milk Dark Underlord

    Wait no, wrong expereience...*ahem*...:

    - Make a mod, save it.
    - Say, WorldEd crashed. You restart it and:
    - A dialogue box comes up and says "WorldEd has detected a previous crashed session. Should I try and recover it? (YES) (NO)"
    - Hit No
    - Dialogue comes up and asks to select a mod
    - Hit Cancel
    - Re-start WorldEd, and load up your Mod
    - Presto Bandito! It's gone! Dun dun dun!

    Well, let's hope my research here can help stop world Hunger. Unless we eat Dark Underlord, or I sell my dagger to an NPC and buy McDonalds and throw fries to the World's children. "Fries! Fries! McDonald say eat yo fries children! Run! Run and eat fries! Grease! Greasy Fries! Eat you must! Pepcid AC! Pepcid Ac you must eat now Children! Fires!"

    Well...There you have it...Problem found, but not solved...The End for this case? Or have I left the File Cabinet wide open...?

    ((( The Newer rplay is much smaller, and is better in every way. "From Telegram Offices, to Credit Card company's, you decide!" )))

    -RunAwayScientist
     
  17. Anonymous

    Anonymous Guest

    Well, Good luck Modders!

    Well, I hope this little Safety tip you can add to your Tutorial Dark Underlord. I mean like, whatever happened to all the stuff we need? Like uhhh..Uhhh..Making movies and stuff? I mean, that tutorial was the coolest! I wouldn't be here today without you DU...

    And for everyone else...BEWARE THE EVIL WORLDED!...MAUHAHAH!!!

    -RunAwayScientist
     
Our Host!