WeaponProtoMaker-Beta

Discussion in 'Modding and Scripting Support' started by theorel, Nov 10, 2009.

Remove all ads!
Support Terra-Arcanum:

GOG.com

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

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Alrighty, so I've been working on this thing to make weapon proto files from a text file(a la the monster/NPCs/etc).

    Here it is.
    I still need to implement Scripts and Spells, so in that regard functionality is limited. I think it does everything else though. Included is a Weapons.txt with three whole weapons in it(dagger, sword, and Tesla Rod). The stats are different from the regular weapons, as I've been using them to test things...I hope to eventually release a text file along-side it that is my version of a weapon balance patch...but we'll see if I get that done before someone else.

    As mentioned in a previous post there are some things that I'm uncertain of, so these protos could very well not work. Also, the exe may not work on your system, I don't necessarily write the nicest code, so compatibility is a maybe as far as I know. But do let me know if it doesn't work, I'll see if I can do anything about it. Okay, so I'm going to post all of the "weapon attributes" that the program currently supports:

    "Description", "Art Number", "Item Flag", "Weapon Flag", "Hit Points", "Normal Damage", "Poison", "Electrical", "Fire", "Fatigue", "Weight", "Worth", "Speed", "Min Strength", "Crit Hit Chart", "Crit Miss Chart", "Material", "Sound Bank", "Weapon Type", "Internal Name", "AC", "Magic Weight Adj", "MagicTech", "Unknown Name", "Spell Mana", "To Hit Adj", "Magic to Hit Adj", "Magic Speed Adj", "Range", "Magic Range Adj", "Magic Min Str Adjustment", "Ammo Type", "Ammo Amount", "Projectile", "Magic Crit Hit Adj", "Magic Crit Miss Adj", "Crit Hit Bonus", "Crit Miss Bonus"

    Put the text exactly as it appears above followed by a colon to set that field. You cannot currently clear flags.

    Let me know of any success/failures you have...and I'll try to get to work on spells and scripts soon(ish)

    Oh, put it in your Arcanum folder to run. It doesn't check that the folders exist or create them, but it puts all the protos in /data/proto, from wherever it is.(like I said it's a bit sloppy).
     
  2. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
  3. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Weapon Proto Maker v1.0(Beta)

    Okay it supports scripts and spells. I added in Axe of Strength and Shocking Staff. Funny, looking at Shocking Staff and Tesla Rod next to each other makes one wonder, just what were they thinking? Why is the Shocking Staff Tech aligned at -90, and worth 2530 gold, when the Tesla Rod is tech aligned at -55 and worth 1007 gold?

    So yeah, now to begin on the weapon balance patch(which is now a simple text file).

    Notes:
    It may not work to attach more than 2 scripts, I haven't tested it. But hey, it's worth a shot. It probably won't work to attach a script to all of the first 4 attachment points and Hit(attachment point 7). I couldn't make it work through hex editing, but I didn't try to actually add all the scripts, just set the numbers for the attachment points.

    I can't seem to edit the Reaper's Axe. Has anyone else noted this problem? I noticed while trying to figure out scripts that hex-editing didn't actually changed the axe in worlded.

    Anyways, I'm labeling this as a beta, as there are several things that may not work. So please take it test it, and let me know if you come across any bugs. Some debugging messages are left in if you run it from command line. I don't generally use very informative printf's so it'll say stuff like "hi?", just ignore it.

    This was made on Windows XP, and may be architecture dependent, so I'm especially curious if it runs on Vista, etc.
     
  4. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
  5. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    For anyone using this, I noticed a random error in my code. I used the singular form for Arrows and Bullets. So, be sure to use "arrow" and "bullet" for ammo type. The current version doesn't suffer from this level of discrimination...but I don't feel it's worth uploading it until I'm pretty sure there are no other bugs/problems introduced by forced selection of random bits of hex.
     
  6. Arthgon

    Arthgon Well-Known Member

    Messages:
    2,733
    Likes Received:
    12
    Joined:
    Dec 30, 2007
  7. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    So, I was inspired to resume working on stuff, and I shortly found out that some weapon art has palette shifts. So, I figured out how that worked(just add the palette to the very first byte in the art number of the proto). And then I updated the Weapon Proto Maker. So, anyways, here's the new version...someday I may finish my weapon balance patch, and then I'll release that too.

    If anybody has found some bugs with this program, but hasn't posted because this thread was pretty dead, let me know.

    Update:
    Weapon Proto Maker v1.1
    It now supports Palette shifts. Use Palette: # (same number as art-view shows, 0 is default palette. Rusty Sword is palette 1, and there are several enchanted sword palettes...maybe more? I've not bothered to check.)
     
  8. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Well, this new machine doesn't want to run the program, so if I ever get it working for me I definately check it out.

    And thank you again. :thumbup:
     
  9. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    I should've replied to this sooner...does it give any messages when it fails to run? If not, or if they're not helpful to me, would you be willing/able to run it in command line? I can put in some useful debug messages and maybe figure out where the problem is.
     
  10. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Hey double-post! But maybe you won't mind.
    I've completed the first version of my Weapon Balance Patch, and so here it is...
    Note: this is largely untested(I dropped a couple of them in Worlded, and that's about it).

    So I'm interested in hearing from what people think. And given that information I will take it into account and perhaps change some things.

    Anyways, here's the patch: ArcanumXWeaponBalance
    To use: drop the dat file into your Arcanum directory, and run Drog's clearcache.bat, or delete all files in data/proto/

    Here's a text file version of all the weapons to edit as you please...just put it in Arcanum directory with the proto maker, and run the proto maker. Note: proto maker does not work unless the path data/proto exists from wherever you put it. It also does not handle unexpected input gracefully. I may add some of these things at a later date, but for now it's what you get.Text File
     
  11. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    Only that the WeaponProtoMaker encountered a problem and needs to close.
    There is a link for technical info, but that makes no sense to me.

    I'm reasonably sure it's something to do with my security settings.
    Running at everything at maximum has caused me grief in the past.
     
  12. theorel

    theorel New Member

    Messages:
    95
    Likes Received:
    0
    Joined:
    Apr 29, 2008
    Some quick stupid questions, just in case:
    -Is it producing any proto files at all?
    (it parses the txt file one weapon at a time and writes the pro file before moving to the next one, so it can write several files and then crash)

    -Do you get a command window pop-up and if so, does it display any text when the program crashes?

    I do know that I have an error in the code currently where it will crash if it encounters an attribute(the word before the ":") that it doesn't recognize. It will also crash(as noted) if the path data/proto is not available (from the directory containing WeaponProtoMaker). I'm going to try to fix these two errors at some point.
     
  13. rroyo

    rroyo Active Member

    Messages:
    3,319
    Likes Received:
    0
    Joined:
    Oct 13, 2006
    1) Nope.
    2) Nothing in a command window, just a pop-up error.
     
Our Host!