• RD2: Resource Distribution 2
    524 replies, posted
You can tweak the Terraformer in the file so that you can spawn and use it like I did on my server :D *Worships the Time Lords Science Storage Vessel*
Ah, thanks for the help , i was starting to go nuts trying to find it :P
[QUOTE=PuddlePirate]You can tweak the Terraformer in the file so that you can spawn and use it like I did on my server :D *Worships the Time Lords Science Storage Vessel*[/QUOTE] Yea the terraformer code is already included in LS2, it's just not showing up in the list, but is there already for other devs to see how it works.
But you can't mine terrajuice so there's not really much use for it right?
Correct, But if you know some lua you can whip up a ent that creates the juice, something like to the oil drill.
[QUOTE=PuddlePirate]Correct, But if you know some lua you can whip up a ent that creates the juice, something like to the oil drill.[/QUOTE] Or you could make an addon and create a new terraformer that uses different resources (It's been made so other other devs can easily add new TerraFormers, Air and Heat Exchangers without needing to put them over the new ones (it just depends on the registration and some vars). I've already put some info about it in the FAQ's of the official website.
Looking through your code made me recognizing this: base_rd_entity/init.lua [lua]function ENT:OnTakeDamage(DmgInfo)//should make the damage go to the shield if the shield is installed(CDS) if ent.Shield then ent.Shield:ShieldDamage(DmgInfo:GetDamage()) CDS_ShieldImpact(self.Entity:GetPos()) return end DamageLS(self, DmgInfo:GetDamage()) end[/lua] Neither ent nor ent.Shield is defined in there and may produce lua errors (tried to index a nil value)
[QUOTE=aVoN]Looking through your code made me recognizing this: base_rd_entity/init.lua [lua]function ENT:OnTakeDamage(DmgInfo)//should make the damage go to the shield if the shield is installed(CDS) if ent.Shield then ent.Shield:ShieldDamage(DmgInfo:GetDamage()) CDS_ShieldImpact(self.Entity:GetPos()) return end DamageLS(self, DmgInfo:GetDamage()) end[/lua] Neither ent nor ent.Shield is defined in there and may produce lua errors (tried to index a nil value)[/QUOTE] Why would that produce errors?
[QUOTE=Catdaemon]Why would that produce errors?[/QUOTE] Because it does. If it was [lua] if ent and ent.Shield then [/lua] It wouldn't. But still, ent isn't being defined.
Yes, it actually even does :) [code]Error: [Scripted Entity Function] entities/base_rd_entity/init.lua:34: attempt to index global 'ent' (a nil value)[/code]
[QUOTE=aVoN]Yes, it actually even does :) [code]Error: [Scripted Entity Function] entities/base_rd_entity/init.lua:34: attempt to index global 'ent' (a nil value)[/code][/QUOTE] Is already fixed in the svn (since yesterday). Tad just needs to upload it.
Hi, is there a bug with the cutoff valve?I see you have "No cutoff valve hax" but i am not sure if this means it's not supposed to work, or if it's a bug. I have not used version 1 before so i am not sure about the history of this, but the current one seems cool!
I'm working on a different approach to RD. I found the old one poorly thought out and buggy as shit, so I started making one from scratch. The problem is that the resources in RD have always been abstract values with very little importance to the player, since EVERY resource acts like electricity. I'm doing it by making the dev define a "header" type dealie so that other parts of the script have a fairly low-cost reference point for dynamic factors, like rate of flow, density, that kind of thing. If you go to [url]www.gamedev.net[/url], there are no shortage of fluid dispersing algorithms, and they take so little to run that there's really no point in having resources propagate instantly.
I've found a bug in RD2 while experimenting with it. The new Link Junctions Don't update to each other properly if you have a chain of them. I'll try to explain: Say you have Solar Panel > Junction > Energy Cache and then add Junction > new 2nd Junction then add to that 2nd Junction > Coolant Compressor 2nd Junction > Large Coolant Tank The Coolant resources do not get updated on the first Junction unless the 2 junctions are reconnected after there is coolant listed on the 2nd junction list. With a large network of junctions, this lack of distribution can get awkward when resources at one end are needed at the other - the links through the whole network need to be rebuilt. Hope I made sense :P
[QUOTE=subenji99]I've found a bug in RD2 while experimenting with it. The new Link Junctions Don't update to each other properly if you have a chain of them. I'll try to explain: Say you have Solar Panel > Junction > Energy Cache and then add Junction > new 2nd Junction then add to that 2nd Junction > Coolant Compressor 2nd Junction > Large Coolant Tank The Coolant resources do not get updated on the first Junction unless the 2 junctions are reconnected after there is coolant listed on the 2nd junction list. With a large network of junctions, this lack of distribution can get awkward when resources at one end are needed at the other - the links through the whole network need to be rebuilt. Hope I made sense :P[/QUOTE] Damn it, someone must have broken it while I was away, that was all working last time I was working on it.
I had the same issue with the junctions during development. I told space and snake about it and apparently they knew about the issue :)
[QUOTE=Q42]I'm working on a different approach to RD. I found the old one poorly thought out and buggy as shit, so I started making one from scratch. The problem is that the resources in RD have always been abstract values with very little importance to the player, since EVERY resource acts like electricity.[/QUOTE] It's more like sub-ether. [QUOTE=Q42]I'm doing it by making the dev define a "header" type dealie so that other parts of the script have a fairly low-cost reference point for dynamic factors, like rate of flow, density, that kind of thing. If you go to [url]www.gamedev.net[/url], there are no shortage of fluid dispersing algorithms, and they take so little to run that there's really no point in having resources propagate instantly.[/QUOTE] My appeoach was a rather simple idea: A network is just a table shared between linked ents and you don't have to rebuild a net to add to it. The old RD used propagation to update nets, each ent had a net tab that recursed to all linked ents, this was rather slow. RD2 only has to change the values in one tab and the update it done. I was only replicating the functions of RD1 for right now, RD3 will add new functions to make custom nets that can work however you want (it's just a table that's shared between link ents, you can do all sorts of stuff with that). I was going to add a net type that would work like a CPU (or more like a real power supply via amps).
I have a small question, When is the debugging text being removed bycose my server console is being spammed with Pumping Air and that kind of stuff and its getting verry anoying.
Links don't seem to work, Entities still disappearing. I did delete the other addons so... Well, nothing in the console, except for sv_cheats turning on and off. Anyone else seen this? I also touched my storage device with the physgun and it said: [lua]autorun/server/sv_resource2.lua:496: attempt to perform arithmetic on a nil value[/lua]
[QUOTE=Midtown123]Links don't seem to work, Entities still disappearing. I did delete the other addons so... Well, nothing in the console, except for sv_cheats turning on and off. Anyone else seen this? I also touched my storage device with the physgun and it said: [lua]autorun/server/sv_resource2.lua:496: attempt to perform arithmetic on a nil value[/lua][/QUOTE] Where is the Life Support Stuff located and where is the RD located? Also try and see if anything is conflicting. Use SVN if your not already. IF all else fails, reinstall Gmod.
What? tortoise SVN? What does it do? They are in addons...
[QUOTE=kevkev]I have a small question, When is the debugging text being removed bycose my server console is being spammed with Pumping Air and that kind of stuff and its getting verry anoying.[/QUOTE] Damn, must have missed some. They should be removed on the next update.
I get: [code] Error: [Scripted Entity Function] entities/base_rd_entity/init.lua:34: attempt to index global 'ent' (a nil value)[/code] each time I shoot a RD-based entity. Are these entities supposed to be destroyable? They don't seem to take damage. Everything else is working fine, and I checked the installation twice.
[QUOTE=tad2020]Damn, must have missed some. They should be removed on the next update.[/QUOTE] Thanks, and also i get something about a vehicle not having recources?
A Lua question here. How can i determine if the entity is in space?
[QUOTE=MrLol]I get: [code] Error: [Scripted Entity Function] entities/base_rd_entity/init.lua:34: attempt to index global 'ent' (a nil value)[/code] each time I shoot a RD-based entity. Are these entities supposed to be destroyable? They don't seem to take damage. Everything else is working fine, and I checked the installation twice.[/QUOTE] That's cause someone changed something shortly before release (when I was busy at work) and didn't test it. It's fixed for the next update, which should be this afternoon-evening (it's 7am now).
[QUOTE=SuperU]A Lua question here. How can i determine if the entity is in space?[/QUOTE] self.planet => nil = inspace, value = in an environment.
O thanks.
Whens RD3 gonna come out? RD2 doesn't work! :argh: Really, it doesn't
Not sure if this is a life support, resource distribution, or advanced duplicator problem... It is not possible to connect resource tanks directly to a pod, once that pod has been pasted by the duplicator (it errors as an invalid source/destination). This includes attempting to connect storage devices directly to a pod on a duplicated contraption, and any saved connections. A freshly spawned pod can be connected properly, but if that connected pod is duplicated, the copy will error when being pasted (invalid source/destination). Sounds like whatever registers the pod as a valid resource distribution entity is not being saved properly. Thanks to the sb2 team for your constant efforts in fixing the bugs with the system. Your work is greatly appreciated.
Sorry, you need to Log In to post a reply to this thread.