Skip to content

Noobie Mod Questions (First Attempt to create a custom item)

HeindrichHeindrich Member, Moderator Posts: 2,959
edited March 2015 in General Modding
I started messing around with Near Infinity for the first time today to try to create some custom items for my next BG:EE playthrough. As I was looking at the options for damage type for a sword, I noticed options for "Piercing or Slashing"...

image

I don't recall coming across any multi-damage type items in all my gameplay thus far... so I have some questions related to this.

1) Are there any existing weapons ingame with multi-damage types that I missed?
2) How would it work mechanically? If a weapon is piercing and slashing, does it use the best or worst case modifier against armour?
3) Is changing weapon damage type as simple as just changing this one variable?

Thanks in advance!
Post edited by Heindrich on

Comments

  • artificial_sunlightartificial_sunlight Member Posts: 601
    edited September 2014
    Piercing or crushing looks flail/morning star to me, but I don't know if it's used ingame. (maybe I put it on my Barbed Club)

    Crushing or slashing is a mystery for me. And Blund missle is should be used for sling bullets i think.
  • HeindrichHeindrich Member, Moderator Posts: 2,959
    edited September 2014
    @Erg‌ (or @CrevsDaak‌)

    I think I am being a bit thick here... so some help would be appreciated!

    So I have created my first custom item using Near-Infinity. I don't understand a lot of variables, so to keep it simple I simply copied a very similar item and edited that. I have tested it ingame and I think the mechanics works... However I can't get the game to display either the item description or the item name.

    I think the problem is that instead of editing dialogues for item name and item descriptions, I created new ones, because I didn't want to completely change all "Long Swords +2" in the game. Surely there is a simple NI solution that I must've missed right?

    Also I looked into using WeiDU, but I can't even find an obviously up-to-date version to download that's compatible with BG:EE! When I installed BG1NPC, did that include WeiDU? I am confused because I see threads that say you need WeiDU to install mods for BG:EE...

    Sorry for being such a Noober at modding :D

    Thx in advance!
  • CrevsDaakCrevsDaak Member Posts: 7,155
    @Heindrich‌ get the latest version of WeiDU from here and create a text file with a .tp2 extension. Just copy/paste this and chane what you need to change (Author's name, directories and the filea to copy):
    BACKUP "example/backup"
    AUTHOR CrevsDaak

    BEGIN "example mod" // this is the mod's name
    COPY "directory/to/your.itm" override
    SAY 0xC "Unidentified name"
    SAY 0x8 "Identified name"
    // these two give the .itm a name, the nane is the string inside the ""s
    SAY 0x50 "Unidentified description"
    SAY 0x54 "Identified description"
    // these two give the .itm a description, usage is the same as with the name string.
    /* this 4 new strings will be added as new entries tp the dialog.tpk and you'll be able to see the description from the game */
  • ErgErg Member Posts: 1,756
    @Heindrich, don't worry, I've been a noob myself not long ago :)

    It is indeed preferable, in most cases, to create a new item, instead of changing an existing one. The easiest way to do it in NearInfinity is to right click on the item name, in the left panel, and select "Add copy of". You'll be asked for a new filename (the extension ITM is added automatically).

    The new name should be no more than 8 characters long and it is customary to use a modder prefix as first two characters (this is to prevent clashes with other modders; my prefix, for example is ER, @CrevsDaak‌ has registered 7C, so all my files will have names starting with ER and there will be no risk to accidentally overwrite @CrevsDaak‌ files whose names start with 7C). Don't worry too much about the prefix right now, but if you are serious about becoming a modder and sharing your work with others, you may consider registering your own prefix here.

    Item names and descriptions are not stored in the corresponding ITM file, but in DIALOG.TLK and this is the reason why you should use WeiDU instead of NI to update them.

    If you do it with NI, the modifications will only apply to your own installation, but other people using your ITM files will not be able to see the new names/descriptions, unless they update the description themselves. Moreover, you'll be forced to manually redo all the work if a new patch is released, or if you are simply restoring or reinstalling the game.

    With WeiDU you can both create a redistributable mod, for other people to enjoy, and saving a lot of time when you have to reapply your changes to your own game.

    WeiDU is simply one of those files called setup-modname.exe shipped with most mods. If you copy and rename one of those files as weidu.exe and double click on it, you'll be able to check the version number (if you do this just to check the version number, after you can simply close the Command Prompt window).

    Current WeiDU version is 236. You can also download the latest version for your operative system here or here.

    Everything you should know to create a simple WeiDU mod is explained very well in this tutorial. If you have further questions, don't hesitate to ask :)
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,367
    The problem with that approach, @subtledoctor, is that any damage added through such effects are not calculated into Critical hits or Backstab Multiplier.
  • [Deleted User][Deleted User] Posts: 0
    edited September 2014
    The user and all related content has been deleted.
    Post edited by [Deleted User] on
  • HeindrichHeindrich Member, Moderator Posts: 2,959
    @Erg and @CrevsDaak‌

    I just wanted to say a big thank you for helping me to create my first ever (albeit extremely simple) mod! It took me a while to figure out how to actually implement a mod using WeiDU once I had something like the above, but I worked it out from examples provided by @Wisp‌ in his very helpful tutorial.

    It's a tiny step compared to the awesome stuff you guys do, but non-the-less...

    image
  • Can you share your mod? So we can enjoy and learn ;)
  • HeindrichHeindrich Member, Moderator Posts: 2,959
    @artificial_sunlight‌
    It is so basic that I'm a bit embarrassed to call it a mod lol... but sure, here it is...

    It is basically just one custom item, a Long Sword +2 that also provides +1AC and inflicts slashing or piercing damage.

    The .ITM was created using Near Infinity, by making an additional copy of the default Long Sword +2 and then editing its damage type, its icon (I prefer the Varscona +2 icon) and adding the +1 AC effect (which I worked out by looking at the effects on Drizzt's Scimitar).

    The .TP2 file was a text file saved as .TP2, and includes installation instruction and ingame item description. I basically used Erg's template. The item is just a personal mod so the description is tailored for my Charname, but it's pretty straight forward to change.

    The .exe file was just a renamed version of the WeiDU.exe.

    And that's basically the core of an item mod. :)
  • The user and all related content has been deleted.
  • I will look trough the files and test it. Maybe I get ideas for future mods. And there may be things I can use die my club mod.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    While I know it reduces readability of your code, I would strongly suggest that everyone use tra files from the get-go. You'll make your translators happy later, and it'll make it easier to move your mod to non-EE games, too.
  • MathsorcererMathsorcerer Member Posts: 3,037
    The last time I tried that the tp2 file would never read my tra successfully; I wound up having to put text directly in tp2 but that was months ago and I haven't modded anything requiring text since then. I hope I can get it to work now because I have some items I am creating for my wife and she is looking forward to using them.
  • The user and all related content has been deleted.
  • WispWisp Member Posts: 1,102
    @subtledoctor‌
    You can use any unique integer, in any order. (So, yes, that does work). The negative range is typically reserved for use by WeiDU; don't use it.
  • CamDawgCamDawg Member, Developer Posts: 3,438
    @Wisp I believe what @subtledoctor is asking is whether or not --traify can skip arbitrary blocks of string numbers. While you can designate the starting number with --traify#, the automatic process does not skip numbers. You could work around that by splitting up your tp2 into chunks and traifying each individually.
  • The user and all related content has been deleted.
  • @Heinrich‌ I checked your .ITM file and I saw that you used different Icons for the inventory and the quickbar. Was this intentonaly?

  • HeindrichHeindrich Member, Moderator Posts: 2,959
    @artificial_sunlight‌
    Nope I intended to use Varscona +2 for both, but I didn't notice until I started my game, and it didn't bother me enough to change it so far. :D
  • If you want to fix it, edit the melee component of the blade in NI and relpace the BAM over there
  • HeindrichHeindrich Member, Moderator Posts: 2,959
    Hey guys! I finally got around to creating the second version of my sword mod. (I really wish I just did it all in one go so I didn't have to relearn all the stuff I forgot in the months that passed!) I have almost got it working properly, but there's just one or two little thing that continues to bug me, and it's so simple that I cannot figure out what I am missing, especially as this mod is basically the same as my first!

    1) I cannot get the item name to show up either at the top left of the item description or when you mouse-over it from inventory or quickslot (the scroll thing).

    This completely baffles me cos it worked perfectly fine for my first version in BG:EE.
    Examples:

    Working as intended in BG:EE
    image

    Item name does not show properly in BG2:EE
    image


    2) This is a really minor point, so not remotely a priority, but I wanted the sword (a Long Sword) to have the same blue glow as Twinkle (scimitar). I copied all of Twinkle's colour properties into the new sword, but it doesn't look quite as blue. I guess it might just be down to the fact that scimitar blades are broader, so there is greater surface area for the blue pigment. But if anyone can suggest a (simple) solution, that'd be much appreciated.

    Comparison between Twinkle and the mod sword:

    image


    Of course I attach my modest efforts here, would appreciate it if somebody can take a quick look at my .TP2 file, I suspect that is where my mistake is, though obviously I cannot find it myself...

    Thanks in advance! :smile:
  • CrevsDaakCrevsDaak Member Posts: 7,155
    Heindrich said:

    Hey guys! I finally got around to creating the second version of my sword mod. (I really wish I just did it all in one go so I didn't have to relearn all the stuff I forgot in the months that passed!) I have almost got it working properly, but there's just one or two little thing that continues to bug me, and it's so simple that I cannot figure out what I am missing, especially as this mod is basically the same as my first!

    1) I cannot get the item name to show up either at the top left of the item description or when you mouse-over it from inventory or quickslot (the scroll thing).

    This completely baffles me cos it worked perfectly fine for my first version in BG:EE.
    Examples:


    Working as intended in BG:EE
    image

    Item name does not show properly in BG2:EE
    image


    2) This is a really minor point, so not remotely a priority, but I wanted the sword (a Long Sword) to have the same blue glow as Twinkle (scimitar). I copied all of Twinkle's colour properties into the new sword, but it doesn't look quite as blue. I guess it might just be down to the fact that scimitar blades are broader, so there is greater surface area for the blue pigment. But if anyone can suggest a (simple) solution, that'd be much appreciated.

    Comparison between Twinkle and the mod sword:

    image


    Of course I attach my modest efforts here, would appreciate it if somebody can take a quick look at my .TP2 file, I suspect that is where my mistake is, though obviously I cannot find it myself...

    Thanks in advance! :smile:
    1) Seems to be something caused by BG2:EE rather than your item mod (at least from what I see from the picture, also it should work alright).

    2) There are several values for where on the sword the colors are displayed, also the sword has it's own colors that might override the others if applied later. Take a look here (I suggest you to bookmark that site—it helps a lot) for a list of the locations of the colors.
  • HeindrichHeindrich Member, Moderator Posts: 2,959
    CrevsDaak said:


    1) Seems to be something caused by BG2:EE rather than your item mod (at least from what I see from the picture, also it should work alright).

    @CrevsDaak Do you have any idea what the problem might be? I used the same WeiDu version as I downloaded months ago for BG:EE, is there a new version and could that cause incompatibility with BG2:EE? Maybe I messed up something in Near Infinity... perhaps reinstall BG2?
  • CrevsDaakCrevsDaak Member Posts: 7,155
    @Heindrich I meant BG2:EE as the changes done by the latest BG2:EE patch (at least from what I see on the picture as I've said before). I tell you—it's not something on your mod (there is no reason why it should work wrong on BG2:EE), but if you want to be really sure, check weidu.conf's contents are set to the language that you're playing the game in.

    Also, I would recommend to update your WeiDU since the latest version came out around a week or two ago.
  • HeindrichHeindrich Member, Moderator Posts: 2,959
    @CrevsDaak Updating WeiDu worked! Thanks. :smile:

    Incidentally why is WeiDu called WeiDu? It's like a Chinese name, same surname as real life me actually, lol.
  • elminsterelminster Member, Developer Posts: 16,315
    Heindrich said:

    @CrevsDaak Updating WeiDu worked! Thanks. :smile:

    Incidentally why is WeiDu called WeiDu? It's like a Chinese name, same surname as real life me actually, lol.

    http://forum.baldursgate.com/discussion/comment/221690/#Comment_221690
Sign In or Register to comment.