Subscribe
 Post #1
 9th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Download Here:
http://forums.facepunchstudios.com/s...d.php?t=425101


Update: Version 1.3:

-Mostly Fixed: Pumps
-Fixed: Supply Connectors saving to Adv. Duplicator


Update: Version 1.1:

-Added: Client-Side Beams
-Added: Cutoff Valve
-Added: Pumps

Client-Side Beams
Thanks to Tad2020's Beam Library you can now link resources without costly ropes lagging your server!

Cutoff Valve
This device can temporarly stop the flow of resources, effectively splitting resource networks. For example, you could shut off power to portions of your ship's systems, or prevent your resources from being siphoned out of Supply Conectors.

Pumps
Supply Connectors can now spawn with Pumps installed with a configurable transfer rate. This will allow you to create refill stations which dispense resources at a controlled rate.


Description:
This is mainly a tool for developing Scripted Entities which operate on resources. For example, you could create a Bread Machine that consumes Flour, Water, Yeast and Energy to produce units of Bread, which could either be stored in a container or consumed by the player if user-addon provides for it.

An example of what this can do is found in the Life Support Mod, where the 3 main resources of Air, Energy and Coolant are generated, stored, distributed and consumed for the purpose of survival in hostile environments. The best part is that it's extremely easy to use. For example:

our Bread Machine's Init() function could have the following lines included:
Code:
RD_AddResource(self.Entity, "flour", 0)
RD_AddResource(self.Entity, "water", 0)
RD_AddResource(self.Entity, "yeast", 0)
RD_AddResource(self.Entity, "energy", 0)

Then in the Bread Machine's Think() function it could say:
Code:
local flour = RD_GetResourceAmount(self, "flour")
local water = RD_GetResourceAmount(self, "water")
local yeast = RD_GetResourceAmount(self, "yeast")
local energy = RD_GetResourceAmount(self, "energy")

if (flour >= 4) and (water >= 2) and (yeast >= 1) and (energy >= 25) then
	RD_ConsumeResource(self, "flour", 4)
	RD_ConsumeResource(self, "water", 2)
	RD_ConsumeResource(self, "yeast", 1)
	RD_ConsumeResource(self, "energy", 25)

	... MAKE BREAD ....
end

Here are the utility function definitions:
Code:
RD_AddResource(ent, res, capacity)
--Adds a named resource with the specified storage capacity to the ent

RD_ConsumeResource(ent, res, amount)
--Consumes a named resource from the entity

RD_SupplyResource(ent, res, amount)
--Replenishes a named resource on the entity by a specified amount

RD_GetResourceAmount(ent, res)
--Returns the amount of a named resource accessable to the entity

RD_GetUnitCapacity(ent, res)
--Returns the maximum storage capacity of a specified entity, disregarding the network size(for named resource only)

RD_GetNetworkCapacity(ent, res)
--Returns the maximum storage capacity of an entire network accessable to the entity(for named resource only)

Using the included Link Tool you can hook devices up and create networks of shared resources. Also included is a retractable Supply Connector for temporary connections such as fueling stations or modular forts.

I have included some test entities in the base pack, the "Bucket o' Crud", the "Tub o' Crud and Junk", and the "Barrel o' Stuff and Junk." These are accessable in the SEnts Spawn Menu, and serve no other purpose than perhaps as templates for you to study.

Please note that Life Support 1.6 will conflict with this mod. Life Support 1.7 was built with Resource Distribution as a foundation, and will thus be compatible. When Garrysmod.org returns from the abyss, I'll be updating that and SpaceBuild.

Enjoy, and Happy Modding!


Addons using Resource Distribution:

Life Support: Petrol Systems

GCombat Damage System

Energy Generation 1.0

Life Support/SpaceBuild - EMP Coil

Powered Omni-Laser

Hydrogen Systems! Life Support Version 2!

Life Support Systems

Life Support System Cheats

Razer Weapon

Plasma Weapon

Tiberium!

Space Shield

Res. Distrib. Plug

Cloaking Button
 Post #2
 9th April 2007
Gold Member
PieClock's Avatar
August 2006
9,899 Posts
Wrong..place? What?
 Post #3
 9th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
I'm Releasing Lua, this is Lua Releases.
 Post #4
 9th April 2007
Gold Member
PieClock's Avatar
August 2006
9,899 Posts
It sounded like a snippet of code
 Post #5
 9th April 2007
pyroguy's Avatar
January 2006
300 Posts
Extremely nice. Any RP maker, get on this immediately.
 Post #6
 9th April 2007
Gold Member
PieClock's Avatar
August 2006
9,899 Posts
Sorry I was wrong.. Screens what do I do huh? confused. *buzz BAM my brain*
 Post #7
 9th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Far from being a snippet, it took nearly a week and was re-engineered at least 3 times with lots of coffee and anime to keep sane...
 Post #8
 9th April 2007
azagedon's Avatar
April 2006
246 Posts
Lol simply amazing..
 Post #9
 9th April 2007
pyroguy's Avatar
January 2006
300 Posts
If you don't know what to do you probably don't need it. It is a Lua function package; it adds nothing to the actual game, it is useful for programmers, though.
 Post #10
 9th April 2007
Gold Member
PieClock's Avatar
August 2006
9,899 Posts
pyroguy posted:
If you don't know what to do you probably don't need it. It is a Lua function package; it adds nothing to the actual game, it is useful for programmers, though.
Now you tell me.
 Post #11
 9th April 2007
Gold Member
bord2tears's Avatar
May 2005
2,747 Posts
Wow, very nice release. Does this networked entity setup cut back on the lag of space build?
 Post #12
 9th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
bord2tears posted:
Wow, very nice release. Does this networked entity setup cut back on the lag of space build?
It does as little traversal as possible, and caches the most direct routes through each network so that when traversal is necessary most of the time it's trivial.
 Post #13
 9th April 2007
NukePower's Avatar
September 2005
794 Posts
Falling sand game anyone? We need to get working on that =D
 Post #14
 9th April 2007
Evixian's Avatar
March 2007
625 Posts
This looks extremely useful. What are the "ingredients" for Life Support items, for people who wish to build, say, a car that needs energy?
 Post #15
 9th April 2007
Gold Member
Foda's Avatar
April 2006
2,481 Posts
FINALLY! I have been waiting for something like this! I can't wait for Life Support 1.7!
 Post #16
 9th April 2007
Skurmedel's Avatar
November 2006
750 Posts
Yay, now I can make a beer brewing rpg!
 Post #17
 9th April 2007
Ninja_Danz0r's Avatar
April 2007
1,010 Posts
Crossing this with the tiberium mod and you get resource gathering, right?
By the way, something made out of coffee and anime can't be anything but great, keep up the good work!
 Post #18
 9th April 2007
Kane's Avatar
October 2006
148 Posts
Ah, I heard you talking about this today on the SpaceBuild server. It's a great code for anything that needs resources and it won't lag the server to a slow painful death. Thanks for the release!
 Post #19
 9th April 2007
Q42's Avatar
August 2006
1,939 Posts
Congratulations. you have successfully made my life exactly 3000% easier. A winrar is you.

[spoiler]you're such a good person [/spoiler]
 Post #20
 9th April 2007
XreDuex's Avatar
September 2006
101 Posts
I love you.

Q42 posted:
A winrar is you.
You'd think that that would get very claustrophobic.

[spoiler]Yes, saying "that that would" is proper grammar...you fracking Nazis.[/spoiler]
 Post #21
 9th April 2007
m1573r_1337's Avatar
May 2006
523 Posts
Hey Shanjaq! Garrysmod.org has been up, then went back down again. Try every minute! I was the new life support!
 Post #22
 9th April 2007
Gold Member
tad2020's Avatar
December 2006
1,656 Posts
Thanks some much for this! I'll put it to good use.

I'll have a generic client side beams module as soon as I can.

Shanjaq posted:
Far from being a snippet, it took nearly a week and was re-engineered at least 3 times with lots of coffee and anime to keep sane...
If you need to restock on anime, I've got several TBs.
 Post #23
 9th April 2007
Gold Member
jaredop's Avatar
September 2005
4,388 Posts
Attention:
This is the 7,777th thread in the Lua Scripting forums

That is all.
 Post #24
 9th April 2007
Gold Member
Cey22's Avatar
December 2006
5,931 Posts
jaredop posted:
Attention:
This is the 7,777th thread in the LUA Scripting forums

That is all.
I Jesus was to visit any thread, he'

I AM JESUS!

MUAHAHAHA


also easter
 Post #25
 9th April 2007
Jeffman12's Avatar
July 2005
1,624 Posts
One step closer to harvesting that pesky Tiberium!
 Post #26
 9th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
tad2020 posted:
Thanks some much for this! I'll put it to good use.

I'll have a generic client side beams module as soon as I can.



If you need to restock on anime, I've got several TBs.
Excellent! I'll be glad to use client-side beams, and I'm sure everyone else would be happy too :)
 Post #27
 9th April 2007
TwingeCrag's Avatar
July 2006
1,161 Posts
Very nice, now for a way to power that deathray .

I know! I know! I will use hamsters!
Also, I think any resource modules made by the community should be posted here, in this thread, so we don't have a million flying around like hell.

[spoiler]hamsters are the best resource evar.[/spoiler]
 Post #28
 10th April 2007
TomatoSoup's Avatar
December 2006
1,636 Posts
Hmmm... We just need to figure out how to stick in object support for this. So we can hook resources up to lasers, rocket launchers, other... non... killy... tingies...

TwingeCrag posted:
so we don't have a million flying around like hell.
Like with the eHud, right?
 Post #29
 10th April 2007
Gold Member
Gmod4ever's Avatar
August 2005
12,301 Posts
I can start working on a way to combine this (I might rewrite it just for the experience :excited:) and StudentLoon's Tiberium. Then, maybe, I can devise a way of getting a Command and Conquer resource gathering thing going on. Or at least a StarCraft thing.

Now, what to use as the Vespene geysers? Hmm...
 Post #30
 10th April 2007
zerglingv2's Avatar
February 2006
1,638 Posts
O wait never mind saw the other download .
 Post #31
 10th April 2007
Gold Member
lil timmy's Avatar
February 2006
2,738 Posts
Garrysmod.org says the file was not found, which means I can't download which also means I am a very unhappy easter bunneh...
 Post #32
 10th April 2007
ana-r3x3a's Avatar
April 2007
73 Posts
k how do you use this can you post a video tutorial
 Post #33
 10th April 2007
Jeffman12's Avatar
July 2005
1,624 Posts
Hey guys, Stickynade made a way for people to power a Wire Turret off of Life Support energy. He didn't however, from what he told me, find a way to decrease the energy without using a lifesupport power device.
 Post #34
 11th April 2007
Gold Member
lil timmy's Avatar
February 2006
2,738 Posts
Yay! it works now=D I'm so happy
 Post #35
 11th April 2007
TomatoSoup's Avatar
December 2006
1,636 Posts
This seems kinda confusing, but very useful. but oh well. Let's say we don't want to see the resource distribution network components, and just want the functioning part for other addons that use this. Delete the Barrel, Tub, and Bucket entities?

And the weapons folder? Because Life Support already has the supply connector and the link tool. (right?)

Edit:

Kay, copied the autorun folder, the res_pump entity, and the weapons, but set their categories to be (shanjaq) like the rest of life support.

Can I delete the resource distribution addon, because I took everything I need from it out, and put it with life support.

Because, I figure that I'll never remove life support from the server. So I can just consolidate those two addons together.
 Post #36
 11th April 2007
Bajenovskii's Avatar
January 2005
1,511 Posts
This is great news. I just wish I had the time to actually use it for something.
 Post #37
 12th April 2007
Dennab
December 2006
2,445 Posts


Cool and great
 Post #38
 12th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Evixian posted:
This looks extremely useful. What are the "ingredients" for Life Support items, for people who wish to build, say, a car that needs energy?
The ingredients are all lowercase: "air", "energy" and "coolant". If you add those resources to your entities they will automatically be supported by the Life Support Addon, and vice-versa.
 Post #39
 12th April 2007
azagedon's Avatar
April 2006
246 Posts
Fuel for cars! Now that would kick ass..
 Post #40
 12th April 2007
Gold Member
conman420's Avatar
January 2007
4,645 Posts
I'm learning lua so my first proper script will be something to do with this.
 Post #41
 12th April 2007
Gold Member
tad2020's Avatar
December 2006
1,656 Posts
Shanjaq posted:
The ingredients are all lowercase: "air", "energy" and "coolant". If you add those resources to your entities they will automatically be supported by the Life Support Addon, and vice-versa.
Neato torpedo!
 Post #42
 13th April 2007
Dennab
June 2005
1,373 Posts
Hello

Already posted a few problems I have with Life support.
Now I also need to report a few with this one.

Console gives these errors somethimes(I even think it let my server crash just now :s => console started to spam these errors and then it crashed):

LS: Autorun/server/sv_resource.lua:44: attempt to index field 'entity' (a nil value) => mostly this one

LS/ autorun/server/sv_resource.lua:285: bad argument #1 to 'pairs' (table expected, got nill)
 Post #43
 13th April 2007
Raccoon's Avatar
September 2005
209 Posts
Hey is there any way to set a model for an item like if I add a command to drop a certain Resource and it would be set as a model?

Edit:

Ignore my last post. Sorry
 Post #44
 13th April 2007
Gold Member
Hanley's Avatar
June 2006
3,314 Posts
I'm trying to create a "Fuel" resource right now, the storage is going to be the 55 gal drum same as the barrel, it's based off of it, and the hydro generator is going to be the "Fuel Compressor" but I don't know how to make it so it doesn't have to be in the water for it too work.
 Post #45
 14th April 2007
Gold Member
Ohforf's Avatar
August 2006
4,451 Posts
Sweet! But can I make new resources my self? Like metal and rubber and stuff?
 Post #46
 14th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Ohforf posted:
Sweet! But can I make new resources my self? Like metal and rubber and stuff?
Go for it! That's the reason I built this. :)

Edit:

Hanley posted:
I'm trying to create a "Fuel" resource right now, the storage is going to be the 55 gal drum same as the barrel, it's based off of it, and the hydro generator is going to be the "Fuel Compressor" but I don't know how to make it so it doesn't have to be in the water for it too work.
You'd probably be better off starting with one of the SEnts that came with this pack or starting a new one entirely. The Hydro Generator in Life Support just uses a water check to decide if it should be adding resources or not.

Edit:

snake_1_1 posted:
Hello

Already posted a few problems I have with Life support.
Now I also need to report a few with this one.

Console gives these errors somethimes(I even think it let my server crash just now :s => console started to spam these errors and then it crashed):

LS: Autorun/server/sv_resource.lua:44: attempt to index field 'entity' (a nil value) => mostly this one

LS/ autorun/server/sv_resource.lua:285: bad argument #1 to 'pairs' (table expected, got nill)

What exactly did you do?
 Post #47
 14th April 2007
Cosmosis's Avatar
May 2005
77 Posts
Ok, first off, all of your stuff has been awesome. :)

I've been tinkering around with the "RDN" to try to get an RP type thing going. One problem I'm having is with my fish net. It works fine except for having to be underwater to use it and after looking at the hydro generator I can see that the bit of enviroment code is interlaced in Life Support. Is it possible I can copy it over or is there an easier way?

Thanks in advance and also would it be possible to add a sample generator in the next update?
 Post #48
 14th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Cosmosis posted:
Ok, first off, all of your stuff has been awesome. :)

I've been tinkering around with the "RDN" to try to get an RP type thing going. One problem I'm having is with my fish net. It works fine except for having to be underwater to use it and after looking at the hydro generator I can see that the bit of enviroment code is interlaced in Life Support. Is it possible I can copy it over or is there an easier way?

Thanks in advance and also would it be possible to add a sample generator in the next update?
Since the "WaterLevel" variable only works on players, I had to write a custom water check, which became a global Life Support function. It essentially boils down to:

Code:
function WaterCheck(ent)
	local entpos = ent:GetPos()
	local trace = {}
		trace.start = entpos
		trace.endpos = entpos + Vector(0,0,10)
		trace.filter = { ent }
		trace.mask = MASK_WATER
	local tr = util.TraceLine( trace )
	if (tr.Hit) then
		Msg( "We are underwater!" )
	else
		Msg( "We are on dry land!" )
	end
end
 Post #49
 14th April 2007
Gold Member
Hanley's Avatar
June 2006
3,314 Posts
Shanjaq posted:
Go for it! That's the reason I built this. :)

Edit:



You'd probably be better off starting with one of the SEnts that came with this pack or starting a new one entirely. The Hydro Generator in Life Support just uses a water check to decide if it should be adding resources or not.

Edit:




What exactly did you do?
I'm using the "Barrel O' Stuff and Junk", I'm just messing with a few varibles but now it won't spawn since I changed the resource to fuel, and then how would I go about creating some kind of compressor/generator to make fuel?
 Post #50
 14th April 2007
Dennab
June 2005
1,373 Posts
Shanjaq posted:
Go for it! That's the reason I built this. :)

Edit:



You'd probably be better off starting with one of the SEnts that came with this pack or starting a new one entirely. The Hydro Generator in Life Support just uses a water check to decide if it should be adding resources or not.

Edit:




What exactly did you do?
The errors randomly come in console and the crash happened when I gave the shutdown command to srcds. Afther the command it just started spamming (about 10 lines) then crashed
 Post #51
 14th April 2007
Gold Member
ghuh's Avatar
August 2006
2,399 Posts
Okay, can someone please make a tutorial, i'm totally confused by this :(
 Post #52
 14th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
snake_1_1 posted:
The errors randomly come in console and the crash happened when I gave the shutdown command to srcds. Afther the command it just started spamming (about 10 lines) then crashed
So if I understand your message correctly, you've created your own SEnts and tried to assign resources to them? Make sure that when addressing your entities, they are actual *entities*, sometimes(not always) you will need to address them as "self.Entity", rather than just "self", depending on which function you're in. The Init() function is notorious for requiring the "self.Entity" reference.
 Post #53
 15th April 2007
Gold Member
ghuh's Avatar
August 2006
2,399 Posts
I made a chinese take out machine and it won't spawn :S
 Post #54
 15th April 2007
Paradukes's Avatar
October 2005
1,124 Posts
What would the script be to determine if an entity uses a certian type of resource?
 Post #55
 15th April 2007
Dennab
June 2005
1,373 Posts
No I didn't make sent's myself, this happened with Life Support.
I don't know anything about lua yet

But I think I found what was causing the problem, posted in wiht life support.
 Post #56
 16th April 2007
Fox682's Avatar
August 2005
222 Posts
Hanley posted:
I'm trying to create a "Fuel" resource right now, the storage is going to be the 55 gal drum same as the barrel, it's based off of it, and the hydro generator is going to be the "Fuel Compressor" but I don't know how to make it so it doesn't have to be in the water for it too work.

AW MAN!

You beat me to it! I just got a bug in my butt to experiment and see if i can do it, and i'm having the same problems.. i can't get the bugger to appear on the list with the other generators :( I'm using a modified Air Compressor, man.. something must be up cause it's not spawning...

I was thinking of using the Coolant Generator as a model but i do think the hydro generator model would be better, it's unlikely you'll be able to put one of these on a ship lol

As for the Storage containers i was thinking of the Propane bottle and the Brown Barrel.


Update/Idea:

*fustration*... this isn't as easy as changing stuff around...

I wonder if it would be easier if we had a Template to add generation resources and storage containters.. cause this is irritating...

I'm going to try one more thing before i give up though...

UPDATE 1:
Ha ha... i got the hydro generator to work out of the water :D
I'll see if i can get it to generate fuel...

UPDATE 2:

Bah, again not as simple as i thought it would be.

For some reason i tried to get the air tank to link up with the hydro generator that generates "Fuel", that was a no go...

So i tried to hook up an Energy Cell modified to hold "Fuel"... it linked but no "Fuel" was transferred...

So obviously this is more than a mere find/replace solution (yes i paid attention to capitalizations)

We need some templates... the bucket and the barrel from the resource distribution when put into the entities folder does not even show up on the list of LS stuff to spawn...

For now i'll wait for some one with actual experiance in Lua to make this, my programming skills are extremely limited...
 Post #57
 16th April 2007
Gold Member
Hanley's Avatar
June 2006
3,314 Posts
Fox682 posted:
AW MAN!

You beat me to it! I just got a bug in my butt to experiment and see if i can do it, and i'm having the same problems.. i can't get the bugger to appear on the list with the other generators :( I'm using a modified Air Compressor, man.. something must be up cause it's not spawning...

I was thinking of using the Coolant Generator as a model but i do think the hydro generator model would be better, it's unlikely you'll be able to put one of these on a ship lol

As for the Storage containers i was thinking of the Propane bottle and the Brown Barrel.


Update/Idea:

*fustration*... this isn't as easy as changing stuff around...

I wonder if it would be easier if we had a Template to add generation resources and storage containters.. cause this is irritating...

I'm going to try one more thing before i give up though...

UPDATE 1:
Ha ha... i got the hydro generator to work out of the water :D
I'll see if i can get it to generate fuel...

UPDATE 2:

Bah, again not as simple as i thought it would be.

For some reason i tried to get the air tank to link up with the hydro generator that generates "Fuel", that was a no go...

So i tried to hook up an Energy Cell modified to hold "Fuel"... it linked but no "Fuel" was transferred...

So obviously this is more than a mere find/replace solution (yes i paid attention to capitalizations)

We need some templates... the bucket and the barrel from the resource distribution when put into the entities folder does not even show up on the list of LS stuff to spawn...

For now i'll wait for some one with actual experiance in Lua to make this, my programming skills are extremely limited...
They show up under the SEnt list, not the LS spawn list. And I've pretty much hit a brick wall as far as fuel goes, so if you get it to work then kudos to you.
 Post #58
 17th April 2007
Fox682's Avatar
August 2005
222 Posts
Alright... I've given up... I need a tutorial.

1. How do we make a generic damageable resource.
2. How do we make a Tank to hold the resource.
3. How do we make the resource be consumed, and output another existing resource...
4. (Bonus!) How do we make the player consume a new resource (like Food!) and need to refill on this new resource.
--------

If someone could make a "Fuel" resource that can be converted to Energy, Coolant, and Air. It's really a Universal Resource that can be used to make everything, of course, thrusters, wheels, weapons, can use the Fuel directly without it needing to be converted.

I Suggested a Fuel resource, it has most of the details hashed out, it just needs to be implemented in some form.

http://forums.facepunchstudios.com/s...284353&page=36
About Half way down, its the long post.


I'm stumped and I don't have time to learn Lua.

Maybe some modular Code snippets that we can assemble together to make a workings script?

Even a few well commented Scripts would help a LOT.

Thanks!
 Post #59
 22nd April 2007
pandamann567's Avatar
April 2007
6 Posts
cool, where do i extract it too?
 Post #60
 22nd April 2007
Gold Member
Elspin's Avatar
December 2006
5,153 Posts
Shanjaq posted:
Far from being a snippet, it took nearly a week and was re-engineered at least 3 times with lots of coffee and anime to keep sane...
Anime to keep you SANE? That sounds like a paradox.
 Post #61
 22nd April 2007
Lochen's Avatar
June 2006
24 Posts
Would it be possible to get an example stool for spawning the sents we create? I have tried modding the ones that came with life support for about a week now, and nothing I do will get them to show up in the stools menu. I believe I have several working sents, but I cannot test them without either having a working stool or remaking them.
 Post #62
 22nd April 2007
Gold Member
Elspin's Avatar
December 2006
5,153 Posts
Lochen posted:
Would it be possible to get an example stool for spawning the sents we create? I have tried modding the ones that came with life support for about a week now, and nothing I do will get them to show up in the stools menu. I believe I have several working sents, but I cannot test them without either having a working stool or remaking them.
It's more complicated to do a stool. Try normal sents first, they come up in the "entities" tab, to the right of vehicles I think.
 Post #63
 22nd April 2007
Gold Member
theJ89's Avatar
February 2005
4,599 Posts
Why does everyone think you need a STool to spawn entities? Why is it nobody knows where the entities tab is or has never visited the scripted entities forum?
 Post #64
 22nd April 2007
Lochen's Avatar
June 2006
24 Posts
theJ89 posted:
Why does everyone think you need a STool to spawn entities? Why is it nobody knows where the entities tab is or has never visited the scripted entities forum?
It isn't that I need it, I just like to be able to use a single entity in several sizes with several settings and don't want to edit the stools that came with life support. I can get them to work fine if I make them only one size, but it kind of defeats the whole point of making them able to be several sizes.

I have used scripted entities quite a bit thank you, else I would not be using the stargate entity, ring transporter, ammo crates, and half a dozen others.
 Post #65
 22nd April 2007
Staplegun's Avatar
September 2006
1,631 Posts
Your temp connection things do not work for me. It just spits out a connector and disappears. Or it connects and then disappears.
 Post #66
 23rd April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
See Original Post for download link!

Update: Version 1.1:

-Added: Client-Side Beams
-Added: Cutoff Valve
-Added: Pumps

Client-Side Beams
Thanks to Tad2020's Beam Library you can now link resources without costly ropes lagging your server!

Cutoff Valve
This device can temporarly stop the flow of resources, effectively splitting resource networks. For example, you could shut off power to portions of your ship's systems, or prevent your resources from being siphoned out of Supply Conectors.

Pumps
Supply Connectors can now spawn with Pumps installed with a configurable transfer rate. This will allow you to create refill stations which dispense resources at a controlled rate.
 Post #67
 23rd April 2007
Gold Member
Xera's Avatar
November 2006
8,003 Posts
Shanjaq posted:


Update: Version 1.1:

-Added: Client-Side Beams
-Added: Cutoff Valve
-Added: Pumps

Client-Side Beams
Thanks to Tad2020's Beam Library you can now link resources without costly ropes lagging your server!

Cutoff Valve
This device can temporarly stop the flow of resources, effectively splitting resource networks. For example, you could shut off power to portions of your ship's systems, or prevent your resources from being siphoned out of Supply Conectors.

Pumps
Supply Connectors can now spawn with Pumps installed with a configurable transfer rate. This will allow you to create refill stations which dispense resources at a controlled rate.
File not found :(
 Post #68
 24th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
I think garrysmod.org flags my file submission for human-review if it contains the word "distribution" in it... All of my other uploads are available to the public but Resource Distribution, without fail, is somehow private and takes a very long time to show up! I'm only guessing it's some kind of content filtering because it says somewhere that "suspicious files" will be examined, without going into detail as to what constitutes suspicious. I think it's up now though(after 4 hours waiting!)
 Post #69
 24th April 2007
Alex141's Avatar
April 2007
344 Posts
I have seemed to discovered a bug, i was playing around with the valve and i came up with this bug.
Its got to do something with the valve. I connected air with the valve and with a large air exchanger, and energy with the valve.

EDIT: The Air() changed to this Air (-1.#IND) do not ask me what that is
 Post #70
 24th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Alex141 posted:
I have seemed to discovered a bug, i was playing around with the valve and i came up with this bug.
Its got to do something with the valve. I connected air with the valve and with a large air exchanger, and energy with the valve.

EDIT: The Air() changed to this Air (-1.#IND) do not ask me what that is
I'm having trouble following the order here, do you mean to say that you connected (Air to Valve) then (Valve to Exchanger) then (Energy to Valve) ? I've been trying every which way, one of them did turn up a resetting of the Energy value to 0, so far that's the only clue I've got.
 Post #71
 24th April 2007
Gold Member
tad2020's Avatar
December 2006
1,656 Posts
How do pumps work and which way do the resources flow? I was on the server last night and I tried to refill my ship from my crappy mars base. I have a large supple cache on the planet with a supply connector attached (with pump), I spawned a socket from that one and plugged it in to my ship's socket. The 2 small caches on the ship only incremented to 1000 each then stopped, but the base supply cache was rather full.
 Post #72
 24th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
If one of the Supply Connectors has a Pump installed, it will push resources out to any other Supply Connector that doesn't have a pump while linked. If both have pumps, well, they'll fight and whoever has the highest flow rate will win ;)
 Post #73
 24th April 2007
Gold Member
tad2020's Avatar
December 2006
1,656 Posts
Shanjaq posted:
If one of the Supply Connectors has a Pump installed, it will push resources out to any other Supply Connector that doesn't have a pump while linked. If both have pumps, well, they'll fight and whoever has the highest flow rate will win ;)
So it doesn't matter which spawns the plug. Then why did my caches not fill up? Or was it just all the lag? (I'm sure the stargates I had made weren't helping)

If pump on NetA has a flow rate of 500 and it gets connected to a pump on NetB with flow rate of 600. Would the flow to NetA be 100 then?
 Post #74
 24th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
tad2020 posted:
If pump on NetA has a flow rate of 500 and it gets connected to a pump on NetB with flow rate of 600. Would the flow to NetA be 100 then?

Correct.

I don't know what's going on with my server, lots of weird behavior(what's new? :)
 Post #75
 24th April 2007
Spacetech's Avatar
January 2006
813 Posts

Any idea on what's happening their?
 Post #76
 24th April 2007
Gold Member
Shanjaq's Avatar
January 2005
641 Posts
Spacetech posted:

Any idea on what's happening their?
Argh, that would be a sign that it's time for me to get some sleep =P

The attachment on the main post is updated with a fix for that and another issue with the pumps. The version on garrysmod.org will have to wait until I can find the cause for the issue that Alex141 brought up.
 Post #77
 24th April 2007
Devils Buddy's Avatar
March 2007
1,156 Posts
SpaceTech you have go another mod that is most likely conflicting with the RDN mod. As i had the same thing with Wire addon. I am not sure how to fix it thought.
 Post #78
 24th April 2007
Gold Member
GiGaBiTe's Avatar
February 2005
7,704 Posts
I'm having a problem with the supply connector on my server. When I try to use it, the pump connector will come out for about 5 seconds and disappear. I assume there's a bug in the code, because every time I spawn a supply connector, the console will report an error.
 Post #79
 24th April 2007
sphearion's Avatar
April 2007
26 Posts
GiGaBiTe posted:
I'm having a problem with the supply connector on my server. When I try to use it, the pump connector will come out for about 5 seconds and disappear. I assume there's a bug in the code, because every time I spawn a supply connector, the console will report an error.
knowing what the error is would be nice, but I can almost bet you have advanced COPY gun installed. LS and Resources don't get along with Advanced Copy gun
 Post #80
 24th April 2007
Gold Member
GiGaBiTe's Avatar
February 2005
7,704 Posts
sphearion posted:
knowing what the error is would be nice, but I can almost bet you have advanced COPY gun installed. LS and Resources don't get along with Advanced Copy gun
That seemed to be the problem, thanks for the help.
Reply


All times are GMT. The time now is 05:31PM.

Facepunch Studios 2009 - Server 'Softlayer 2.0'