• NutScript - Nutty name, serious framework
    2,778 replies, posted
Ended up writing my own ammo persistence into the character save/load functions. Dunno if I should make it save the ammo when you die or if it should just drop your ammo.
[QUOTE=AndrewPH;41736451]Ended up writing my own ammo persistence into the character save/load functions. Dunno if I should make it save the ammo when you die or if it should just drop your ammo.[/QUOTE] Perhaps make it drop an item with the current magazine you had loaded into your weapon? (If your weapon uses ammo that is) You can have different models for different ammo 'types' (and I'm pretty sure there are some good magazine models around here somewhere)
[QUOTE=Steven :D;41736488]Perhaps make it drop an item with the current magazine you had loaded into your weapon? (If your weapon uses ammo that is) You can have different models for different ammo 'types' (and I'm pretty sure there are some good magazine models around here somewhere)[/QUOTE] I'm using the default source ammo handling stuff, so I don't use physical ammo beyond an item that gives you ammo, but that's an idea! I'm also making it so that, when a player dies, he drops any rare/legendary weapons he has (they do extra damage, so it sortof balances itself out) so that one player can't hoard all the legendary weapons (or people can go around collecting all of them) I might also have it move half of the ammo (in multiples of #gunclipsize if possible) back into your inventory to make it less annoying when you die.
Working on crafting things. it works well but I'm thinking about how do we craft.
saving clip information to the weapon item seems to be a good way of doing ammo persistence... [vid]https://dl.dropboxusercontent.com/u/113529150/rp_downtown_v2%202013-8-6%2013-55-48.webm[/vid] whoopdie fucking doo \o/
Fixed 'Freezed act camera'. [thumb]http://cloud-2.steampowered.com/ugc/920144122895947285/B7CD57EB0288D9C05227489ED732A5EFA3DC3C8E/[/thumb] [thumb]http://cloud-3.steampowered.com/ugc/920144122895946689/39B98A2A069EC43166AB13E7CE69D1E52423B4B7/[/thumb] [thumb]http://cloud-2.steampowered.com/ugc/920144122895120234/FC31B29C07EADB056FEC9717546635F130E425EC/[/thumb] [thumb]http://cloud-2.steampowered.com/ugc/920144122895111475/F6108041C80149254324D00339FD4DB927988215/[/thumb] [thumb]http://cloud-4.steampowered.com/ugc/920144122895115314/B9A9473C442F1A22AEA5BCDCD535BF94B62218A7/[/thumb] [thumb]http://cloud-3.steampowered.com/ugc/920144122895124461/1965DE800D524810B404FA6D8565AE4976A83FB2/[/thumb]
Is is possible to override the Hud and Derma menus via a schema with this framework?
[QUOTE=AndrewPH;41723047]Will it get fired with nutscript? edit: nope.jpg. I know what I want, there's just no way of running a function when an item is dropped atm.[/QUOTE] Added ITEM:Hook(name, callback). The name is a string for the item function's name (e.g. Drop). Callback is what happens when the 'event' is triggered and passes arguments similar to item function run functions. [QUOTE=C0MMUNIZT;41749179]Is is possible to override the Hud and Derma menus via a schema with this framework?[/QUOTE] You can only add on to the HUD using plugins/the schema at the moment, as for modifying the menus what do you mean?
The menu should be toggled with the Tab button at anytime. The F1 system is outdated.
Good job with this framework, honestly really well done. You should make different schemas, like for an example, the new vegas/phase four one. Except different, and better. :)
[QUOTE=Chessnut;41760203]Added ITEM:Hook(name, callback). The name is a string for the item function's name (e.g. Drop). Callback is what happens when the 'event' is triggered and passes arguments similar to item function run functions. You can only add on to the HUD using plugins/the schema at the moment, as for modifying the menus what do you mean?[/QUOTE] Say I wanted to make a Fallout schema and replace the whole inventory UI.
[QUOTE=Chessnut;41281239]<text>[/QUOTE] -snip- ; I'm an idiot.
[QUOTE=C0MMUNIZT;41767872]Say I wanted to make a Fallout schema and replace the whole inventory UI.[/QUOTE] Use hooks that return the panel to be used by the gamemode. [lua] -- Create default inventory UI function GM:CreateInventoryUI() local frame = vgui.Create("DFrame") frame:SetSize(ScrW() * 0.75, ScrH() * 0.6) frame:Center() -- etc etc return frame end -- Called immediately after GM:CreateInventoryUI() function GM:PostCreateInventoryUI(panel) end function GM:CreateChatUI() end -- and so on[/lua] And elsewhere: [lua]hook.Add("CreateInventoryUI", "FalloutInventory", -- ha ha ha fuck the gamemode -- let's return something unusable return "" end)[/lua] If you want a shitload of string comparisons instead of a shitload of separate hooks I guess a generic CreateUI(name) would work, but doing everything in giant if blocks is not very pretty
[QUOTE=C0MMUNIZT;41767872]Say I wanted to make a Fallout schema and replace the whole inventory UI.[/QUOTE] You'd might as well just edit the derma stuff in the framework.
[QUOTE=Chessnut;41773915]You'd might as well just edit the derma stuff in the framework.[/QUOTE] Wouldn't future updates overwrite these changes?
[QUOTE=Llamalord;41766426]The menu should be toggled with the Tab button at anytime. The F1 system is outdated.[/QUOTE] [url=https://github.com/Chessnut/NutScript/issues/4]I agree.[/url]
[QUOTE=mdeceiver79;41775561]Wouldn't future updates overwrite these changes?[/QUOTE] I'd guess you could just save them.
[QUOTE=Chessnut;41773915]You'd might as well just edit the derma stuff in the framework.[/QUOTE] Why can't you add a system that allows people to create their own menus that replace inventory, ect
I guess I could but then there'd just be a bunch of hooks for like PreCreate/PostCreate<menu name> unless there's a better way of doing it.
Not bad, I approve.
[QUOTE=Chessnut;41760203]Added ITEM:Hook(name, callback). The name is a string for the item function's name (e.g. Drop). Callback is what happens when the 'event' is triggered and passes arguments similar to item function run functions.[/QUOTE] Excellent! Just moved all my weapon persistence over to use hooks, and I'm rethinking ways to make this more balanced (ie just persisting clip info when the player unequips/equips the weapon, which would give them a reason to unequip weapons they aren't using)
Oh, forgot to mention. You can define multiple hooks of the same type for the items.
[QUOTE=Chessnut;41779064]Oh, forgot to mention. You can define multiple hooks of the same type for the items.[/QUOTE] Awesome! Do you have any insight as per the cause of [url=https://github.com/Chessnut/NutScript/issues/9]this little guy[/url]? It's basically the only big problem I'm having with NS now.
[QUOTE=AndrewPH;41779723]Awesome! Do you have any insight as per the cause of [url=https://github.com/Chessnut/NutScript/issues/9]this little guy[/url]? It's basically the only big problem I'm having with NS now.[/QUOTE] Not sure, what database method are you using?
[QUOTE=Chessnut;41779891]Not sure, what database method are you using?[/QUOTE] Default, so sqlite. I also ran into a problem where I created a character, and then deleted my 2 older characters. The one I created showed up after deleting the first one (as expected) but disappeared after deleting the second one. It came back when I reloaded the map. Also I'm doing all of my testing on a listen server.
Okay, I've been done with Crafting things. Currently it just simply detects items. That means this plugin can't detect item's data yet. [thumb]http://cloud-4.steampowered.com/ugc/920144123004720101/5CF2F3D830A7BD15011102C199DBCDD5D357D2B6/[/thumb] [thumb]http://cloud-2.steampowered.com/ugc/920144123004716432/FF8A9A077459859F2C4F5A6C2C7B9CFF052C4721/[/thumb]
[QUOTE=rebel1324;41804881]Okay, I've been done with Crafting things. Currently it just simply detects items. That means this plugin can't detect item's data yet. [thumb]http://cloud-4.steampowered.com/ugc/920144123004720101/5CF2F3D830A7BD15011102C199DBCDD5D357D2B6/[/thumb] [thumb]http://cloud-2.steampowered.com/ugc/920144123004716432/FF8A9A077459859F2C4F5A6C2C7B9CFF052C4721/[/thumb][/QUOTE] Jesus man you are good! can't wait to see this progress, are you gonna force this update along with the clothing plugin too? or just this one..
[QUOTE=Deemoney77;41805209]Jesus man you are good! can't wait to see this progress, are you gonna force this update along with the clothing plugin too? or just this one..[/QUOTE] Crafting? I don't think it have to be necessary.
That's true, I was just interested in it, are you gonna release it publicly though just to do it for us?
[QUOTE=Deemoney77;41805653]That's true, I was just interested in it, are you gonna release it publicly though just to do it for us?[/QUOTE] Releasing stuffs is easiest thing that I can do.
Sorry, you need to Log In to post a reply to this thread.