Raised This Month: $51 Target: $400
 12% 

[CS:GO/CS:S] Jailbreak Gangs (V1.1.9, 06/1/2017)


Post New Thread Reply   
 
Thread Tools Display Modes
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-23-2017 , 15:34   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.5, 02/21/2017)
Reply With Quote #51

Quote:
Originally Posted by Headline View Post
You're more than welcome to contribute on Github! The duplicate error should be fixed since I made the gangs column for databases unique, but I'll add that notice to clients so they know their gangs are being created.

Adding a modifier to increase price can definately be done, too.

As far as chat tags go, I'm interested in supporting it but it's unlikely that it'll be incorporated into the master plugin. I'd rather expose natives through hl_gangs such that the feature can be implemented through an external plugin, rather than adding it to the main one
I'll try to make the price multiplier (:.

How about the max upgrade for each perk? If that is ok for you, I can try also.
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-23-2017 , 17:59   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #52

I was able to add the Price Multiplier. I just had some issues with the GitHub. I wasn't sure if it was committing properly, then I reverted my changes to avoid any mistakes. Sorry about that :/

Sorry for my English mistakes. This keyboard from my notebook is weird.

Review the code and compare. I don't know if there are better ways to make my code better, but at least it works (:

New ConVar: hl_gangs_price_multiplier
Default Value: 1.0 (Disabled)

Description:
For each upgrade bought, the next one will be more expensive, based on the ConVar value.
Attached Files
File Type: sp Get Plugin or Get Source (hl_gangs.sp - 67 views - 74.2 KB)
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 02-23-2017 , 18:44   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #53

Ill create a branch for it and compare to see what you did. I'll edit this post with an update once I can review it

EDIT: I switched up what you did because it used so many for loops and stuff. The algorithm for calculating credit modifier is as follows

Code:
price = itemPrice + (priceModifier * perkLevel)
That way it always increases by the ammount of the price modifier, but when set to zero it's completely ignored (zero times any value is zero )

Here's the pull request. I just need to test it.
https://github.com/Headline22/Gangs/pull/6

Last edited by headline; 02-23-2017 at 21:51.
headline is offline
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-23-2017 , 22:26   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #54

Quote:
Originally Posted by Headline View Post
Ill create a branch for it and compare to see what you did. I'll edit this post with an update once I can review it

EDIT: I switched up what you did because it used so many for loops and stuff. The algorithm for calculating credit modifier is as follows

Code:
price = itemPrice + (priceModifier * perkLevel)
That way it always increases by the ammount of the price modifier, but when set to zero it's completely ignored (zero times any value is zero )

Here's the pull request. I just need to test it.
https://github.com/Headline22/Gangs/pull/6
I did that way, but the reason I used the for loops is to increase for each level. For example:
Level 1 = 100
Level 2 = 200
Level 3 = 400
...

This way you did it will increase only in general, right?

Thanks for the feedback!
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 02-24-2017 , 00:39   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #55

Quote:
Originally Posted by plock View Post
I did that way, but the reason I used the for loops is to increase for each level. For example:
Level 1 = 100
Level 2 = 200
Level 3 = 400
...

This way you did it will increase only in general, right?

Thanks for the feedback!
Yes in that example it won't scale exponentially, just linearly. However by changing + to * it does exactly that what you had intended

I do believe though, people would prefer linear over exponential

Edit: look at the latest pull request

Last edited by headline; 02-24-2017 at 03:47.
headline is offline
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-24-2017 , 12:49   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #56

Quote:
Originally Posted by Headline View Post
Yes in that example it won't scale exponentially, just linearly. However by changing + to * it does exactly that what you had intended

I do believe though, people would prefer linear over exponential

Edit: look at the latest pull request
Linear the user could just increase each price, no?

Sorry for questioning a lot, but it's more like a concern.
The user can't modify to 1.5, right? Maybe it would be some feature that the user could take more advantage of.
Which is the correct method of calculating exponential?
Code:
price = gcv_iGravityPrice.IntValue * (gcv_iPriceModifier.IntValue * ga_iGravity[client]);
price = 1000 * (2 * 3) = 6000
or
Code:
price = 1000 * 2 = 2000
price = 2000 * 2 = 4000
price = 4000 * 2 = 8000
Great job with the plugin! it's getting better and better
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 02-24-2017 , 13:55   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #57

Quote:
Originally Posted by plock View Post
Linear the user could just increase each price, no?

Sorry for questioning a lot, but it's more like a concern.
The user can't modify to 1.5, right? Maybe it would be some feature that the user could take more advantage of.
Which is the correct method of calculating exponential?
Code:
price = gcv_iGravityPrice.IntValue * (gcv_iPriceModifier.IntValue * ga_iGravity[client]);
price = 1000 * (2 * 3) = 6000
or
Code:
price = 1000 * 2 = 2000
price = 2000 * 2 = 4000
price = 4000 * 2 = 8000
Great job with the plugin! it's getting better and better
Actually. Doing it exponentially just makes an added complication imho. Let's just make in linear, that way the price increase will be like this

Assuming that the modifier is set to 100, and the initial price is 100
Code:
Level 1 - 100
Level 2 - 200
Level 3 - 300
Level 4 - 400
...
headline is offline
ichiballs
Member
Join Date: Oct 2016
Old 02-24-2017 , 14:12   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #58

Do speed and gravity work, cause im not sure if they do for me.
ichiballs is offline
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-24-2017 , 14:16   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #59

Quote:
Originally Posted by Headline View Post
Actually. Doing it exponentially just makes an added complication imho. Let's just make in linear, that way the price increase will be like this

Assuming that the modifier is set to 100, and the initial price is 100
Code:
Level 1 - 100
Level 2 - 200
Level 3 - 300
Level 4 - 400
...
Awesome! It's also better this way

Quote:
Originally Posted by ichiballs View Post
Do speed and gravity work, cause im not sure if they do for me.
Are you sure? Did you tried running in parallel to a friend? Because it's a subtle difference.
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
plock
Senior Member
Join Date: Feb 2016
Location: noitacoL
Old 02-24-2017 , 14:21   Re: [CS:GO/CS:S] Jailbreak Gangs (V1.0.7, 02/22/2017)
Reply With Quote #60

Portuguese translation

I'll update if I see some mistakes or if you add more.
Attached Files
File Type: txt hl_gangs.phrases.txt (4.6 KB, 109 views)
__________________
~tuturu

Owner/Developer at Kniv
My Steam Profile
plock is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode