Quake 1 maps

Post anything to do with editing Nexuiz here. Whether its problems you've had, questions, or if you just want to show off your work.

Moderators: Nexuiz Moderators, Moderators

Wed May 16, 2007 9:21 pm

Wed May 16, 2007 9:33 pm

Thu May 17, 2007 8:32 am

  • Redoing a map as a Quake 3 map is preferred but is harder. Each face in the .map file has two extra values so you have to go through adding two zeros to each set of face values. A massive find and replace operation really.

    The values will be like:
    n n n n TEXTURE
    Quake 3 maps need:
    n n n n n n TEXTURE

    So a good solution is to replace all faces values with:
    0 0 0 0 0 0 CAULK
    Ed
    Forum addon
     
    Posts: 1172
    Joined: Wed Mar 01, 2006 12:32 am
    Location: UK

Thu May 17, 2007 11:36 am

  • for *nix-Systems there exists a tool called "rpl" which crawls through plaintext-files and replaces one string with another.

    as I have no clue how these values are constructed and which values MAY appear. but this might help a bit.

    an example (has to be edited to REAL values):
    Code: Select all
    rpl -Ri -xmap "0 0 0 0 CAULK" "0 0 0 0 0 0 CAULK" *

    which does the following: going through each directory recursively, and changing "0 0 0 0 CAULK" to "0 0 0 0 0 0 CAULK" - BUT only if the file-ending is .map (and the i stands for case-insensitive)

    or with plenty of different texture-names:
    create a file textures.txt with the names inside (one per line) and do:
    Code: Select all
    for i in `cat textures.txt` ; do
       rpl -Ri -xmap "0 0 0 0 $i" "0 0 0 0 0 0 CAULK" * ;
    done
    ZyanKLee
    Alien
     
    Posts: 151
    Joined: Sun Feb 18, 2007 8:58 pm
    Location: Germany

Fri May 18, 2007 1:23 pm

  • ZyanKLee wrote:
    Code: Select all
    for i in `cat textures.txt` ; do
       rpl -Ri -xmap "0 0 0 0 $i" "0 0 0 0 0 0 CAULK" * ;
    done

    That will only change any line that is all zeros and only for caulk, you can't count on that. What you need to do is replace ALL textures with CAULK and ALL texture numbers with zero. This will reset the textures to caulk and then you manually retexture everything. Doing it programmtically is not reliable enough as the textures are not simply equivalent to each other.
    Ed
    Forum addon
     
    Posts: 1172
    Joined: Wed Mar 01, 2006 12:32 am
    Location: UK

Fri May 18, 2007 5:42 pm

  • ok, I have a look into it, and see if I could present you some script - in the meantime you could give me a list of possible values for "texture", so perhaps the process of replacing everything with caulk could be automated
    ZyanKLee
    Alien
     
    Posts: 151
    Joined: Sun Feb 18, 2007 8:58 pm
    Location: Germany

Fri May 18, 2007 6:13 pm

  • ZyanKLee wrote:ok, I have a look into it, and see if I could present you some script - in the meantime you could give me a list of possible values for "texture", so perhaps the process of replacing everything with caulk could be automated

    That's what regular expressions are for ;)
    Code: Select all
    perl -pi.bak -e 's/^(\([0-9\.\- ]+\) \([0-9\.\- ]+\) \([0-9\.\- ]+\)) [^ ]+ ([0-9\.\- ]+)$/\1 common\/caulk \2 0 0 0/' foo.map

    seems to work, but there are a lot of warnings "Doom3LightRadius: failed to parse default light radius"...

    Edit: for all poor souls who don't have perl: http://kadaverjack.planetnexuiz.de/tmp/ ... verted.zip
    User avatar
    KadaverJack
    Site admin and forum addon
     
    Posts: 1102
    Joined: Tue Feb 28, 2006 9:42 pm

Fri May 18, 2007 7:20 pm

Fri May 18, 2007 8:02 pm



Return to Nexuiz - Editing




Information
  • Who is online
  • Users browsing this forum: No registered users and 1 guest