jeremych Posted May 25, 2011 Report Share Posted May 25, 2011 Smart-Care PackageSmart CarePackage is simple code which will use ( losing team score / losing team score ) ratio to limit quality of a drop.Easy speaking - a losing team will always get better drops then a winning team. Its called - balance - huh.Code affects both airdrops - carepackage and emergency airport too.getRandomCrateType( dropType ){ winning = getWinningTeam(); if (winning == "axis") diff = game["teamScores"]["axis"] / game["teamScores"]["allies"]; else diff = game["teamScores"]["allies"] / game["teamScores"]["axis"]; if ( self.owner.pers["team"] == winning ) { value = randomInt( level.crateMaxVal[dropType] ); value = int(value / diff); } else { min = int(level.crateMaxVal[dropType] / diff); max = level.crateMaxVal[dropType] - min; value = randomInt( max ) + min; } selectedCrateType = undefined; foreach ( crateType, crateWeight in level.crateTypes[dropType] ) { if ( !crateWeight ) continue; selectedCrateType = crateType; if ( crateWeight > value ) break; } return( selectedCrateType );}Note: you must call getRandomCrateType with self property, better to get _airdrop.gsc from attached z_cp_balance.iwd mod or if you do not care about modding stuff, just put z_cp_balance.iwd into your /main folder.IWD: http://alteriw.net/download/file.php?id=4143 Link to comment Share on other sites More sharing options...
xShockwav3z Posted May 25, 2011 Report Share Posted May 25, 2011 I am soo jealous who know how to code. i wanna learn to code But this helps me when i have to carry my team. and emergency airport? xD Link to comment Share on other sites More sharing options...
Stiuart Posted May 25, 2011 Report Share Posted May 25, 2011 So in other words , join the more crappy team or play like crap for a longer while to then win the round thanks to "cheated" care package/emergency airdrop ?Changes the whole meaning of care package/emergency airdrop since without this mod it is luck based.Bull poo not balance Link to comment Share on other sites More sharing options...
tactical Posted May 25, 2011 Report Share Posted May 25, 2011 I would hate to be in the winning team and get ownd by a lucky "newb" who just got an AC130 (for playing bad) which needs 4-5 Stingers to kill...And except for me noones shooting it It's an interesting idea to give bad players a better chance but I would not use it on my server x_xI agree with Stiuart ^^ Link to comment Share on other sites More sharing options...
jeremych Posted May 25, 2011 Author Report Share Posted May 25, 2011 Hmm, never thought of it that way.I suppose...I'm against it also. Although I rarely use CP+EA anyways.Also, I dont know how to code. lmaobox coded that.Just reposted from aIW forums since it was interesting. Link to comment Share on other sites More sharing options...
tactical Posted May 25, 2011 Report Share Posted May 25, 2011 Hmm, never thought of it that way. I suppose...I'm against it also. Although I rarely use CP+EA anyways. Also, I dont know how to code. lmaobox coded that. Just reposted from aIW forums since it was interesting. Yep, interesting in any case. I also rarely use CP or EA Just sometimes for fun as I'm tired getting UAV or 4x Counter UAV & Ammo:) Link to comment Share on other sites More sharing options...
Stiuart Posted May 26, 2011 Report Share Posted May 26, 2011 Although I rarely use CP+EA anyways. I also rarely use CP or EA Just sometimes for fun as I'm tired getting UAV or 4x Counter UAV & Ammo:) I added EA sometime ago to my streak. Why ? Cuz I couldnt care less for kills/frags but at the same time , I'm giving chance to others. Always letting teammates pick what they want , dont care if its chopper gunner or anything else :wink: I'm covering their butts and they can choose anything or everything if they want Link to comment Share on other sites More sharing options...
Recommended Posts