Quick question about adding new weapons to Arcanum.

Discussion in 'Modding and Scripting Support' started by GrimmHatter, Jan 3, 2007.

Remove all ads!
Support Terra-Arcanum:

GOG.com

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

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    I copied and edited a weapon (the Old Revolver) with a hex editor to make my new weapon and gave it a different .pro file name (006200 Weapon.pro or something like that, I'm not looking at it right now). I know I have to make new references to the weapon in the specific .mes files (description.mes, oname.mes, etc.) which I unpacked from the dat files. My question is, do I have to repack these .mes files into the dats or should I be making these new entries into different .mes (like gamedesc.mes) files that will go into the other folders (rules, mes, etc) in order to get the weapon into the game? I followed DKeopp's and Otto Krupp's docs on how to edit weapons, but I'm a little confused as to how to actually get the weapon into the game.

    Thanks for the help.
     
  2. Xz

    Xz Monkey Admin Staff Member

    Messages:
    5,085
    Likes Received:
    4
    Joined:
    May 31, 2003
    As far as we (well atleast I) know it's impossible to add new weapons. You can change any weapons already there, but not add new ones.
     
  3. GrimmHatter

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    Thanks. I'm kind of surprized there's no way of doing it. Does the same go for items in the world editor as well? If I make a module and edit the Old Revolver in WE with a new name and stats to make a new weapon, does it write over all instances of the Old Revolver, thus preventing me from also adding the Old Revolver to my module?
     
  4. Grossenschwamm

    Grossenschwamm Well-Known Member

    Messages:
    7,630
    Likes Received:
    4
    Joined:
    Feb 21, 2006
    You can technically add new weapons to the game, but first you need to copy an old weapon's proto, rename it, and then alter it from there.
    In that way, you can still have the Old Revolver and your new weapon in the game, and simply add it to shopkeeper menus or make a schematic for it.
     
  5. GrimmHatter

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    That's basically what I've done (stated in my first post). But don't I have to add a new line to one of the .mes files (like description.mes or gamedesc.mes) that will have the new name I want to give the new weapon? Then I can use a hex editor to tell my new proto file to reference the new description line I added instead of the same one as the Old Revolver so that they'll have different "in-game" names. And that's where my real question lies. Which .mes file should I add this new entry to that will have the "in-game" name I want to show for the new proto file I created? Do I have to add it to description.mes and repack it in Arcanum3.dat or add it to one of the other "description" .mes files saved in the rules or mes folder (or where ever it is, sorry I don't have it in front of me right now)? Really, all I want is to change 2 stats of the Old Revolver (HP and TH) and give it a different name (like "Old Reliable" or "Old Trusty" or something) and then package it with a custom gunslinger background I've already added to the game. Hope this clears things up a little. Thanks for the info though everyone.
     
  6. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    Stop this madness!
    When I first came here I read many posts stating how it is impossible to add new protos or how you have to alter old or unused protos instead. It's simply not true.
    New schematics can be added to the game quite easily.
    Add a new line to description.mes.
    Copy the proto for whatever item you are using as the template.
    Rename the copy to correspond to the description.mes number (plus 20 as described in the proto editing documents).
    You MUST change the prototype number (offsets 24 and 25). Any other changes are optional.
    Save the proto in the C:\SIERRA\Arcanum\data\proto folder.
    That's it.

    To access the item in the game you have to use a script to produce the item. New protos cannot be added to invensource.mes.

    That's really all there is to it.



    No. If you alter an item in WorldEd you are only changing that one specific copy of the item. All other copies of the original item remain unchanged.
     
  7. GrimmHatter

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    Wait. A couple questions then...

    1) Once I make the addition to the description.mes, where do I save it? Do I repack it in the Arcanum3.dat or save it to one the Sierra\Arcanum\ folders?


    2) What about producing the item via a background? Would that work? Why can't new proto's be available in stores (I'm assuming that's what the invensource.mes does?)?

    EDIT: Sorry, one more question: Does the description.mes number, the proto file's number, or the number in the 24 or 25 offsets get the 20 added to it?

    -Thanks-
     
  8. GrimmHatter

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    I tried to just edit the Old Revolver itself (not use it as a template and put the new proto into the game, just the original proto) and look at the changes in game. To keep it simple, I just wanted to change it's To Hit from -10 to -5. Now according to DKoepp's Prototype Editing doc:

    The problem I'm facing is that when I open the Old Revolver (006080 - Weapon.pro) in my hex editor, I get 0000 0000 for offsets 1CA - 1CD. In Otto Krupp's Arcanum Non-Magickal Weapon Protos doc it says:

    So if the Old Revolver has a TH of -10, then should'nt there be something along the lines of F6FF FFFF in offsets 1CA through 1CD? I tried to make a simple adjustment to try out in-game by changing 0000 0000 to 0100 0000. I saved the proto (overwriting the original file in the Proto folder of Arcanum) and loaded up the game, but the Old Revolver still read TH: -10 in the description window and it was still applying -10% penalties to all my attacks with the gun. I'm confused as to why it didn't change to TH: +1 or at least a TH: -9 (since I was technically modifying the Hit Modifier by a positive 1).

    Are there other files I need to be editing as well, even if it's just to change this one little stat on a pre-existing weapon already in the game by default? Thanks for the help.
     
  9. Xz

    Xz Monkey Admin Staff Member

    Messages:
    5,085
    Likes Received:
    4
    Joined:
    May 31, 2003
    You can save the mes file in one of these locations, not quite sure which:

    Arcanum\data\mes
    Arcanum\data\rules
     
  10. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    1. Any changes you make can be redatted back into their original dat file.
    However a much easier way to accomplish this is by putting the file in the data folder. Description.mes comes from the mes folder so you would put it into C:\SIERRA\Arcanum\data\mes.

    2. No. Certain backgrounds are hardcoded (e.g. sword from hero background or teaching effect from educator background). I do not think there is any way to do this without Troika's software.

    3. Invensource.mes governs what a merchant has in his inventory. If you put the number of a user made proto in invensource.mes the game engine will reject it and the merchant's inventory will be empty of all items.

    4. DKoepp's documents cover this:

    "Offset 24 & 25, this one deals with the prototype number. It should always be the same as the number of the prototype you are making it. (Ex. 3818 in the new example is hex for 6200 matching the actual prototype number.)
    Offset 143 & 144, Known name. This value should be the same as in description.mes for the item. Note is that there is a difference of 20 between the description.mes # and the prototype #. "

    e.g. Proto = 1020
    Offset 24 and 25 = 1020
    Description.mes = 1000
    Offset 143 and 144 = 1000

    The proto documents are an excellent guide but they do not apply perfectly to every proto. Usually you will find the number you are looking for at or near the offset that DKoepp mentions. Sometimes it might be 5 rows away from where you expect it. It all depends on what other properties the item has e.g. attached scripts, etc.
    Search for -10 (F6FF) in the proto and there is your offset. If you find more than one, then simply change them one at a time and then check in WorldEd until you change the correct one.

    I've been hex editing Arcanum for nearly 2 years and I have yet to uncover everything. Read the proto docs inside and out and then simply use trial and error. You'll get there in the end.
     
  11. GrimmHatter

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    I must still be doing something wrong. I tried searching for the hex value (using xvi32 for my editor) of -10, which would be F6 according to Krepp's doc, for the Old Revolver's TH and found nothing. I also followed his tip in taking the same hex value (F6) and converting it to decimal (246), then subtracted it from 256 (10), changing it to a negative value (-10), and then converting that value back to hex (0A) and searched for that byte and found nothing. So I'm incredibly confused now.

    To make matters worse, I loaded up the exact same proto used in DKoepp's doc (006148 - Weapon.pro a.k.a. Charmed Bow) and went directly to the offsets he describes that affect Hit Bonus and tried changing them, but got nothing when I checked the item out in-game. I then went and tried changing min and max normal and fatigue damage, weight, and speed and saw no changes taking place in-game. Now, all I'm doing is modifying an already existing proto file in the game, so I shouldn't have to make any additions or changes to other game files (ex: description.mes, item_effect.mes, etc.) right?

    This will probably be my last endeavor at attempting to modify the game any. I only just got it for Christmas and haven't gotten much play time out of it (I haven't even made it past Dernholm yet). So I'll just take some time to enjoy the game for what it is for now. Thanks for the help.
     
  12. TONGSyaBASS

    TONGSyaBASS Member

    Messages:
    772
    Likes Received:
    0
    Joined:
    Apr 19, 2005
    In the case of the Old Revolver, the To Hit value is exactly where you would expect it to be (offset 1CA).

    In Description.mes: {6080}{Old Revolver}
    So 6080 + 20 = 6100
    Open up proto 6100 in a hex editor.

    To Hit value is -10.
    -10 = FFF6
    I never really tried to do it the complicated way explained in the documents i.e. subtract 256, etc. I use the only hex convertor I could find that handles negative values:
    http://web.archive.org/web/200604280521 ... converter/
    (It's down at the moment but the archive.org link works).

    Arcanum reverses all bytes so FFF6 becomes F6FF.

    Also for Arcanum to acknowledge negative numbers they must be followed by an extra FFFF.
    So -10 = F6FFFFFF

    In proto 6100 you'll see that F6FFFFFF is present at offset 1CA.

    You want to change this to -9.
    -9 = FFF7
    Reverse: F7FF
    Add extra FFFF: F7FFFFFF
    Type F7FFFFFF in at offset 1CA.
    Save proto to C:\SIERRA\Arcanum\data\proto

    You MUST add the file extension ".pro" when you save the file.

    That's everything.
     
  13. GrimmHatter

    GrimmHatter Active Member

    Messages:
    1,274
    Likes Received:
    0
    Joined:
    Dec 27, 2006
    Holy crap. I've been looking at the wrong proto the whole time. Instead of adding 20 to 6080 I was subtracting 20 and looking at proto 6060. I'll have to check that out when I get home. Man am I lucky you all are patient with morons like me. :???:

    Thanks for all the help.
     
Our Host!