Página 1 de 1

[Graffiti Anywhere] How to add new images

Enviado: 29 Nov 2020, 00:33
por Junior_Djjr
PT-BR: f52-tutoriais-utilidades/t5549-graffiti ... as-imagens

Basic

https://www.mixmods.com.br/2020/11/graf ... lquer.html
Each graffiti is a unique object, occupying a unique model ID, etc. So it works entirely on the original game system.
Therefore, to create a new design option, you need to create a new object, making a copy of an existing one and changing the texture.


Replacing the original textures

The mod comes with few graffiti. If you just want something quick, changing the original textures, just use Magic.TXD to open the mod's graffiti_anywhere.txd and replace the textures ( Ctrl + R) with new images with transparency and a resolution of 2 ( 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 or 4096).
In the options, use DXT5 compression and activate Mipmaps. Remembering that it is M to open the options window for that texture.


Adding a new one without replacing

In the mod there are some .dffs with different sizes. The .dff name itself says the size.
For example, graffiti_1x1_1.dff is a 1x1 proportion (in reality, it is 2x2 meters).
If you want to add a new 1x1 graffiti, make a copy of graffiti_1x1_1.dff and rename it to graffiti_1x1_2.dff.

Open the GraffitiAnywhere.col file with Col Editor.
Right click on graffiti_1x1_1, in Copy to make a copy, and name that copy graffiti_1x1_2.

Open the file GraffitiAnywhere.ide with some text editor.
Make a copy of one line and, again, rename it to the name of your new .dff.
The number at the beginning is the model ID, that is, if the last line is 13977, put a 13978 on the line below with the name of your new .dff.
For example: 13978, graffiti_1x1_2, graffiti_anywhere, 299, 4.

Attention: You can repeat the process with new objects up to thousands of IDs. In the list of IDs I reserved up to ID 13999, so I recommend adding it up there as other mods can use the following IDs. Recalling that other mods that add objects, such as SAMP Objects for Singleplayer and total conversion mods may conflict and you’ll need to choose other IDs.

Now in the mod's CLEO folder, open Graffiti Anywhere.ini
It is self-explanatory, at the end of the list of IDs, add a new line for your new ID.
That is, if it ends with ID4=13977, add below ID5=13978.

If you open the game now, it will work, however the new graffiti will be exactly the same as the one you made the copy of. You need to change its texture.

The name of the texture is defined in the .dff file, so to use another texture, it is necessary to edit its name.
You can open .dff in a software that imports .dff files, but this is more complicated and can be destructive. The simplest way is to use RwAnalyze.

Open the .dff file in RwAnalyze.
Search for the texture name in a Material> Texture> String. When selecting the line, you will easily see the texture name there.
Imagem
Double click on this line, a window will open to enter the new name. Switch to any other, for example graffiti_1x1_2.
Save the file.

Open the graffiti_anywhere.txd file with Magic.TXD and add a new texture named graffiti_1x1_2.
To add a new texture, you can simply drag a .png file to the program window.
Use images with transparency and at a power resolution of 2 (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 or 4096).
In the options,
After adding it in .txd, at the end of the list, select it and press M to open the options window: Use DXT5 compression and activate Mipmaps.

There, now you have a whole new graffiti in your game!

Remember, the object is in your saved game, so if you save the game with painted graffiti, do not delete the files or it will crash, you need to delete them from the game and save again before deleting the files.

Re: [Graffiti Anywhere] How to add new images

Enviado: 08 Fev 2021, 21:21
por EpsilonSurv
do you know how can i edit some of the 100 original tags (just the txd file) of the game?

Re: [Graffiti Anywhere] How to add new images

Enviado: 09 Fev 2021, 06:49
por Neon
EpsilonSurv escreveu:
08 Fev 2021, 21:21
do you know how can i edit some of the 100 original tags (just the txd file) of the game?
With Magic.Txd Editor

Re: [Graffiti Anywhere] How to add new images

Enviado: 10 Fev 2021, 00:16
por EpsilonSurv
i mean a specific graffiti, for example i want to edit one of the "temple drive ballas" tags  without edit all the temple drive ballas tags

Re: [Graffiti Anywhere] How to add new images

Enviado: 07 Out 2021, 17:58
por laureegrd
Hi, sorry if this is the wrong topic but I couldn't find another one for this mod on the forum. My post is related to adding new images though :)

I managed to make different sizes and a new vertical 1x2 format by importing and scaling the models in zmodeler. This is my first time working with these tools so it's probably not perfect but it works. Is there any place where I can contribute or discuss the changes? I really like this mod and I'm sure many would like something like this to be implemented.
Here are some screenshots using the default textures (CJ for scale): https://imgur.com/a/tDuS7mh

One thing to note about having so many different format and sizes is that the .dff and texture names quickly get confusing, specially as you add variants. And the .txd gets loaded with a lot of mixed up textures of different aspect ratios. So personally I split them into 4 .txd files according to the aspect ratio.
  • 1x1, 2x2, 0.5x0.5 is grfanyw_square.txd
  • 2x1, 4x2, 1x05 is grfanyw_landscape.txd
  • 4x1, 8x2 is grfanyw_slandscape.txd (s stands for super)
  • 1x2, 0.5x1 is grfanyw_portrait.txd
This makes it way easier to manage the textures. And I also moved the .dff files to 4 different folders.
The .dff names are still confusing so I would probably follow this same approach and rename them like graffiti_square_small, graffiti_square_default, graffiti_square_big and so on.

Anyway, I'd like to discuss this and/or contribute the files (if my new .dffs are good, which I doubt).