[release]
[img]http://imgkk.com/i/qvsd.png[/img]
I'm releasing the unfinished beta of my Pill Framework. I'm working on so many other things now that I doubt I'll have time to finish it anytime soon. That's why I figured it would be unfair to keep it to myself so here you are. It works as far as I can tell. Post here if you find any problems.
[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.
Here's some eye candy.
[media]http://www.youtube.com/watch?v=3yiq72ITflw[/media] [media]http://www.youtube.com/watch?v=j9Mg1_gNyxY[/media]
[b]Download:[/b]
[url=http://www.garrysmod.org/downloads/?a=view&id=105285][img]http://www.garrysmod.org/img/?t=dll&id=105285[/img][/url]
Extract to your garrysmod folder. Includes the framework and two unfinished sample pills. Pills are in the lua/pills folder.
[b]Need help understanding the framework?[/b]
Post here, PM me, or shoot me a message on steam and I'll gladly help you (if I'm not too busy).
[/release]
Awesome work! Can't wait to see what comes out of this.
[QUOTE=SGTNAPALM;23631395]Awesome work! Can't wait to see what comes out of this.[/QUOTE]
Thanks. I hope to see some pill packs made using this.
Nice
Awesome.
:D
Oh yeah, and here's how you'd make a pill.
1. Go into lua/pills.
2. Make a new folder. Call it pill_whatever or something.
3. In the folder, make two files - pill.lua and actions.lua.
Here are the base pill and base actions files. You can copy/paste it, remove all the stuff you don't need, and edit it to your liking.
Your pill.lua file:
[lua]
// General
PILL.Base = "pill_base" -- This works just like SWEP.Base. Yes, pills have their own BaseClass.
PILL.DisplayName = "Base Pill" -- Pill nice-name
PILL.PlayerModel = "" -- The pseudo player model file path
PILL.Author = "" -- Pill Author
PILL.Contact = "" -- Author contact
PILL.Purpose = "" -- Pill Purpose
PILL.Instructions = "" -- Pill Instructions
PILL.SpawnIcon = "" -- The icon you'd see in the spawn menu
PILL.SelectIcon = "j" -- The weapon select icon.
PILL.AdminOnly = true -- Use this for admin sweps.
// SWEP Table - Use this to override SWEP properties and functions.
// Please use PILL Think, OnPrimary, OnSecondary, OnReload, CanDeploy, CanHolster, OnDeploy, and OnHolster rather than overriding.
PILL.SWEP.Spawnable = false
PILL.SWEP.AdminSpawnable = false
// Misc Values
//PILL.CanEnterVehicle = false -- Don't let players enter vehicles.
PILL.UseBlood = true -- When true, we use can blood effects
PILL.UseCharacterEntity = true -- Use a character entity? If you don't, you'll need to script all the rendering from scratch.
PILL.UseCharacterEntityHull = true -- Use the character entity hull for player collisions.
//PILL.UseCustomBloodEffect = false -- Assuming PILL.UseBlood is true, this overrides the default blood effects and uses PILL.Effects.Blood as a replacement.
//PILL.UseSimpleMovement = false -- When set to true, the pill will disable all custom move hooks. Instead, you'll use the PILL.Movement table for movement modification.
//PILL.UseCharacterEntityMovement = false -- This is only to be used when you are using a custom character entity like a SENT or a prop_physics.
//PILL.UseThirdPersonView = true -- When set to false, the default CalcView hooks will get disabled. This does not include PILL.CalcView (which is blank by default) or any action CalcView hooks.
PILL.CanDuck = false -- A lot of stuff can't duck (headcrabs, etc.). This sets HullDuck to the normal Hull, and disables view changes to simulate no ducking. This allows us to detect the +duck key.
PILL.CanZoom = false -- I doubt your pill will have binoculars, but maybe it will. Set this to true to reenable zoom.
PILL.CanJump = true -- Can they use the default jump?
PILL.StartHealth = 100 -- Starting health.
PILL.MaxHealth = 100 -- Maximum health.
PILL.BloodColor = BLOOD_COLOR_RED -- Assuming PILL.UseBlood is true, this sets the color. Check out [url]http://wiki.garrysmod.com/?title=Enumeration_List:Blood_Color[/url] for the enum list.
//PILL.ShouldTakeDamage = true -- When false, the player will not take damage.
//PILL.ShouldDrawLocalPlayer = false -- Only set this to true if you are drawing the player and want to see them in your Third Person View
//PILL.ShouldDrawPlayer = false -- Only set this to true if you are drawing the player
// Character Entity Handling
// This table controls how we handle the character entity for this pill.
//PILL.Character.OverrideEntityHandling = false -- This overrides all character entity handling. You'll need to write your own hooks. With this you could make a physical melon roller.
//PILL.Character.HidePlayerForPhysMove = true -- If/when you try to hotswitch to physical movement, the player will be placed out of the way.
//PILL.Character.TransferDamageForPhysMove = true -- If/when you use physical movement, the player will be given any damage the character entity recieves.
//PILL.Character.ClampCharacterPitch = true -- When true, pitch will be clamped to 0 by default.
//PILL.Character.MaxYawBeforeTurn = 0 -- Absolute yaw change before turning the character.
//PILL.Character.MaxPitchBeforeTurn = 0 -- Absolute pitch change before turning the character. Only available when ClampCharacterPitch is false.
PILL.Character.ParentToPlayer = true -- Parent it to player
PILL.Character.FadeCharacterEntity = true -- When true, the character entity will fade as the camera gets closer to the model
PILL.Character.Movetype = MOVETYPE_NONE -- Change this if you must.
PILL.Character.Solid = SOLID_NONE -- Change this if you must.
PILL.Character.SurfaceProp = "flesh" -- PhysObj material.
PILL.Character.CharacterEntity = "prop_pillcharacterentity" -- If you want to give the pill a custom character entity. You'll need to write your own hooks.
// Use this to override hull
// The script will only set the ones you use, so you can override normal and duck hulls separately.
//PILL.Hull.Normal = { Vector( -16, -16, 0 ), Vector( 16, 16, 72 ) } -- Normal hull. If PILL.Character.UseCharacterEntityHull is true, then using this will override that.
//PILL.Hull.Duck = { Vector( -16, -16, 0 ), Vector( 16, 16, 36 ) } -- Hull while ducking. This is good to use if you know you want your character to duck, but it doesn't have a hull specified for that animation.
// This table will override any custom CalcView hooks.
// This table should only be used when PILL.UseThirdPersonView is set to true
PILL.ThirdPersonView.VectorOffset = Vector( 0, 0, 0 ) -- Vector offset from camera origin. This is applied before ThirdPersonView.Distance.
PILL.ThirdPersonView.AngleOffset = Angle( 0, 0, 0 ) -- Angle offset from camera angles. This is applied before ThirdPersonView.Distance.
PILL.ThirdPersonView.Distance = -100 -- Distance backwards from the VectorOffset in units.
PILL.ThirdPersonView.UseCharacterCenter = true -- Use the character's OBBCenter as the camera origin.
PILL.ThirdPersonView.AllowFullRotation = false -- When set to true, the player can rotate the camera all the way around the character entity without it turning.
// This table will set movement characteristics.
// This table should only be used when PILL.UseNormalMovement is set to true
PILL.Movement.WalkSpeed = 250 -- Speed while walking
PILL.Movement.RunSpeed = 500 -- Speed while running
PILL.Movement.CrouchedWalkSpeed = 0.50 -- Speed while crouched walking
PILL.Movement.CrouchedRunSpeed = 0.75 -- Speed while crouched running
PILL.Movement.JumpPower = 160 -- Jump power
PILL.Movement.StepSize = 18 -- Step size.
// This table can be for personal utility. ChangeTo and ChangeFrom are automatically used in Deploy/Holster.
// Any effects you add to this table will be compatible with the SWEP.BangHowdy method
PILL.Effects.ChangeTo = "Sparks" -- Effect to be played when changing to/from?
PILL.Effects.ChangeFrom = "Sparks" -- Effect to be played when changing to/from?
PILL.Effects.Blood = "" -- Internal member Blood - This effect replaces the default player blood effect. Only used when PILL.UseCustomBloodEffect is true. Check out [url]http://wiki.garrysmod.com/?title=Util.Effect[/url] for a full list of default effects.
// This table is partly a personal utility for your use. It's not required, but some of the sounds are used internally.
// The Deploy, Holster, Reload, Hurt, Death, and Footstep members are used internally, so fill them out and they will be used automatically.
// You may add your own sounds to this table as a personal utility to be played with PILL:PlaySound( sound, pitch, volume )
// To find the NPC sounds in their short versions like this, check out [url]http://www.synergymod.net/docs_v11/?p=npcsounds[/url]
PILL.Sounds.Deploy = "Weapon_Bugbait.Splat" -- Internal member Deploy - Play this when we take the weapon out
PILL.Sounds.Holster = "Weapon_Bugbait.Splat" -- Internal member Holster - Play this when we put the weapon away
PILL.Sounds.Reload = "" -- Internal member Reload - Play this when we reload
PILL.Sounds.Hurt = "" -- Internal member Hurt - Play when hurt
PILL.Sounds.Death = "" -- Internal member Die - Play when you die
PILL.Sounds.Footstep = "" -- Internal member Footstep - Footstep sound to play in GM.PlayerFootstep
// Called on gamemode initialize
function PILL:Initialize()
end
// Called when the pill SWEP is spawned
function PILL:OnSpawn()
Omg. :iia:
Remind me of my first pills done with the hellknight and pinky monster from doom3 xD.
Exelent job btw ^^
[QUOTE=bigboss15;23669720]Remind me of my first pills done with the hellknight and pinky monster from doom3 xD.
Exelent job btw ^^[/QUOTE]
Thanks! I'm hoping some people will remake the old pills with this. :buddy:
[QUOTE=grea$emonkey;23671303]Thanks! I'm hoping some people will remake the old pills with this. :buddy:[/QUOTE]
Who knows, maybe I will! :DD
I wish cringerpants hadn't disappeared. :frown:
Lol, me too..
This will be interesting. :) Thanks a lot for this, Greasemonkey.
Yeah, its fantastic. :buddy:
Came across this when searching 'headcrab' on Garrysmod.org. :/
It's been out for 2 whole days and still no new pills. :saddowns:
If the framework seems confusing, just ask your questions here.
Is it possible to give ranged attacks to your pills? For example, a Combine soldier that can shoot and throw grenades.
So if I was to edit the antlion pill to make an antlion worker, would it be possible to make it spit acid?
[QUOTE=Timenova;23702655]Is it possible to give ranged attacks to your pills? For example, a Combine soldier that can shoot and throw grenades.
So if I was to edit the antlion pill to make an antlion worker, would it be possible to make it spit acid?[/QUOTE]
Sure. You'd need to make it throw acid manually like you would with any SWEP. Just go and edit the PILL:PrimaryAttack() function.
Keep in mind that self.Owner is available in those.
[QUOTE=grea$emonkey;23702691]Sure. You'd need to make it throw acid manually like you would with any SWEP. Just go and edit the PILL:PrimaryAttack() function.
Keep in mind that self.Owner is available in those.[/QUOTE]
Thanks. :v:
I think tomorrow I will attempt to make some pills, who knows.. [sp]I love Grea$eMonkey's work...[/sp]
We don't get the headcrab and antlion with it? :(
Would be a nice example, other then wanting to be a antlion.
[QUOTE=Shadow_Hedgehog;23732003]We don't get the headcrab and antlion with it? :(
Would be a nice example, other then wanting to be a antlion.[/QUOTE]
They are included. You must have installed it wrong.
Ah alright thanks, I didn't put it on just looked through the files I obviously didn't look in the right place.
Yeah looked in addons instead of lua, silly me.
I can't wait to become a hunter again... Does the hunter need any special bone editing, since its' a tripedal beast?
[QUOTE=Lol-Nade;23743323]I can't wait to become a hunter again... Does the hunter need any special bone editing, since its' a tripedal beast?[/QUOTE]
Just make the pill model the hunter model, and set animations accordingly in your actions.lua file.
[QUOTE=grea$emonkey;23743660]Just make the pill model the hunter model, and set animations accordingly in your actions.lua file.[/QUOTE]
Ok, thanks! And thanks again for this great base!
[QUOTE=Lol-Nade;23743323]I can't wait to become a hunter again... Does the hunter need any special bone editing, since its' a tripedal beast?[/QUOTE]
I forgot about how good it was to be the Hunter. :3:
Excuse, but what exactly is the "pill"? A thing that turns you into the npc?
[QUOTE=OneManArmy;23746722]Excuse, but what exactly is the "pill"? A thing that turns you into the npc?[/QUOTE]
The pill is something young women take to avoid pregnancy.
Pills in GMod are SWEPs that change the player into a different sort of character.
Umm a dumb question, I tried to my best of abilities create a hunter pill, and when I went to test it out it didn't show up in my weapons folder.
[code]
Including Actions
Including Base Action
Action action_base successfully registered!
including action_antlion
Action action_antlion successfully registered!
including action_headcrab
Action action_headcrab successfully registered!
including action_hunter
Couldn't include file 'pills\pill_hunter\actions.lua' (File not found)
Achievements disabled: Steam not running.
Achievements disabled, ignoring achievement progress for GMA_BADCODER
Hook 'PFW_LOADPILLS' Failed: addons\pill_framework\lua\autorun\shared.lua:126: bad argument #1 to 'gsub' (string expected, got nil)[/code]
Sorry, you need to Log In to post a reply to this thread.