powerup plugin 0.3 alpha
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
powerup plugin 0.3 alpha
Now with:
a config file parser, no more constants.h
capping a flag 2 times in a row within a certain time period triggers a powerup
couple bug fixes
a couple refinements
Missing option to use random sky color - it would be easy to add, but I'll release while i'm ahead.
May be buggy, I didn't do a final test of it. Proceed with caution. But if it works, Hey!
Post here if you need any help with anything.
a config file parser, no more constants.h
capping a flag 2 times in a row within a certain time period triggers a powerup
couple bug fixes
a couple refinements
Missing option to use random sky color - it would be easy to add, but I'll release while i'm ahead.
May be buggy, I didn't do a final test of it. Proceed with caution. But if it works, Hey!
Post here if you need any help with anything.
- Attachments
-
- powerup.tar.gz
- Powerup 0.3 alpha, "Slightly tempermental"
- (5.37 KiB) Downloaded 438 times
Where's Darwin when you need him?
Lagger@Everywhere
- I_Died_Once
- Special Forces
- Posts: 635
- Joined: Sun Nov 28, 2004 5:27 pm
- Location: The Dark Side
- Contact:
- Spazzy McGee
- Sergeant Major
- Posts: 1405
- Joined: Mon Mar 21, 2005 4:59 pm
- Location: Planet MoFo, Sheffield Division; United Kingdom
when i tried to make it, it chucked out a load of errors
Code: Select all
g++ -fPIC -I../../include -g -c -o powerup.o powerup.cpp
powerup.cpp:9:21: error: bzfsAPI.h: No such file or directory
poweruptracker.h:11: error: expected class-name before '{' token
poweruptracker.h:16: error: `bz_EventData' has not been declared
powerup.cpp:20: error: 'BZ_GET_PLUGIN_VERSION' does not name a type
powerup.cpp:37: error: expected constructor, destructor, or type conversion before "int"
powerup.cpp: In function `int loadconfig(const char*)':
powerup.cpp:73: error: 'bz_debugMessage' was not declared in this scope
powerup.cpp:125: error: 'bz_debugMessage' was not declared in this scope
make: *** [powerup.o] Error 1
"Life is what happens to you while you're busy making other plans." - John Lennon
- I_Died_Once
- Special Forces
- Posts: 635
- Joined: Sun Nov 28, 2004 5:27 pm
- Location: The Dark Side
- Contact:
HmmmSpazzy Mcgee wrote:when i tried to make it, it chucked out a load of errors
Code: Select all
g++ -fPIC -I../../include -g -c -o powerup.o powerup.cpp powerup.cpp:9:21: error: bzfsAPI.h: No such file or directory poweruptracker.h:11: error: expected class-name before '{' token poweruptracker.h:16: error: `bz_EventData' has not been declared powerup.cpp:20: error: 'BZ_GET_PLUGIN_VERSION' does not name a type powerup.cpp:37: error: expected constructor, destructor, or type conversion before "int" powerup.cpp: In function `int loadconfig(const char*)': powerup.cpp:73: error: 'bz_debugMessage' was not declared in this scope powerup.cpp:125: error: 'bz_debugMessage' was not declared in this scope make: *** [powerup.o] Error 1
Copy a file named "bzfsAPI.h" from /path/to/bzflag/include/bzfsAPI.h to where your powerup source is, THEN run make.
...This has been a recording.
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
Read the README. (ie RTFRM)I_Died_Once wrote:Ohhhh, a funky config file....
I dare you to post a sample config demonstrating the full scope of the plugin for me to base one off of....
Whats the defaults (if I didn't give it a config?)
here is mine, showing off the full capabilities:
Code: Select all
var POWERUP_PERIOD 5m
var POWERUP_PERIOD_VARIANCE 30
var POWERUP_DURATION 30
var POWERUP_DURATION_VARIANCE 15
var FLAG_CAP_PERIOD 2m
powerup
name Speed
desc Run fast. If you get autokicked, please flame the server owner
var _tankSpeed 10
var _shotSpeed 10
end
powerup
name JumpHigh
desc Hello
var _gravity 5
end
powerup
name Jump hig shoot + run fast
desc blah blah blah
var _gravity 5
var _shotSpeed 5
var _tankSpeed 5
end
Code: Select all
var [servervar] [value]
Where's Darwin when you need him?
Lagger@Everywhere
- I_Died_Once
- Special Forces
- Posts: 635
- Joined: Sun Nov 28, 2004 5:27 pm
- Location: The Dark Side
- Contact:
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
not quite,
this sets the name, the description, which get /say'd. And, it will add 5 to _gravity, _shotSpeed, and _tankSpeed when the powerup is triggered.
simple, really.
Code: Select all
powerup
name Jump hig shoot + run fast
desc blah blah blah
var _gravity 5
var _shotSpeed 5
var _tankSpeed 5
end
simple, really.
Where's Darwin when you need him?
Lagger@Everywhere
- I_Died_Once
- Special Forces
- Posts: 635
- Joined: Sun Nov 28, 2004 5:27 pm
- Location: The Dark Side
- Contact:
- The Vaxorcist
- Private First Class
- Posts: 134
- Joined: Wed Mar 23, 2005 10:28 am
- Location: Santa Rosa, CA
Yes, and no. It doesn't say that anymore, but it still stacks powerups and indicates it with the sky color. In the next release, I will implement your idea of having a random sky color, It is easy enough, I just was tired of coding and I decided to release.
Oh, and the config file has no default values, if you omit something, you will either not notice anything, or wonder why your server is periodicly crashing. There is also nothing that checks the validity of the config file (actually, there is some, but don't count on it), so be careful.
Oh, and the config file has no default values, if you omit something, you will either not notice anything, or wonder why your server is periodicly crashing. There is also nothing that checks the validity of the config file (actually, there is some, but don't count on it), so be careful.
Where's Darwin when you need him?
Lagger@Everywhere
- The Knights Who Say Ni
- Private First Class
- Posts: 556
- Joined: Mon Sep 26, 2005 7:21 pm
- Location: Uplyme, England
- Contact:
- DJ Atomica
- Private First Class
- Posts: 145
- Joined: Thu May 12, 2005 8:55 pm
- Location: PA - USA