Skip to content

Using Near Infinity to make items

Ages ago, I did extensive modding for Baldur's Gate II using the old Team BG tools. Never released them, just made them for personal use. Lost them when my old computer crashed. I don't want to really get back into modding, but there are some of my old items I'd like to remake. However, I can't get DLTCEP or any other old program to work. I've tried using Near Infinity to make an item, but I can't seem to figure it out. Any tips?

Comments

  • PaulaMigratePaulaMigrate Member Posts: 1,201
    edited June 2017
    Easiest way to make an item in Near Infinity is to find an item that approximately comes close to what you have in mind, use the *make copy of* option to create a new item with your custom name. Afterwards you can easily modify all the fields you want to have different. It is pretty simple unless you are ambitious to also create a new bam picture for your item instead of using some existing ones.
    If you want your item to have special effects/abilities and you do not want to start from scratch, NI allows you to copy stuff from other items you find suitable to your own as well.
    If you want to keep your item locally, this is about it. Otherwise you export your new item to keep it save and (maybe) create yourself a mini-mod, weidu based, to import your item selection into any new game you may want to install some day.
  • extremeragnarokextremeragnarok Member Posts: 23
    Thanks. I've been able to get started making those items. However, when I edit the name and description for them (let's take Gorion's Ring of Protection for example), 10 other items now have the name and description. I tried making a second item, and everything changed to the new name and description. SO in the process of making new items I corrupted the Dialog.tlk file. Is there a way to make the names and descriptions not have and references to Dialog.tlk strings? The old programs I used saved them to the .itm file without making any kind of changes to the .tlk.
  • PaulaMigratePaulaMigrate Member Posts: 1,201
    edited June 2017
    This is what my last sentences were about. ("If you want to keep your item locally, this is about it. Otherwise you export your new item to keep it save and (maybe) create yourself a mini-mod, weidu based, to import your item selection into any new game you may want to install some day. ") You would use weidu to add the new items with the new names and texts to the game. You use NI just to create the itm file.

    Example for a tp2 entry
    COPY ~Chloe/Items/SLNOTECR.itm~ ~override/SLNOTECR.itm~
    SAY NAME1 ~text~
    SAY NAME2 ~text~
    SAY UNIDENTIFIED_DESC ~text~
    SAY DESC ~text~

    Avoid dealing with dialog.tlk directly in NI. It is possible but not recommended.
    What you have done is probably to modify existing strings via NI. Now every component that used the string will have your modified text. What you want to do is to create new strings that your new items use. Above weidu procedure is the save way to do it. The other way is to actually create new strings in NI, note down their reference numbers and update the fields in your item file with the new numbers (this however means you directly manipulate dialog.tlk).
  • extremeragnarokextremeragnarok Member Posts: 23
    Again, thanks. I figured out what I did wrong. I repaired most of the damage I did to dialog.tlk. I did try just making new strings and referencing them for the names and descriptions, but none of them seemed to work in the game. I'm thinking on going the Weidu route, however, I can't get the friggin' thing to work. Still looking for either a front-end or a decent guide for it.
  • PaulaMigratePaulaMigrate Member Posts: 1,201
    Fast track:

    - You create a folder in your BG directory, e.g MyItemMod. In this folder a subdirectory Itm.
    - You export your item, say FirstItm.itm to MyItemMod/itm
    - You create a text file in your folder and name it MyItemMod.tp2 (make sure it has ending tp2 not txt or whatever.)
    - In the text file put a header like this
    BACKUP ~MyItemMod/backup~
    AUTHOR ~extremeragnarok~

    VERSION ~0.1~

    BEGIN ~My new items for BG~

    //Now put in the stuff you want to add to the game

    COPY ~MyItemMod/itm/FirstItm.itm~ ~override~
    SAY NAME1 ~MyNewItem~
    SAY NAME2 ~MyNewItem~
    SAY UNIDENTIFIED_DESC ~something new~ //You need this only if your item needs identification in game
    SAY DESC ~A useful new item created by extremeragnarok~

    you can add more items, more cretures dialogues or whatever.

    You can add a new mod component with BEGIN ~A second mod component~
    Look here at what weidu can do http://www.weidu.org/~thebigg/README-WeiDU.html#hevea_default444

    - Now look if you have a Weidu.exe or a setup-Modxxxx.exe already in your game directory.
    - Make a copy of it and name it setup-MyItemMod.exe
    - If you now start your setup.exe you should get a mod install window asking you if you want to install *My new items for BG*
    - Afterwards you should have a new item with the name/description in your game

    Sounds like a little bit of effort at first, but once you have this running, you can go ahead an simply keep adding stuff to your mini-mod.
  • extremeragnarokextremeragnarok Member Posts: 23
    Ok, I followed your instructions to the letter, but for some reason the exe won't work. "Cannot find setup-TRIP.tp2." I put setup-TRIP.tp2 in the TRIP directory, like other mods do with their respective files, but it's still not working. What simple thing am I overlooking?
  • PaulaMigratePaulaMigrate Member Posts: 1,201
    edited June 2017

    Ok, I followed your instructions to the letter, but for some reason the exe won't work. "Cannot find setup-TRIP.tp2." I put setup-TRIP.tp2 in the TRIP directory, like other mods do with their respective files, but it's still not working. What simple thing am I overlooking?

    Your trip folder with the tp2 inside is on the same level as the exe in the main directory of BG?

    Maybe you can post what is in your tp2 here?

    Further things to check:
    - you successfully installed other mods in this game already?
    - your tp2 does not have any hidden extension from the program you used to create it (e.g. TRIP.tp2.txt)?
    - try to put the tp2 in the main folder where the exe is as well.
    Post edited by PaulaMigrate on
  • extremeragnarokextremeragnarok Member Posts: 23
    Seems to be. What's throwing me off is that other mods install just fine, like BG2 Tweaks.
  • PaulaMigratePaulaMigrate Member Posts: 1,201

    Seems to be. What's throwing me off is that other mods install just fine, like BG2 Tweaks.

    Maybe not. It appears that Weidu works on your setup and you can install other mods. So, presumely the error is in your own mod
    - your tp2 does not have any hidden extension from the program you used to create it (e.g. TRIP.tp2.txt)?
    - try to put the tp2 in the main folder where the exe is as well.

    If nothing helps, you may put your files in a zip or rar folder like the mods do and post it here. Four eyes may see more than two.
  • PaulaMigratePaulaMigrate Member Posts: 1,201
    One very very small thing
    "Cannot find setup-TRIP.tp2." Do you notice the dot after tp2? is there a typo in the name of your setup?
    setup-TRIP.exe
  • extremeragnarokextremeragnarok Member Posts: 23
    Wow. It was the extension. I unchecked "Hide extensions for known file types."But now I'm dealing with a permission issue. Think I'm gonna have to do something as drastic as moving the game directory out of Program Files(x86)?
  • PaulaMigratePaulaMigrate Member Posts: 1,201
    It may help, Programs or x86 are no place for the game if you want to mod it.
  • AasimAasim Member Posts: 591
    Try downloading this. I made this about a year ago, it's a "phantom" mod which you need to finish up yourself, but can be used for stuff like adding items created with NI to your game with proper descriptions. Most of the things you need to know are written in .tp2 file, components/items.tpa, and languages/english files and folders.
  • extremeragnarokextremeragnarok Member Posts: 23
    For some reason it's working now. I just got home from work and tried launching it again. This time it it had the re-install option. Did that, and it worked. No idea why now. Thanks.
  • noTime666noTime666 Member Posts: 20
    Example for a tp2 entry
    COPY ~Chloe/Items/SLNOTECR.itm~ ~override/SLNOTECR.itm~
    SAY NAME1 ~text~
    SAY NAME2 ~text~
    SAY UNIDENTIFIED_DESC ~text~
    SAY DESC ~text~

    In most cases, the unidentified description already exists in the unmodded game. How can we reference it instead of duplicating it unnecessarily?
  • jmerryjmerry Member Posts: 4,205
    The SAY command searches through the list of existing strings. If it finds an exact match* for your string, then it returns the reference number for that existing string. If it doesn't find a match, it adds your string to the list and returns the new string's number.

    So, you don't have to do anything special. You won't duplicate the string unnecessarily.

    *Exact match includes more than just the text itself. It also includes associated material such as sounds. For example, BG2EE has more than ten instances of "Yes?" with different voices from various character soundsets; these wouldn't match each other.
  • noTime666noTime666 Member Posts: 20
    That's something, but by not "duplicating" I meant not having to paste the same text into my mod's .tra or .tpa file.
    For example, since every war hammer has the same unidentified description, it could be derived from the item's category.
  • jmerryjmerry Member Posts: 4,205
    Ah. So, what you're actually asking here is "how do I reference an existing string?". And to do that, you just enter that string's reference number in the field. A simple WRITE command in WeiDU, or you do it in NI so it doesn't show up in code at all.

    One exception to this ... BGEE strings in EET. BG1 and BG2 use the same numbers for different strings*, so EET has to move one set. It does this by adding 200K to all of the string reference numbers from BGEE. Kivan's name is string #9491 in BGEE and 209491 in EET. So, then, if you're working with BG1 content and want to install the mod on EET, you need to account for this. An example from my own work, modifying Baeloth's ring:
    // Barrityl's Bigger and Better Burden
    
    BEGIN @27000 DESIGNATED 270
    GROUP @3
    REQUIRE_PREDICATE GAME_IS ~bgee eet~ @13
    	COPY ~jtweaks/resource/BARING.ITM~ ~override~
    	PATCH_IF (GAME_IS ~eet~) BEGIN
    		WRITE_LONG 0x4 (THIS+200000) // Correct string references
    		WRITE_LONG 0x8 (THIS+200000)
    		WRITE_LONG 0x50 (THIS+200000)
    		WRITE_LONG 0x54 (THIS+200000)
    		LPF ALTER_ITEM_EFFECT INT_VAR check_headers=1 match_opcode=319 special=229084 END
    	END // Last string ref is in an effect. I don't want to just WRITE deeper in.
    
    I built the item fully in NI. With the unchanged name and description, all I need to do in BGEE is copy it over. But when installing on EET, I have to add 200K to all of the string reference numbers. Four fields in the item's header block, plus one in an effect.

    *Example: string #28283 is "Dorn" in BGEE and "I said nothing to you, Viconia! What brings this on?!" in BG2EE. Made me laugh when I was doing my playthrough with Dorn as the protagonist, and saw that on the import screen.
Sign In or Register to comment.