Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Postby greaserpirate » 03 Dec 2011, 20:02

As many may already know, I've created a new gamemode based on the game Mafia and now have a server running(sometimes) with that mode.
If you want to read more about it, follow this link: http://forum.freegamedev.net/viewtopic.php?f=53&t=2236

I've recently updated the code, and I thought I should make a new thread instead of adding on to the "Server Content RIghts" one. Here's what I changed in the new update:
-now displays bot numbers in "this guy was brought to justice" message
-removed "killerexpert" variable. Killers now take damage from body hits, but that amount is scaled by the "killerbodydamage" variable. (default:0.175). Slightly adjusted because of rounding, so all attacks will cause at least one damage point unless "killerbodydamage" is set to 0.
-split "killeranrachy" variable into "killerteamkillpenalty" (default: 1) and "killerdyingpenalty" (default: 2)
-renamed "killerpenalty" to "killerjusticepenalty" to avoid confusion and changed the default value to 3.
-changed "killermutualbounty" default value to 10
-changed "killerbounty" default value to 3
-changed "killerchaospoints" default value to 2

The code is in the attachments, but you can get it here too: http://www.mediafire.com/?ir3a5mi2qe89juc
(Intended for "Vanilla" RE, but you can make it work for the SVN just by copying lines with the phrase "killer" on the included "server.ccp" and "vars.h" to the same places in the SVN versions of both files.)

At this point, however, I'm kind of at a roadblock. The next things I want to do aren't documented by simple, commented code like Orbital's Zombie Mod, and I can't find any documentation for them anywhere.

What I was thinking of doing next was adding an "accusation" system. When a player "accuses" another, they share part of the killer's bounty when the killer is caught, but it the person they accused is innocent, the accuser shares part of the penalty for teamkilling. This is first on my list and I think it would really have a good effect on the gameplay, but I don't really know how to go about doing it. I'm going to have to make some kind of gui, which I only know how to do in Cubescript, have some way of calling the function in-game, and either make new player variables or mess with arrays, which I currently don't know how to do and can't find any documentation about. If anyone could help me, I'd really appreciate it.

Feel free to use, modify, and share your modified versions of this code. It would be great if other people can work on this gamemode too so we can make something epic together. Maybe someday this can even be included with future releases of Red Eclipse ;)
Attachments
KillerMod.zip
Constanlty updated, and now on my signature.
(45.15 KiB) Downloaded 368 times
Last edited by greaserpirate on 21 Jan 2012, 03:54, edited 2 times in total.

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- update(12/5/11) and questions

Postby greaserpirate » 06 Dec 2011, 02:39

I recently found and fixed a bug: the game crashed when a killer died of natural causes (falling into bottomless pits, melting in lava, etc). I've fixed it now and updated the links. Sorry for not testing it more intensively the first time.

I hope you enjoy this or are inspired to start coding your own gamemodes(or help me out with mine) :D

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- Final update... for now(12/17/11)

Postby greaserpirate » 18 Dec 2011, 02:24

I apologise for the amount of updates I've been having on this thread, but now it's at a finished state. This version will be the final product unless someone else has any good ideas they want me to implement. After struggling hard against the demons of C++(I couldn't find ANY documentation on vectors that matched how they were used in RE), I've added several new features:

-Changed default values for most of the variables( Killerbounty = 0, Killerjusticepenalty = 0, Killerbodydamage = 0.2, Killermutualbounty = 5, Killerchaospoints = 2)
-Players now get points from damaging, not just fragging, the Killer. The number of points they get is scaled by "Killerdamagepoints" (Default: 0.1). I thought it was unfair that the one player who finishes the Killer off should get a metric frakton of points while all the other players who helped out would get nothing, almost as if they'd just sat there and done nothing.
-Statistics, such as the number of victims claimed and the number of innocent civilians killed by other civilians, for the Killer's reign of terror are shown when they are caught. I also reworded the messages and made the one that says "You are a Killer!" blink like the "carnage" and "critical" messages so it would be hard to miss.

I've playtested this version for a while and I think it's at a stage of completion. Yes, it could be made more awesome, but nothing seems to be missing. I don't think it's incomplete without an accusation system after all, because with the teamkilling penalties for citizens and the bonus for Killers, players already have enough incentive to communicate who's the Killer and who's innocent.

Anyway, would it be possible for this mode to included in the next release? ;) The file only takes up 12 KB of space, plus one or two lines of code in "server.cpp" and "vars.h", but it adds a whole dimension of gameplay to Redeclipse. Unlike most other modes, it's not clear who the enemy is, so you have to use strategy and good communication to win. With access to the client side of the code, this code could be made much more professional-looking and generally better in all ways. Also, with the "compile barrier" down, other people will be able to make their own Killer Mode servers. I can't really do this mode justice with only one server- my schedule's too complicated, my location(East-coast America) is too far from a lot of people, and the optimal number of players for this mode is too low.

P.S: I've also fixed most of the problems with my internet that were keeping my server down. See you in-game! :cool:

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- Final update... for now(12/17/11)

Postby TheLastProject » 18 Dec 2011, 10:22

greaserpirate {l Wrote}:Anyway, would it be possible for this mode to included in the next release? ;) The file only takes up 12 KB of space, plus one or two lines of code in "server.cpp" and "vars.h", but it adds a whole dimension of gameplay to Redeclipse. Unlike most other modes, it's not clear who the enemy is, so you have to use strategy and good communication to win. With access to the client side of the code, this code could be made much more professional-looking and generally better in all ways. Also, with the "compile barrier" down, other people will be able to make their own Killer Mode servers. I can't really do this mode justice with only one server- my schedule's too complicated, my location(East-coast America) is too far from a lot of people, and the optimal number of players for this mode is too low.

P.S: I've also fixed most of the problems with my internet that were keeping my server down. See you in-game! :cool:

Would you mind giving me more information about your server's name? Also, is it on the SVN or 1.1 Client? I would say we're rather close to release and adding a new gamemode with relatively little maps probably won't be a good idea, but I would still like to give your gamemode a try. If I can find your server I'll try to give your mode a try, as much as is possible against bots (hopefully others will join, but they generally don't).

I've also downloaded your mod, but have no clue how to start it offline. Any instructions? =/ (Yes, I have already unzipped it into the correct directory)
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: Killer Mode- Final update... for now(12/17/11)

Postby greaserpirate » 19 Dec 2011, 02:16

Would you mind giving me more information about your server's name? Also, is it on the SVN or 1.1 Client? I would say we're rather close to release and adding a new gamemode with relatively little maps probably won't be a good idea, but I would still like to give your gamemode a try. If I can find your server I'll try to give your mode a try, as much as is possible against bots (hopefully others will join, but they generally don't).


The server's name is "Killer Mode(Custom)" and it's on verision 1.1. I usually run it at 5:30 to 10:00, but my schedule is pretty complicated so there's no guarantees. About the maps, it works on all maps, just like Deathmatch. Some maps are better than others, but the difference isn't that noticeable.

I completely understand if I'm too late to make it into this upcoming release, but from what I heard it seemed like it was still some ways off. When is it expected to be released?

I've also downloaded your mod, but have no clue how to start it offline. Any instructions? =/ (Yes, I have already unzipped it into the correct directory)


You're going to have to compile. If you're on Linux, just go to Synaptic and download all the packages starting in "libsdl" and ending in "-dev", and also zlib and g++. Then, go into a terminal and type "cd wherever-your-redelcipse-folder-is/src," "make clean," and "make install". (More info here: http://forum.freegamedev.net/viewtopic.php?f=53&t=2148)

If you're on Windows there are several C++ compliers I've heard about, including Code:Blocks, but since I haven't tested them out I'm not the best source of advice on that issue. I have found a useful thread with some help though: http://forum.freegamedev.net/viewtopic.php?f=53&t=1510

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- Final update... for now(12/17/11)

Postby Marenz » 19 Dec 2011, 02:54

Codeblocks is NOT a compiler, just an IDE that can work with at least 8 compilers. However, the default installation comes with gcc/g++ as in, the mingw (windows) version.
Marenz
 
Posts: 29
Joined: 20 Oct 2011, 00:06

Re: Re: Killer Mode- Final update... for now(12/17/11)

Postby TheLastProject » 19 Dec 2011, 16:46

The next release is planned "any moment now", we're currently having a feature freeze and the SVN will become 1.2 if no bugs get reported in the coming days.

Well, I compiled it and gave it a try, this is what I have to say about it:
It looks decent, but there are a few things I would think would work better in another way:
- Bigger punishment for killing an innocent person, right now you barely get punished. Perhaps being thrown out of the round and giving the killer a free point?
- More messages. Instead of the default message when killing an innocent person, what about "TheLastProject killed an innocent player!"?
- Survivor-like style gameplay. Killer receiving 1 point per kill and an additional one point per player if the complete team has been killed?
- Do not add points until the round is over or the killer has been killed, otherwise the TAB screen will tell you exactly who is the killer.
- Right-top could show the amount of citizens alive? To give an idea when someone has been killed, even though you can't see it. Or, of course, like in DeathMatch your score.
- Bots need to be changed a lot for this mode, they just kill around randomly. I guess you'll have to bother quin with code to let the bots mark someone as target to kill if they see said player killing someone within a certain radius in front of them and otherwise just walk around a bit.

Of course, this is just a general idea and I expect you to tweak everything the way you think it fits best, but I still hope my opinion will be helpful to you. Good mode so far though, it has great potential.
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: Re: Killer Mode- Final update... for now(12/17/11)

Postby greaserpirate » 19 Dec 2011, 23:57

Those sound like good ideas. The Killer already gets points when innocents kill innocents, and the points aren't added up until the Killer is caught, but the other suggestions sound really good and I'll try and work on them, especially the "survivor" idea and the bots.

By the way, are other modes such as Zombie and Deathball/Goalden(even though it's still kinda in development) going to be included? Zombie Mode's been around for a while, and it looks pretty complete to me. I'd love to see it included in the game.

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- Final update... for now(12/17/11)

Postby srbs » 20 Dec 2011, 02:48

greaserpirate {l Wrote}:After struggling hard against the demons of C++(I couldn't find ANY documentation on vectors that matched how they were used in RE)

That would be because it is a custom vector class. (see shared/tools.h, line 385 on linked version) So you'll just have to look around the code for examples since there aren't very many comments.

Most of Sauer & Red Eclipse code is technically written in C, but using templates/generics from C++ and maybe a couple of other things. Tools.h contains most, if not all, of the data structures that Sauer/RE use.
srbs
 
Posts: 94
Joined: 17 Mar 2011, 07:00

Re: Re: Killer Mode- Final update... for now(12/17/11)

Postby TheLastProject » 20 Dec 2011, 08:52

greaserpirate {l Wrote}:Those sound like good ideas. The Killer already gets points when innocents kill innocents, and the points aren't added up until the Killer is caught

Oops, sorry, my bad. I seem to have failed somewhat there. Should test more to make sure instead of posting ideas that are already included :oops:

greaserpirate {l Wrote}:, but the other suggestions sound really good and I'll try and work on them, especially the "survivor" idea and the bots.

By the way, are other modes such as Zombie and Deathball/Goalden(even though it's still kinda in development) going to be included? Zombie Mode's been around for a while, and it looks pretty complete to me. I'd love to see it included in the game.

Zombie mode is still struggling with the issue of players leaving the game and rejoining, causing balancing issues. If they fix that I would love to see it included, it's quite a fun and interesting gamemode. If they ARE going to be included I don't know and I don't want to bother quin during the feature freeze, he suffers from withdrawals if he can't improve his game so yeah... But well, seeing how much quin likes to add stuff, perhaps we will see it later on the SVN if those modes are properly balanced?
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Postby greaserpirate » 21 Jan 2012, 03:49

I've been working on this update for a while, and I think it's time for it to be relesaed. I haven't been able to host a server for a while due to router difficulties, but I should be back soon.

First some, good news: I've compiled these modes for Ubuntu and cross-compiled for Windows, so if you have Ubuntu or Windows you don't need to compile, just back up your "bin" folder, move the included folder to your main Red Eclipse folder, rename it "bin", and start the game.

UPDATES:
-Defensive A.I.: controlled by the "aidefensive" variable. "Aidefensive 1" means bots will not attack you until you attack them first, and then they will regard you as an enemy until you die(from any cause). "Aidefensive 2" is the same, but if there are no humans around and nobody has any enemies they will start fights amongst themselves. This may be useful outside of Killer Mode, too.
-"Aiattack <name> ": Bots will (temporarily) regard the player with the name you enter as an enemy. If the player is a bot you can say, for example, "aiattack bot 3", but you do not have to put in the number if the player is a human. Might not work if you type your own name, but you can easily get all the bots to attack you by shooting them first. Not case-sensitive.
-"Aipacify": Defensive Bots will forgive all their enemies. They can still start fights if Aidefensive is 2 and no humans are present, however.

-Survivor mode: Type "Killersurvivor 1" to activate and "killersurvivor 0" to deactivate. Selecting the "Survivor" mutator on your mutator menu is not actually necessary.

How Survivor Mode works: After a citizen dies, a message will announce their death and state the number of remaining citizens. If that number goes to zero, the Killer wins and is rewarded. The size of reward depends on the var "killersuccessbonus" (Default: 0). However, if the Killer is fragged and there are citizens remaining, the match will reset and points will be given just like in normal Killer Mode. If you choose to play without the "Survivor" mutator, instead of players having to wait for the next round, there is a "ticket system" like in Battlefield, where all players can respawn but the number of available citizens will drop by 1 each time a citizen dies. Extra citizens tickets can be added by the variable "killerextracitizens". However, if you are playing with the "Survivor" mutator selected, DON'T set this to anything but zero or the match mightnever end if the Killer frags all the citizens but there are still some remaining on the ticket counter.

-"Resetround" command: Instantly kills all the players, with no point penalties or losses. This is very useful for Survivor matches where the only remaining players are bots, especially if they can't find the waypoints and are just standing there for all eternity. Fortunately, it can only be used by the admin, so abuse of this command shouldn't be too much of a problem. Still, use with responsibility.


Download links:
Source code: http://www.mediafire.com/?nu9lhss49kzkbdw
Windows Binaries: http://www.mediafire.com/?wgaioh1j3wz0cc5
Ubuntu Binaries: http://www.mediafire.com/?355tq18t74zg04n

Feedback is greatly appreciated since I've only been able to test this offline with bots, and I haven't tried the Windows binaries yet.

Have fun, and I hope to see you ingame soon.

By the way, does anyone know how to cross-compile for macs?

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Postby TheLastProject » 21 Jan 2012, 18:31

I can't seem to get it to start, not even with /killeractivated 1
There are no messages about being the killer or not and every kill gives me points. Besides that, I just respawn even with /killersurvivor 1
To add to that, whenever I change map after having /killeractivated and /aidefensive set to 1 I crash with "Fatal signal 8 (Floating-point Exception)

Strange issues =/
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Postby greaserpirate » 22 Jan 2012, 00:20

TheLastProject {l Wrote}:I can't seem to get it to start, not even with /killeractivated 1
There are no messages about being the killer or not and every kill gives me points. Besides that, I just respawn even with /killersurvivor 1
To add to that, whenever I change map after having /killeractivated and /aidefensive set to 1 I crash with "Fatal signal 8 (Floating-point Exception)

Strange issues =/


Strange indeed :( .., which OS are you using?

(By the way, you still respawn with "/killersurvivor 1", there's just a limited number of total citizen respawns. You have to select the "survivor" mutator to make people stay dead, sorry if I was too vague about that.)

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Postby TheLastProject » 22 Jan 2012, 13:28

greaserpirate {l Wrote}:
TheLastProject {l Wrote}:I can't seem to get it to start, not even with /killeractivated 1
There are no messages about being the killer or not and every kill gives me points. Besides that, I just respawn even with /killersurvivor 1
To add to that, whenever I change map after having /killeractivated and /aidefensive set to 1 I crash with "Fatal signal 8 (Floating-point Exception)

Strange issues =/


Strange indeed :( .., which OS are you using?

(By the way, you still respawn with "/killersurvivor 1", there's just a limited number of total citizen respawns. You have to select the "survivor" mutator to make people stay dead, sorry if I was too vague about that.)

I was running on Windows 7 because my Arch Linux broke after an update. At the moment I can't test anything at all though because my system spreads a smell of something burning so I'll have to take it to the PC store on tuesday and can only help test again after I've got it back. I was running on the latest SVN by the way, maybe that could be the issue?
Hats, Afros, wings and raptor feet. This game is showing progress indeed.
TheLastProject
 
Posts: 432
Joined: 06 Nov 2011, 17:04

Re: Killer Mode- Survivor, and Defensive Bots(Jan 20)

Postby greaserpirate » 23 Jan 2012, 01:20

TheLastProject {l Wrote}: I was running on the latest SVN by the way, maybe that could be the issue?


That's most likely the problem. It might also be because the windows binaries don't work, (I haven't been able to test them) but it's less likely since the kind of error I'd expect would be not running at all, not having some tiny little thing broken.

I hope your computers get better. Some days technology is just out to get us...

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Re: Killer Mode- Finally fixed the bugs!

Postby greaserpirate » 22 Aug 2012, 01:34

Wow, I haven't updated this in ages.

As some of you know, the Killer Mode server I run had a problem when a player was in spectator mode: the text wouldn't show up and there would be no Killer. I finally found out how to fix this problem, so I decided to post the finished version of the mod here to replace the ancient one from January. I'm not sure how much I've made changes to the gamemode, but I definitely haven't been updating the version on this forum enough to keep up with it.

Anyway, here are the files for standard 1.2 RE. Have fun, and I'll see you on my server!
Attachments
src.zip
source files: for those who can compile, and for those who want to mess around with the code.
(78.44 KiB) Downloaded 335 times
winbin.zip
for Windows users.
(1.94 MiB) Downloaded 338 times
ubuntubin.zip
Ubuntu binaries- your mileage may vary depending on your version. Backing up your original files is strongly recommended.
(1.91 MiB) Downloaded 352 times

Friendship is Magic Voice Chat Mod
(Map) Trespass
(Map) Suspended
Find out more about >DOOM< here: www.redoomclan.tk
User avatar
greaserpirate
 
Posts: 350
Joined: 22 Jun 2011, 18:23

Who is online

Users browsing this forum: No registered users and 0 guests