Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 24

Thread: MOH:CS Mod

  1. #11

    Default

    it's not caulk, it's a texture i ported from css. the browns are textures already ported, the blues are missing textures
    the error isn't the texture itself, is the texture positioning in the .map file

    to export textures i use VTFEdit you can convert textures individually and bulk


    here is the CSS's maps folder https://docs.google.com/uc?export=do...ULjWu793b_KkO-

  2. #12

    Default

    I just wanted to add all the CS maps I found converted to MOHAA. Even if you can't use them, who knows what they might be good for (for anyone)

    http://www.mohaaaa.co.uk/AAAAMOHAA/content/aztec
    http://www.mohaaaa.co.uk/AAAAMOHAA/content/dust
    http://www.mohaaaa.co.uk/AAAAMOHAA/content/dust-1
    (2 Different Dust versions)

    I thought there was another one but can't find it.. have found many CS Weapon & Sound conversions as well for MOHAA.

  3. #13
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    EDIT:
    I just realized I got as far as Zappa got. For some reason these converters are overwriting the textures, I wonder if there's a way to prevent that. That PHP script looks promising, but honestly, I want to keep all the textures instead of replacing them. We just need to rearrange the way the structure of the map file is.

    I got crafty to work, but there is a parameter that's missing if you convert the map using bsp2src. It loads fine if you use vmex though. BSP2src is missing the "rotation" parameter. You can see it if you compare the output to that of vmex. My concern is though that the vmex export might be missing some things that the bsp2src doesn't...

    What I haven't tried yet since I don't have the game or SDK; try to load it into HAMMER and see if you can export it to a VMF or .MAP that way. See if the export of that VMF is any different than that of VMEX or BSP2SRC. I'll have to play around with this a bit more later. I wish I can remember how I did it last time. Maybe it was CS1.6, but it was so many years ago I can't remember. I am pretty sure it was cs source though.

    Also a few more useful sources I found:
    https://www.ugx-mods.com/forum/index.php?topic=2997.0
    http://quark.sourceforge.net/download_tools.php
    http://forums.warchest.com/archive/i...p/t-29480.html

    EDIT2:

    Valve Maps Decompiled:
    https://tf2maps.net/threads/valve-maps-decompiled.5952/

    Official CSS VMF Maps
    https://gamebanana.com/dl/164342

    EDIT3:
    I got a little further this time..
    I found out that the utility "hlq32map" is what is overwriting all the textures/shaders to the default concrete texture. Obviously this is an issue because it would require having to retexture everything, however I came across 2 tools that seem to work a bit better for this.

    https://www.dropbox.com/s/4gb27krd63az2oe/tools.rar --> This tool was actually written for Call of Duty, however the map structure is similar to MOHAA, and we might have better luck working off this one.
    Original src: https://undeadmodding.com/index.php?topic=50.0

    http://demba.tk/vmf2map/ --> this is VERY similar to the HLq32map file, but it's in Polish. The first button is the import, the 2nd is the export and then the last is the conversion. (BTW, my AV flagged this file, but it looks clean to me (just an FYI))

  4. #14
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Did you guys get a chance to try this out above?

  5. #15

    Default

    good news
    i edited the php script from the cod forum and now is working.
    now the textures look like they should, the only thing that isn't working is the rotation property, but is not a big deal, can be easily fixed using radiant

    what I think will have to be done manually is to add the terrain patches, I could not find any tool to export them to a .map format


    this is the script if you find something that can be improved (sorry if it doesn't look too clean)
    PHP Code:
    <?php
    function convertVMF2map($name)
    {
        
    $content file_get_contents($name);

        if (
    $content != false) {
            
    $brushes explode("solid"$content);

            
    //echo "brushes: " . count($brushes) . "\n";
            
    $realBrushes = array();

            for (
    $i=1$i<count($brushes); $i++) {
                
    $planes explode("side"$brushes[$i]);

                if (
    count($planes) < 2)
                    continue;
        
                
    $realBrush = array();
                
    $realBrush["planes"] = array();
                
    $realBrush["isTrigger"] = false;

                for (
    $ii 1$ii count($planes); $ii++) {
                    
    $vars explode("\n"$planes[$ii]);
                    
    $realPlane = array();    
                    for (
    $iii 1$iii count($vars); $iii++) {
                        
    $parts explode("\""$vars[$iii]);

                        if (
    count($parts) < 2)
                            continue;

                        
    //echo "brush $i planes $ii vars $iii: ";

                        
    $key $parts[1];
                        
    $value "";

                        if(
    count($parts) >= 4)
                            
    $value $parts[3];
                        
    //echo "$key->$value\n";

                        
    if ($key == "plane" || $key == "material" || $key == "uaxis" || $key == "vaxis" || $key == "rotation") {
                            
    $realPlane[$key] = $value;
                            if (
    $value == "TOOLS/TOOLSTRIGGER")
                                
    $realBrush["isTrigger"] = true;
                        }
                    }
                    if (
    count(array_keys($realPlane)) >= 2// only add if "plane" and "material" is set at least
                        
    $realBrush["planes"][] = $realPlane;
                }
                
    $realBrushes[] = $realBrush;
            }
                
                
    $map "";
                
    // PRINT NORMAL BRUSHES
                
    $map .= "{\n";
                
    $map .= "\"classname\" \"worldspawn\"\n";
                foreach (
    $realBrushes as $brush) {
                    if (
    $brush["isTrigger"])
                        continue;
                    if (
    count($brush["planes"]) > 0) {
                        
    $map .= "{\n";
                        foreach (
    $brush["planes"] as $planes) {

                            
    $vector0 = array("("")");
                            
    $vector1   = array("( "" )");
                            
    $planes["plane"] = str_replace($vector0$vector1$planes["plane"]);

                            
    $brackets = array("[""]");
                            
    $planes["uaxis"] = str_replace($brackets""$planes["uaxis"]);
                            
    $horizontal explode(" "$planes["uaxis"]);
                            
    $horizontal_shift $horizontal[3];
                            
    $horizontal_scale $horizontal[4];

                            
    $planes["vaxis"] = str_replace($brackets""$planes["vaxis"]);
                            
    $vertical explode(" "$planes["vaxis"]);
                            
    $vertical_shift $vertical[3];
                            
    $vertical_scale $vertical[4];


    //    ( 0 0 0 ) ( 0 0 0 ) ( 0 0 0 ) <material> <horizontal_shift> <vertical_shift> <rotation> <horizontal_scale> <vertical_cale> <content_flags> <surface_flags> <intensity>
                            
    $map .= $planes["plane"]. " " .getNewMaterial($planes["material"]). " " .$horizontal_shift" " .$vertical_shift" ".$planes["rotation"]. " " .$horizontal_scale" " .$vertical_scale" 0 0 0 \n";
                        }
                        
    $map .= "}\n";
                    }
                }
                
    $map .= "}\n";
                
                
    // PRINT ONLY TRIGGERS AS ENTITY
                
    foreach ($realBrushes as $brush) {
                    if (
    $brush["isTrigger"] == false)
                        continue;

                    
    $map .= "{\n";
                    
    $map .= "\"classname\" \"trigger_multiple\"\n";
                    if (
    count($brush["planes"]) > 0) {
                        
    $map .= "{\n";
                        foreach (
    $brush["planes"] as $planes) {
                            
    $map .= $planes["plane"] . " " .getNewMaterial($planes["material"]). " 60 0 0.00 1 1 0 160 0 \n";
                        }
                        
    $map .= "}\n";
                    }
                    
    $map .= "}\n";
                }
                return 
    $map;
            }
            else
                echo 
    "Could not read ".$name;

            return 
    false;
        }
        
    $missingTextures = array();
    function 
    getNewMaterial($materialname)
    {
        global 
    $missingTextures;
        
    // missing textures will be notexture for easy recognition in MohRadiant
        
    $material "notexture";
        
    $materialname strtoupper($materialname);
        
        switch(
    $materialname)
        {
            
    // Editor Shaders
            
    case "TOOLS/TOOLSAREAPORTAL"$material =    "common/areaportal"; break;
            case 
    "TOOLS/TOOLSBLOCKLIGHT"$material =    "common/sunblock"; break;
            case 
    "TOOLS/TOOLSCLIP"$material =            "common/clip"; break;
            case 
    "TOOLS/TOOLSHINT"$material =            "common/hint"; break;
            case 
    "TOOLS/TOOLSINVISIBLE"$material =    "common/vis"; break;
            case 
    "TOOLS/TOOLSNODRAW"$material =        "common/nodraw"; break;
            case 
    "TOOLS/TOOLSPLAYERCLIP"$material =    "common/playerclip"; break;
            case 
    "TOOLS/TOOLSSKIP"$material =            "common/skip"; break;
            case 
    "TOOLS/TOOLSSKYBOX"$material =        "common/caulksky"; break;
            case 
    "TOOLS/TOOLSTRIGGER"$material =        "common/trigger"; break;

            
    // Maps Shaders to convert
            // de_dust2
    //        case "CS_HAVANA/WHITE": $material =                    "notexture"; break;
    //        case "CS_ITALY/MARKETWALL04": $material =            "notexture"; break;
    //        case "CS_ITALY/MARKETWALL04A": $material =            "notexture"; break;
    //        case "CS_ITALY/MARKETWALL04B": $material =            "notexture"; break;
            
    case "DE_DUST/DOOR011"$material =                    "css/de_dust/door011"; break;
            case 
    "DE_DUST/DOOR02"$material =                    "css/de_dust/door02"; break;
            case 
    "DE_DUST/DOOR04"$material =                    "css/de_dust/door04"; break;
            case 
    "DE_DUST/DOOR05"$material =                    "css/de_dust/door05"; break;
            case 
    "DE_DUST/DOOR07"$material =                    "css/de_dust/door07"; break;
            case 
    "DE_DUST/DOOR10"$material =                    "css/de_dust/door10"; break;
            case 
    "DE_DUST/DUCRTLRGSD"$material =                "css/de_dust/ducrtlrgsd"; break;
            case 
    "DE_DUST/DUCRTLRGTP"$material =                "css/de_dust/ducrtlrgtp"; break;
            case 
    "DE_DUST/DUMLTRYCRSD2"$material =            "css/de_dust/dumltrycrsd2"; break;
            case 
    "DE_DUST/DUMLTRYCRTP"$material =                "css/de_dust/dumltrycrtp"; break;
            case 
    "DE_DUST/DUSANDCRETE"$material =                "css/de_dust/dusandcrete"; break;
            case 
    "DE_DUST/DUTILE1"$material =                    "css/de_dust/dutile1"; break;
            case 
    "DE_DUST/GROUNDSAND03"$material =            "css/de_dust/groundsand03"; break;
            case 
    "DE_DUST/GROUNDSAND_BLEND"$material =        "css/de_dust/groundsand_blend"; break;
            case 
    "DE_DUST/MARKETWALL02"$material =            "css/de_dust/marketwall02"; break;
            case 
    "DE_DUST/MARKETWALL02B"$material =            "css/de_dust/marketwall02b"; break;
            case 
    "DE_DUST/MARKETWALL03"$material =            "css/de_dust/marketwall03"; break;
            case 
    "DE_DUST/PI_RUST"$material =                    "css/de_dust/pi_rust"; break;
            case 
    "DE_DUST/PICRATE1"$material =                "css/de_dust/picrate1"; break;
            case 
    "DE_DUST/PICRATE2"$material =                "css/de_dust/picrate2"; break;
            case 
    "DE_DUST/PWTRIM1"$material =                    "css/de_dust/pwtrim1"; break;
            case 
    "DE_DUST/RESIDBWALL01"$material =            "css/de_dust/residbwall01"; break;
            case 
    "DE_DUST/RESIDBWALL01B"$material =            "css/de_dust/residbwall01b"; break;
            case 
    "DE_DUST/RESIDBWALL02"$material =            "css/de_dust/residbwall02"; break;
            case 
    "DE_DUST/RESIDBWALL02A"$material =            "css/de_dust/residbwall02a"; break;
            case 
    "DE_DUST/RESIDBWALL02B"$material =            "css/de_dust/residbwall02b"; break;
            case 
    "DE_DUST/RESIDBWALL03"$material =            "css/de_dust/residbwall03"; break;
            case 
    "DE_DUST/RESIDBWALL03A"$material =            "css/de_dust/residbwall03a"; break;
            case 
    "DE_DUST/RESIDBWALL03B"$material =            "css/de_dust/residbwall03b"; break;
            case 
    "DE_DUST/RESIDBWALL04"$material =            "css/de_dust/residbwall04"; break;
            case 
    "DE_DUST/RESIDBWALL04A"$material =            "css/de_dust/residbwall04a"; break;
            case 
    "DE_DUST/RESIDBWALL04B"$material =            "css/de_dust/residbwall04b"; break;
            case 
    "DE_DUST/RESIDWALL01"$material =                "css/de_dust/residwall01"; break;
            case 
    "DE_DUST/RESIDWALL01A"$material =            "css/de_dust/residwall01a"; break;
            case 
    "DE_DUST/RESIDWALL01B"$material =            "css/de_dust/residwall01b"; break;
            case 
    "DE_DUST/RESIDWALL02"$material =                "css/de_dust/residwall02"; break;
            case 
    "DE_DUST/RESIDWALL04"$material =                "css/de_dust/residwall04"; break;
            case 
    "DE_DUST/RESIDWALL05B"$material =            "css/de_dust/residwall05b"; break;
            case 
    "DE_DUST/RESIDWALL06"$material =                "css/de_dust/residwall06"; break;
            case 
    "DE_DUST/RESIDWALL06A"$material =            "css/de_dust/residwall06a"; break;
            case 
    "DE_DUST/RESIDWALL06B"$material =            "css/de_dust/residwall06b"; break;
            case 
    "DE_DUST/ROCKWALL_BLEND"$material =            "css/de_dust/rockwall_blend"; break;
            case 
    "DE_DUST/SITEBWALL01"$material =                "css/de_dust/sitebwall01"; break;
            case 
    "DE_DUST/SITEBWALL01A"$material =            "css/de_dust/sitebwall01a"; break;
            case 
    "DE_DUST/SITEBWALL01B"$material =            "css/de_dust/sitebwall01b"; break;
            case 
    "DE_DUST/SITEBWALL02"$material =                "css/de_dust/sitebwall02"; break;
            case 
    "DE_DUST/SITEBWALL03B"$material =            "css/de_dust/sitebwall03b"; break;
            case 
    "DE_DUST/SITEBWALL05"$material =                "css/de_dust/sitebwall05"; break;
            case 
    "DE_DUST/SITEBWALL05A"$material =            "css/de_dust/sitebwall05a"; break;
            case 
    "DE_DUST/SITEBWALL05C"$material =            "css/de_dust/sitebwall05c"; break;
            case 
    "DE_DUST/SITEBWALL10"$material =                "css/de_dust/sitebwall10"; break;
            case 
    "DE_DUST/SITEBWALL10A"$material =            "css/de_dust/sitebwall10a"; break;
            case 
    "DE_DUST/SITEBWALL10B"$material =            "css/de_dust/sitebwall10b"; break;
            case 
    "DE_DUST/SITEBWALL11"$material =                "css/de_dust/sitebwall11"; break;
            case 
    "DE_DUST/SITEBWALL11A"$material =            "css/de_dust/sitebwall11a"; break;
            case 
    "DE_DUST/SITEBWALL11B"$material =            "css/de_dust/sitebwall11b"; break;
            case 
    "DE_DUST/SITEBWALL12"$material =                "css/de_dust/sitebwall12"; break;
            case 
    "DE_DUST/SITEBWALL12A"$material =            "css/de_dust/sitebwall12a"; break;
            case 
    "DE_DUST/SITEBWALL12B"$material =            "css/de_dust/sitebwall12b"; break;
            case 
    "DE_DUST/SITEBWALL13"$material =                "css/de_dust/sitebwall13"; break;
            case 
    "DE_DUST/SITEBWALL13A"$material =            "css/de_dust/sitebwall13a"; break;
            case 
    "DE_DUST/SITEBWALL13B"$material =            "css/de_dust/sitebwall13b"; break;
            case 
    "DE_DUST/SITEBWALL14"$material =                "css/de_dust/sitebwall14"; break;
            case 
    "DE_DUST/SITEBWALL14A"$material =            "css/de_dust/sitebwall14a"; break;
            case 
    "DE_DUST/SITEBWALL14B"$material =            "css/de_dust/sitebwall14b"; break;
            case 
    "DE_DUST/STONESTEP01"$material =                "css/de_dust/stonestep01"; break;
            case 
    "DE_DUST/STONESTEP02"$material =                "css/de_dust/stonestep02"; break;
            case 
    "DE_DUST/STONESTEP03"$material =                "css/de_dust/stonestep03"; break;
            case 
    "DE_DUST/STONESTEP04"$material =                "css/de_dust/stonestep04"; break;
            case 
    "DE_DUST/STONEWALL02"$material =                "css/de_dust/stonewall02"; break;
            case 
    "DE_DUST/STONEWALL02A"$material =            "css/de_dust/stonewall02a"; break;
            case 
    "DE_DUST/STONEWALL02B"$material =            "css/de_dust/stonewall02b"; break;
            case 
    "DE_DUST/STONEWALL02C"$material =            "css/de_dust/stonewall02c"; break;
            case 
    "DE_DUST/TEMPLEWALL02"$material =            "css/de_dust/templewall02"; break;
            case 
    "DE_DUST/TEMPLEWALL02A"$material =            "css/de_dust/templewall02a"; break;
            case 
    "DE_DUST/TEMPLEWALL02B"$material =            "css/de_dust/templewall02b"; break;
            case 
    "DE_DUST/TEMPLEWALL02C"$material =            "css/de_dust/templewall02c"; break;
            case 
    "DE_DUST/TEMPLEWALL02D"$material =            "css/de_dust/templewall02d"; break;
            case 
    "DE_DUST/TEMPLEWALL02E"$material =            "css/de_dust/templewall02e"; break;
            case 
    "DE_DUST/TEMPLEWALL03"$material =            "css/de_dust/templewall03"; break;
            case 
    "DE_DUST/TEMPLEWALL03B"$material =            "css/de_dust/templewall03b"; break;
            case 
    "DE_DUST/TEMPLEWALL04"$material =            "css/de_dust/templewall04"; break;
            case 
    "DE_DUST/TEMPLEWALL04A"$material =            "css/de_dust/templewall04a"; break;
            case 
    "DE_DUST/TEMPLEWALL04B"$material =            "css/de_dust/templewall04b"; break;
            case 
    "DE_DUST/TILEFLOOR01"$material =                "css/de_dust/tilefloor01"; break;
            case 
    "DE_DUST/TILEFLOOR02"$material =                "css/de_dust/tilefloor02"; break;
    //        case "DEV/DEV_MEASURESTAIRS01A": $material =        "notexture"; break;
    //        case "NATURE/ROCKWALL009B": $material =                "notexture"; break;
    //        case "SPRITES/LIGHT_GLOW02_ADD_NOZ": $material =    "notexture"; break;
            
            
    default:
                
    // only print once at end:
                
    $missingTextures[$materialname] = true;
                break;
        }
        
        return 
    $material;
    }
        
    $name "de_dust2_d";
    $map convertVMF2Map($name ".vmf");
    if (!
    $map)
        die(
    "ERROR: Converting failed.\n");

    $textureNames array_keys($missingTextures);
    foreach (
    $textureNames as $textureName)
        echo 
    "WARNING: no texture for $textureName\n" "<br>\n";
        
    file_put_contents($name.".map"$map);

    ?>
    and here is a video


  6. #16
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Wow nice job, but have you tried the tools I provided above? It seems to do a better job at exporting the map file.

  7. #17

    Default

    the one from the cod forum yeah, but it doesn't align the textures

    Note that the textures of the brushes need to be realigned since the way the texture alignment info is stored in both VMF and MAP format are different and I couldn't find a way to convert that yet
    and the Polish one, i can't execute that program, it just freezes

  8. #18
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I ran it on Windows 8.1 without a problem... Maybe try and run the app in compatibility mode??
    And what do you mean by the textures not being aligned?

    With regards to your modified PHP... Are the terrain patches not image files or shaders like the rest of the brush? Some of the links I posted above seem to have a lot of different tools for exporting. I even saw a heavily modified PHP script similar to yours by someone that worked really well maybe try using his.

    https://killtube.org/showthread.php?...ull=1#post9572
    https://github.com/voron00/vmf2map/b...er/vmf2map.php

    Those seem to have more "stuff" than your script. I haven't taken a detailed look at what it all does, but honestly I don't think we would need all that.

    If I look at one of your lines in php:
    case "DE_DUST/TILEFLOOR02": $material = "css/de_dust/tilefloor02"; break;

    Can't we just export CSS shader or whatever and convert it to MOHAA so you don't have to have so many shader to texture cases? Your PHP is just for the map you converted. If there are 30+ maps, you would need to make a modified php for each map. I find that extremely convoluted. There's not a better way to just export everything CS related that's tied to the map... shader, material, textures, etc... then put everything in the same paths and that should be it? I saw tools that allow you to export all the materials.

  9. #19
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    I found the game. My brother bought it a long time ago, and I found it so I installed it on my machine.
    I extracted all the VPK files to a single folder
    I also converted all the materials from vtf to tga. The newly converted textures are all about 3.5Gb
    CS also uses a *.VMK file which appears to be a *.shader for MOHAA. I don't see any way of converting it, but perhaps we can adjust the PHP script to read the contents of the VMK and adjust it and export to shader.

    I think once we have all 3 of those (textures, shaders, and the converted map) we will be in good standing.

  10. #20

    Default

    i worked a little on the php script and made a few changes
    first, that mess with the 'switch' statement is gone, now the script convert all the textures from the css map to mohaa and it auto generates a .shader file with all the textures on it. but evety texture will have a stone wall properties so it will need a little of manual edit at the end.
    the models and entities are writen to the map file too.

    and also now the map size is scaled up to have the correct proportion according to the eyelevel (64 units in CSS, 82 units in mohaa), so the scale ratio is 1:1.28125

Posting Permissions

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