Jump to content

Counter-Strike 2 Workshop Q&A


Recommended Posts

Posted (edited)
On 2/4/2024 at 6:58 PM, Radu said:

Thanks for putting all this together! You da' real mvp @Radix

Thanks! But I have to say that this didn't work as intended. Originally I hoped to get some people involved to get some answers for my own questions while doing the tedious work of putting it all together. But obviously people/communities have changed in the last years.

But I will keep this thread up for everybody or even just for me in case I need to look up something.

Edited by Radix
Posted (edited)

Question: Many entities have unused keyvalues after porting a map. Can I just delete these?

obsolete_vars1.png.75e6d991ea94e1e9d36764783db8e439.png

 

Answer: (Edit: This answer is probably wrong) These keys are obsolete and not used anymore (?). If you want, you can remove all of them by clicking 'Map'->'Check for problems' and then hitting 'Fix':

check_problems.png.699b700fe679df312730d12a35c47103.png

Edited by Radix
Posted (edited)

Question: (Porting CS:GO maps to CS2) All the instances that I had in my CS:GO map don't exist in the ported map (as a prefab). They are only inside the maps/prefabs folder, but all func_detail geometry is missing. How to fix this?

Answer: If you want to preserve your func_instances, replace "-usebsp" with "-usebsp_nomergeinstances" in the Python script parameters:

python import_map_community.py <s1gameinfopath> <s1contentpath> <s2gameinfopath> <s2addon> <mapname> -usebsp_nomergeinstances

(Import Tool Documentation)

Edited by Radix
  • 1 month later...
Posted (edited)

Question: How to upload a map to the Workshop?

Answer: Open the CS Workshop Tools and select the project you want to publish. Then open the Tools tab (top right) and select "Counter-Strike 2 Workshop Manager"

Publish1.png.eb991254407618d7e613dc712c807a9c.png

The rest is self-explanatory...

Edited by Radix
  • 4 weeks later...
Posted (edited)

Question: How to achieve a seamless transition between the water in your map an the water in the skybox? (like in de_anubis)

(water texture scale in skybox; cubemaps?)

anubis_skybox0.png.1447778f7ba1b10a5d07257ac6493e47.png

 

anubis_skybox1.png.808094f7290018156dd2c2ac4c74ea24.png

 

I've been struggling with this for a while now. I tried to decompile de_anubis map, because it works pretty well there. There the skybox map uses the exact same water texture as the actual map. But in my map the skybox water looks scaled too large (=> larger waves) compared to the water in the actual map. It seems like the texture scale of the water texture doesn't have an effect (like in Source1).

Also I'm not sure how to get the cubemaps right, since I can't assign a cubemap to a specific face anyore (Can I?).

Edited by Radix
  • 2 months later...
  • 1 month later...
  • 4 months later...
Posted (edited)
On 4/15/2024 at 10:45 PM, Radix said:

Question: How to achieve a seamless transition between the water in your map an the water in the skybox? (like in de_anubis)

de_anubis water uses a material that fades at a certain distance in the skybox.

How to make a water material that fades at the distance you want:

1. make a water material using the "CSGO water fancy" shader, or decompile a water material using the source2viewer (i did the last method since i had no ideea how the shader really worked)

2. in your fancy water material settings look for these parameters: 

3RjQVu8.png

 Those values don´t have to be equal, or the mesh a square, they just dictate the distance from the center of the editor to where the material fades into the skybox.

bSOyv89.png

3. Place a big cubemap or a combined light probe volume on your water. 

4. do not place other materials besides nodraw or solidblocklight beneath the water in the distance.

Here are some results: the first is the desired one, the others if you place other materials beneath the water in the distance. (Also in the 3d skybox map place a cubemap or a combine light probe cubemap right in the center of the skycamera, end extend it to cover all the water´s surface.)

HKgzD7A.jpg

8RAnk4b.jpg

go8KcCn.jpg

 

Edited by Serialmapper
  • 3 weeks later...
Posted (edited)

How to create a custom cookie (thanks to @Slimek ):

1. In your custom addon folder create the following folders materials/effects/lightcookies , their name and order it´s important otherwise it won´t work.

2. Create your desired image that you want to project as tga (targa) an place it in the folder "lightcookies" 

3. Using notepad or notepad++ ,create a vtex file using this code: 

<!-- dmx encoding keyvalues2_noids 1 format vtex 1 -->
"CDmeVtex"
{
    "m_inputTextureArray" "element_array"
    [
        "CDmeInputTexture"
        {
            "m_name" "string" "InputTexture0"
            "m_fileName" "string" "materials/effects/lightcookies/stained_glass_01.tga"
            "m_colorSpace" "string" "srgb"
            "m_typeString" "string" "2D"
            "m_imageProcessorArray" "element_array"
            [
                "CDmeImageProcessor"
                {
                    "m_algorithm" "string" "None"
                    "m_stringArg" "string" ""
                    "m_vFloat4Arg" "vector4" "0 0 0 0"
                }
            ]
        }
    ]
    "m_outputTypeString" "string" "2D"
    "m_outputFormat" "string" "BGRA8888"
    "m_outputClearColor" "vector4" "0 0 0 0"
    "m_nOutputMinDimension" "int" "0"
    "m_nOutputMaxDimension" "int" "0"
    "m_textureOutputChannelArray" "element_array"
    [
        "CDmeTextureOutputChannel"
        {
            "m_inputTextureArray" "string_array" [ "InputTexture0" ]
            "m_srcChannels" "string" "rgba"
            "m_dstChannels" "string" "rgba"
            "m_mipAlgorithm" "CDmeImageProcessor"
            {
                "m_algorithm" "string" "Box"
                "m_stringArg" "string" ""
                "m_vFloat4Arg" "vector4" "0 0 0 0"
            }
            "m_outputColorSpace" "string" "srgb"
        }
    ]
    "m_vClamp" "vector3" "0 0 0"
    "m_bNoLod" "bool" "1"
}

4. Now you can apply it to a light_barn entity and set the light to dynamic in order to behave properly ( to project and maintain its shape).

tulqyAO.png

Edited by Serialmapper
  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...