Skip to content

how do i make an item mod?

degenbakadegenbaka Member Posts: 1
I'd like to create a mod that adds a custom item to the game. Can anyone link me to a guide?

I know how to create an .itm file with the effects that i want, using NI. But i'm having trouble with creating a setup that adds custom item descriptions to the game.

Comments

  • sarevok57sarevok57 Member Posts: 5,975
    edited August 2018
    if you want, you can use NI to edit the item description as well ( although it is highly advised to make a back up copy of your dialog.tlk file before you do so )

    in NI go to the "Edit" tab at the top and select "dialog.tlk"

    it will say to make sure to make a back up before you do this, and that would be highly advisable

    now you will see the dialog box pop up, take that slider at the top and shift it all the way to the right

    once you are all the way to the right, click on the button that says "Add" and you will get a blank StrRef

    make sure that your "Flags" is set to ( Has Text (0) )

    then make sure to keep track of the new StrRef numbers that you are making

    once you make a StrRef for your weapon name and weapon description go to you item in NI and select the "Edit" tab on the top

    there you will see "Identified name" select that line and at the bottom you will see the dialog box again, put your weapon name StrRef number into the StringRef box and then click on "Update value"

    then do the same for your "Identified description" line as well, using the item description for your StrRef

    and for "General name" and "General Description" you can just use ones that the game already has ( so for example if it's a longsword you can just go search for the item SW1H04.ITM in the ITM folder of NI and see what StringRef it uses for it's "General name" and "General description"

    but aware that this can be tricky business if you have other mods installed especially ones that use your dialog.tlk file
    StummvonBordwehr
  • RaduzielRaduziel Member Posts: 4,714
    @ManiacalFreak How can I add the item to a container or store instead of to a creature?

    Thanks!
  • jasteyjastey Member Posts: 2,669
    Adding to a store via tp2:
    COPY_EXISTING ~highhedg.sto~ ~override~
    ADD_STORE_ITEM ~SCRLNT71~ #0 #0 #0 ~IDENTIFIED~ #10

    adds 10 identified copies of the item SCRLNT71 to Thalantyr's store. Have a look at the WeiDU readme for more info for the use of ADD_STORE_ITEM

    I think with the EE there is also an ingame possibility to add items to a store during a game but I don't know that.

    Adding an item to a container is either possible via tp2:

    COPY_EXISTING ~ar1000.are~ ~override~
    LPF fj_are_structure
    INT_VAR
    fj_con_itm_idx = SHORT_AT 0x74 - 1 // a new container will be last in the file
    fj_flags = 1 // identified
    fj_charge0 = 2
    STR_VAR
    fj_name = EVALUATE_BUFFER ~%tutu_var%potn04~
    fj_structure_type = itm
    END


    I always confuse how to determine the right container, and I think if a mod added another container before then the item will go somewhere else.

    So, unless my mod also inserted a new container I prefer to place an item inside a container via script ingame:

    IF
    Global("######","ar1000",0)
    THEN
    RESPONSE #100
    SetGlobal("######","ar1000",1)
    ActionOverride("Container 3",CreateItem("%tutu_var%potn04",0,0,0))
    Continue()
    END
    RaduzielStummvonBordwehr
  • RaduzielRaduziel Member Posts: 4,714
    edited August 2018
    Thanks!

    What is this %tutu_var%?

    Edit:

    Will an item added to a creature be droppable if added to its armor slot (and, of course, is not flagged as undroppable)?

    I want to make the creature wear the item during the fight and drop it when killed by the party.

    If the answer is "no", will adding a copy of the said item to the creature's quickslot (where droppable items apparently are stored) do the trick?
    Post edited by Raduziel on
  • jasteyjastey Member Posts: 2,669
    edited August 2018
    That's only important if you want to mod for BG:EE and Tutu in one go. If not, then you don't need it. (Sorry for the confusion. It's a habit for me to add it..)
    Raduziel
  • RaduzielRaduziel Member Posts: 4,714
    No problem, thanks!
Sign In or Register to comment.