Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: CoD4 - basics

  1. #1
    Private
    Join Date
    Feb 2013
    Location
    Poland
    Posts
    32
    Thanks
    33
    Thanked 27 Times in 8 Posts

    CoD4 - basics

    I've got some (maybe dumb) questions about CoD4.

    1. How to save console_mp.log file?

    I've got this in my .cfg:
    Code:
    set g_logsync "1"
    set logfile "2"
    set g_log "games_mp.log"
    2. What is .ff file for? When should I update it to new one? (After every change in script, after new images file etc.)

    3. What should I check when I want to build mod? (Mod Builder)


    4. Do I need to select .csv and .gsc files? (Mod Builder)


    5. When I create graphic, do I need to create sth like materials (like in CoD2 - images & materials)?

    6. Is it OK if I upload polish files on server? (I mean "zone/polish" and "main/localized_polish_iw*.iwd") If no where I can find english ones?

    7. I heard something about 1.7a patch. What's the difference between 1.7?

    8. Do I need a protection like "q3dirtravfix.so" in CoD2?

    9. Is there a way to decompile .ff file?

    10. How to disable shot-through walls?


    Thanks in advance, BlancO
    Last edited by BlancO; 20th September 2013 at 13:40.

  2. #2
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by BlancO View Post
    I've got some (maybe dumb) questions about CoD4.

    1. How to save console_mp.log file?

    I've got this in my .cfg:
    Code:
    set g_logsync "1"
    set logfile "2"
    set g_log "games_mp.log"
    2. What is .ff file for? When should I update it to new one? (After every change in script, after new images file etc.)

    3. What should I check when I want to build mod? (Mod Builder)


    4. Do I need to select .csv and .gsc files? (Mod Builder)


    5. When I create graphic, do I need to create sth like materials (like in CoD2 - images & materials)?

    6. Is it OK if I upload polish files on server? (I mean "zone/polish" and "main/localized_polish_iw*.iwd") If no where I can find english ones?

    7. I heard something about 1.7a patch. What's the difference between 1.7?

    8. Do I need a protection like "q3dirtravfix.so" in CoD2?

    9. Is there a way to decompile .ff file?


    Thanks in advance, BlancO
    Wow, a lot of questions. Let's try to tackle them:

    1. To create console_mp.log file, put this in your server config file:

    Code:
    set logfile "2"
    2. fastfiles are the compression format used by XBOX 360. Infinity Ward decided to use it for PC also because it makes the game load faster than using RAW files.

    3. You have it about right for mod builder. Personally, I don't use mod builder, even though I helped write it (I did the very first version of it. It was then taken over by Mike Denny for IW), because I prefer using batch files to create my mod.ff file.

    4. You select everything that you want copied over from your mod folder to your mod tools RAW folder. There are batch commands in the EXE which simply copy all your files over from your mod folder to the raw folder. Similar to this:

    Code:
    xcopy english ..\..\raw\english /SY
    xcopy fx ..\..\raw\fx /SY
    xcopy images ..\..\raw\images /SY
    xcopy maps ..\..\raw\maps /SY
    xcopy materials ..\..\raw\materials /SY
    xcopy mp ..\..\raw\mp /SY
    xcopy openwarfare ..\..\raw\openwarfare /SY
    xcopy sound ..\..\raw\sound /SY
    xcopy soundaliases ..\..\raw\soundaliases /SY
    xcopy ui_mp ..\..\raw\ui_mp /SY
    xcopy vision ..\..\raw\vision /SY
    xcopy xanim ..\..\raw\xanim /SY
    xcopy xmodel ..\..\raw\xmodel /SY
    xcopy xmodelparts ..\..\raw\xmodelparts /SY
    xcopy xmodelsurfs ..\..\raw\xmodelsurfs /SY
    xcopy weapons ..\..\raw\weapons /SY
    xcopy animtrees ..\..\raw\animtrees /SY
    If you don't check an item, it wont get copied over to the raw file, and as such, the latest version of your file wont get compiled into mod.ff

    You DO NOT have to compile .GSC files while you are busy developing. The game will read .GSC files from RAW status. Simply put them in your IWD file like you did for COD2 while you are writing your code. Only when it is finalised do you need to compile it into fastfile.

    The only files which MUST BE COMPILED into mod.ff are the following:

    1. menu files
    2. materials files
    3. .CSV files
    4. xmodel/xanim/xmodelparts/etc f
    5. .EFX files

    These will NOT be read in RAW state by the game. So, don't try to run the game with them in your IWD file, as they will be completely ignored by the game, as if they weren't there.

    5. You create a materials files for COD4 just like you did for COD2, for every single image you want to show in your mod. But don't use COD2 materials files in COD4, as they are a different version number. The game wont crash, but you wont see any images as the version is out of date.

    6. If your server is running a Polish version of COD4, then of course you can use Polish files on the server. However, if the server is running English language, you MUST use english, otherwise your fonts wont be parsed properly.

    7. the 1.7a patch is an "unofficial" patch which fixes a "denial of service" (DOS) vulnerability in 1.7.

    8. I'm not familiar with "q3dirtravfix.so" so I can't answer that question.

    9. There are decompilers for .FF files, but they only work for the text-based files in a .FF file (no menu files unfortunately). A programmer by the name of Tom BMX is working on a complete decompiler but it has not been released yet. If you want the text-based decompiler, please PM me and I will send one to you. I wont put it up for download as an attachment, because the status of decompilers is very controversial because it basically allows any noob to steal your code work. This has not gone down too well with some modders, who feel the program is a tool to be used by plagiarists.
    Last edited by Tally; 20th September 2013 at 13:52.

  3. The Following 3 Users Say Thank You to Tally For This Useful Post:

    BlancO (20th September 2013),kung foo man (20th September 2013),YuriJurek (20th September 2013)

  4. #3
    Private
    Join Date
    Feb 2013
    Location
    Poland
    Posts
    32
    Thanks
    33
    Thanked 27 Times in 8 Posts
    1. I've already have logfile "2". I can't see the log file. (Should it be in fs_game?)

    .sh start file
    Code:
    cd /home/cod4/server
    LD_LIBRARY_PATH="/home/libcod/mysql" LD_PRELOAD="/home/libcod/libcod4_1_7.so" ./cod4_lnxded +set dedicated "2" +set net_port "28961" +set fs_basepath "/home/cod4/server" +set fs_game "mods/nl_zom" +exec zom.cfg +map_rotate
    .cfg file
    Code:
    set rcon_password "testtest"
    set sv_hostname "^4`^9nL^4.^7Zombies^4*"
    set g_allowvote "0"
    set sv_pure "1"
    set developer "0"
    set g_password ""
    set sv_floodProtect "1"
    set sv_maxPing "0"
    set scr_drawfriend "1"
    set scr_forcerespawn "0"
    set scr_killcam "1"
    set scr_teambalance "0"
    set sv_timeout "60"
    set sv_kickBanTime "300"
    set g_no_script_spam "1"
    set g_antilag "1"
    set sv_voice "0"
    set com_hunkmegas "512"
    set sv_punkbuster "1"
    
    set sv_maxclients "24"
    set sv_privateclients "0"
    set sv_privatePassword ""
    
    set logfile "2"
    
    set sv_mapRotationCurrent ""
    set sv_MapRotation "gametype dm map mp_crash"

    2. Where can I get 1.7a patch?

    3. "q3dirtravfix.so" fixes that player can't download gsc files from a server by command "/download mod\maps\mp\gametypes\tdm.gsc"

    4. How to disable shot-through walls?

  5. #4
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    1) Yea, it's in fs_game but I can't see why it's working in some servers and others not by config :S

    3) set sv_allowDownload 0 isn't enough for CoD4? Only the www-download needs to be enabled on CoD2.
    timescale 0.01

  6. The Following User Says Thank You to kung foo man For This Useful Post:

    BlancO (22nd September 2013)

  7. #5
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by BlancO View Post
    1. I've already have logfile "2". I can't see the log file. (Should it be in fs_game?)

    .sh start file
    Code:
    cd /home/cod4/server
    LD_LIBRARY_PATH="/home/libcod/mysql" LD_PRELOAD="/home/libcod/libcod4_1_7.so" ./cod4_lnxded +set dedicated "2" +set net_port "28961" +set fs_basepath "/home/cod4/server" +set fs_game "mods/nl_zom" +exec zom.cfg +map_rotate
    .cfg file
    Code:
    set rcon_password "testtest"
    set sv_hostname "^4`^9nL^4.^7Zombies^4*"
    set g_allowvote "0"
    set sv_pure "1"
    set developer "0"
    set g_password ""
    set sv_floodProtect "1"
    set sv_maxPing "0"
    set scr_drawfriend "1"
    set scr_forcerespawn "0"
    set scr_killcam "1"
    set scr_teambalance "0"
    set sv_timeout "60"
    set sv_kickBanTime "300"
    set g_no_script_spam "1"
    set g_antilag "1"
    set sv_voice "0"
    set com_hunkmegas "512"
    set sv_punkbuster "1"
    
    set sv_maxclients "24"
    set sv_privateclients "0"
    set sv_privatePassword ""
    
    set logfile "2"
    
    set sv_mapRotationCurrent ""
    set sv_MapRotation "gametype dm map mp_crash"

    2. Where can I get 1.7a patch?

    3. "q3dirtravfix.so" fixes that player can't download gsc files from a server by command "/download mod\maps\mp\gametypes\tdm.gsc"

    4. How to disable shot-through walls?
    4. You cannot disable Deep Impact perk unless you have a mod, and run unranked server. You can't disable any perks if you run a ranked server. If you have a mod, it would be disabled by the dvar command that the mod maker created for that particular perk. With the modwarfare mod (the mod provided with the game), the dvar is:

    Code:
    set perk_allow_speciality_bulletpenetration "0"

  8. The Following User Says Thank You to Tally For This Useful Post:

    BlancO (22nd September 2013)

  9. #6
    Private
    Join Date
    Feb 2013
    Location
    Poland
    Posts
    32
    Thanks
    33
    Thanked 27 Times in 8 Posts
    1. Finally, I found console_mp.log. It was in "/root/.callofduty4/mods/nl_zom". To repair it I had to set homepath.

    Code:
    +set fs_homepath "/home/cod4/server"
    3. After setting "set sv_allowDownload 0", all files will be downloaded from site and there won't be posibility to download gsc files?

    4. Do You think it will be good?

    - check BulletTrace on damage
    - possibly return if player is behind the wall

  10. The Following User Says Thank You to BlancO For This Useful Post:

    kung foo man (22nd September 2013)

  11. #7
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by BlancO View Post
    1. Finally, I found console_mp.log. It was in "/root/.callofduty4/mods/nl_zom". To repair it I had to set homepath.

    Code:
    +set fs_homepath "/home/cod4/server"
    3. After setting "set sv_allowDownload 0", all files will be downloaded from site and there won't be posibility to download gsc files?

    4. Do You think it will be good?

    - check BulletTrace on damage
    - possibly return if player is behind the wall
    1. I'm not sure of your problem, but I get the impression you are trying to run a server from the COD4 "main" folder (hence why you weren't looking in your mod folder). Mods WILL NOT RUN in the "main" folder. IW have restricted all mods to only work in mod folders (i.e fs_game folders). So, you cannot mod a ranked game in any way. The game will simply ignore any mod files you put in the "main" folder, as if they weren't even there; they will be invisible to a ranked game.

    If I have misunderstood you on this, then I apologise.

    3. You can stop GSC files downloading in 2 ways:

    1. put them in a raw folder on your server. They wont download to anyone as raw folders don't download to clients;
    2. Put them in an IWD file, with "_svr_" in the IWD file name. Just like in COD 1 1.5 and COD UO. IWDs with "_svr_" in their name don't download to clients.

    4. You cannot stop Deep Impact with any kind of physics trace (bullteTrace or otherwise) to return on if found because it is hard coded. Where would you put the code? What file? There isn't one!

    The only way of restricting perks from a player's saved class data is by intercepting them on the class loadout ( maps\mp\gametypes\_class::giveloadout() ). There is a function there to set any perks on the player. Simply intercept Deep Impact at that function and unsetPerk() on the player if Deep Impact is found. You wont be able to take it out of their saved class data, but it will stop them being able to use Deep Impact during a game.
    Last edited by Tally; 22nd September 2013 at 21:02.

  12. #8
    Private
    Join Date
    Jul 2012
    Posts
    76
    Thanks
    9
    Thanked 56 Times in 38 Posts
    Quote Originally Posted by Tally View Post
    3. You can stop GSC files downloading in 2 ways:

    1. put them in a raw folder on your server. They wont download to anyone as raw folders don't download to clients;
    2. Put them in an IWD file, with "_svr_" in the IWD file name. Just like in COD 1 1.5 and COD UO. IWDs with "_svr_" in their name don't download to clients.
    Maybe I am wrong on this, but I think the q3dirtrav was not fixed by IW in CoD4. So it's basically possible to download any file from the main folder of the server and from the fs_game folder as well, including gscs. Also, at least in CoD2 you can, as a client, simply hex-edit your multiplayer .exe and change the part with '_svr_' to for example '_sxr_' and the client downloads that .iwd automatically.

  13. #9
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by Peterlankton View Post
    Maybe I am wrong on this, but I think the q3dirtrav was not fixed by IW in CoD4. So it's basically possible to download any file from the main folder of the server and from the fs_game folder as well, including gscs. Also, at least in CoD2 you can, as a client, simply hex-edit your multiplayer .exe and change the part with '_svr_' to for example '_sxr_' and the client downloads that .iwd automatically.
    Yeah, but you are talking about hacking. I am talking about normal users who don't hack. With a hack, you can do anything - break into secure sites, steal money, steal a persons whole identity, the lot. I am talking about ordinary law-abiding citizens who don't resort to hacking. So, excuse me for not talking about the exceptions to the rule. I just talk about normal functions of cod games, and with normal functions, raw folders don't download, and neither do IWD files with _svr_ in their name.

  14. #10
    Private
    Join Date
    Feb 2013
    Location
    Poland
    Posts
    32
    Thanks
    33
    Thanked 27 Times in 8 Posts
    I don't want to run server from main folder. After setting "+set fs_homepath "/home/cod4/server"" console_mp.log is in fs_game folder so I think it's ok.

    Will the "q3dirtravfix.so" from CoD2 work in CoD4?

    What if I will check bullettrace before calling damage function?

    PHP Code:
    /*================
    Called when a player has taken damage.
    self is the player that took damage.
    ================*/
    CodeCallback_PlayerDamage(eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLoctimeOffset)
    {
        
    // Check for bulletTrace
        
    ...
        ...
        ...

        if(
    trace)
            return;
        
    //

        
    self endon("disconnect");
        [[
    level.callbackPlayerDamage]](eInflictoreAttackeriDamageiDFlagssMeansOfDeathsWeaponvPointvDirsHitLoctimeOffset);


Tags for this Thread

Posting Permissions

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