• WarMelons:RTS-Original Warmelons Reborn
    1,179 replies, posted
[QUOTE=blob202]Yeah. I am the friend. in spawnpoint init.lua: LS_RegisterEnt(self.Entity, "Generator") changed to: LS_RegisterEnt(self.Entity, "Storage") fixes the 40 minute error. Also, I made a new stool that takes the prop you are aiming at and turns it into a base prop. It calculates cost based on health you want it to have and its mass, and is fully team controlled like the regular base prop tool. I did this because it is much easier for me to spawn 20 blast doors and then just go through and click on them to change them; also removes need to 'add' base props to a list, any model can be a base prop :) (within reason).[/QUOTE] Hmm, when the "no NRG coming in" error occured on de Port, no spawnpoint in my ressource Network had been destroyed yet. There may have been one in the opponents Network, but I don't know if i destroyed it (it was the one in the warehouse, I think it was yours blob202). The base prop maker sounds cool, however players can still just keep the normal prop. As long as there are no mingebags on the server that's fine, but imagine someone just using normal PHX props killing you base. Also you can't adjust the health (though that is probably pretty easy to add). Edit: Since i can't PM anyone I'm posting this here: If there's still need for it with the base prop maker i would add most of the PHX "useful construction props" plus the PHX spheres and some PHX wheels. If someone wants a Melon Space War I could also add SBMP props. And sorry if this sounds stupid for a lua coder, but isn't there a way to just add a whole category of props to the Base prop list instead of adding every single one? And Lap maybe you could divide the base prop spawning menu into different categories for later versions when we have more base props. All under the assumption that we don't find a better way of doing this via the base prop maker STool.
I do assume MegaJohnny approves. Lua king'd.
[QUOTE=blob202]Yeah. I am the friend. in spawnpoint init.lua: LS_RegisterEnt(self.Entity, "Generator") changed to: LS_RegisterEnt(self.Entity, "Storage") fixes the 40 minute error. Also, I made a new stool that takes the prop you are aiming at and turns it into a base prop. It calculates cost based on health you want it to have and its mass, and is fully team controlled like the regular base prop tool. I did this because it is much easier for me to spawn 20 blast doors and then just go through and click on them to change them; also removes need to 'add' base props to a list, any model can be a base prop :) (within reason).[/QUOTE] This is where the use of RD3 (once it's out will be a lot better) it doesn't bug out for stuff like that (or RD bugs). The LS_RegisterEnt stuff doesn't even exist anymore. And for RD stuff that don't use any resources you can just do RegisterNonStorageDevice(ent)
Lap, I think I've found a way to reproduce the barracks error (at least for me) althoughI would swear when I first got the addon there was no barracks trouble at all. Anyway, my method goes something like this: Make a barracks/heavy barracks. Tell it to rally them somewhere near. Select the barracks and some other group of melons. Issue a command, the barracks stops working. That's the best way I've found to make it stop working, selecting both the barracks and something else. It might not be the problem though. A more likely explanation is that one of my addons is conflicting rather nicely. Oh, and Blob202, I can see that tool being useful, and the script it uses (should this ever fledge into a full gamemode) could be very handy in controlling prop spawning.
i want this but without the resource thing.
Yay! I loved the first WR addon and this is so much better, thank you for this! :D
What I want is a version of this that does not require RD2 and is just the fixed movement and new weapons/bombs.
[QUOTE=tepholman]What I want is a version of this that does not require RD2 and is just the fixed movement and new weapons/bombs.[/QUOTE] It has already been stated that there are Cvars to practically disable the RD2 stuff. This has been specifically designed for the use with RD2, so if you want it without i'd suggest you either use MegaJohnnys version or code it yourself.
I've been having the same problem as Burning_Gray. I'm going to try removing all my addons, and adding them in 10 at a time, when a group messes up, ill narrow it to 5, and so on. If I find the addon(s) that are conflicting, i'll post their name here.
I've found some bugs which I think you should know about: 1. You can move all teams' units at all times. If you set your team to team one, you are still able to command team 2,3,4,5,6' units.. This doesn't just apply to team 1. 2. If you spawn something which you didn't mean to spawn, it'll take your money but when you undo it, it won't give any of it back. 3. When you undo/remove/destroy war melons, it's like they're still checking if they can fire. We had a war in which there were 3 teams. It started to lag because we had too many melons, so we decided to send them all at each other. The lag didn't vanish as we intended :S. Same applys the the regenerative core, except with this, I had proof of it.. First it spammed me when It didn't have any targets, then it spammed me because I removed it.. I'll get the spam here when I get into gmod again :) 4. How do you set the generators team? I can only seem to make it spawn team 1's melons. And a suggestion/request: The melons can't climb ANYTHING. They can't even climb up the shores on freespace :( I would like them to be able to climb the bridge ramp.. If they don't have full speed impact on the ramp, none will get up, and even if some do, there's gonna be a shitload left for you to pick up with your gravity gun and drop them on the bridge. I'm sorry if I'm hard to understand/if these bugs already has been posted..
[QUOTE=Cronos988] Edit: Since i can't PM anyone I'm posting this here: If there's still need for it with the base prop maker i would add most of the PHX "useful construction props" plus the PHX spheres and some PHX wheels. If someone wants a Melon Space War I could also add SBMP props. And sorry if this sounds stupid for a lua coder, but isn't there a way to just add a whole category of props to the Base prop list instead of adding every single one? And Lap maybe you could divide the base prop spawning menu into different categories for later versions when we have more base props. All under the assumption that we don't find a better way of doing this via the base prop maker STool.[/QUOTE] Sounds like a good idea. [QUOTE=snake_1_1]This is where the use of RD3 (once it's out will be a lot better) it doesn't bug out for stuff like that (or RD bugs). The LS_RegisterEnt stuff doesn't even exist anymore. And for RD stuff that don't use any resources you can just do RegisterNonStorageDevice(ent)[/QUOTE] Thanks for taking notice snake. I might need your help for the conversion when RD3 comes around. [QUOTE=tepholman]What I want is a version of this that does not require RD2 and is just the fixed movement and new weapons/bombs.[/QUOTE] My melons are not balanced versus each other. They have money to balance them. Johnnys do not and therefore it wouldn't make sense to add a lot of my melons to his version. The improved controls and such are universally useful. These can easily be added. [QUOTE=Marine123]I've been having the same problem as Burning_Gray. I'm going to try removing all my addons, and adding them in 10 at a time, when a group messes up, ill narrow it to 5, and so on. If I find the addon(s) that are conflicting, i'll post their name here.[/QUOTE] Please let us know what you find. I want to find the culprits before next release. [QUOTE=mu ha ha]I've found some bugs which I think you should know about: 1. You can move all teams' units at all times. If you set your team to team one, you are still able to command team 2,3,4,5,6' units.. This doesn't just apply to team 1. 2. If you spawn something which you didn't mean to spawn, it'll take your money but when you undo it, it won't give any of it back. 3. When you undo/remove/destroy war melons, it's like they're still checking if they can fire. We had a war in which there were 3 teams. It started to lag because we had too many melons, so we decided to send them all at each other. The lag didn't vanish as we intended :S. Same applys the the regenerative core, except with this, I had proof of it.. First it spammed me when It didn't have any targets, then it spammed me because I removed it.. I'll get the spam here when I get into gmod again :) 4. How do you set the generators team? I can only seem to make it spawn team 1's melons. And a suggestion/request: The melons can't climb ANYTHING. They can't even climb up the shores on freespace :( I would like them to be able to climb the bridge ramp.. If they don't have full speed impact on the ramp, none will get up, and even if some do, there's gonna be a shitload left for you to pick up with your gravity gun and drop them on the bridge.[/quote] 1. I cannot confirm this. Seems to be working properly. 2. This is not a bug. You buy it, moneys gone. I don't want lamers getting refunds on half dead stuff. 3. Cannot confirm. Tried specfically to do anything I could to the regen core to get it angry and failed. Any way to reproduce this? 4. Wire only at the moment. I think now that I have a team gun I might be able to just have them auto select a team based on the player who built it. I might use VGUI later.
-snip- My first idea was pretty dumb. trying to work out a way to just add a whole directory of models via "file.Find". Problem is it only gives me the file names, not the complete paths. Edit2: ok, new try: [lua] local phxmdl = file.Find("models/props_phx/construct/*.mdl") function = addtolist (k, v) list.Set("BasePropModels", "models/props_phx/construct/" + "v", {}) end table.Foreach(phxmdl, addtolist) [/lua] the "+" is there to add the v (the filename) add the end of the string, so i have the complete path. I don't know if that's the right symbol though.
It doesn't seem to be any of my addons. I'm going to try messing with my lua folder. [b]EDIT:[/b] I got it working! Now I just need to put things back into my lua folder untill it stops working. [b]EDIT:[/b] Shit. I don't know how, but I somehow fixed the problem.
[QUOTE=Lap]3. Cannot confirm. Tried specfically to do anything I could to the regen core to get it angry and failed. Any way to reproduce this?[/QUOTE] This is how I did it with the regenerative core: 1. I had a damaged melon outside my base. 2. I spawned the regen core 3. I moved the melon close to the regen and watched it get healed. 4. Once the melon was fully healed, I moved it away. 5. Spam starts. Something with Johnny_medic or something like that I'll get the error when I get the time :) 6. I remove the regen core, since the spam is annoying. 5. New spam kicks in, this time it's something returning a NILL value. I think that the regen core partly thinks it's still there.. About the melons not actually getting removed: I don't have any console spam that can confirm this or anything. Just try and have a massive battle, If the melons made you lag, the lag just won't go away :/ The lag will also build up as you spawn more melons and they get killed, even if you don't have many melons spawned at a time. The melons seem to be very laggy. Could you do some optimizing before you add more stuff please? :D I'd love you very much.. I really like this mod and I think it has a lot of potential :)
Just a quick request to anyone who has been tinkering. If you have new tools, units, scripts, or whatever than send them to my email [email]l_a_p@hotmail.com[/email] and I'll see about getting them into the next release.
[QUOTE=Lap]Just a quick request to anyone who has been tinkering. If you have new tools, units, scripts, or whatever than send them to my email [email]l_a_p@hotmail.com[/email] and I'll see about getting them into the next release.[/QUOTE] I'm gonna send you a long list of props. But i have an Idea: would it be possible to take Blob202's STool and turn it into a script that automatically turns every prop spawned into a base prop. If you can't afford it the prop gets deleted. It could either calculate the props normal HP or use the value currently set in the BaseProp spawner STool. Since this isn't a gamemode we would need a Server cvar to disable it, and maybe limit it's effect to players so Admins can still spawn normal props. If I get the code of the STool i could try it, but I'm still a lua noob, so maybe Blob202 can do this, since he's the one who coded it in the first place?
[QUOTE=Cronos988]I'm gonna send you a long list of props. But i have an Idea: would it be possible to take Blob202's STool and turn it into a script that automatically turns every prop spawned into a base prop. If you can't afford it the prop gets deleted. It could either calculate the props normal HP or use the value currently set in the BaseProp spawner STool. Since this isn't a gamemode we would need a Server cvar to disable it, and maybe limit it's effect to players so Admins can still spawn normal props. If I get the code of the STool i could try it, but I'm still a lua noob, so maybe Blob202 can do this, since he's the one who coded it in the first place?[/QUOTE] If blob throws me the tool I'll do my best.
Where is the download?
My e-mail client is being a pain in the ass right now, so I will just post the stool code here: NOTE: Just a quick note, in order to get the automatic script idea working, what you need is to make a server autorun script, for the function GM:PropSpawn or GM:SpawnProp (I forget the exact function), and then in there have it check like a CVar for the player's team, and then when the player spawns any prop, the function can modify the prop like my stool does. basepropsetter.lua [lua] TOOL.Category = "(WarMelons)" TOOL.Name = "#Base Prop Setter" TOOL.Command = nil TOOL.ConfigName = "" TOOL.ClientConVar[ "teamnumber" ] = "1" TOOL.ClientConVar[ "health" ] = "100" if (CLIENT) then language.Add( "Tool_baseprops_name", "Base Prop Setter" ) language.Add( "Tool_baseprops_desc", "Creates breakable props from existing models." ) language.Add( "Tool_baseprops_0", "Left-click to create a convert your eye prop. Right-click to repair a prop." ) language.Add( "Undone_baseprops", "Undone NRG Relay" ) end function TOOL:LeftClick (trace) if ( SERVER ) then local Pos = trace.HitPos local Ang = trace.HitNormal local entz = ents.FindByClass("lap_spawnpoint"); local entz2 = ents.FindByClass("lap_nrgrelay"); local ply = self:GetOwner() local relay = 0 local spawnpoint = 0 local buildradius = server_settings.Int( "WM_BuildRadius", 750 ) local cteam = self:GetClientNumber("teamnumber") for k, v in pairs(entz) do local dist = v:GetPos():Distance(Pos); if (v.Team == cteam && dist <= buildradius) then spawnpoint = 1 end end for k, v in pairs(entz2) do local dist2 = v:GetPos():Distance(Pos); if (v.Team == cteam && dist2 <= 2080) then relay = 1 end end local nrgsup = ply:GetNetworkedInt( "nrg" ) local propcost = server_settings.Int( "WM_Propcost", 2 ) local cost = self:GetClientNumber("health")*propcost if (trace.Entity:IsValid()) then cost = cost + trace.Entity:GetPhysicsObject():GetMass() end if (trace.Hit && trace.Entity:IsValid() && nrgsup >= cost) then if ( relay == 1 || spawnpoint == 1 ) then local t = self:GetClientNumber("teamnumber") local eang = ply:EyeAngles() ply:SetNetworkedInt( "nrg" , nrgsup - cost) melon = ents.Create ("melon_baseprop"); melon:SetPos (trace.Entity:GetPos()); melon:SetAngles (trace.Entity:GetAngles()); melon:GetTable().Team = self:GetClientNumber("teamnumber"); melon:GetTable().health = self:GetClientNumber("health"); melon:GetTable().maxhealth = self:GetClientNumber("health"); melon:SetModel(trace.Entity:GetModel()); if (t == 1) then melon:SetColor (255, 0, 0, 255); end if (t == 2) then melon:SetColor (0, 0, 255, 255); end if (t == 3) then melon:SetColor (0, 255, 0, 255); end if (t == 4) then melon:SetColor (255, 255, 0, 255); end if (t == 5) then melon:SetColor (255, 0, 255, 255); end if (t == 6) then melon:SetColor (0, 255, 255, 255); end melon:Spawn (); melon:Activate (); melon:GetPhysicsObject():EnableGravity(0); trace.Entity:Remove(); --trace.Entity:DeleteOnRemove(melon); undo.Create("relay"); undo.AddEntity (melon); undo.SetPlayer (self:GetOwner()); undo.Finish(); return true; else ply:PrintMessage(HUD_PRINTTALK, "Too far from spawn point or another relay") end else local message = "Your NRG:" .. ply:GetNetworkedInt( "nrg" ) .. " Cost: " .. cost ply:PrintMessage(HUD_PRINTTALK, message) return false end end end function TOOL:RightClick (trace) if (SERVER) then local Pos = trace.HitPos local Ang = trace.HitNormal local entz = ents.FindByClass("lap_spawnpoint"); local entz2 = ents.FindByClass("lap_nrgrelay"); local ply = self:GetOwner() local relay = 0 local spawnpoint = 0 local buildradius = server_settings.Int( "WM_BuildRadius", 750 ) local cteam = self:GetClientNumber("teamnumber") for k, v in pairs(entz) do local dist = v:GetPos():Distance(Pos); if (v.Team == cteam && dist <= buildradius) then spawnpoint = 1 end end for k, v in pairs(entz2) do local dist2 = v:GetPos():Distance(Pos); if (v.Team == cteam && dist2 <= 2080) then relay = 1 end end local nrgsup = ply:GetNetworkedInt( "nrg" ) local propcost = server_settings.Int( "WM_Propcost", 2 ) local cost = self:GetClientNumber("health")*propcost if (trace.Hit && trace.Entity:IsValid() && trace.Entity:GetClass() == "melon_baseprop") then if (nrgsup >= cost) then if ( relay == 1 || spawnpoint == 1 ) then ply:SetNetworkedInt( "nrg" , nrgsup - cost) trace.Entity:GetTable().maxhealth = self:GetClientNumber("health") trace.Entity:GetTable().health = self:GetClientNumber("health") ply:PrintMessage(HUD_PRINTTALK, "Health Updated") return true else ply:PrintMessage(HUD_PRINTTALK, "Too far from spawn point or another relay") end else local message = "Your NRG:" .. ply:GetNetworkedInt( "nrg" ) .. " Cost: " .. cost ply:PrintMessage(HUD_PRINTTALK, message) return false end end end end function TOOL.BuildCPanel (CPanel) CPanel:AddControl ("Header", { Text="#Tool_baseprops_name", Description="#Tool_baseprops_desc" }) CPanel:AddControl ("Slider", { Label = "Team number", Command = "baseprops_teamnumber", Type = "Integer", Min = "1", Max = "6" } ) CPanel:AddControl ("Slider", { Label = "Health", Command = "baseprops_health", Type = "Integer", Min = "50", Max = "1000" } ) end [/lua]
Could someone ... give me a download??
Yeah what the crap guys, put a link at least to the mod.
Holy shit, have meh bebbies. [b]Edit:[/b] And a download link to the people who are :downs: and didn't read the thread: [url]http://files.filefront.com/WarMelonsRTSzip/;11348959;/fileinfo.html[/url]
Pro tip - Read the thread.
When I try to spawn some melons, it gives me a 'Too far from spawn point' message. What is a spawn point? And where are the superweapons???
[QUOTE=Skcorps]When I try to spawn some melons, it gives me a 'Too far from spawn point' message. What is a spawn point? And where are the superweapons???[/QUOTE] Pro tip #2: Read the manual.
The Manual's link doesn't work anymore, it says it 'cannot find server'.
Works instantly for me. The manual is also included in the download and it's one of the first files you see when you open up the zip.
Any progress on this mod?
I've changed Blob202s script so it now automatically turns props into base props. As of now there's no server cvar to disable it, cause I don't know how to add one. Props do not always spawn where they should, but I don't know what causes this and it's a pretty minor bug. Here it is: [lua]local teamnumber = CreateClientConVar("set_teamnumber", 1, true, true) local prophealth = CreateClientConVar("set_prophealth", 500, true, true) function createbaseprop (ply, mdl) if ( SERVER ) then local traceRes = ply:GetEyeTrace() local Pos = traceRes.HitPos local Ang = traceRes.HitNormal local entz = ents.FindByClass("lap_spawnpoint"); local entz2 = ents.FindByClass("lap_nrgrelay"); local relay = 0 local spawnpoint = 0 local buildradius = server_settings.Int( "WM_BuildRadius", 750 ) local cteam = teamnumber:GetInt(); local ply = ply for k, v in pairs(entz) do local dist = v:GetPos():Distance(Pos); if (v.Team == cteam && dist <= buildradius) then spawnpoint = 1 end end for k, v in pairs(entz2) do local dist2 = v:GetPos():Distance(Pos); if (v.Team == cteam && dist2 <= 2080) then relay = 1 end end local nrgsup = ply:GetNetworkedInt( "nrg" ) local propcost = server_settings.Int( "WM_Propcost", 2 ) local cost = prophealth:GetInt()*propcost if (nrgsup >= cost) then if ( relay == 1 || spawnpoint == 1 ) then local t = teamnumber:GetInt(); local eang = ply:EyeAngles() ply:SetNetworkedInt( "nrg" , nrgsup - cost) melon = ents.Create ("melon_baseprop"); melon:SetPos (Pos); melon:SetAngles (Ang); melon:GetTable().Team = teamnumber:GetInt(); melon:GetTable().health = prophealth:GetInt(); melon:GetTable().maxhealth = prophealth:GetInt(); melon:SetModel(mdl); if (t == 1) then melon:SetColor (255, 0, 0, 255); end if (t == 2) then melon:SetColor (0, 0, 255, 255); end if (t == 3) then melon:SetColor (0, 255, 0, 255); end if (t == 4) then melon:SetColor (255, 255, 0, 255); end if (t == 5) then melon:SetColor (255, 0, 255, 255); end if (t == 6) then melon:SetColor (0, 255, 255, 255); end melon:Spawn (); melon:Activate (); melon:GetPhysicsObject():EnableGravity(0); undo.Create("relay"); undo.AddEntity (melon); undo.SetPlayer (ply); undo.Finish(); return false; else ply:PrintMessage(HUD_PRINTTALK, "Too far from spawn point or another relay") return false end else local message = "Your NRG:" .. ply:GetNetworkedInt( "nrg" ) .. " Cost: " .. cost ply:PrintMessage(HUD_PRINTTALK, message) return false end end end hook.Add("PlayerSpawnProp", "PlayerSpawnNonbaseProp", createbaseprop)[/lua] as of now you have to set team number an health via a convar. we could either make the health value from the base prop spawner a networked Int or embed this script in the spawner. And there's no mass in the cost equation any more. Since this hook kicks in before the prop is actually spawned there's no entity to get the mass from. If Mass should be in the equation (though i can't find a reason for the mass to be there, prop health is absolute or isn't it?) you would have to use gm:playerspawnedProp. Probably wouldn't change much, you'd only have to delete the normal prop afterwards.
[QUOTE=Lap]Works instantly for me. The manual is also included in the download and it's one of the first files you see when you open up the zip.[/QUOTE] Well, it doesn't for me. I have no idea why, it looks fine... So can you just tell me? Where are the superweapons, and what is a SpawnPoint? Or at least upload the manual .txt somewhere...
Sorry, you need to Log In to post a reply to this thread.