Raised This Month: $ Target: $400
 0% 

Need help with saving xp method and more


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
3volution
Junior Member
Join Date: Jun 2006
Old 06-17-2007 , 12:16   Need help with saving xp method and more
Reply With Quote #1

Alright, I have been programming for 4 years now and have been messing around with HL plugins for nearly 2 of those. I haven't done a whole lot or released anything publicly before, as most of the plugins I write deal with networking issues or are specific tools for my custom server (mainly for SH mod).

Anyways, I recently got back into playing CS and stumbled upon Mini_Midget's "Zombie Swarm" mod. After playing around with that and a few variations, I couldn't help but think of the potential of expanding upon it.

If you have taken a look at the sma, you can see I still have a lot of work to do, but a fair amount of the abilities shouldn't be too hard to add or have been done before and can be used as an example.

The only real problem I have is with the method of saving and seperating the xp and abilities from each team, as well as a few of the more complicated skills (medic health regen based on radius, soldier 'armor plating' ability, and alot of the custom creations/traps as well).

If anyone wants to help with coding, that would be greatly appreciated!
Ideas and suggestions are welcome as well, try to keep it at least somewhat realistic and feasible though (I know, zombies aren't exactly 'realistic,' but you know what I mean).

Edit: After getting frustrated with trying to setup the class abilities and individual xp per class systems, I decided to just recode pretty much everything using the WC3XP method as an outline. I am working on getting all the basic CT side stuff finished and will update the code posted on here later. I can't really even start on half of the plugin without knowing how to seperate the xp systems though...so that is a priority if anyone can help.
Attached Files
File Type: sma Get Plugin or Get Source (zombieXP_mod.sma - 374 views - 22.9 KB)

Last edited by 3volution; 06-19-2007 at 03:05.
3volution is offline
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-17-2007 , 12:34   Re: Need help with saving xp method and more
Reply With Quote #2

You needed two years to make THAT?!?!?!?!!!!
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
3volution
Junior Member
Join Date: Jun 2006
Old 06-17-2007 , 12:40   Re: Need help with saving xp method and more
Reply With Quote #3

Quote:
Originally Posted by Toster v2.1 View Post
You needed two years to make THAT?!?!?!?!!!!
?

I threw this together in a few minutes last night...I said I've been messing around with HL coding/scripting for two years.
3volution is offline
pRED*
Join Date: Dec 2006
Old 06-17-2007 , 16:51   Re: Need help with saving xp method and more
Reply With Quote #4

Have a look through the tutorials sections.

There is tutorials on all the popular saving methods.

nvault - easy as to use..
sql - can support massives numbers
file writing - harder to set up that nvault but more customisable.

The flashlight is an impulse command..
http://www.amxmodx.org/funcwiki.php?go=func&id=462
you can use that to detect when people press the flashlight button and then block it.

Theres plenty of plugins that revive people. Try searching for revival kit by Cheap_suit for a good code example..
pRED* is offline
3volution
Junior Member
Join Date: Jun 2006
Old 06-17-2007 , 23:25   Re: Need help with saving xp method and more
Reply With Quote #5

Quote:
Originally Posted by pRED* | NZ View Post
Have a look through the tutorials sections.

There is tutorials on all the popular saving methods.

nvault - easy as to use..
sql - can support massives numbers
file writing - harder to set up that nvault but more customisable.

The flashlight is an impulse command..
http://www.amxmodx.org/funcwiki.php?go=func&id=462
you can use that to detect when people press the flashlight button and then block it.

Theres plenty of plugins that revive people. Try searching for revival kit by Cheap_suit for a good code example..
I don't mean to sound rude, but none of that is really useful. I have searched the tutorials forum plenty of times and there isn't a single example of how to setup a system that this plugin would require (there aren't really any good xp/saving tutorials in general. XunTric's is ok, but has quite a few problems). I need it to basically save like the WC3 plugins for CT side and then have a different system for T side.

As far as the revive ability goes, I guess I could just use something similar to cheap_suit's plugin, but that's not really the approach I had in mind.

And yes, I know that impulse 100 (client side) = flashlight, but I was wondering if there is a way of turning off all light entities/effects globally and possibly team specific. For a simple workaround, I could just set mp_flashlight to 0, force the client to try and turn on the flashlight (this will force it to turn off if previously on, otherwise won't do anything) and then reset mp_flashlight after a given amount of time, but once again that's not really the way I had intended it to work.

Thanks for at least responding though. Any help coding would be greatly appreciated if you have the spare time!
3volution is offline
pRED*
Join Date: Dec 2006
Old 06-18-2007 , 04:40   Re: Need help with saving xp method and more
Reply With Quote #6

I think you missed my point on some things.

Firstly look a few posts below Xuntrics main xp tutorial. PM has posted a very similar code snippet with lots of bugs and stuff fixed. You should be able to cut and paste what you need to get a basic vault system running.
Spend some time reading and understanding what the plugin does and how it works then adapt it to work for your purposes.

For the flashlight..
To block a users flashlight (using engine module, I can do a fakemeta example as well if you want)

just call enable_flashlight(id) to enable and disabled_flashlight(id) to disable.
client_impulse is automatically run by the engine module when a user enters an impulse command

Code:
new bool:flashdisabled[33] public client_connect(id) {     flashdisabled[id]=false } public disable_flashlight(id) {     flashdisabled[id]=true     client_cmd(id,"impulse 100")     //might wanna inform the user as well } public enable_flashlight(id) {     flashdisabled[id]=false     //might wanna inform the user as well } public client_impulse(id,impulse) {     if (flashdisabled[id] && impulse==100)     {         //user has flashlight disabled and they sent the impulse 100 command (flashlight)         return PLUGIN_HANDLED         //plugin_handled will block the impulse cmd     }     return PLUGIN_CONTINUE }

Care to expand more on your preferred approach for revivals. I'm pretty sure cheap suit's will have the basic code outlines you need just not in the exact form you want
pRED* is offline
3volution
Junior Member
Join Date: Jun 2006
Old 06-19-2007 , 03:24   Re: Need help with saving xp method and more
Reply With Quote #7

Quote:
Originally Posted by pRED* | NZ View Post
I think you missed my point on some things.

Firstly look a few posts below Xuntrics main xp tutorial. PM has posted a very similar code snippet with lots of bugs and stuff fixed. You should be able to cut and paste what you need to get a basic vault system running...
That's what I was originally trying, but I couldn't get it to work the way I needed it to. I think using the WC3 saving method should work perfectly for the CT side of things though.

Thanks for the flashlight example, but that would add a fair amount of overhead wouldn't it? Maybe it wouldn't matter too much, but it just seems like it would be too CPU intensive for something that could be solved a simpler way. That part of the code would be executed everytime anyone in the server even moved as the movement commands are impulses, are they not?

Also, after thinking about it, the revival kit plugin by Cheap_suit would fit in pretty well. Should force some teamwork since you have to be near your teammates' body to revive them. I am going to have to recode a fair amount of it so it won't interfere with the rest of the mod though, but thanks for the heads up.

Anyone else have some suggestions or want to help code a bit?
3volution is offline
pRED*
Join Date: Dec 2006
Old 06-19-2007 , 04:06   Re: Need help with saving xp method and more
Reply With Quote #8

WC3 does use nvault. Or sql...
Gungame uses direct file reading.

Nup it really shouldn't be that CPU intensive. Client button commands are not impulses, they are a separate data stream. (includes movement keys, jump, crouch, attack etc..)

That impulse forward should only detect people spraying, flashlight..
pRED* is offline
3volution
Junior Member
Join Date: Jun 2006
Old 06-19-2007 , 12:45   Re: Need help with saving xp method and more
Reply With Quote #9

Quote:
Originally Posted by pRED* | NZ View Post
WC3 does use nvault. Or sql...
Yes, I know WC3 can use vault/nvault/sql, I was referring to the way it saves xp for each race seperately.

I'm still slowly working on this mod, but I don't have a whole lot of free time. I'm hoping to be able to test the CT side and have it most of the way finished before the end of the week. Still could really use some help seperating the XP systems from T and CT though.
3volution is offline
pRED*
Join Date: Dec 2006
Old 06-19-2007 , 19:01   Re: Need help with saving xp method and more
Reply With Quote #10

http://cvs.alliedmods.net/viewvc.cgi/wc3mods/war3ft/

Thats the link to the entire source code of war3ft. It's really well set out into well named include files so its really easy to find what you want.

Has great code examples for nvault and sql saving methods, effects and temp entities, damage and health powers etc..
pRED* 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 10:39.


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