Results 1 to 10 of 22

Thread: How to change image/iwi in existing maps?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    For that you can use the IWI_X_DDS tool by DiegoLogic (http://www.diegologic.net/diegologic...%20X%20DDS.htm).

    Basically you extract the original .iwi (in images folder) from the stock .iwds, double click it (open .iwi files with this program), and it will generate a .dds. Edit the image at your own likings, eg. this image is used for the signs in Toujane, I quickly edited it adding a "Custom Sign" text. That will be shown in certain areas where the actual map uses this texture (in Toujane, it will show in Brit spawn, at the tunnels on the left, and also in the little house below the infamous roof)

    signs2.iwi
    signs.png

    Once you have the .dds ready (I personally use Photoshop CS6 + DDS plugin, but you can go for Paint.NET, Gimp, or the image editor of your preference), you can convert it back to .iwi using 2 ways:

    1. CoD2 Asset Manager, in which you will need to make a new material, select the .dds as the color map, saving the .gdt and clicking on PC Convert -> Current asset. It will generate an .iwi in main/images and a material inside main/materials. You're just interested in the .iwi.

    2. Use this tool, dds2iwi.exe, which iirc is made by @Tally. Drag and drop the .dds onto it, and you'll have it converted.
    dds2iwi.zip

    After you got the .iwi, you just need to pack the output image into an .iwd (name it eg. z_img.iwd, so that it overrides the previous ones; and also dont put a long name on the .iwds because of the "iwdsum name mismatch" thing), making sure it is inside a folder called "images", and that the name of the .iwi overrides the one in the stock files; in other words, keep the same image name. And at last, of course place it in the fs_game folder of your mod.

    Edit2 on page 2 for using models, as fx look buggy

    Edit1. that's if you wanna replace the existing ones. If you wanna make more in custom locations, you will need to make an fx or a model (as IzNoGoD posted once in KT's Discord) and spawn it via script.

    For a quick howto, you just need to make a new material with Asset Manager with the image you'd like, that will be used in CoD2 FX Editor to make the actual fx.

    b84uLVU.png

    Then in cod2 fx editor make the fx such that it's constant in shape/color (tweak the size as needed), and that uses the gfx previously made:

    TYPO: it needs to be an Oriented Particle (so that it sticks to its position and doesnt face to the players camera)
    customfx1.png
    customfx2.png
    customfx3.png
    customfx4.png

    And in script you will need to take the position of the sign, playing with bullettrace function and grabbing the trace["position"] and the trace["normal"] vector to orient it perpendicular to the surface. Here's a nice tutorial to understand the bullettrace func.

    https://killtube.org/showthread.php?...ttrace-and-you

    For the script to get those, I'll make one in a bit if it's for help.
    Attached Thumbnails Attached Thumbnails custom_sign.png  
    Last edited by pollo; 13th March 2021 at 10:20.

  2. The Following 2 Users Say Thank You to pollo For This Useful Post:

    agribilos (11th March 2021),brague (2nd May 2021)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •