PDA

View Full Version : Creating new mod for Call of Duty 2 : race



Puissant
9th February 2013, 21:46
Hello to everybody :)

I'm thinking to create this new mod fod COD2, gametype name : race
I'll write all things you have to know :


First : Maps to create, i thinking about mario kart maps ( most populair as priority ;) )

Second : To race, maybe use this actual jeeps but like Jared says ( thx to him ), they have some bugs... For shocks or other things.

Third : The rules, i'll try to explain as better i can...



How to play/get points & win ?
--> It's easy to play, like the mod is, it's only races, we have to get/drive jeeps ( 2 guys maximum, it's important, note it ;) ), driving touch = shift.

--> To get points, you have 2 ways :
- Try to finish 1st to get bonus points at end ( i'll give you for every positions next )
- The co-driver ( helper ) inside the jeep at the second place have to take objects like mario kart but in this situation, objects = weapons, and weapons are on the ground, and ONLY the guy who's no drive can take them. You have to try to kill other guys in other jeeps, to get better place at end.

--> For win, you have to get the most of points of the race/circuit at end.
--> How it end ? When all other players are down, or when all jeeps are no longer usable...


How much players to play that ?
--> If it's possible to keep actual jeeps ( 2 places ), i think about 12 of them, 12 x 2 guys = 24 players :)


/!\ Bonus points for positions /!\

1st : 15 points
2nd : 12 points
3rd : 10 points
4th : 8 points
5th : 7 points
6th : 6 points
7th : 5 points
8th : 4 points
9th : 3 points
10th : 2 points
11th : 1 point
12th : 0 point

I can try to make maps but with my shitty experience of it ( ^^ ), it will took years... So if anybody can say his opinion about this ( good or bad idea ), it's welcome :).

Sure, i still search awesome :
--> Mapper(s)
--> Modder(s)
--> Scripter(s)

You can ask any question here or on my xfire : puissantxx


Have a good game :)

kung foo man
9th February 2013, 22:03
Sounds nice, when you start? :D

Puissant
9th February 2013, 22:08
Thx man, ehm, i dont know ^^, who can help for that, i mean, creating maps, scripts, debug jeeps, weapons on ground etc :/

serthy
10th February 2013, 11:51
groundVehicleLogic()
{
self endon( "death" );
self endon( "destroyed" );

speedTreshold = 3;

for( speedAdd = 0 ; isDefined( self ) ; speedAdd = 0 )
{
wait( 0.1 );

self.anglesF = anglesToForward( self.angles );

if( !isDefined( self.driver ) || self.driver.sessionstate != "playing" )
{
if( self.speed > speedTreshold )
self.speed -= 1;
}
else
{
self.forward = self.driver getPlayerAngles();

if( self.driver meleeButtonPressed() )
{
if( self.driver useButtonPressed() )
{
speedAdd -= 2;
}
else
{
speedAdd += 2;
}
}
else
{
if( self.speed != 0 )
speedAdd += ( -1 * self.gear );
}
}

self vehGiveSpeed( speedAdd ); //self.speed += speed; clamp( speed , minspeed , maxspeed ); if speed < 0 self.gear = -1 < backwards else forwards gear = 1

if( self.speed * self.gear > speedTreshold )
{
speedVec = vectorScale( self.anglesF , self.speed );
traceStart = self.origin + ( 0 , 0 , 40 );
traceEnd = traceStart + speedVec;

trace = bulletTrace( traceStart , traceEnd , true , self );

if( !self checkCollission( trace ) )//check if collision = player or world geometry
{
nextPos = self.origin + speedVec;
trace = bulletTrace( nextPos + ( 0 , 0 , level.groundVehicle_climbhigh ) , ( nextPos[0] , nextPos[1] , self.origin[2] - 256 ) , false , self );//climbhigh, max high of travelling

if( !self checkCollission( trace ) )
nextPos = trace["position"];
}
else //collide, inverse speed
{
nextPos = self.origin;

self.speed = int( self.speed * -0.5 );
}

self moveTo( nextPos , 0.1 , 0 , 0 );

self.yaw = self.forward[1];

self rotateTo( ( self.pitch , self.yaw , self.roll ) , 0.2 , 0 , 0 );
}
}
}


ingame:

http://www.xfire.com/videos/5bda89

if you want to align your vehicle to the ground:


if( self.rotateVehicle )//no need to rotate every cycle...
{
self.rotateVehicle = false;

if( nextPos != self.origin )
{
self.pitch = vectorToAngles( nextPos - self.origin );
self.pitch = self.pitch[0];
}
else
{
self.pitch = 0;
}

s = vectorScale( self.anglesR , 100 );
l = bulletTrace( self.origin - s + ( 0 , 0 , 64 ) , self.origin - s - ( 0 , 0 , 64 ) , false , self ); //check left
r = bulletTrace( self.origin + s + ( 0 , 0 , 64 ) , self.origin + s - ( 0 , 0 , 64 ) , false , self ); //check right
roll = vectorToAngles( r["position"] - l["position"] );
roll = roll[0];

hDiff = angleDiff( self.angles[1] , self.direction[1] );
hDir = turnDir( hDiff );//left, rght >> -1 , 1
hDiff *= hDir;

self.pitch = self.pitch * self.gear;
self.yaw = self.angles[1] + ( min( hDiff , self.maxYawRate ) * hDir ); //max yaw add per cycle
self.roll = roll;

self rotateTo( ( self.pitch , self.yaw , self.roll ) , 0.2 , 0 , 0 );
}


this is the most light-weighted vehicle code which i have done, i thinks its a good way, but since it uses not this many bullettraces (1-2 for collission, 2 for rotation every 2 cycles = app. 2,25 bullettraces every 0.1 secs)

for comparison:
the un vehicle mod uses like 5 for collision, 4 for every tire rotation, and again more than 5 for player detection per vehicle = app. 15 traces every 0.1 secs

IzNoGoD
10th February 2013, 12:08
http://www.xfire.com/videos/5e1a1b

Loveboy
10th February 2013, 12:16
I am a mapper. I can make for you maps. Add me on Xfire if you need me: 2call2of2duty2

Puissant
10th February 2013, 12:43
Serthy,

1st : I added you on xfire :D
2nd : I totally begin with mods, i'm far to be pro with this codes, you speak chinese for me ^^



@IzNoGoD

Nice video man, why not, it change ^^, but my question is : It's possible to be 2 in one car only ?


@Loveboy

I added you and thx :)

Tally
10th February 2013, 13:48
Serthy,

1st : I added you on xfire :D
2nd : I totally begin with mods, i'm far to be pro with this codes, you speak chinese for me ^^



@IzNoGoD

Nice video man, why not, it change ^^, but my question is : It's possible to be 2 in one car only ?


@Loveboy

I added you and thx :)

It's all been done before. Check out United Noobs Vehicle mod for COD2:

http://forum.i3d.net/modifications-cod2/28642-cod2-mod-vehicles-mod.html

Developed in 2006, and released to the public in 2007. Tanks, jeeps, planes, and Flak 88. 2 man jeeps - one drives, the other man's an MG.

FYI - the guy who made the mod is the same guy who did the first xmodel exporter. His website is DieagoLogic.com. I am pleased to say he was a personal friend of mine, and we did many mods together. One of them was custom multiplayer maps for COD2 long before the mod tools came out:

http://callofduty.filefront.com/file/CoD2_Community_SPtoMP_Map_Pack_1;56488

To accomplish them, El Diablo made a small program which stripped out all the SP entities from a SP map. Effectively it left it free to run on a MP server, once the MP spawns and level script had been added.

Puissant
10th February 2013, 14:01
It's all been done before. Check out United Noobs Vehicle mod for COD2:

http://forum.i3d.net/modifications-cod2/28642-cod2-mod-vehicles-mod.html

Developed in 2006, and released to the public in 2007. Tanks, jeeps, planes, and Flak 88. 2 man jeeps - one drives, the other man's an MG.

FYI - the guy who made the mod is the same guy who did the first xmodel exporter. His website is DieagoLogic.com. I am pleased to say he was a personal friend of mine, and we did many mods together. One of them was custom multiplayer maps for COD2 long before the mod tools came out:

http://callofduty.filefront.com/file/CoD2_Community_SPtoMP_Map_Pack_1;56488

To accomplish them, El Diablo made a small program which stripped out all the SP entities from a SP map. Effectively it left it free to run on a MP server, once the MP spawns and level script had been added.

Hey Tally,

Thx for that link, but it says no web page found at the adress : http........
Erreur 6 (net::ERR_FILE_NOT_FOUND) : Fichier ou répertoire introuvable

Do you know why ? Or maybe do you have other site i can get it ? ( speedyshare ? )

Tally
10th February 2013, 14:13
Here is the download link:

http://forum.i3d.net/downloads.php?do=file&id=1343

Just click the blue download button at top right.

Puissant
10th February 2013, 14:15
Thx man, i have it now ( 9.6 Mb )

Puissant
10th February 2013, 21:40
I got it, i have that little console to custom but, how can i get the test server ( myself only ) to test mod if it works please ?