GoldenEye: Source Forums

Debriefing => Questions, Help, & How To's => Topic started by: Deadly Porkchop on March 23, 2010, 01:10:23 am

Title: Question on modifying Live and Let Die mode
Post by: Deadly Porkchop on March 23, 2010, 01:10:23 am
Hey all, I have another question about changing stuff. Me and a buddy just spent the better part of an hour looking at the Live and Let Die code to try and see if we could make the Baron a tank. We like how he starts off with the damage handicap but we want him to be able to just absorb damage to make him an actual threat early on. We managed to increase the armor he spawns with to 8 but we can't figure out how you go about changing his health or, if there's even a way, to super charge his armor to make it go past 8.

I have a very rudimentary understanding of Python and have been trying to figure it out with no luck. I don't quite understand where in the code it pulls his health from. Any help?
Title: Re: Question on modifying Live and Let Die mode
Post by: killermonkey on March 23, 2010, 01:52:02 am
To increase the Baron's health/armor beyond the maximums defined you need to call into:

player.SetMaxHealth( int )    or    player.SetMaxArmor( int )

where player represents a CGEPlayer type object.

Then you can freely set the health and armor using:

player.SetHealth( int )    or    player.SetArmor( int )

Sorry for the poor documentation of our python code in the wiki, its *mostly* correct but I haven't the time to update it atm.

http://wiki.goldeneyesource.net/index.php/Category:Python
Title: Re: Question on modifying Live and Let Die mode
Post by: Deadly Porkchop on March 23, 2010, 03:08:45 am
So where do I put that to call it exactly? I can't really seem to pull any help from your wiki, maybe I'm missing something. I thought to try it under lld_declare_baron_data since that's where I changed the amount of armor he actually spawns with but that just blatantly broke the game mode. Do I call it under the class LiveAndLetDie(PYBaseGamePlay): init section? I think I kind of understand how the variables should be set and called I'm just not sure where I I set them. I appreciate the help thus far though.
Title: Re: Question on modifying Live and Let Die mode
Post by: killermonkey on March 23, 2010, 12:17:54 pm
Start out at OnPlayerSpawn(self,player): this is where the attributes are assigned after the player spawns into the gameplay. Follow the function calls for the baron from there.

Assignment of the Baron occurs in OnRoundBegin(self):

You might also want to look in: def lld_declare_baron_data(self):


When it comes time for you to make Baron "the tank" look in the function def ShouldDoCustomDamage(self, victim, info, health, armour):


The Wiki is not designed to describe individual gameplays. It just documents the function calls.