Page 1 of 1

Change gameplay (coding)

PostPosted: Thu Sep 01, 2011 4:33 am
by Neka
Hello everyone!
I wanna make 4 changes in GG gameplay.
1. (DONE) Earn extra nade only if kill with knife on the nade level
2. Give weapon (deagle) only with 7 shells, not 7 in pistol and 35 in reserve on nade level.
3. No reaload on kill with deagle on nade level
4. Give smokeNade on knife level (only on levelup to knife or respawn at a knife level)

How can i do this changes? Where and what i must add in the code to this changes make work?

PostPosted: Mon Sep 12, 2011 7:10 am
by Neka
Is there who knows about this, or where i can get help on this questions?

PostPosted: Mon Sep 12, 2011 7:21 am
by satoon101
For #4, I have a custom addon that does that, but it isn't done yet. Once it is, I will release it (it has a lot more options than just giving a smoke on knife level).

As for the rest, that would need to be a custom addon as well. I'm not going to create this myself, but if you have experience with Python, I can help you get it working. Otherwise, you're going to have to have someone else make it for you.

Satoon

Re: Change gameplay (coding)

PostPosted: Wed Sep 14, 2011 5:29 am
by Neka
Oh, i dont want to wait your addon. I know, it will be good and funny, but in this time i need only smokenade.

For #2, i find line in included addon, that give weapon specified in config of this addon. But how can i rewrite this line to give weapon with certain value of shells (dont know how it sounds in eng)? There it is (from gg_nade_bonus.py, line 333)
ggPlayer.give(weapon, False, False)

PostPosted: Wed Sep 14, 2011 5:33 am
by Neka
Also i have some idea with saving wins in DB. I wanna have extra tables (i.e. gg_weekly_wins, gg_monthly_wins) and write data to it at "win event". But with one condition: If last win was in previous week or month, wins count sets to 1.