Introducing Base Raiders - A gamemode based on territory control and raiding
4 replies, posted
I made base raiders over the past few weeks.
There are 4 territories for control on the map. All players can form gangs and struggle to control them all.
Raid other bases with your friends and form alliances to conquer new ground.
[img]http://i.imgur.com/MbuCcJS.jpg[/img]
The power plant governs total power available in the city.
Players can only use power sockets to power items if there is available power.
The power plant output can be boosted +50% by providing wood to the furnace inside.
[img]http://i.imgur.com/Ks8O3Ft.jpg[/img]
Items are crafted from raw materials harvested from the map.
A property system allows you to stake your claim safely so long as lock picks are nowhere to be found.
Props can be destroyed and are used to defend your base.
Grow plants to sell on the market and get rich
[img]http://i.imgur.com/ISyLMXd.jpg[/img]
This was built from scratch with tmysql integration as well
[url="steam://connect/192.223.24.172:27015/"][img]http://cache.www.gametracker.com/server_info/192.223.24.172:27015/b_560_95_1.png[/img][/url]
Required Addons
Darkland Global Content - [url]https://bitbucket.org/hegrec/darkland-addon[/url] -This has the database connection stuff, it's all just code built to support the gamemode. It also includes an achievement system and a custom chatbox. You can disable any of these with a little bit of lua configuration.
Tmysql - [url]https://code.google.com/p/blackawps-glua-modules/source/browse/#hg%2Fgm_tmysql4_boost%2FRelease[/url] - get the appropriate dll for your platform. tmysql is more efficient than MySQLoo so that's why I chose it.
the dll goes in garrysmod/lua/bin
IF YOU USE WINDOWS BE SURE TO RENAME THE WINDOWS DLL FROM gm_tmysql4_win32.dll TO gmsv_tmysql4_win32.dll I may be mistaken but I believe it won't load unless you do this.
GIT Repo
[url]https://bitbucket.org/hegrec/baseraiders[/url]
MySQL Schema
[code]
CREATE TABLE `da_misc` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`SteamID` varchar(30) NOT NULL,
`Membership` tinyint(4) NOT NULL DEFAULT '0',
`PlayerName` varchar(255) NOT NULL,
`LastLogin` int(11) NOT NULL,
`LastServer` tinyint(4) NOT NULL,
`Online` tinyint(4) NOT NULL,
`AchievementVars` text NOT NULL,
PRIMARY KEY (`ID`)
)
CREATE TABLE `achievements_earned` (
`ID` int(11) NOT NULL,
`SteamID` varchar(30) NOT NULL,
`AchievementName` varchar(255) NOT NULL,
UNIQUE KEY `SteamID` (`SteamID`,`AchievementName`)
)
CREATE TABLE `achievement_list` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`GameID` int(11) NOT NULL,
`IconURL` varchar(255) NOT NULL,
`Name` varchar(255) NOT NULL,
`Description` text NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `Name` (`Name`)
)
CREATE TABLE `bans` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`SteamID` varchar(30) NOT NULL,
`PlayerName` varchar(255) NOT NULL,
`ExpireTime` int(11) NOT NULL,
`Message` text NOT NULL,
`AdminSteamID` varchar(30) NOT NULL,
PRIMARY KEY (`ID`)
)
CREATE TABLE `history` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`Action` varchar(100) NOT NULL,
`SteamID` varchar(30) NOT NULL,
`Reason` text NOT NULL,
`Time` int(11) NOT NULL,
`Admin` varchar(30) NOT NULL,
PRIMARY KEY (`ID`)
)
CREATE TABLE `rp_gangdata` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`OwnerSteamID` varchar(30) NOT NULL,
`GangBank` text NOT NULL,
`Name` varchar(40) NOT NULL,
`Experience` int(11) DEFAULT '0',
PRIMARY KEY (`ID`),
UNIQUE KEY `OwnerSteamID` (`OwnerSteamID`),
UNIQUE KEY `Name` (`Name`)
)
CREATE TABLE `rp_playerdata` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`SteamID` varchar(30) NOT NULL,
`Money` int(11) NOT NULL,
`Experience` int(11) NOT NULL,
`CurrentHat` varchar(255) NOT NULL DEFAULT '',
`CurrentSkin` varchar(255) NOT NULL DEFAULT '',
`BankAccount` text NOT NULL,
`Vehicle` text NOT NULL,
`Inventory` text NOT NULL,
`Skills` text NOT NULL,
`Levels` text NOT NULL,
`Clothing` text NOT NULL,
`Model` varchar(255) NOT NULL DEFAULT '',
`GangID` int(11) NOT NULL DEFAULT '0',
`Noteriety` int(11) NOT NULL DEFAULT '0',
`Perks` text,
PRIMARY KEY (`ID`)
)
[/code]
Installation Step by Step
-Download and install tmysql
-install the darkland global content addon
-clone the GIT repo to your gamemodes folder
-Setup MySQL tables
I remember seeing something kind of like this, There was this one building that had a gas station and it produced steel and you had gangs and so you could store the steel to make something wasn't it? Plus you would make power but you had to put logs in the fire.
[editline]5th April 2014[/editline]
I remember seeing something kind of like this, There was this one building that had a gas station and it produced steel and you had gangs and so you could store the steel to make something wasn't it? Plus you would make power but you had to put logs in the fire. Use to be an awesome community server but went down :(
[IMG]http://s4.postimg.org/i7bm5tqm3/image.png[/IMG]
[IMG]http://s30.postimg.org/w45j8dx27/image.png[/IMG]
[lua]
local pnl = self:GetParent():GetParent():GetParent() --This should return the panel not to extend past. Depends on which paint function you put this in, I used DModelPanel's paint function.
local x2, y2 = pnl:LocalToScreen(0, 0)
local w2, h2 = pnl:GetSize()
render.SetScissorRect( x2, y2, x2 + w2, y2 + h2, true )
oldpaint(self)
render.SetScissorRect( 0, 0, 0, 0, false )
[/lua]
[editline]5th April 2014[/editline]
[IMG]http://s28.postimg.org/8unmbu231/image.png[/IMG]
[QUOTE=find me;44455727][IMG]http://s4.postimg.org/i7bm5tqm3/image.png[/IMG]
[IMG]http://s30.postimg.org/w45j8dx27/image.png[/IMG]
[lua]
local pnl = self:GetParent():GetParent():GetParent() --This should return the panel not to extend past. Depends on which paint function you put this in, I used DModelPanel's paint function.
local x2, y2 = pnl:LocalToScreen(0, 0)
local w2, h2 = pnl:GetSize()
render.SetScissorRect( x2, y2, x2 + w2, y2 + h2, true )
oldpaint(self)
render.SetScissorRect( 0, 0, 0, 0, false )
[/lua]
[editline]5th April 2014[/editline]
[IMG]http://s28.postimg.org/8unmbu231/image.png[/IMG][/QUOTE]
terrific
Looks like a pretty good idea. It could use some polishing up if you were to make it into a full on official looking gamemode but the mechanics seem to be there. I can't say I'll be trying it but good job.
P.s. Did you make the map for this?
Sorry, you need to Log In to post a reply to this thread.