Data Realms Fan Forums
http://45.55.195.193/

BW Tournament Script - Need help!
http://45.55.195.193/viewtopic.php?f=73&t=14809
Page 1 of 2

Author:  numgun [ Wed May 20, 2009 12:27 pm ]
Post subject:  BW Tournament Script - Need help!

Ok, now that the mod is released, its time to move to phase 2:

THE TOURNAMENT SCRIPT


That's what I'll call it since the goal is to make something little more than just ordinary deathmatch.

No doubt that a capture the flag, survival and horde hunter gamemodes would be eventually wanted at some point so it will be better to create a universal system for all them from the start.

Now all I can do with Lua is copy paste random bits of code and experiment with functions to create interesting bombs guns and actor functions. Something as complex as this is way beyond my skill.
And I can plan and write what the script would be like while keeping in mind possible limitations* of CC.

*limitations that involve non-lua modding, there may be some aspects
that Lua can achieve where normal modding would usually stop.


Heres the point:
I need a skilled Lua coder to make a tournament script that would
add special gamemodes to Cortex Command using scripts. How would they be
enabled in a game has several possible solutions:


Quote:
-Script binded to scene itself.
-A special buyable item that you place into the scene during bunker
building and then hit run and the script will then activate from it.
This solution will enable the gamemodes on virtually any skirmish map.
-Maps will have said item already integrated to them




So far, heres what the plan looks like:

Code:
===============================
//
//   Tournament script plan
//
//   Purpose of the script(s)
//   is to add a competive action
//   packed gamemodes like deathmatch
//   and such to Cortex Command.
//
===============================


---------
//Basic//
---------

=Round Time Limit.
.when time is out, end game


=Kill Limit.
.when a player reaches goal, end game


=Point Limit.
.When enough flag captures made, end game
.When enough monsters have been killed, end game


=Life Limit.
.if no more lives, player is out of the game and set to spectator mode


=Spawning.
.areas for spawning places (Underground maps. Area name is "SpawnZone")
.if no areas (usually areas are in underground maps only), spawn by dropping in a strike pod from above at any horizontal point accross the map
.player is a normal merc, not hero variant. (If the player has to be a brain due to scripting limitation, it can be a hero type, but usually use the normal merc. Hero has a revolver always pre-equipped you see.)
.give spawning player 2 random weapons.
-
+one from a list of minor sidearms and melee.
+second from a list from all other weapons.
-


=Warm up(?)
.before the match will start, user must press any key to begin.
.before starting the match, give a 10 second delay to announce a deathmatch is about to begin.
-
+for 7 first seconds, show text "Ballistic Weapons Tournament" and under or next to, show text "[gamemode]" (where gamemode is either: deathmatch, melee match, survival, horde hunter)
+during the 10 seconds also show text: "Get ready:...[seconds left]" and as the last seconds count down, show them in the [seconds left].
+once warm up is over, begin game.
-


=2-4-player deathmatch.
.every player is independent and has their own scores
.said players can be set to be AI controlled to hunt other nearest actors if no human player is present to use it.


=Bots.
.Human players and bot players are different
-
+Maximum 4 humans can play at once. Bots do not take their slots.
+Humans are belong to "human players" group and this group is belong to "players".
+Bots can be any number. You could say they are additional players rather than actual players.
+Bots are belong to "bot players" group and this group is belong to "players". And "players" give points to killers when killed.
+Bot's goal is: Check for nearest actor from own position and hunt him down using "brain hunt AI" style. Aka move to nearest player and kill him.
-


=Killing.
.give point to killer, do note that a point is awarded if player or bot is killed. Other actors like the ones in "random events" do not count as kills in death match.
.kills in horde hunter game mode(see special for more) : Kill player = -100 points. Kill horde enemy/or any other = +10 points.
.show name of killed player (as in "Player 2 got wasted") at top of screen. 5 lines max at once.
.if possible to above, have multiple random kill messages to replace the last word like: "Player 2 got fragged, nuked, pwned, slayed, murdered ect. ect."



-----------
//Special//
-----------


=Announcer.
.headshot - when a Merc Head X attachable is gibbed, play "headshot" sound.
.killing spree - keeps track of a players kill count and at every 5 kills, without dying, play "killing spree" sound.
.multiple kills - keep track of players recent kills and if player manages to kill 2 or more targets within 5 seconds from last kill, play "multikill" sound.
.time remaining - when 5,3,2,1 minutes remain, play a "X minute(s) remain" sound.
.end game announcement - see "end game" section below


=Random events
-A random event occurs with a 20% chance each 5 or 10 minutes in a match. If they do happen, select a random one from the list of events and activate it. Can be disabled for serious skill competition matches if necesary.
.airstrike (Check if map not sealed by terrain from the top, and then one-by-one spawn a falling dropship bomb every 100 pixels accross the horizontal lenght of the map, starting from 0 point of the map so it looks like a bombing run.)
.radiation health decreasing (certain duration. 1-5mins? -1hp/s)
.tradestar police attack (coalition troops with guns and hunt nearest players)
.displacement bomb (10 teleport bombs are spawned and gibbed instantly.)
.lightweight (all actors will have their mass reduced 4x for a duration of 3-5 minutes)
.pasifism! (every weapon on ground and inventories are instantly deleted, players forced to find new guns or headbutt opponents.)
.jump! (all players will be launched once upwards at speed 20)



=Game modes.
-Have seperate files for each game mode. The user can select the script he wants either ingame or outgame. Whichever is possible.

.death match (normal, kill other players to gain score/reach either kill or time limit)

.team dm (TEAM GAME, like deathmatch, except with teams and kills are shared. Kill limit usually higher than solo deathmatch.)

.melee match (deathmatch but with only knife, saw and katana are available when you spawn, ignore/remove/disable weapon and bomb station modules. They are MOSR so it should be easy.)

.survival mode (death match, but with a lives limit. once no lives, dont spawn player and announce he's out. Set play to spectate once he's gone.)

.capture the flag (TEAM GAME. goal is to capture the enemy flag and bring it to your own flag.)
-
+Upon touching/getting close to a flag object, make it stick behind the actor and stay there. If player is killed, the flag is released and dropped.
+If flag taken from opposing team by a player/bot, show a message: "[Team color] flag taken!"
+If enemy flag brought to own flag, increase score by 1 and show a message: "[Team color] scores!"
+If friendly flag brough back to base, show message: "[Team color] flag returned!"
+If flag is destroyed by accident (goes out of map or is left on the ground untouched for 1 minute), move it back to its base.
+By a certain key combo or binded button, throw flag forward at 15 speed.

+! Alternative: If dropped friendly flag is touched, flag will return immediatly to base.
-

.horde hunter (players fight against constant armies of skirmish activity units. Time or kill limit apply here. Wont work on underground maps too well.)
-
+If killing a player, reduce 100 points from killer.
+If horde enemy killed, add 10 points to killer.
+Players have lives. (Optional and can be toggle'd on/off by the user through the script file. This feature is of great use when there is only one player. It is challenging to fight horder of enemies while staying alive.)
-



------------
//End game//
------------

=Draw game
.time limit hits the end and no one has a higher score
.gib everyone just for kicks ;)


=Announce winner.
.play announcer sound "Game end/Winner/Round over"
.show winner's name("Player 1" for example) and his score.
.after a delay of 6 seconds show the list of player with their scores sorted from highest at top.


=Show list of players and their scores.
.show the list after a delay of 6 seconds after the winner has been announced and showed.
.sort the list of player from highest with the highest score and down to the lowest score.


=Change music to CC default "Win theme"
(Might get a some song for this, you can suggest one too!)




-----------------------------
-------------EOF-------------
-----------------------------



Sidenote:

Read it first quickly from top to bottom and then read again with more care.
In any case, this is the initial plan and some parts maybe not possible or maybe not
fun or wrong, so suggestions/changes are very welcome to it.

The point is to make a badass tournament script for single and multiplayer games.

Attachments:
File comment: Current Script plan in .txt form
TournamentScriptPlan.txt [7.28 KiB]
Downloaded 306 times

Author:  Roon3 [ Wed May 20, 2009 12:37 pm ]
Post subject:  Re: BW Tournament Script - Need help!

Hmm, I think I can do something out of all of this. I'll try the time limit part, brb.

Edit: If I remember correctly, KloneSoccer had time limit script, lets see if I still have it.

Edit 2:Taken directly from Tim's script:
Code:
--Stick this in the "Create" part
    timelimit = true
    timeleft = ###
--And this in the update part
    if(timelimit and timeleft <= 0) then
        FrameMan:ClearScreenText(0)
        FrameMan:ClearScreenText(1)
        ActivityMan:EndActivity()
        end
    end

-- Someone else will do the the whole scoring and stuff
-- Hopefully I got the spaces and code right...


Edit 3: Just noticed you had the announcer sounds in there, I'll add them later.
I also forgot to make (copy) an update script...

Author:  robolee [ Wed May 20, 2009 5:18 pm ]
Post subject:  Re: BW Tournament Script - Need help!

I'll have a go at making a script

Author:  Daman [ Wed May 20, 2009 5:24 pm ]
Post subject:  Re: BW Tournament Script - Need help!

Capture the flag is something I've been wanting to do for a long while. It wouldn't be a very complicated script, but there are some things I'd like before making it. One of the major things is the problem with DrawText not being able to be given a bmp to draw to, thus disabling our ability to draw to the screen.

By the way emitters can have infinite lifetime right? Those would probably be good as a flag.

Author:  numgun [ Wed May 20, 2009 7:17 pm ]
Post subject:  Re: BW Tournament Script - Need help!

Daman wrote:
Capture the flag is something I've been wanting to do for a long while. It wouldn't be a very complicated script, but there are some things I'd like before making it. One of the major things is the problem with DrawText not being able to be given a bmp to draw to, thus disabling our ability to draw to the screen.

By the way emitters can have infinite lifetime right? Those would probably be good as a flag.


Yeah emitters can stay forever, I just hope they wont become terrain during the match. If they are pinned, they usually dont.

As for the DrawText thing, can you explain where will you use that?
If its something very useful, I'll be happy to tell Data about it and put a ticket for it.

Author:  piipu [ Wed May 20, 2009 7:35 pm ]
Post subject:  Re: BW Tournament Script - Need help!

I can propably contribute bits and pieces, but I think I'm too lazy to do stuff this big.

Author:  Daman [ Wed May 20, 2009 8:27 pm ]
Post subject:  Re: BW Tournament Script - Need help!

numgun wrote:
As for the DrawText thing, can you explain where will you use that?
If its something very useful, I'll be happy to tell Data about it and put a ticket for it.


You don't need to worry about anything lua. I just tell TLB over IRC any time I find anything broken in it.

Author:  gtaiiilc [ Wed May 20, 2009 11:55 pm ]
Post subject:  Re: BW Tournament Script - Need help!

I can't code but you said to give ideas so here is my 2 cents.

1. for a CTF mode since this is a mod about mercs why would they be after flags so maybe stealing components for respawners so after you steal 3(or more) parts you win because the enemy can no longer respawn so they retreat( kinda like how they use respawners in UT3's story)

1 1/2 . for CTF instead of taking the object back to a point in your base you load it in to a rocket like on zombie caves :D

2.for a king of the hill mode it could be hacking a termenal to steal data or actvate defences(after a while in the hill turrets turn on)?

3. if there are going to be teams there needs to be more than just green mercs but since I was bored and offline today I recolored them blue and the droppod green and added them to the exsiting ini's( YAY less jumbled up mess!) I will PM them to you.

Author:  Geti [ Thu May 21, 2009 2:44 am ]
Post subject:  Re: BW Tournament Script - Need help!

CTF is one thing i've wanted for ages too.. could you use the objective print things to show who has the flag? it would be cooler if it were a device rather than an AEmitter, and to prevent it becoming terrain make it gib other weapons if the game is coming up to its maxunhelddevices and just have it recursively gib itself.. unless there's another AEmitter property you're thinking of using for this..
what would you want to draw to the screen daman?

Author:  mail2345 [ Thu May 21, 2009 6:33 am ]
Post subject:  Re: BW Tournament Script - Need help!

numgun wrote:
-A special buyable item that you place into the scene during bunker
building and then hit run and the script will then activate from it.
This solution will enable the gamemodes on virtually any skirmish map.


Would be much easier if function replacement worked.

I'm willing to help in bits and pieces.

Author:  CrazyMLC [ Thu May 21, 2009 6:39 am ]
Post subject:  Re: BW Tournament Script - Need help!

A flag should probably be a weapon, and the flag forces you to use it, so you can't use a gun when you have the flag.

Author:  mail2345 [ Thu May 21, 2009 6:54 am ]
Post subject:  Re: BW Tournament Script - Need help!

crazyMLC wrote:
the flag forces you to use it


No offical way, but hackishly you could have it check the controller alot, and if it is one of the weapon states, force the actor to do nothing.

Author:  CrazyMLC [ Thu May 21, 2009 7:47 am ]
Post subject:  Re: BW Tournament Script - Need help!

Or force the actor to drop everything in order to obtain it.
There are variables in the code to do that.

Author:  Gran PC [ Thu May 21, 2009 7:11 pm ]
Post subject:  Re: BW Tournament Script - Need help!

I doubt it's possible to know if there was a headshot or not in Lua. So far, I think the Lua implementation isn't complete at all. Sure, you might have all of the engine functions in there, but still, it's not that great. In fact, I think people will keep on asking for more and more and more. Just look at Garry's Mod, 2 years after the release, Garry's adding more functions and hooks. Although a lot of the stuff there is possible.
I will try to make the bot players.

Author:  numgun [ Thu May 21, 2009 7:22 pm ]
Post subject:  Re: BW Tournament Script - Need help!

I see.

I do agree that Lua isnt completely exposed yet and Data is still working on making it work properly as well as many other things like selecting activities that might come in handy.

I guess its best to halt this project and wait until we have the needed functions for it. I guess all we can do now is some hacky way of having a deathmatch gamemode or bots, but proper implementation would require some further functions from the game itself.

Oh well, I guess I can or someone else pick this up after I get back from the army. :P

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/