Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 39 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername, novemberdobby
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page
subscribe
Author Topic: A Tutorial would help.....
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Sunday, Aug. 31, 2008 12:10 pm
Quote:
why not see if something can be done about those limitations that affects mappers and modders?

almost all cod4 limitations are hardcoded. to raise these limits, you'd have to hack the cod4 executables (iw3mp/iw3sp) - i'm, pretty sure it's impossible. and everyone who want to play mods based on a hacked exe would need to replace the original file each time before. so there's nothing realistic we could do.


again, Tally: can i add the scripting introduction of your friend to modsonwiki?

i want to start better script docs and SP scripting tutorials. but i don't want to do it alone. anybody willing to help?
Share |
andylegate
General Member
Since: Apr 2, 2006
Posts: 165
Last: Aug 31, 2008
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Sunday, Aug. 31, 2008 12:12 pm
Thanks guys!

I do have a good understanding of scripting, having worked on maps for COD, UO and COD2. Plus I use Python, and we use what we call ALCscripting in Blender to export what we've built into Ages (the prp files that Plasma uses), which is basically Python files that tells Blender what to do.

Last night I DID find a way to read the FF files! Which I'm sure others here may have found, but I have not seen it explained.

What I mean by that is that all I found was statements like: "You have to use a hexeditor, like HxD to read them." and nothing more.

I found on another website, the basics of how to read what is going on:

Basically load up COD4 with an mod and / or map. Then Alt-Tab out and run a Hexeditor that will let you read the computers memory, like HxD does. It has a function which tells it to dump what is in the computer's memory, based upon what program is running that you've chosen, in this case it was iw3mp.exe

Then use the search or find function to locate what it is you're looking for. Once you have, you can select that section, then copy and past it over to Notepad. Of course all the spacing and indents will not be right, but you'll at least have the following from it:

What files were used: .gsc, .csv, .menu, etc, etc and if you're trying to figure out what it was they set certain varibles to, you'll have your answer to that also.

Was real funny to me to see the info go from gibberish that you see when you just try to open a FF file in HxD to plain english when you dump it from the memory. It was like: TAH DAH!

I then started cussing myself out, as this is how the Tool Team explored and discovered how Plasma for Uru works, so that they could turn around and build a plugin for Blender to build Ages using Python scripting. [rolleyes]

I'm just going to start out simple with any mod I make for a server. If I can change the logo, music played while in the Main Menu, and put in messages that appear during game play, hey! I'm happy then!
Just like how most Noobs should be going through a "First Room" tutorial, to simply learn the basics of Raidiant and how to compile a map.

So thanks, I think I got a handle on it now (until I come here asking "Hey! WTF does this do???" hehehe ).

Oh, and sorry some people got into it here. Like I said above, you have a right your opinion, but also keep in mind that whether or not COD4 is crap or not, it's MY crap, on MY computer, and if I want to play around and mod MY CRAP on MY COMPUTER, then I'll do so and ask questions about said CRAP.....[lol][lol]
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Sunday, Aug. 31, 2008 07:27 pm
Quote:
Last night I DID find a way to read the FF files!

well, you don't need a memory dump. you can get gsc, csv and wav straight out of the ff files located in the zone folder.

question: how do the .menu files look like? 'cause they were unreadable when i used a direct decompression.

(part of a menu gsc script, but not a .menu file)
Code:
level.curMenu = menuDef;

	if ( menuDef.menuType == "fullScreen" )
	{
		if ( isDefined( oldMenu ) )
			oldMenu thread hideMenu( 0.2, true );

		menuDef thread showMenu( 0.2, true );	
		level notify ( "open_menu", level.curMenu.name );
	}
	else
	{
		menuDef thread expandMenu( 0.2 );
	}
	
	level.player playsound("mouse_click");
}


popMenu()
{
	if ( level.menuStack.size == 1 )
		return;

	level.menuStack[level.menuStack.size - 1] = undefined;
	oldMenu = level.curMenu;
	level.curMenu = level.menuStack[level.menuStack.size - 1];
	
	if ( oldMenu.menuType == "subMenu" )
	{
		oldMenu thread collapseMenu( 0.2 );
		level.curMenu updateMenu( 0.2, true );
	}
	else
	{
		oldMenu thread hideMenu( 0.2, false );
		level.curMenu thread showMenu( 0.2, false );
		level notify ( "close_menu", level.menuStack.size );
	}
	
	level.player playsound("mouse_click");
}


createMenu( name )
{
	menuDef = spawnStruct();
	menuDef.name = name;
	menuDef.menuType = "fullScreen";
	menuDef.itemDefs = [];
	menuDef.itemWidth = 120;
	menuDef.itemHeight = 20;
	menuDef.itemPadding = 0;
	menuDef.selectedIndex = 0;
	menuDef.xPos = 80;
	menuDef.yPos = 100;
	menuDef.xOffset = 0;
	menuDef.yOffset = 0;
	
	return menuDef;
}


createMenu_Controls( name )
{
	menuDef = spawnStruct();
	menuDef.name = name;
	menuDef.menuType = "fullScreen";
	menuDef.itemDefs = [];
	menuDef.itemWidth = 420;
	menuDef.itemHeight = 20;
	menuDef.itemPadding = 0;
	menuDef.selectedIndex = 0;
	menuDef.xPos = 80;
	menuDef.yPos = 100;
	menuDef.xOffset = 0;
	menuDef.yOffset = 0;
	
	return menuDef;
}


createSubMenu( name )
{
	subMenuDef = spawnStruct();
	subMenuDef.name = name;
	subMenuDef.menuType = "subMenu";
	subMenuDef.itemDefs = [];
	subMenuDef.itemWidth = 120;
	subMenuDef.itemHeight = 20;
	subMenuDef.itemPadding = 0;
	subMenuDef.selectedIndex = 0;
	subMenuDef.isExpanded = false;
	
	return subMenuDef;
}


addItem( text, action, event, description )
{
	precacheString(text);

	itemDef = spawnStruct();
	itemDef.itemType = "item";	
	itemDef.bgShader = "menu_button_selected";
	itemDef.fgText = text;
	itemDef.xPos = 0;
	itemDef.yPos = 0;
	itemDef.xOffset = 0;
	itemDef.yOffset = 0;
	itemDef.action = action;
	itemDef.event = event;
	itemDef.description = description;
	itemDef.parentDef = self;
	itemDef.index = self.itemDefs.size;

	self.itemDefs[self.itemDefs.size] = itemDef;
}


addItemSetting( text, action, event, description, setting )
{
	precacheString(text);

	itemDef = spawnStruct();
	itemDef.itemType = "settingMenu";	
	itemDef.bgShader = "menu_button_selected";
	itemDef.fgText = text;
	itemDef.xPos = 0;
	itemDef.yPos = 0;
	itemDef.xOffset = 0;
	itemDef.yOffset = 0;
	itemDef.action = action;
	itemDef.event = event;
	itemDef.description = description;
	itemDef.setting = setting;
	itemDef.parentDef = self;
	itemDef.index = self.itemDefs.size;

	self.itemDefs[self.itemDefs.size] = itemDef;
}


addSubMenu( name, text )
{
	itemDef = createSubMenu(name);
	itemDef.itemType = "subMenu";
	itemDef.bgShader = "menu_button_selected";
	itemDef.fgText = text;
	itemDef.xPos = 0;
	itemDef.yPos = 0;
	itemDef.xOffset = 20;
	itemDef.yOffset = (self.itemHeight + self.itemPadding) ;
	itemDef.parentDef = self;
	itemDef.index = self.itemDefs.size;

	self.itemDefs[self.itemDefs.size] = itemDef;

	return itemDef;
}


createItemElems()
{
	self.bgIcon = createIcon( self.bgShader, self.parentDef.itemWidth, self.parentDef.itemHeight );
	self.bgIcon.alpha = 0;
	self.bgIcon.sort = 0;

	self.fontString = createFontString( "default", 1.5 );
	self.fontString.alpha = 0;
	self.fontString.sort = 100;
	self.fontString setText( self.fgText );

	if ( self.itemType == "settingMenu" )
	{
		self.settingValue = createFontString( "default", 1.5 );
		self.settingValue.alpha = 0;
		self.settingValue.sort = 100;
		self updateDisplayValue();
	}
	
	if ( self.itemType == "subMenu" )
	{
		self.caretIcon = createIcon( "menu_caret_closed", self.parentDef.itemHeight, self.parentDef.itemHeight );	
		self.caretIcon.alpha = 0;
		self.caretIcon.sort = 100;
	}

	if ( isdefined ( self.description ) )
	{
		self.descriptionValue = createFontString( "default", 1.5 );
		self.descriptionValue.alpha = 0;
		self.descriptionValue.sort = 100;
		self.descriptionValue setText( self.description.display );
	}
}


destroyItemElems()
{
	if ( self.itemType == "subMenu" )
		self.caretIcon destroyElem();

	if ( self.itemType == "settingMenu" )
		self.settingValue destroyElem();

	if ( isdefined ( self.descriptionValue ) )
		self.descriptionValue destroyElem();

	self.bgIcon destroyElem();
	self.fontString destroyElem();
}		


setElemPoints( point, relativePoint, xPos, yPos, transTime )
{
	xOffset = 3;
	self.bgIcon setPoint( point, relativePoint, xPos, yPos, transTime );

	if ( self.itemType == "subMenu" )
	{
		self.caretIcon setPoint( point, relativePoint, xPos, yPos, transTime );
		xOffset += 16;
	}

	if ( self.itemType == "settingMenu" )
	{
		self.settingValue setPoint( "TOPRIGHT", relativePoint, xPos + xOffs


i found a few fragments of the menu files, but spread all over, and seems to be incomplete (compressed somehow or something...)

edited on Aug. 31, 2008 03:33 pm by Sevenz
Share |
andylegate
General Member
Since: Apr 2, 2006
Posts: 165
Last: Aug 31, 2008
[view latest posts]
Level 4
Category: CoD4 Scripting
Posted: Sunday, Aug. 31, 2008 09:06 pm
Quote:
well, you don't need a memory dump. you can get gsc, csv and wav straight out of the ff files located in the zone folder.


Ah, no, I'm afraid you misunderstood what I was trying to do. I don't want to look at the stock FF files, I wanted to be able to look at someone's mod.ff file that comes with their mod for a server.

For example, let's say that I'm running the BTD (Before The Dawn) mod. One thing I like about it is the fact that you can look through the scope of a sniper rifle and not have to steady it.
That's a problem for me. Why? Because I hold LAN games here in my house, and everyone else can hear me hold my breath to steady the scope and shoot. Which means they duck back, when in reality, they would never hear me hold my breath, nor my heart beat from 500 yards away.

I also like the zoom feature that they put in for the scope.

So to see how they did this, I have to look in the mod.ff file that comes with the mod, as just the config files will not tell me that.

So let's say I want to make a simple mod, that includes messages I want to appear on the screen, but also mods the scope of the rifle. Now, with this technique I can look in the mod.ff file and see how they set up their unique files for that (in fact I already have and it was very educational).
Share |
Sevenz
General Member
Since: Apr 24, 2006
Posts: 2390
Last: May 10, 2013
[view latest posts]
Level 8
Category: CoD4 Scripting
Posted: Sunday, Aug. 31, 2008 09:31 pm
"my method" works for all fastfiles of course, not stock only. there's no difference.
Share |
Restricted Access Topic is Locked
Page
Previous Page
subscribe
MODSonline.com Forums : Call of Duty 4 : CoD4 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»