07-15-2011, 18:44
(This post was last modified: 08-23-2011, 15:03 by Cyborgking.)
There is quite some stuff that you'll have to do to add new rounds.
1. Make sure the game doesn't end after round 5
In maps/mp/gametypes/globallogic_actor.gsc in Callback_ActorKilled.
Change this:
To this:
2. Set how much bots have to be killed
In maps\mp\gametypes\_rank.gsc in newroundstarttimer()
In
Add another after
So for 60 bots in round 6
3. Add the round info
In maps\mp\gametypes\_rank.gsc in allowbotrespawn()
InAdd another one
So for round 6
4. Set the loadout of the bots
In maps\mp\gametypes\_rank.gsc in onPlayerSpawned()
InAdd another one
So for round 6 where bots have scorpions
5. Make sure the game stops after round x
In maps/mp/gametypes/globallogic_player.gsc in Callback_PlayerKilled
Change this
To this Where x is the last round that is played.
Happy tweaking!
If you have found a nice round setup, please let me know and I'll consider putting it in the mod!
Thanks for letting me know.
1. Make sure the game doesn't end after round 5
In maps/mp/gametypes/globallogic_actor.gsc in Callback_ActorKilled.
Change this:
Code:
if (level.dogskilled == 40)
{
thread maps\mp\gametypes\_globallogic::endGame( "allies", "Your team survived the invasion and achieved a score of^3 " +level.scoretotal);
}
Code:
if (level.dogskilled == 40)
{
level.gamestarted = 0;
thread maps\mp\gametypes\_rank::roundmessage( "Round " +level.round+ " survived", "NONE" );
level.round ++;
thread maps\mp\gametypes\_rank::respawnhumans();
thread maps\mp\gametypes\_rank::newroundstarttimer();
}
2. Set how much bots have to be killed
In maps\mp\gametypes\_rank.gsc in newroundstarttimer()
In
Code:
if (!level.gameEnded)
{
level.gamestarted = 1;
if (level.round == 2) level.killsneeded_round = 35;
else if (level.round == 3) level.killsneeded_round = 40;
else if (level.round == 4) level.killsneeded_round = 45;
if (level.round != 5) maps\mp\gametypes\_rank::allowbotrespawn();
else if (level.round == 5) self maps\mp\gametypes\_rank::dogroundstart();
}
Code:
else if (level.round == x) level.killsneeded_round = x;
Code:
else if (level.round == 4) level.killsneeded_round = 45;
Code:
else if (level.round == 6) level.killsneeded_round = 60;
3. Add the round info
In maps\mp\gametypes\_rank.gsc in allowbotrespawn()
In
Code:
if (level.round == 2)
{
maps\mp\gametypes\_rank::roundmessage("Round 2", "35 bots with makarovs");
}
else if (level.round == 3)
{
maps\mp\gametypes\_rank::roundmessage("Round 3", "40 bots with full-auto c-zechs");
}
else if (level.round == 4)
{
maps\mp\gametypes\_rank::roundmessage("Round 4", "45 bots with enfields");
}
So for round 6
Code:
else if (level.round == 6)
{
maps\mp\gametypes\_rank::roundmessage("Round 6", "60 bots with I don't know what not");
}
4. Set the loadout of the bots
In maps\mp\gametypes\_rank.gsc in onPlayerSpawned()
In
Code:
if(is_bot(self) && self.team == "axis")
{
self takeAllWeapons();
self clearPerks();
wait 0.5;
if (level.round == 1)
{
self giveWeapon("knife_ballistic_mp");
self setWeaponAmmoClip("knife_ballistic_mp", 0);
self setWeaponAmmoStock("knife_ballistic_mp", 0);
self switchToWeapon("knife_ballistic_mp");
}
else if (level.round == 2)
{
self giveWeapon("makarov_mp");
self setWeaponAmmoStock("makarov_mp", 300);
self switchToWeapon("makarov_mp");
self thread refillammo();
}
else if (level.round == 3)
{
self giveWeapon("cz75_auto_mp");
self setWeaponAmmoStock("cz75_auto_mp", 300);
self switchToWeapon("cz75_auto_mp");
self thread refillammo();
}
else if (level.round == 4)
{
self giveWeapon("enfield_mp");
self setWeaponAmmoStock("enfield_mp", 300);
self switchToWeapon("enfield_mp");
self thread refillammo();
}
So for round 6 where bots have scorpions
Code:
else if (level.round == 6)
{
self giveWeapon("skorpion_mp");
self setWeaponAmmoStock("skorpion_mp", 300);
self switchToWeapon("skorpion_mp");
self thread refillammo();
}
5. Make sure the game stops after round x
In maps/mp/gametypes/globallogic_player.gsc in Callback_PlayerKilled
Change this
Code:
if (level.killsneeded_round == level.axiskilled_round)
{
level.gamestarted = 0;
level.activeSatellites["allies"]--;
assert( level.activeSatellites["allies"] >= 0 );
if ( level.activeSatellites["allies"] < 0 )
level.activeSatellites["allies"] = 0;
maps\mp\_killstreakrules::killstreakStop( "radardirection_mp", "allies");
level notify ( "uav_update" );
thread maps\mp\gametypes\_rank::roundmessage( "Round " +level.round+ " survived", "NONE" );
level.round ++;
level.axisspawned = 0;
level.axiskilled_round = 0;
thread maps\mp\gametypes\_rank::respawnhumans();
thread maps\mp\gametypes\_rank::newroundstarttimer();
}
Code:
if (level.killsneeded_round == level.axiskilled_round)
{
level.gamestarted = 0;
level.activeSatellites["allies"]--;
assert( level.activeSatellites["allies"] >= 0 );
if ( level.activeSatellites["allies"] < 0 )
level.activeSatellites["allies"] = 0;
maps\mp\_killstreakrules::killstreakStop( "radardirection_mp", "allies");
level notify ( "uav_update" );
if(level.round == x)
{
thread maps\mp\gametypes\_globallogic::endGame( "allies", "Your team survived the invasion and achieved a score of^3 " +level.scoretotal);
}
else
{
thread maps\mp\gametypes\_rank::roundmessage( "Round " +level.round+ " survived", "NONE" );
level.round ++;
level.axisspawned = 0;
level.axiskilled_round = 0;
thread maps\mp\gametypes\_rank::respawnhumans();
thread maps\mp\gametypes\_rank::newroundstarttimer();
}
}
Happy tweaking!
If you have found a nice round setup, please let me know and I'll consider putting it in the mod!
(07-14-2011, 18:50)Elite_Nudel Wrote: And it works on Dedi Servers. I played it on a Server the first time.That's great news!
Thanks for letting me know.