• Shadow - an RP mod that needs you!
    178 replies, posted
[B][highlight]THE PROJECT IS DEAD, STOP ASKING STUPID QUESTIONS ABOUT IT :D[/highlight][/B] [B]Please read the post before downloading![/B] [img]http://img337.imageshack.us/img337/4949/shadowlogonontexture.png[/img] [release] [B][U]tl;dr[/U][/B] Scroll down to find download instructions. It's in the [U]second[/U] gray box. [B][U]What?[/U][/B] Shadow is a RP gamemode. It's currently under somewhat slow development, but has some advanced functionality completed, such as a hot-swappable module system. [quote]Much of its content consists of the custom interfaces that are used for chat commands, blocks (which are modules) and "classes".(whatever you like to call them)[/quote] [B][U]Seriously, what?[/U][/B] It's a RP gamemode. It's not complete, but it works. It is customizable. [B][U]Oh ok.[/U][/B] This isn't even a question, why did I include it here?!? [B][U]How do I install it?[/U][/B] [B][U]Where can I get it?[/U][/B] Scroll down. The instructions to install are at the bottom of this post. [B][U]Who created it?[/U][/B] Me. And raBBish. And the third guy, maddsci. [B]IF YOU WANT TO HELP CODE SHADOW, PM ME OR POST IN THE THREAD![/B] [quote][B][U]Why does it need us?[/U][/B] First of all, I want to say that this is an incomplete gamemode. Even though it's under active development, all the planned features won't be completely working any time soon. To lead the development in the right direction, I would request that you download the gamemode and play around, alone or with friends, and tell what should be fixed and what works as-is. If you like it, feel free to use it on your servers. There's only one thing I tell you not to do: Don't make any permanent edits of your own in the core code. If your edits fix a bug, tell us about the bug and send your fix, so we can add it to the SVN. If your edits add functionality to the core, (Such as item handling methods) PM it to me or raBBish, so we can look at it and possibly even add it to the gamemode. And finally, if you have an idea - any idea at all - regarding the development of this gamemode - just tell![/quote] [B][U]Lol DarkRP[/U][/B] Look at the code, dumbass :) [B][U]We already have DarkRP/GmodRP/Cakescript/[I]Foo[/I]RP/[I]Foo[/I]Script, why would we need this[/U][/B] If you prefer your gamemode to this, that's okay. Shadow was originally planned to be quite extendable with the use of modules, so maybe if you tried it, you could modify it to work as you want! [quote] [B][U]Why the heck would I get it?[/U][/B] Because we have worked hard on the gamemode so that somebody would use it. It also [U]should be easily modifiable[/U] using our custom interfaces and the hot-swappable block (module) system. So, if you want an alternative for DarkRP, here's one. It has even been proven to work with [U]all blocks removed[/U]. The standard block set currently contains all the necessary chat commands and the inventory and item system, though... Lots of the functionality is still hard-coded. If you want us to take something from the core and put it in a block, or expose some kind of an interface for it, so that it'll be modifiable - just tell us. I'll feel happy to do something for others :)[/quote] [B][U]But it sucks ass![/U][/B] [B][U]Lol u cant cdoe[/U][/B] [B][U]Lol I liek mukipz[/U][/B] [B][U][I]Whining generally[/I][/U][/B] That's nice to know. Now tell me what's the problem so that I can fix it. [B][U]My server needs a custom RP script, may I use this as a base?[/U][/B] Sure thing. Just remember that you have to merge the updates by hand if you touch much of the core... [B][U]Can you code a custom RP script for me?[/U][/B] Of course. But don't expect me to complete it. [B][U]I have more questions...[/U][/B] Ask! Ask, ask, ask, ask, [B]ASK![/B] [/release] [release] [B]Finally, the download guide![/B] To install shadow, first you have to choose which version you want. Currently available versions: [B] [U]Under development:[/U] - Trunk, or current "non-experimental development" version: [url]http://subversion.assembla.com/svn/shadow/trunk[/url] - Photon, the cakescript plagiarising gamemode (Highly experimental, DO NOT USE ON A DEDICATED SERVER!): [url]http://subversion.assembla.com/svn/shadow/branches/photon[/url] [U]Tagged (Snapshots of stable-ish code, no development)[/U] - Version 1.2 tagged (Should be stable, but isn't developed any more and likely won't work, either): [url]http://subversion.assembla.com/svn/shadow/tags/1.2[/url] [/B] You selected a version? Good. Now make sure you know how to use SVN. You don't know? Refer to [url=http://www.facepunch.com/showthread.php?t=688324]this guide ( http://www.facepunch.com/showthread.php?t=688324 )[/url] Now, let's see. We know how to use SVN, have a SVN client and all that shit. Now checkout the URL of the version you selected in the first step. The above guide teaches you how, if you don't know or can't remember! [B]Don't export/checkout to the addons-folder! This is a a gamemode![/B] You checked it out? Splendid, you are ready to go! Just check the file gamemode/convars.lua. It contains all the convars you can use to configure your installation. (Note: [B]This information does not apply to Photon.[/B]) [B]OR[/B] If you have TortoiseSVN installed, just click the below button to get the latest trunk version: [url=tsvn:http://subversion.assembla.com/svn/shadow/trunk][highlight]Direct SVN checkout link (TortoiseSVN only)[/highlight] [img]http://img39.imageshack.us/img39/686/directsvnicon.png[/img][/url] [/release]
oooooooh, i smell something awesome!
Thanks. Would the people who disagreed with him also post here and tell me why my gamemode is not awesome, but actually fail? [editline]08:57PM[/editline] Rev 9 already, contains some minor bugfixes and fixes stamina system. [code]Revision 9 already, woot. [Fixed] Stamina system now actually works, running for long slows you down and you *can* waste your stamina running against a wall. (Stamina loss rate configurable using rp_staminalossrate, default 0.05 ) Checks if using stamina system. Stamina bar on the HUD works now [Changed] The messages when blocking SENT, SWEP or NPC spawning. :P If you don't have a radio and try to broadcast, the message is clearer now [Added] Block debug command shadow_blockdebug Added chatcommand "list" which lists every player and their RP names in chat A comment in blacklist.lua, feel free to find it :D[/code]
What? Run against a wall and you loose Stamina? Bad Idea.
[QUOTE=commander204;17534250]What? Run against a wall and you loose Stamina? Bad Idea.[/QUOTE] Then just disable it. Here's what I'm interested in adding to the gamemode (probably as blocks, to keep it modular) in addition to working on the core: Skills (Exp, Intelligence, Strength, etc...) Weapons Custom classes w/ custom models Shop NPC's Enemy NPC's w/ loot or rewards (money and/or exp) Player groups/factions Random item pick-ups Containers (chests, etc.) Dynamic player models depending on what they are wearing (For example: a player wearing a helmet would have a helmet model on his head) RPG-style equipment system More may follow... this is what I can think of right now. My use of the script extends beyond just a Roleplay script and into RPG territory with RP roots.
[QUOTE=maddsci2k;17537305]Brilliant idea.[/QUOTE] Do it. NOW.
[QUOTE=maddsci2k;17537305]Skills (Exp, Intelligence, Strength, etc...) [B]- If this is a RPG, then thats necessary.[/B] Weapons [B]- Obviously, weapons add a bit of fun.[/B] Custom classes w/ custom models [B]- Kind of unnecessary bloat.[/B] Shop NPC's [B]- Better than letting small children try and sell you shit.[/B] Enemy NPC's w/ loot or rewards (money and/or exp) [B]- Good idea.[/B] Player groups/factions [B]- Good idea, yet again, not too hard to implement either.[/B] Random item pick-ups [B]- Not so good idea, unless the items are scattered on the floor. And not just dropped into a inventory.[/B] Containers (chests, etc.) [B]- Yes[/B] Dynamic player models depending on what they are wearing (For example: a player wearing a helmet would have a helmet model on his head) [B]- Incredibly good idea to have a visual representation of shit.[/B] RPG-style equipment system [B]- If you mean slots for different things, and different attribute on a item, then yes.[/B][/QUOTE] Some replies to your ideas. Though I don't think combining a RPG and a RP will be a great idea, as you'll have idiots who only want to grind and who cannot actually RP, then uptight RP players who won't play due to the stats, it's either one of the other. With maybe a hint of the unused style.
[QUOTE=hexpunK;17537974]Some replies to your ideas. Though I don't think combining a RPG and a RP will be a great idea, as you'll have idiots who only want to grind and who cannot actually RP, then uptight RP players who won't play due to the stats, it's either one of the other. With maybe a hint of the unused style.[/QUOTE] These are my ideas for additions, which will be totally separate from the core of the gamemode. Edit: Current to-do list for the gamemode: [QUOTE=esalaka;17536446] [code]Property owning system Weapons and SENTs Jobs Multiple character system Item system Dropping money[/code] [/QUOTE] esalaka, do we have a list of LUA coders that are working on the project, and who is working on what, or are we just working on what we feel like doing? Edit again: Added following convars: rp_gravgun, rp_gravpunt, rp_propspawn rp_gravgun 0 or 1 disables or enables spawning with a gravity gun rp_gravpunt 0 or 1 disables or enables punt functionality of gravity gun rp_propspawn 0 or 1 disables or enable prop spawning These changes have not yet been committed to SVN.
[QUOTE=maddsci2k;17538118] Edit: Current to-do list for the gamemode: [/QUOTE] I said the most up-to-date, not current. These are all on real, physical paper, and I can scan them for you if oyu understand Finnish :D [QUOTE=maddsci2k;17538118] esalaka, do we have a list of LUA coders that are working on the project, and who is working on what, or are we just working on what we feel like doing? [/QUOTE] I wonder how you suddenly turned into a co-developer. We should have a list, indeed, but guess what; I've done it until now all by myself. Submit something useful and I'll give you SVN access. :) No fear about you removing or rolling back SVN revisions, since my working copy is almost definatedly different from the HEAD revision. [QUOTE=maddsci2k;17538118] Edit again: Added following convars: rp_gravgun, rp_gravpunt, rp_propspawn rp_gravgun 0 or 1 disables or enables spawning with a gravity gun rp_gravpunt 0 or 1 disables or enables punt functionality of gravity gun rp_propspawn 0 or 1 disables or enable prop spawning These changes have not yet been committed to SVN.[/QUOTE] Neat. Did you add those convars to the GM hooks in player.lua? If you did, feel free to commit them :D [editline]02:23PM[/editline] [QUOTE=commander204;17534250]What? Run against a wall and you loose Stamina? Bad Idea.[/QUOTE] I just realized you can fix this by getting player velocity and checking whether or not they are on the ground. :P [editline]02:38PM[/editline] [QUOTE=hexpunK;17537974] <quote box here> Skills (Exp, Intelligence, Strength, etc...) - [B]If this is a RPG, then thats necessary.[/B] - [U]No, this is not a RPG, but you can make it one if you really want :D[/U] Weapons - [B]Obviously, weapons add a bit of fun.[/B] - [U]Indeed[/U] Custom classes w/ custom models - [B]Kind of unnecessary bloat.[/B] - [U]Agree on the bloat[/U] Shop NPC's - [B]Better than letting small children try and sell you shit.[/B] - [U]Possibly. Just a bit of bloat imo[/U] Enemy NPC's w/ loot or rewards (money and/or exp) - [B]Good idea.[/B] - [U]If this is a RPG[/U] Player groups/factions - [B]Good idea, yet again, not too hard to implement either.[/B] - [U]Likely to get support in core[/U] Random item pick-ups - [B]Not so good idea, unless the items are scattered on the floor. And not just dropped into a inventory.[/B] - [U]If attached to the enemy NPC's in some way (eg. they protect them)[/U] Containers (chests, etc.) - [B]Yes[/B] - [U]YES![/U] Dynamic player models depending on what they are wearing (For example: a player wearing a helmet would have a helmet model on his head) - [B]Incredibly good idea to have a visual representation of shit.[/B] - [U]Do want.[/U] RPG-style equipment system - [B]If you mean slots for different things, and different attribute on a item, then yes.[/B] - [U]Would be good. The slots, I mean.[/U] Some replies to your ideas. Though I don't think combining a RPG and a RP will be a great idea, as you'll have idiots who only want to grind and who cannot actually RP, then uptight RP players who won't play due to the stats, it's either one of the other. With maybe a hint of the unused style.[/QUOTE] Some replies to his ideas and your replies of his ideas :D (If someone here is a moron, my comments are [U]underlined[/U] and hexpunK's are [B]bolded[/B]) [editline]03:54PM[/editline] Revision 10 [code] /|------|\ ||Rev 10|| \|------|/ OH MY GOD WHY WAS THAT HORRIBLE SHIT IN THERE? [Fixed] Stamina is now only depleted if you are on ground and running faster than 10 speed units. Whatever the speed units might be. [/code]
I apologize if I suprised you with my willingness to help out... I assumed by the gamemde "needing help" that part of it was coding help, and I was going to make a gamemode anyways. And again, I'll be keeping my custom modules separate from the core, so there's no need to worry about bloat or unnecessary features in the gamemode.
No, you didn't surprise me. You just wrote the message in manner that would've made me think you were a co-developer. Unless, of course, I was in the project :D I just set you up SVN rights, feel free to fiddle with the Core after you've registered in Assembla. I invited you via email already, didn't I?
Yes, I got your email. I'm working on a few more things before I commit. :D
Awsum. Remember to post the revision log in this topic so that I remember to fix the current rev number.
[code]/|------|\ ||Rev 11|| \|------|/ Mostly convars & functionality. Payday timer fixed. Added a few abstraction functions for handling money. [Fixed] Fixed payday timer. (Changed timer.Simple to timer.Create) [Added] ply:AddMoney and ply:RemoveMoney to give easy access without rewriting code ply:CanAfford( int ) returns TRUE if a player can afford a number to be taken out of his wallet rp_gravgun 0 or 1 disables or enables spawning with a gravity gun rp_gravpunt 0 or 1 disables or enables punt functionality of gravity gun rp_propspawn 0 or 1 disables or enable prop spawning rp_propprice <number> sets a price to spawn a prop, disable by using 0[/code] and... had to fix a small error in a chat notice when spawning props. [code]/|------|\ ||Rev 12|| \|------|/ Minor commit [Fixed] Fixed prop price being displayed incorrectly when you spawn a prop with rp_propprice enabled.[/code]
HOLY SHIT YOU FIXED THE PAYDAY! I LOVE YOU NOW! Seriously, I am praising somebody else for the work they have done on my project? I'll get back to work now, as soon as I have checkouted the new revision :)
Have you yet to have saving and loading of the money? If not I could do that. I just dont see it in your changelog ^^
[QUOTE=Jamie932;17551726]Have you yet to have saving and loading of the money? If not I could do that. I just dont see it in your changelog ^^[/QUOTE] Right now, there is no saving of money. Do you think you could make it so you have the option of saving to a file or a database? (MySQL would be great, I think, or SQLite would be nice for portability.)
Cant do sql or mysql. I can do easy text file stuff though.
I'll look into saving money after I've fixed the payday. It seems the approach maddsci2k used in his fix allows you to change payday delays only after mapchange. I'm investigating this currently. [editline]09:08PM[/editline] Oh yeah, it repeats infinitely.
Ah, I wasn't thinking about the payday delay needing to change before map change. You could just set the repeat to 1, and re-create the timer each time it's called.
iRzilla, this ain't a public SVN, but if you think you can contribute at least as much as me (Which is not really much), just give me your email and register on Assembla and I'll give you full SVN access. Also no direct sql, that crap has to be wrapped for easy swappability between flatfile / SQLite / MySQL
[QUOTE=esalaka;17553110]iRzilla, this ain't a public SVN, but if you think you can contribute at least as much as me (Which is not really much), just give me your email and register on Assembla and I'll give you full SVN access. Also no direct sql, that crap has to be wrapped for easy swappability between flatfile / SQLite / MySQL[/QUOTE] Absolutely. I'm 100% for data abstraction. Changing between data sources shouldn't require extra code, it should be a configuration variable that can be changed, and once it is, the script should use the correct data source.
Oh, also, the payday implementation should've called itself with the timer. That's what it was designed to do :D HOW DOES THIS FAIL? [lua] local meta = FindMetaTable( "Player" ) function meta:Payday() if !SHADOW.Payday:GetBool() then return end if !self or !ValidEntity( self ) or !self:IsPlayer() then return end if !self.pay then self.pay = 15 end self:AddMoney( self.pay ) Notify( self, string.format( "You have been paid %s%G%s", SHADOW.CurrencyPrefix:GetString(), self.pay, SHADOW.CurrencySuffix:GetString() ), 0, 15 ) -- ToDo: Clean this code up -- THE UNIQUEID IS STRICTLY NECESSARY. Otherwise payreseting one player payresets _everyone_ -- Also one repeat should do the thing print( self:UniqueID() .. "PayDayTimer", SHADOW.PayDayDelay:GetInt(), 1, self.Payday, self ) timer.Destroy( self:UniqueID() .. "PayDayTimer" ) timer.Create( self:UniqueID() .. "PayDayTimer", SHADOW.PayDayDelay:GetInt(), 1, self.Payday, self ) end [/lua] [editline]09:59PM[/editline] By failing I meant why does it only repeat twice :/ [editline]10:03PM[/editline] Wow.. I managed to overflow the umsg queue -.- [editline]10:06PM[/editline] Actually, make [U]this one[/U] work: [lua] local meta = FindMetaTable( "Player" ) function meta:Payday() if !self.pay then self.pay = 15 end if SHADOW.Payday:GetBool() then self:AddMoney( self.pay ) Notify( self, string.format( "You have been paid %s%G%s", SHADOW.CurrencyPrefix:GetString(), self.pay, SHADOW.CurrencySuffix:GetString() ), 0, 15 ) end -- ToDo: Clean this code up -- THE UNIQUEID IS STRICTLY NECESSARY. Otherwise payreseting one player payresets _everyone_ -- Also one repeat should do the thing -- This should repeat even upon failure! timer.Destroy( self:UniqueID() .. "PayDayTimer" ) timer.Create( self:UniqueID() .. "PayDayTimer", SHADOW.PayDayDelay:GetInt(), 1, self.Payday(), self ) end [/lua] And don't you dare say you aren't my personal army, because you are :D [editline]10:07PM[/editline] I gotta go sleep, PM me if you invent something revolutionary
[lua]local meta = FindMetaTable( "Player" ) function meta:Payday() if !SHADOW.Payday:GetBool() then return end if !self or !ValidEntity( self ) or !self:IsPlayer() then return end if self.payreset then self.payreset = false return end if !self.pay then self.pay = 15 end -- ToDo: Clean this code up timer.Create( self:UniqueID() .. "PayDayTimer", SHADOW.PayDayDelay:GetInt(), 0, function() timer.Adjust( self:UniqueID() .. "PayDayTimer", SHADOW.PayDayDelay:GetInt(), 0 ) -- Adjust the timer if the delay has changed. Notify( self, string.format( "You have been paid %s%G%s", SHADOW.CurrencyPrefix:GetString(), self.pay, SHADOW.CurrencySuffix:GetString() ), 0, 15 ) self:AddMoney( self.pay ) end ) end [/lua] Doesn't make your method work, but it does make it work. Every time a payday happens, it updates the delay value for the next payday. Probably just a temporary fix until we can find out how to handle this better. Ideally, I *would* like it to callback itself on a repeat of 1, and update the timer when rp_paydaydelay is updated.
I wrote the datastorage thing with flatfile, SQLite and MySQL support (via tmysql by Azuisleet) and PM'd it to esalaka, so no need to worry about that anymore :v: Now to do items and containers...
[QUOTE=raBBish;17559058]I wrote the datastorage thing with flatfile, SQLite and MySQL support (via tmysql by Azuisleet) and PM'd it to esalaka, so no need to worry about that anymore :v: Now to do items and containers...[/QUOTE] You are officially my favorite person.
Now commit those changes. [editline]02:48PM[/editline] Okay, I'm gonna have to go now. The crap better be commited in three hours ( 6PM GMT +2 DST )
Somehow this doesn't work for me, no hud, no commands, everything's like in sandbox gamemode. Reverting sv_defaultgamemode to sandbox - gamemode is not valid.
[code] /|------|\ ||Rev 13|| \|------|/ Data storage mostly. [Fixed] LoadBlocks being called too many times due to not checking for _BLOCKS_LOADED [Changed] Name and money system to use data storage [Added] data.SaveVar and data.LoadVar for storing variables ply:SaveVar and ply:LoadVar for storing player variables ply:ID for getting modified SteamID for flatfile data storing rp_storemethod 0/1/2 sets the storage method to be used (flat/SQLite/MySQL) rp_dbprefix <string> sets the table prefix for databases rp_storemoney 0 or 1 disables or enables money saving between sessions rp_storename 0 or 1 disables or enables RP name saving between sessions [/code] [editline]05:45PM[/editline] [code] /|------|\ ||Rev 14|| \|------|/ Whoops. [Fixed] Fixed data storage debug messages showing up Fixed no name displaying if rp_storename was 0 [/code]
[code]/|------|\ ||Rev 15|| \|------|/ Payday delay fix [Fixed] Fixed payday delay not changing until map change. New delay will be applied at the next scheduled payday.[/code] Edit: Small bug: When data storage is enabled, when a player joins a server, his money shows as 0 until his first payday, when it updates to the correct value. Tested on a listenserver with Flatfile & SQLite. Not tested with MySQL but I would assume it would be the same.
Sorry, you need to Log In to post a reply to this thread.