• Dissolution - A post-apocalyptic schema
    91 replies, posted
who would use a temperature script if i made it? aka you can die of hypothermia, staying warm can be effected by clothing, fires/heat source and of course being in doors. And being wet will be taken into account as well. would you use it?
[QUOTE=Luxzhv;42657188]Shouldn't the doors get blown off to make it more realistic, and you need to find or build a new door to replace it?[/QUOTE] [media]http://www.youtube.com/watch?v=ccq4dS6Ja_Y[/media]
I'm adding onto this Schema my own stuff: [video=youtube;yhUGRnFnIWI]http://www.youtube.com/watch?v=yhUGRnFnIWI[/video] I am also working on an sNPC handler for this schema which a sNPC base class will tie into the 'PDA' and allow the player to do missions and get rewards! By the way, please excuse my bad Derma and please keep in mind that the PDA might not even be in the F1 menu for very much longer. I also did something like this with Cakescript, it was less menu based but the concept will add this too(I'll have a menu for players to choose, not type): [video=youtube;jR3G1iQPKzc]http://www.youtube.com/watch?v=jR3G1iQPKzc[/video]
I've added next_bot to Dissolution and I have just finished an sNPC handler.(It basically checks if a certain amount of next_bots are, generates their name and spawns them if that name hasn't been taken already.) I want to make a faction based gamemode and I plan on implementing these sNPCs to the gameplay.... The thing that I'm not sure how I'm going to handle is areas. How should I manage what areas are what, who it belongs to and how should I make sure an sNPC idles/wanders(but stays) in an area? [lua] PLUGIN.name = "sNPC Environment" PLUGIN.author = "LiebstPanzer" PLUGIN.desc = "Handles spawning, sNPC information and schedules." --Periodically we'll spawn characters --Stars are Characters who (sometimes) don't die and have their own entity file and aren't our base generic sNPC(traders are considered stars as they wont die.) --Characters die and have items and schedules, walk around and are mission targets. --Server mods should be warned when characters and areas aren't setup. //Add chatbox commands for mods to setup stars and setup character spawn areas. //Eventually if (SERVER) then PLUGIN.NAMES = { FIRST = { "Vlad", "Yuri", "Boris" }, LAST = { "Chaban", "Novikoff" } }; local COUNT_DEFAULT = #PLUGIN.NAMES.FIRST * #PLUGIN.NAMES.LAST; if !PLUGIN:ReadTable()["SPAWNPOINTS"] then PLUGIN:WriteTable({["SPAWNPOINTS"] = {}, ["CHARACTERS"] = {}}); nut.util.WriteTable("ACTOR_COUNTER", COUNT_DEFAULT); end PLUGIN.sNPCLimit = 2;--How many sNPC are allowed at one time. PLUGIN.AmountsNPC = nut.util.ReadTable("ACTOR_COUNTER")[1] or COUNT_DEFAULT; --How many sNPC are ABLE to be generated. --HACKY METHOD FO' SHO' function PLUGIN:AI() PrintTable(self:ReadTable()) if self.AmountsNPC > 0 && #ents.FindByClass("nut_nextbot") < self.sNPCLimit && table.Count(self:ReadTable()["SPAWNPOINTS"] or {}) > 0 then self:SpawnRandomCharacter("GoodSpawn"); end timer.Simple(5, function() self:AI(); end); end; --Setup our SpawnPoints function PLUGIN:SetupSpawn(info) local SpawnData = self:ReadTable(); SpawnData["SPAWNPOINTS"][info.name] = {pos = info.pos, angles = info.angles}; PLUGIN:WriteTable(SpawnData); end --Generate a list of Characters --The list will hold info like their name and faction preference. --More to come. function PLUGIN:GenerateCharacterData(bool) --BOOL do we want to generate a character before they are allowed to spawn??? local ActorData = self:ReadTable(); local name = table.Random(self.NAMES.FIRST)..","..table.Random(self.NAMES.LAST); if ActorData["CHARACTERS"][name] then while ActorData["CHARACTERS"][name] do name = table.Random(self.NAMES.FIRST)..","..table.Random(self.NAMES.LAST); print(name); end end self:TickCharacters(); ActorData["CHARACTERS"][name] = {active = bool, pos = 0, angles = 0}; PLUGIN:WriteTable(ActorData); end --Not very random, but kind of is. function PLUGIN:SpawnRandomCharacter(SpawnPoint) self:GenerateCharacterData(true); local ActorData = self:ReadTable(); for k, v in pairs(ActorData["CHARACTERS"]) do --Make sure he hasn't spawned yet but check if he's allowed to. if v.active && !self:CheckCharacter(v.rawname) then ActorData["CHARACTERS"][k].pos = ActorData["SPAWNPOINTS"][SpawnPoint].pos; ActorData["CHARACTERS"][k].angles = ActorData["SPAWNPOINTS"][SpawnPoint].angles; ActorData["CHARACTERS"][k].name = string.Explode(",", k)[1].." "..string.Explode(",", k)[2]; ActorData["CHARACTERS"][k].rawname = k; ActorData["CHARACTERS"][k].data = {}; ActorData["CHARACTERS"][k].factionData = {}; ActorData["CHARACTERS"][k].classData = {}; PLUGIN:WriteTable(ActorData); self:SpawnCharacter(ActorData["CHARACTERS"][k]); break; end end end --Timers and a lot of shit don't start without players being in the server. function PLUGIN:PlayerInitialSpawn(ply) if #player.GetAll() > 0 then self:RetreiveCharacters(); self:AI(); end end function PLUGIN:SpawnCharacter(data) local entity = ents.Create("nut_nextbot"); entity:SetPos(data.pos); entity:SetAngles(data.angles); entity:Spawn(); entity:Activate(); entity:SetModel("models/odessa.mdl"); entity.rawname = data.rawname; entity:SetNetVar("name", data.name); entity:SetNetVar("desc", nut.lang.Get("no_desc")); entity:SetNetVar("data", data.data) entity:SetNetVar("factiondata", data.factionData) entity:SetNetVar("classdata", data.classData) function entity:RunBehaviour() --THESE ARE LISTED ELSEWHERE!! nut.BEHAVIOURLIST.wander(self); end end function PLUGIN:ShutDown() if !IsValid(self) then return; end local ActorData = self:ReadTable(); PrintTable(ActorData); ActorData["CHARACTERS"][entity.rawname].pos = self:GetPos(); ActorData["CHARACTERS"][entity.rawname].angles = self:GetAngles(); PLUGIN:WriteTable(ActorData); print("ACTOR DATA SAVED!"); end function PLUGIN:RetreiveCharacters() --Don't retrieve if nothing is in there! if (table.Count(self:ReadTable()["CHARACTERS"] or {}) > 0) then for k , v in pairs(self:ReadTable()["CHARACTERS"]) do if v.Active then self:SpawnCharacter(v); end end end end --This is a helper function which allows us to see if a Character has been spawned. --If so we'll return his entity. function PLUGIN:CheckCharacter(rawname) for k, v in pairs(ents.FindByClass("nut_nextbot")) do if v.rawname == rawname then return v; end end return false; end --This helper function saves the amount of sNPCs that are allowed to be generated. --A Character has been spawned this is used so we know how many are on our list to spawn. function PLUGIN:TickCharacters() self.AmountsNPC = self.AmountsNPC - 1; nut.util.WriteTable("ACTOR_COUNTER", self.AmountsNPC); end end nut.command.Register({ adminOnly = true, syntax = "<string name>", onRun = function(client, args) local position = client:GetEyeTraceNoCursor().HitPos local angles = client:EyeAngles() angles.p = 0 angles.y = angles.y - 180 if SERVER then local tab = {name = args[1], pos = position, angles = angles} local PLUGIN = PLUGIN; PLUGIN:SetupSpawn(tab) end nut.util.Notify("You have added a spawn point. UID = "..args[1], client) end }, "snpc_addspawn") nut.command.Register({ adminOnly = true, onRun = function(client, args) if SERVER then for k, v in pairs(ents.FindByClass("nut_nextbot")) do v:Remove(); end PrintTable(self:ReadTable()); PLUGIN:WriteTable({["SPAWNPOINTS"] = {}, ["CHARACTERS"] = {}}); nut.util.WriteTable("ACTOR_COUNTER", COUNT_DEFAULT); end nut.util.Notify("You have removed all sNPC data(spawnpoints & character info)", client) end }, "snpc_clear") [/lua]
Have this and Nutscript under gamemodes. Loading up Dissolution and it seems to just be running a base gamemode with no errors.
[url]https://github.com/Chessnut/Dissolution[/url] [editline]14th November 2013[/editline] Fixed the link, thanks for pointing that out.
So it's running under a base gamemode, I noticed Nutscript is not showing up on the main menu so Garry's Mod isn't finding it, which explains why Dissolution seems to be not working for me. [img]http://puu.sh/5iMJ9.png[/img] Edit: "menusystem" "1" not being in nutscript.txt? I'm assuming this is because you don't want players loading it up. Still base gamemode for me though.
NutScript isn't suppose to be found under the menu.
"CANNOT BE RAN IN SINGLEPLAYER" Did not know this. Explains everything. Possible suggestion. Not sure how NextBots work, but if Zombies could climb realistically tall things, it would be pretty nice. Again, I do not know if that is possible. And one more thing, they stop to attack you. I literally cannot get them to land a hit on me unless I crouch walk or stand still. Just a quirk that you probably already know about.
The whole "Stopping to attack thing" can't really be helped because of how playing sequences seems to work with these, because when it does an animation it literally "waits" for the animation to finish performing before resuming operation. Also they won't climb very well without animations for it, but they probably could jump with Locomotion:Jump( )... not sure how ti make it look for the right place to jump though. Another thing about the zombies, Chessnut; Can I use them in another gamemode if I get them working? I'm not claiming your work at all, and I intend to give you all the credit despite the changes I've made. I also don't intend to release them at the moment. Besides, all I've done is changed their model and sounds, but still I want to make sure you don't mind me doing so.
I have a suggestion for Nutscript (Unless it's already implemented). A command to make unownable doors that save with the map (Like DarkRP). The one from Pistachio did not work too well. Another suggestion, unless already implemented, is to allow Admins to set spawn points for players on the map. Edit: Does NutScript work on Linux servers?
Both already exist. /doorsetunownable <title> /spawnadd <faction> [class]
Found a possible bug. I had a locker in the world. I put 10 scrap in it and an AK-47. I tested both a restart and a shutdown of the server. I checked my inventory, it gave me the 10 scrap back, but now I have two AK-47's. Tested it a second time: I now have a clone of the weapon I put in it this time, and it didn't give my scrap back. Also, how do I use Areas? I went into a square/rectangle shaped town, ran /areaadd Town in one corner, then ran it again in the diagonal corner. It said Town on the screen, but now it doesn't when I go inside that rectangle. Am I running these in the right areas?
[QUOTE=Lordbleck;42877837]Found a possible bug. I had a locker in the world. I put 10 scrap in it and an AK-47. I tested both a restart and a shutdown of the server. I checked my inventory, it gave me the 10 scrap back, but now I have two AK-47's. Tested it a second time: I now have a clone of the weapon I put in it this time, and it didn't give my scrap back. Also, how do I use Areas? I went into a square/rectangle shaped town, ran /areaadd Town in one corner, then ran it again in the diagonal corner. It said Town on the screen, but now it doesn't when I go inside that rectangle. Am I running these in the right areas?[/QUOTE] how exactly did you restart it?
[QUOTE=Johnny Guitar;42879285]how exactly did you restart it?[/QUOTE] Shut Down, and Restart. I was asked this same question with Pistachio when it came to the unownable doors resetting themselves, but the mailboxes and ATM's saving with the map. The problem with the doors on there was they were broken. I'm assuming something might be off here as well. Another thing. The Custom weapon changing menu conflicts with FAS:2 Customizable Sweps which have you open the context menu and press 1,2,3 to change attachments. When you hit those keys, it changes your weapon rather than changing attachments. This doesn't happen with the vanilla HUD. I really like the custom weapon changing HUD so I don't want to remove it, and the weapons are great because they have a 3D HUD built onto them when you reload, which is nice due to the absence of ammo on the actual HUD.
[QUOTE=Lordbleck;42879535]Shut Down, and Restart. I was asked this same question with Pistachio when it came to the unownable doors resetting themselves, but the mailboxes and ATM's saving with the map. The problem with the doors on there was they were broken. I'm assuming something might be off here as well. Another thing. The Custom weapon changing menu conflicts with FAS:2 Customizable Sweps which have you open the context menu and press 1,2,3 to change attachments. When you hit those keys, it changes your weapon rather than changing attachments. This doesn't happen with the vanilla HUD. I really like the custom weapon changing HUD so I don't want to remove it, and the weapons are great because they have a 3D HUD built onto them when you reload, which is nice due to the absence of ammo on the actual HUD.[/QUOTE] I was talking to Chessnut about shutting it down correctly, and to shut it down correctly you need to: 1. Go into console. 2. Type in "quit" or "restart". Then your server has been shut down correctly.
[QUOTE=sants1;42882388]I was talking to Chessnut about shutting it down correctly, and to shut it down correctly you need to: 1. Go into console. 2. Type in "quit" or "restart". Then your server has been shut down correctly.[/QUOTE] The problem with this is I don't want players getting item duplications or losing currency if there's a random crash, which is inevitable in Garry's Mod. Maybe Chessnut can take a look at the way PostNuke handles their inventory (It's an open gamemode now so it wouldn't hurt to check). Another thing I noticed is players can still unload a full clip of a gun, put it back in their inventory, and re-equip it and get the full ammo back for it. PostNuke also avoids this by saving ammo data. The way I'm trying to get around this is giving all my weapons 1 bullet on equip, so players HAVE to buy ammo.
[QUOTE=Lordbleck;42885943]The problem with this is I don't want players getting item duplications or losing currency if there's a random crash, which is inevitable in Garry's Mod. Maybe Chessnut can take a look at the way PostNuke handles their inventory (It's an open gamemode now so it wouldn't hurt to check). Another thing I noticed is players can still unload a full clip of a gun, put it back in their inventory, and re-equip it and get the full ammo back for it. PostNuke also avoids this by saving ammo data. The way I'm trying to get around this is giving all my weapons 1 bullet on equip, so players HAVE to buy ammo.[/QUOTE] dude I've never had an issue with duplicating on NutScript, it's because of what you are doing to cause duping to happen in the first place
I don't want players to spawn with the HL2 Pistol, I searched every file in NutScript and Dissolution and it's not mentioned once. How do I remove it?
There was already an update that addressed this: [url]https://github.com/Chessnut/NutScript/commit/4ff244660a0e4007b52fdf403705a38933d39057[/url] Simply update your framework :)
[QUOTE=Chessnut;42907780]There was already an update that addressed this: [url]https://github.com/Chessnut/NutScript/commit/4ff244660a0e4007b52fdf403705a38933d39057[/url] Simply update your framework :)[/QUOTE] Alright. I have a suggestion for the gamemode, not sure if I should put it here or on the Github. You should be able to see a full preview of your character model when you create a new character, rather than just the icon. Also found some bugs. Sometimes when you find Junk in the world and hit scrap, it makes the scrapping noise but the object doesn't disappear and nothing else happens. If you keep doing it, it eventually registers you scrapped it and you get Scrap and the object vanishes from the world. Another bug is if you /setworldcontainer any container, and reload the server (Tested on a dedicated and local multiplayer), the container will still be there, but there will be a tiny filing cabinet (small drawer) container inside of it that is also able to be interacted with. I'll be looking out for more bugs and etc in the meantime. Also, where do I find Black Tea. I found a problem with the cookfood plugin. You cannot drink or eat food, even if your meters are about empty. Just says "You do not need to eat this right now." Also, apparently nothing happens when the hunger and thirst meters hit 0. I looked in the code for them and there is nothing in there besides the math for making them drop to 0. Edit: Ok so apparently the food just replenishes your health. Why would there be hunger and thirst meters then...? Leaving the hunger problem on the github.
[QUOTE=Lordbleck;42908807]You should be able to see a full preview of your character model when you create a new character, rather than just the icon.[/QUOTE] That's not schema-related. That's framework-related.
Sounds a lot like fallout rp. That's a really good thing.
[QUOTE=KluKluxKid;42919057]Sounds a lot like fallout rp. That's a really good thing.[/QUOTE] It's more based off of Severance / Left 4 Dead Roleplay than Fallout although there in a non official Fallout New Vegas schema out there for NutScript made by Fayz Golden aka Santi
[QUOTE=KluKluxKid;42919057]Sounds a lot like fallout rp. That's a really good thing.[/QUOTE] What's up with [url]http://koolkidsklubhangout.weebly.com/kool-kids-klub-secret-hangout.html[/url] ? Your website kind of scares me.
[QUOTE=PeterEdwards;42920289]What's up with [url]http://koolkidsklubhangout.weebly.com/kool-kids-klub-secret-hangout.html[/url] ? Your website kind of scares me.[/QUOTE] Well that's extremely off topic...anyways the name "Dissolution" remind me of the "Vein" gamemode, especially since its related to L4D it just reminds me of mercy hospital.
I'm kinda confused. I have the content workshop file in my collection for my server as well as on my client but the zombies are all badly posed and are static with no animations. The server console says the model is missing but I can see it on my end. I read on the content this was because the content isn't on the server however it fails to download the workshop addon every time I try. PLUS the workshop site says the content is 30mb~ while when I tried to extract it on my side it was going to 150+mb with a bunch of models. Is there a zip I can grab with just the content so I can shove it on fastdl? As my server's ability to use workshop seems to be fucked up whenever a file is fairly large.
Did you build a navmesh? [editline]4th December 2013[/editline] It's 30mb compressed.
[QUOTE=Chessnut;43075204]Did you build a navmesh? [editline]4th December 2013[/editline] It's 30mb compressed.[/QUOTE] If you mean a nav_generate I haven't, trying now but it's gm_atomic which as far as I know should work but I dunno side note: If I buy any of the m9k weapons from a vendor I can equip them in my inventory but it doesn't really do anything, can't select them, no lua errors or anything - spawning them my self via Q menu works fine but they're not shown in inventory - also my /doorsetunownable's don't seem to save :( -snip- Server restarted after nav_generate and I realized I can spawn zombies via Q menu, same thing, they just stand there and strike a pose at me and make noises but don't do much else
Sounds like the navmesh isn't working? Dunno
Sorry, you need to Log In to post a reply to this thread.