Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Iswenzz committed Oct 5, 2024
1 parent 1f9265b commit fa4161d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

This program converts `.BSP` files from Quake3 levels, and converts them to Call of Duty 4's `.MAP` format. These files can be opened and edited using Call of Duty 4's level editor Radiant. This program also creates a `.GDT` file which stores all of the materials used in the level, as well as any properties those materials may have. The `.BAT` file generated by this program allows the user to compile the materials much faster than trying to do it manually. The purpose of this program is mainly to speed up the process of porting Quake3 levels to Call of Duty 4.

![](https://i.imgur.com/RkDPYn9.png)
![](https://i.imgur.com/GKptkni.png)

## Instructions
1. Place Q3 ``.BSP`` in the ``bsp`` folder.
Expand Down
7 changes: 4 additions & 3 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

PRINT_Q3BSP_Q3MAP = """
#####################################
Q3BSP => Q3MAP
Q3BSP => Q3MAP
#####################################
"""

PRINT_Q3MAP_COD4MAP = """
#####################################
Q3MAP => COD4MAP
Q3MAP => COD4MAP
#####################################
"""

Expand Down Expand Up @@ -48,7 +48,7 @@ def cod4map2(filepath: str):
Convert a Q3 MAP to a CoD4 MAP.
"""
with open(filepath, "r+", encoding="utf8") as map_file:
print(f"\nConverting {filepath}")
print(f"Converting {Path(filepath).stem}")
content = map_file.read().replace(
"// Generated by Q3Map2 (ydnar) -convert -format map", ""
)
Expand All @@ -67,6 +67,7 @@ def cod4map2(filepath: str):
map_file.truncate()
print(">> Generate GDT & Batch")
make_gdt(filepath)
print()


def make_gdt(filepath: str):
Expand Down

0 comments on commit fa4161d

Please sign in to comment.