[img]http://imgkk.com/i/qvsd.png[/img]
[i]Thanks yakahughes for the sweet banner.[/i]
We can have 5-Second Pills... Hooray? :v:
Don't like pills? Never understood the point? Then go away, this isn't for you.
[b]What is this?[/b]
This is a weapons framework designed for making pill SWEPs. The Pill framework comes with a wide variety of features to accomodate all sorts of pills. Making your own pill can be as easy as changing variables.
[b]What does it do?[/b]
[list]
[*]Handles enabling and disabling of hooks for you.
[*]Comes with a character entity to replace your player model.
[*]Third-person CalcView is automatically configured for you with some simple value changes.
[*]Movement is also configurable. Stuff like speed, jump power, and step size are all things that you can change with a few key strokes.
[*]Several gamemode hooks are included as methods within the framework: CalcView, Move, CreateMove, PlayerFootstep, EntityTakeDamage, DoPlayerDeath, and HUDPaint.
[*]Uses an Action system to handle smooth transitions between states of movement, appearance, and interaction.
[*]Comes complete with a brief library of player methods.
[/list]
For a simple pill, all you really need to do is change some values and program the animations in.
[b]About Actions:[/b]
In this framework, an [b]Action[/b] is anything that changes appearance, movement, or the way the player interacts with the world.
When you make a pill, you need to make your own custom set of actions. Since pills and actions using this framework support a BaseClass, you can use actions from other pills as a base for your own actions.
[b]Things you can do with Actions:[/b]
[list]
[*]Modify Movement.
[*]Write special CalcView methods.
[*]Draw special HUD elements.
[*]Alter user commands with the CreateMove method.
[*]Use a Think method for frequent logic.
[*]Draw the character entity differently with the Render method.
[*]Use the Start and Finish methods for setting things up and cleaning up after yourself.
[/list]
All of which are on a per-action basis. They only get called when the particular action is active. Any of the methods you don't use will simply not run and the internal pill methods will take over.
The only two things you'll usually be doing is writing a ShouldPerform method, and a Render method to change animations.
[b]Media:[/b]
[img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-51-11-08.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-51-16-65.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-51-31-08.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-51-41-26.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-52-27-15.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-52-43-09.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-52-53-47.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-53-03-84.png[/img_thumb] [img_thumb]http://dl.dropbox.com/u/899872/hl2%202010-06-07%2016-53-21-14.png[/img_thumb]
[media]http://www.youtube.com/watch?v=3yiq72ITflw[/media] [media]http://www.youtube.com/watch?v=j9Mg1_gNyxY[/media]
[b]Download:[/b]
This is a Work In Progress, but once I have this in a clean, stable version, I will make an SVN. Once the SVN is up, people can start developing and keep requesting features for this to improve development.
I'm thinking I'll have the community try their hand at making a starter pill pack to go with the garrysmod.org release.
[b]Code:[/b]
Here are the base files for those who want to read them and make suggestions.
[b]Base Pill:[/b] [url]http://luabin.foszor.com/2522[/url]
[b]Base Actions:[/b] [url]http://luabin.foszor.com/2523[/url]
[b]Here's the part where I ask [i]you[/i] for help:[/b]
Look at the base pill and actions files. Tell me if there's anything I should add, change, or remove. This is for you guys, so I want things to be as comfortable to use as possible. Even stuff as simple as how the values are named. If one of those values is going to bother you relentlessly, tell me what to change it to.
[b]Basic things I need your opinion on:[/b]
[list]
[*]Are there any values, functions, or methods from the PILL or ACTION table that should be added, changed, or removed?
[*]Should I add the option to use the player model rather than a character entity?
[*]How should I handle physical movement? I have methods set up for PhysicsSimulate, but I'm not sure what to do with the player entity.
[*]Suggestions?
[/list]
I'm aiming to have this released in July, but my Summer term has started and that will significantly slow development down. If I end up dropping this, I'll just release the code and let someone else carry on the dream.
Thanks for reading! :smile:
Looks nice
Awesome, I found making pills pretty hard so this'll come in handy!
Nice Grea$emonkey!
Will try it tomorrow
You know, this made me wonder...what happens when we run out of bases and frameworks to make :frogbon:..Don't get me wrong all these types of things are awesome...but what happens when all it takes to code for this game is to use a framework or a pre-made base. :ohdear:
[QUOTE=DocDoomsday;22539685]You know, this made me wonder...what happens when we run out of bases and frameworks to make :frogbon:..Don't get me wrong all these types of things are awesome...but what happens when all it takes to code for this game is to use a framework or a pre-made base. :ohdear:[/QUOTE]
I should make a framework for making frameworks. :buddy:
Why is his post rated dumb? This is awesome :D
I need feedback on it before I can really continue development.
can I make a "Strider Pill" out of this?
[QUOTE=shadowboy303;22561602]can I make a "Strider Pill" out of this?[/QUOTE]
Yes
[editline]09:43PM[/editline]
And grea$emonkey if you want some feedback all i can say is:
:iia:
Make is possible to specify the model of the character entity in the pill script
[editline]09:47PM[/editline]
You should make RenderScreenspaceEffects hookable easly
I hate framework.
[QUOTE=Tobba;22561617]Yes
[editline]09:43PM[/editline]
And grea$emonkey if you want some feedback all i can say is:
:iia:
Make is possible to specify the model of the character entity in the pill script
[editline]09:47PM[/editline]
You should make RenderScreenspaceEffects hookable easly[/QUOTE]
1. Thanks.
2. PILL.PlayerModel - Should I change the name?
3. What would you use RenderScreenspaceEffects for?
PlayerModel is fine i guess, and maybe you want some post processing or drawing, no idea
[QUOTE=Tobba;22564806]PlayerModel is fine i guess, and maybe you want some post processing or drawing, no idea[/QUOTE]
These methods are called from the character entity's Draw method.
ACTION:RenderCharacterEntity( ply, ent )
ACTION.Actions.MyAction:Render( ply, ent )
[editline]05:58PM[/editline]
Also if you can think of a better variable name just say so.
This thread died way too quickly.
Yeah, I guess nobody is really interested.
It looks impressive.
Also, is Pastebay down?
[QUOTE=Jamie932;22689849]It looks impressive.
Also, is Pastebay down?[/QUOTE]
Seems to be. I can use pastebin, but their lua syntax highlighter sucks.
What about [URL="http://codepad.org/?lang=Lua"]Codepad[/URL]?
Totally forgot about that. I think I'll use luabin though.
[url]http://luabin.foszor.com/2522[/url]
[url]http://luabin.foszor.com/2523[/url]
This looks cool
[editline]10:08PM[/editline]
You should add stuff like PILL.StrafeAnimation and PILL.JumpAnimation
[QUOTE=sniperlover;22691121]This looks cool
[editline]10:08PM[/editline]
You should add stuff like PILL.StrafeAnimation and PILL.JumpAnimation[/QUOTE]
Come to think of it, I should make a base action set. Stuff like idle, walk, run, jump, and swim. Then I could add an animations table that automatically feeds into the base set. What do you think?
yes
Seems nice.
[QUOTE=grea$emonkey;22694447]Come to think of it, I should make a base action set. Stuff like idle, walk, run, jump, and swim. Then I could add an animations table that automatically feeds into the base set. What do you think?[/QUOTE]
It sounds great. Whenever the SVN is out I'm going to try to make a vortigaunt pill :P
[editline]10:03AM[/editline]
You should also add damage hooks so we can reduce the damage the player takes on certain spots, add filters and such
[editline]10:04AM[/editline]
for example a strider pill shouldn't take damage from bullets
we need people to bump this
[editline]11:44AM[/editline]
this thread is worth it
[QUOTE=sniperlover;22701059]It sounds great. Whenever the SVN is out I'm going to try to make a vortigaunt pill :P
[editline]10:03AM[/editline]
You should also add damage hooks so we can reduce the damage the player takes on certain spots, add filters and such
[editline]10:04AM[/editline]
for example a strider pill shouldn't take damage from bullets[/QUOTE]
Thats what the PILL:EntityTakeDamage() method is for, but I could add and/or replace with the Scale Damage hooks.
Oh right, I didn't see that one
Sorry, you need to Log In to post a reply to this thread.