Skip to content

Creating a custom item - help an aspiring modder?

MikeMike Member Posts: 65
Let me start by saying that Baldur's Gate 1 & 2 are my most treasured games in my vast collection. In my opinion there isn't really another RPG that competes - at least not well enough to hold my interest like these.

Given that fact, I have decided I would like to start trying to create some custom items for BG:EE. I have read a couple of beginner guides on this subject with using EE Keeper & Near Infinity. I found the guides (that I have read) to be a tad bit lacking in detail. Can someone point me to a detailed outline of what the different global effects, attributes and abilities do in Near Infinity. Is there another modding utility that I should learn for IE modding? I would like to create a dagger that causes permanent blindness on successful hit as my first mod.

Thanks in advance!

Comments

  • ErgErg Member Posts: 1,756
    Mike said:

    Is there another modding utility that I should learn for IE modding? I would like to create a dagger that causes permanent blindness on successful hit as my first mod.

    You may want to check also DLTCEP and WeiDU.

    These are not meant to replace entirely tools like NI and EE Keeper, because each tool may be better suited for a different task.

    In particular DLTCEP includes descriptions for each effect. For instance, for Opcode 74 it says

    State: Blindness [74]
    Applies the blindness effect to the targeted creature(s). Both parameters should be 0 (zero).
  • RequiemRequiem Member Posts: 187
    edited March 2013
    @mike I would probably recommend using DLTCEP for this item. Once you have it all set up then on the main screen click edit items, then click load item and select a normal dagger (select the item with the item code DAGG01).

    When that is opened up click on the extended effects tab at the top right, this is the tab that dictates all of the combat specifics of the weapon such as damage and any effects it has.

    Around the middle of the tab is a dropbox which is labelled effect # and has in it 1 Spell : Cast Spell (at Target) 146.

    As @erg says, we need to use opcode 74 to inflict blindness on the target, so just above the dropbox click the "Add" button, which should add a new effect, then click edit to set this to what we need.

    When you click edit a new window will open up which details exactly what we want to happen when effect 2 triggers (i.e. when you strike an enemy with the dagger). All of the effects listed will trigger when an enemy is struck, but they are subject to the probability restrictions and saving throws as to whether they actually do anything to the enemy.

    In the top left is the effect opcode box, this is the overall effect you want to happen, select this box and then change it to state 74 - Blindness.
    The target dropdown box needs to be set to "2 - Pre-Target" so that this effect is applied to whoever the dagger hits.
    The timing dropdown box needs to be set to permanent as you want the blindness to be permanent.
    As it says on the right both paramaters can be 0 (the parameter boxes are the ones which say irrelevant above them, their descriptions will change as you choose different opcodes).

    At the bottom you need to decide if you will allow a saving throw, if so then choose which save you want to roll against from the dropdown box. The bonus can be either positive or negative (if it is negative then it is a penalty).
    To the right of the saving throw box is another dropdown box which allows you to select whether or not the effect can bypass magic resistance and can be dispelled. The options are pretty self explanatory.

    Once all of that is filled in then click exit and back on the main page your effect 2 will have changed to opcode 74 - blindness. If you want to go back and change something you can click edit and go back in.

    Once you are done you need to save the item in your override folder in the 00766 directory where you installed the game. If an override folder doesn't exist then create one.

    Once that is done boot up your game and open up the cheat console (if you are unsure of how to do that there are various threads on this forum) and use type CreateItem("ITEMNAME") to get your item into game. Obviously replace ITEMNAME with whatever you saved your item as (it cannot be more than 8 letters long).


    **Extras**

    A point to consider is that although the above item will blind a target, it will not play sounds or visual effects when it does so, and it will not cause the little "blindness" icon on the character portrait, as we don't have effects on the dagger to do this kind of thing. When you feel a bit more comfortable it might be worth having a look at the wizard spell blindness (filename is SPWI106). You could have a go at customising this and then use an effect containing opcode 146 - Cast Spell (at Target) on your dagger to simply cast the spell at the target with all of the effects and sounds in one go, rather than adding a separate effect on your dagger item for each seperate bit.

    At every point you should try and think if one of the developers has built some part of what you are trying to do, and then use that part rather than building your own from scratch.

    Hopefully that makes sense, and let me know how you get on.

  • MikeMike Member Posts: 65
    Requiem, thank you for that. It was just what I needed. Is there a DLTCEP for bgee?
  • ErgErg Member Posts: 1,756
    @Mike

    Click on the word DLTCEP on my post above and download the most up to date version (currently that is 7.6a and it works with BGEE).
  • CrevsDaakCrevsDaak Member Posts: 7,155
    I think the first thing I'm going to create is Elric's StormBringer, a Long Sword +4 THAC0 and +2 Damage, and every successful hit to living, not soul less, grant the wielder with 4 HP regenerated, only usable by Evil.
  • ErgErg Member Posts: 1,756
    @Avenger_teambg

    I'm currently using BG2Effects.dat as effect list for BGEE in DLTCEP.

    Is this correct, or there are better alternatives for BGEE?

    In the setup.txt you mentioned that there are also lists downloadable from various sources. Do you have any specific recommendation for an effect list that may be more suited for beginners than the standard ones?
  • MikeMike Member Posts: 65
    @erg

    Can I make this a unique item in the description without changing the normal DAGG01 in the Dialog.tlk?

    I see where I can do it, but I just don't want to replace the string for the normal dagger.

    Thanks!
  • ErgErg Member Posts: 1,756
    @Mike

    Yes, it is preferable to add a new description for your custom item instead of replacing the string for DAGG01.

    To add or modify item descriptions you should use WeiDU, especially if you plan to make your custom item available to others. It requires writing code and it can be a little intimidating at first, if you're not used to it, but it is definitely worth the effort on the long run.

    If you didn't already, you should read this short introduction to WeiDU:

    http://forum.baldursgate.com/discussion/15010/short-introduction-to-weidu-and-simple-mod-template

    If you decide to use WeiDU, I can provide further advice.

    On the other hand, if you plan to use the item just for yourself, using WeiDU is not really required (but I would still recommend it).
  • MikeMike Member Posts: 65
    @Erg

    Out of curiosity is there any way to accomplish this from within DLTCEP? Perhaps in the Descriptions tab? I am going to take a look at the Weidu tutorial you posted - thank you.
  • ErgErg Member Posts: 1,756
    edited March 2013
    It is indeed possible to edit directly dialog.tlk from within DLTCEP without going through WeiDU, but it is risky, because you may end up ruining you dialog.tlk. Even if you are careful and make a backup copy of dialog.tlk, you may still ending up corrupting your savegame. WeiDU is much safer.

    You can also run WeiDU from within DLTCEP, but I never tried myself. Maybe @Avenger_teambg can provide some advice on how to do that.

    Let me know when you are done reading the WeiDU tutorial and I will show you how to add a new description using just WeiDU.
  • MikeMike Member Posts: 65
    edited March 2013
    Thank you for helping me through this Erg. I am currently reading though this (http://www.weidu.org/~thebigg/README-WeiDU.html#htoc1) in a addition to what you suggested. So yes, please show me how to add a unique item name and description with just WeiDU.
  • ErgErg Member Posts: 1,756
    edited March 2013
    There are two possibilities:

    1) doing everything with WeiDU
    2) creating the ITM file with DLTCEP (or NearInfinity, etc.) and using WeiDU just to add the new strings

    I would say we start with #2, that's easier, first.

    Assuming that you already have the .ITM file inside a folder called "copy", like in the example in the WeiDU tutorial, you just need the following code in your .tp2 file

    BACKUP ~your_mod_name/backup~
    AUTHOR ~Mike, at some forum~
    BEGIN ~Your mod name~
    COPY ~your_mod_name\copy\your_file.ITM~ ~override~
    SAY 8 ~put here the general name~
    SAY 12 ~put here the identified name~
    SAY 80 ~put here the general description~
    SAY 84 ~put here the identified description~

    You can omit the strings that don't need to be changed. For instance if the "General name" is just "Dagger", you can remove or comment the line with SAY 8.

    You can also load an item in DLTCEP and use the "export TP2 item file" from the menu "File" to get a template that will make easier to write the new strings. In your case I would use "DAGG02" as template as "DAGG01" is missing the "Identified description" beacuse it isn't magical.
  • MikeMike Member Posts: 65
    Erg said:


    You can omit the strings that don't need to be changed. For instance if the "General name" is just "Dagger", you can remove or comment the line with SAY 8.

    Does that apply to SAY 80 as well?

    Thank you!
  • JalilyJalily Member Posts: 4,681
    Erg said:

      SAY 8 ~put here the general name~
    SAY 12 ~put here the identified name~
    SAY 80 ~put here the general description~
    SAY 84 ~put here the identified description~
    I find it easier to do this:
      SAY NAME1 ~general name~
    SAY NAME2 ~identified name~
    SAY UNIDENTIFIED_DESC ~general description~
    SAY IDENTIFIED_DESC ~identified description~
    @Mike Yes. As @Erg said, it goes for anything that doesn't need to be changed.
  • MikeMike Member Posts: 65
    edited March 2013
    Well I am getting this error


    With this code TP2.

  • ErgErg Member Posts: 1,756
    edited March 2013
    There is definitely something wrong because it looks like WeiDU is trying to use resources from Icewind Dale instead of BGEE.

    Did you run setup-mod_name.exe, where mod_name is the name of the mod folder, from inside the main BGEE folder, i.e. the one containing BGEE chitin.key?

    Also it looks like you are using an old WeiDU version that may not be compatible with BGEE.

    The most up to date version is 231.08 (Beta)

    Direct Link:
    http://www.weidu.org/~thebigg/beta/

    Forum Discussion:
    http://forums.pocketplane.net/index.php/topic,28364.0.html

    Edit: I've noticed also another problem in your code. ITM names should be no longer than 8 characters (extension excluded).
  • MikeMike Member Posts: 65
    edited March 2013
    OK, I figured out what I was doing wrong... Thank you guys for your help in this matter!

    However when I try to equip it via EE KEEPER I get "Error: Item not found in database."

    even though it is in the override folder... what gives?
  • MikeMike Member Posts: 65
    Haha, well I got the dagger in the game now, but it has no name and some random error number saying there is a missing string
  • ErgErg Member Posts: 1,756
    That's most likely is because WeiDU is modifying a copy of dialog.tlk in the main folder, but not the one in the language folder.

    You can solve this in several ways

    1) copying around dialog.tlk between the main and the language folder
    2) creating a hard link to dialog.tlk in the main folder
    3) making a bat file to tell WeiDU where dialog.tlk is

    #1
    Not recommended

    #2
    Start the Command Prompt (cmd.exe) and enter the following command:

    mklink /H "C:\Program Files\Baldur's Gate Enhanced Edition\Data\00766\dialog.tlk" "C:\Program Files\Baldur's Gate Enhanced Edition\Data\00766\lang\en_US\dialog.tlk"

    changing the path according to your actual installation path and language

    #3
    Create a plain text file in the main BGEE folder, put in it something like

    weidu your_mod_name\setup-your_mod_name.tp2 --script-style bg2 --tlkin .\lang\en_us\dialog.tlk --tlkout .\lang\en_us\dialog.tlk --log setup-your_mod_name.debug

    save, rename as "bgee_install_your_mod_name.bat" and double click on it to install the mod.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    Erg said:

    @Avenger_teambg

    I'm currently using BG2Effects.dat as effect list for BGEE in DLTCEP.

    Is this correct, or there are better alternatives for BGEE?

    In the setup.txt you mentioned that there are also lists downloadable from various sources. Do you have any specific recommendation for an effect list that may be more suited for beginners than the standard ones?

    BG2Effects.Dat is perfect. Just use one from a recent release which contains the bgee specific opcodes, even some old ones have been improved.
    Note, this is an ongoing process as the engine coders listen to my pleas and add more and more new features into it :D
  • CrevsDaakCrevsDaak Member Posts: 7,155
    A way to creating new items is by editing them with Near Infinity and dropping the edited the file in the override folder, items from BG2 can be imported by doing this, but they've all miss they description unless they are in BG1 with the same item file name and string codes.

    I created a Dagger+6 (by replacing Battle Axe +1), 80d100 which has a range of 150 feet and has only one use.

    Some items from BG2 like Dr. Freeze Death Ray (An ammunition for Big Metal Gun) has both Description and Name string, but the item is not in BGEE, and the Frag Grenade (Also a Big Metal Rod ammunition) has it too.
  • CrevsDaakCrevsDaak Member Posts: 7,155
    edited August 2013
    image

    I created this today, only using Near Infinity, only used EEKeeper to locate the sword in the game (in a enemy's inventory) and to take the image.
Sign In or Register to comment.