[Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

I know Im basically talking to myself but helps me think and work through problems :)
New post for a new day

I've located one bug in the network code, basically when the node_users are removed from a network it appears it dosent use table.remove() this leaves the table no longer a integer table and the network code at the moment assumes an interger table ie uses ipairs. This means any node lodged in the table that is beyond the position removed can't be indexed (wrong term?) when checking for network.

Example
Before code

Code: Select all

		users = {
			{y = 9,x = 19,z = 15},
			{y = 9,x = 17,z = 15},
			{y = 9,x = 20,z = 17},
			{y = 9,x = 17,z = 17},
			{y = 9,x = 18,z = 17}
		}
After code

Code: Select all

		users = {
			{y = 9,x = 19,z = 15},
			{y = 9,x = 17,z = 15},
			[4] = {y = 9,x = 17,z = 17},
			[5] = {y = 9,x = 18,z = 17}
		}
so 4/5 can now only be reached with a "pairs" statement ipairs will stop at the second ref. I cant remeber what I was working on recently but I had a similar issue. I just need to locate the removal statement (not obvious in the code)and update it so it uses table.remove rather than what I expect at the moment its doing which is blanking the record leaving a hole in the numbering sequence.

This also explains(hopefully fully) why adding nodes the network code is rock solid but removing it gets a bit flaky.

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by auouymous » Post

sirrobzeroone wrote:
Sat Jun 12, 2021 01:09
I know Im basically talking to myself but helps me think and work through problems :)
If you were to give up, your public notes could be useful for someone else wanting to continue the project.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

auouymous wrote:
Sat Jun 12, 2021 02:40
sirrobzeroone wrote:
Sat Jun 12, 2021 01:09
I know Im basically talking to myself but helps me think and work through problems :)
If you were to give up, your public notes could be useful for someone else wanting to continue the project.
Good Point :)

This table removal bug was painful, the code is/was quiet difficult to follow and understand, and I got thrown off a couple of times:

Network.lua has essentially 3 scenarios:
[*]Deadend and placed
[*]Deadend and not placed
[*]Everything else

Now the code definition of a deadend is when a connection == 1, conduit or another machine count as a connection. the check radius is 1 node distance in each main axis

"Deadend and Placed" always works as the code always uses table.insert.
"Deadend and not placed" dosen't it uses a set nil event into the table of users
"Everything Else" I dont fully understand how this works but somehow this recalcs the whole network, the code leaves me scratching my head as it basically purges the whole network record, but Im not sure how or when that gets rebuilt....anyway it works but my understanding on how very limited. edit: record is recaculated at next abm run and rebuilt and saved to "ele.graphcache".

So if you have two furnaces next to each other both connected, removing one will work okay as it drops through "Everything Else" as we have "2" connections and everything gets re-calc'd
G = Generator, F=Furnace, C=Conduit

Code: Select all

	FF
     GCCCC
If we have a single furnace we want to remove, this will drop through "Deadend and not placed"

Code: Select all

       F
     GCCCCF
problem is doing this it removed furnace by setting the table ref to nil so if it happened to be the highest number in the table everythign worked if its a mid number some will work some wont, if it was say no 1 no machine left on that network would work....

The code was a bit obscured but it was line 427:

Code: Select all

 table[devicenum] = nil 
Updating meant I had to adjust the "table" ref to "tables" so no local/inbuilt confusion as I need to use table.remove()

Code: Select all

table.remove(tables,devicenum)
That then fixed the issue or seems to have....at least in my limited testing I no longer end up with a wonky network when removing furnaces...for a 1 line fix I had to add a ton of debug i removed nearly all of it....I added a note at the top of that section now indicating what it removes from where.

I see those 2 fix's although the second was small as fairly significant so I've uploaded the fixed network file to git. If someone feels like giving it a spin that would be great.

https://github.com/sirrobzeroone/elepower

Onto Powercells they are really brokwn now, dont work at all I think

EDIT-1 Power Cells just mostly broken, Connect generator directly to power cell and then have all machines come off of powercell. Cant have 2 batteries connected to a single Gen, they seem to bounce power back and forth and drain themselves...or I think thats whats happening. Use them at your own risk.....I think that was the case before.

EDIT-2 So I've been looking at the code and power cells already have a custom group of ele_storage at the moment that group gets dumped in with "ele_user" (crafting machines). I think if I add to the abm code such that if generators are generating enough power then power cells just get charged or if full ignored (same as crafting machines). However if generators are offline then the batteries kick in and provide power to the network. From an initial check through the code I cant see any major roadblocks, although bound to stumble on some headaches. Initally I'll make powercells and generators fully independent ie if any generator provides power (assuming not overloaded) then batteries do nothing. Once I get that working I'll see how hard it is to supplimenting from batteries, the problem with that is that the batteries will be causing some of the power drain on the generator so it could become a circular dependancy and require alot more checks....wouldnt want batteries bouncing power back and forth with each other for example.....

EDIT-3 I have 2 power cells on a single conduit with 1 solar panel and 1 furnace. During the day the solar panel charges the powercells and provides power to the furnace ie all charging. At night when the solar output drops to 0 the batteries kick in and supply power to the furnace. The only downside is at night the batteries provide the max they can so deplete really fast as they effectively rapid charge the furnace even if its not being used. Basically furnace drains them until its fully charged. Thats not particularly helpful behaviour as really just want batteries to provide a minimal on demand power if the machine is being used. So I want to look at that before committing any code, but at least my idea worked in principal and I was able to reuse a large proportaion of the existing code base ie minimal changes.

EDIT-4
Hmm my solution above although working in principal created a few bugs/issues:
[*] The way providers distribute power is done when the 1st provider is hit by the abm, however the abm still hits the others its just there storage is then 0 so powersupply is then 0 which was triggering my battery/powercell and depleting it unessecarly...fix I added a depeletion time and set the check as same as abm time ie 1 sec so if the dep time is <1 sec and pw_supply is 0 then dont run for batteries. If its dep time > 1 sec and pw_supply 0 then we run batteries - it seems to work although I havent done comprehensive testing.

[*] I've successfully lowered the power draw when on battery power however it still occurs even if machine is not active - So I need to improve this to check for machine active status as well, I could check node name for some machines as they have an "nodename_active" version but if a machine dosent have this it would still drain so I want to try and hook into the actual "power_used" just not sure were thats stored from second to second at the moment and I want to fix the issue below first.

[*]Somewhere along the way i've broken the powercell update code when they are being providers, probably as they dont recieve the provider template boilerplate code. behind the scenes the storage value is updating correctly just not updating with tooltip and when you click into formspec, they do all refresh as soon as the powercells start recieving power, but its very annoying and looks very broken.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Okay, I think I've fixed all the bugs I mentioned above. I found another which was on save and reload, machines/batteries no longer acted as power pass through. The fix was already in the code as conduit worked around this issue already so I applied the same code fix for machines/powercells-batteries.

I did a simple diagram any of the below are valid networks, you can actually daisy chain machines and conduits endlessly....naturally not sure what happens when you hit the end of active map and the generator is now no longer active. Anyways its a start and Powercells/Batteries now work reliably hopefully - most useful for Solar networks.

Image

Powercell/Battery Rules
  • They will only turn on when Power Generator generation is 0
  • They will only supply Power to Active Machines ie they wont charge machines that aren't working.
  • To work there must be a generator on the network, ie sticking a Powercell down next to a machine wont work as its currently not a valid network. Code needs hopefully minor change but fair bit of testing to confirm what I think will work will.
  • They cant supplement power, so if you generator goes into Overload ie supplying <1 power unit to each machine Powercells wont help. Code needs a significant re-think to work for this event.
  • Yes you can have multiple Powercells on a network
I've done a release for this and called it Alpha 20, Fairly sure IcyDiamond was upto 18 but I just jumped 19 as 20 is a nice round number. This will also give people a semi-stable version to test against while Im messing with the repo code.

Alpha 20

Edit - Forgot to say looking at icons for inside machine UI and doco now. Assembling machines can be quiet a challange as its not clear what In's/Outs they accept/produce in game. I think this may have been the Issue Highpopes encountered as the code does actually have "Steam" included, not sure its complete but its there. Ill have a quick look at that as well.
Attachments
power_network_simple_examples.png
power_network_simple_examples.png (12.26 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Little bit of a preview on example icons and new tooltips for machines. Im not entirely happy with the Gas cloud shape, but it works for now.

Anyways Icons added and if you mouse over you get a little tooltip, i may add a heading like input/output etc. I picked the electrolyzer as its a good example of a machine with many in's and many outs depending what you feed in. Battery icon for machine internal power storage - although thats already fairly obvious added for consistancy.

Image
Attachments
electrolyzer_wip.png
electrolyzer_wip.png (36.11 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Bit a big learning curve over the past few days with formspec to start assembling a user guide. Still struggling with some layout elements and how they move with different screen resolutions.

Trying to automate as much as I can to lower maintenace overhead in the future. Here's a preview of the contents page and then the craft-cooking page (item names popup in tooltips),although all the craft pages populate which is nice. Working on machines, although may not need an indivdual double page space for each machine for example pretty sure I can fit all generators on two pages.

Image
Image
Attachments
tome_preview_1.png
tome_preview_1.png (39.3 KiB) Viewed 2262 times
tome_preview.png
tome_preview.png (31.1 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

I wrapped up some quick testing and cleaned up a few bits and pieces and commited what I have done so far with doco and icons to github. I wont do a new release yet as I want to do more work with the doco and icons just want to commit what i've done just incase of pc crash etc. If you wish to have a look, the current master has the start of the guide and icons:

https://github.com/sirrobzeroone/elepower

if you start a new world you'll recieve elepower tome on initial logon, left click to open

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

I took this screenshot with MT game window at 1920x1080, I might need to play with text size a little - although that could be my PC as I've noticed windows seems to do strange things to menu fonts compared to a MT under a linux flavour.

Simple EpU generators page done, I also cleaned up some of the layout as I'm learning how formspec cascades/self sizes elements. The EpU tags are actually text converted to images as images scale up and down more nicely across screen res.
Not committed to git yet as I'd like to see if I can get powercells and a few other machine types populating on the same page template before committing anything. I think this might be the first of the truly useful info that has been hidden in the code ie the EpU's produced by each simple power generator

Image
Attachments
tome_preview_2.png
tome_preview_2.png (159.47 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Still working on doco more focused on complex machine assembly etc. I've got a working sol'n for presenting the new crafts ie the ones that wont appear on the mtg_guide and also got a method for showing the right click upgrades. Mainly I'm trying to cleanup and rationalise the code some at the moment its a bit of spagehetti, but cleanup is coming along.

Showing the right click upgrade process (yes changed "Pump" description to "Pickup Pump Tank" but node still registers as the same name)
Image

Custom craft with link through to custom craft page although created a bit of a rod for my ownback there as now I really need a "back" button. At the moment I dont have any interpage nav buttons just the page flickers at the top for info in the same section.
Image

Edit 1
I think the pump (not transfer pump) maybe a little bugged. Im not 100% sure but I think if the pump ever gets into a state of "No More Fluid!", that ends the timer...i cant see a way at the moment for the pump to get out of this state, no abm to refire the timer etc, no delay timer that loops back around...just wondered if anyone else has found this to happen?
Attachments
tome_preview_4.png
tome_preview_4.png (154.41 KiB) Viewed 2262 times
tome_preview_3.png
tome_preview_3.png (109.05 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Initial upload to git of the Book/Tome of instructions on how to use elepower. You'll recieve a copy of the book on intial logon to a new game with the mod enabled.

It's not finished but I think it's a good start towards a guide you can read in game about how to do things in elepower.

I've shown some of the screens above but below is an example page set for the evaporation plant, I've completed similar for Pump, Miner, Fission Reactor. Still have Fusion Reactor, Wind Turbine and Transporter to go. Also some layout cleanup/additions to do eg back button, image zoom on instruction step by step pages and clean up icons and icon storage bit scattered at the moment and two pages need to broken out of init.lua to there own lua files.

Image
Image
Image
Attachments
preview_evap_3.png
preview_evap_3.png (67.03 KiB) Viewed 2262 times
preview_evap_2.png
preview_evap_2.png (59.85 KiB) Viewed 2262 times
preview_evap_1.png
preview_evap_1.png (59.29 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

I've added 3 guides/help files:
  • Getting Started
  • First PCB Creation
  • Upgrading Machines
I probably need to add a 4th one just with general info about elepower.

I've also added a "back" button so navigating around is a bit easier, I did play around with it and try and break the code and I couldnt after fixing a few minor bugs so hopefully it's pretty solid now.

I'll work on cleaning up and adding the missing info to the guide/tome now. Even with some "unknown" images and missing text I think the tome should be useful for getting a handle on how elepower works and getting started. Im not sure I'll fully flesh out every section at the moment as I have other bits I want/need to work on that I need for a game :).

Edit - 1
I've been looking at the planter and hard to say how it was meant to work but I can say it appears to have a few minor issues - 1. The check for ground/soil appears to occur to high even if you embed the planter in the ground I'm fairly sure its at least 1 Y to high. Regular "dirt" isnt in the soil group, im not sure if wet dirt is either so cant ever get into the auto-hoe loop. The inventory at least visually dosent appear to support stacks of seed so it is only ever loaded with 1 seed for each spot which represents a 3x3 area on the ground. I wanted to check it out as hotcyr mentioned it appeared to not be working and I would agree. I'll see if I can get it working and fix the issues and add some instructions to the tome.

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by auouymous » Post

sirrobzeroone wrote:
Thu Jul 01, 2021 00:15
The check for ground/soil appears to occur to high even if you embed the planter in the ground I'm fairly sure its at least 1 Y to high.
Planters in Minecraft go below the dirt.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

auouymous wrote:
Thu Jul 01, 2021 04:58
sirrobzeroone wrote:
Thu Jul 01, 2021 00:15
The check for ground/soil appears to occur to high even if you embed the planter in the ground I'm fairly sure its at least 1 Y to high.
Planters in Minecraft go below the dirt.
Ahh Thanks yes I just gave that a try and embeded it 2 down with 1 water on top, plants fine now....well when I have it hotwired to not check for seed quantity.....

Edit - ahh got it so the top grid takes the object you wish to plant in that quadrant ie wheat seed or brass blocks or whatever. The lower 2 strips of 8 are the inventory which can take stacks of seeds or basically anything. Ground appears to hoe okay so I need to have another look at that code block and see how it does that.

Edit 2 - Page for the Tome/Guide on Auto Planter, Hopefully will help out with how to use it, tried to make it semi-understandable just from the pictures. I also adjusted the img texture in the upper grid area on the planters UI so it looks like a 3x3 sub grid inside each one. Hard to see in the below but visible in game. Addition added to Git Master - tricky machine to figure out how to work - thanks for the tip auouymous
Image
Attachments
tome_preview_6.png
tome_preview_6.png (195.96 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

this could be another one were Im not quiet understanding but the wind turbine was not working at all. I pulled the two pieces apart and think i understand. Im better with timers and entities than formspec and fieldnames....

I checked the two parts the controller and the entity blades.

Entity Blades:
On close and reload the controller position was being lost and reset to 0,0,0. Fairly sure this because the entity info is respawned with base data which totally missed the entity blades on placed code and the entity had a fall back loc for the controller inside entity def as 0,0,0. My quick dirty fix for this was to just +1 to z blade pos and that is controller pos. Given the controller pretty much works like this trying to find entity blades and blades "on place" is controller pos -1 z its an ok fix to get things working.

Controller:
The node timer didnt have a start event, not even one at on_construct...there could be something somewhere that is meant to be starting it but I cant find anything or any indication of anything. I've learnt Icy is really good coder so I doubt he missed this so I'm fairly sure there is a piece of code somewhere that is simple not tied in or firing I just cant find it. Anyways as the Blades and Controller are meant to work togther and the Blades already has a nice on_step I just have the blades starting the controller timer with 1 sec timeout (should have mentioned thats only needed for very first kickoff of the timer after that the internal controller code takes over).

With the two minor tweaks wind turbines now produce power and the blades turn. I've taken a very minamilistic approach with the above fix's on purpose so if I find (or someone knows) how they are meant to work reverting to the orginal code will be pretty easy.

Edit 1
So I've put a bit of a pin in the doco wrapped and cleaned up what was there. Still some gaps (fusion reactor, teleporter) and some icons missing, I expect some typo's etc in the text itself but hopefully a pretty solid start.
Link to the release:
https://github.com/sirrobzeroone/elepow ... s/tag/a.21

Mineminer
Member
Posts: 325
Joined: Mon Mar 05, 2018 04:05

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by Mineminer » Post

I am very happy for you @sirrobzeroone that you decided to go hard in the paint to get this mod back to speed and investing all of this time and efforts so far so it get closer and closer to being a Technic alternative.

I just may replace Technic sometimes in the pipeline once this mod reaches that realms. :)

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Mineminer wrote:
Fri Jul 02, 2021 18:33
I am very happy for you @sirrobzeroone that you decided to go hard in the paint to get this mod back to speed and investing all of this time and efforts so far so it get closer and closer to being a Technic alternative.

I just may replace Technic sometimes in the pipeline once this mod reaches that realms. :)
Nice to know people are keeping half an eye on what Im doing :).

For my purposes I need lights and currently Elepower has no lighting, for what Im doing torches wont be a possability but I figure others may like elepower lighting as well, but this will be a standalone mod inside elepower so it can be easily disabled.

I'm planning 3 types of bulbs:
  • Incandescent Light- 4 EpU a sec
  • CCF Light - 2 EpU sec
  • LED - 1 EpU sec


Naturally the higher ones will require more tech/machines to make. At the moment I have a working Wip of an Incandescent Light (bulb). I'm also going to add a new conduit piece basically a "wall pass through" so you can get power through a wall nicely. At the moment I've just got 1 extra node but I might do 3 a "lead", "copper" and "gold" so they can look decorative. construct requirements are just 1 conduit + 2 lead ingots - wanted to keep them reasonably easy to make. Quick WIP screenshot showing light bulb on/off sitting ontop of the wall pass through (lead version). punch to turn on/off at the moment I might add a "switchbox" later so you can create light circuits and tie them to mesecons. I need to change the light bulb from a nodebox to a proper mesh as nodebox wallmounted cant accept multiple nodebox's and trying to use connected just results in some potentially weird looking behaviour.

Image
Attachments
light_bulb_wip_1.png
light_bulb_wip_1.png (556.99 KiB) Viewed 2262 times

Mineminer
Member
Posts: 325
Joined: Mon Mar 05, 2018 04:05

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by Mineminer » Post

sirrobzeroone wrote:
Sat Jul 03, 2021 01:18
Mineminer wrote:
Fri Jul 02, 2021 18:33
I am very happy for you @sirrobzeroone that you decided to go hard in the paint to get this mod back to speed and investing all of this time and efforts so far so it get closer and closer to being a Technic alternative.

I just may replace Technic sometimes in the pipeline once this mod reaches that realms. :)
Nice to know people are keeping half an eye on what Im doing :).
Aww I am very glad it's very much helps you be reassured, cause I do really gets what you means. I am deaf and blind so I often get that many people just don't seems to "realize" that what I do or at least don't give me sufficient dedication and credits.

That what happened with my last server followed by not being able to do other plans with the dedicated unit.
For my purposes I need lights and currently Elepower has no lighting, for what Im doing torches wont be a possability but I figure others may like elepower lighting as well, but this will be a standalone mod inside elepower so it can be easily disabled.

I'm planning 3 types of bulbs:
  • Incandescent Light- 4 EpU a sec
  • CCF Light - 2 EpU sec
  • LED - 1 EpU sec


Naturally the higher ones will require more tech/machines to make. At the moment I have a working Wip of an Incandescent Light (bulb). I'm also going to add a new conduit piece basically a "wall pass through" so you can get power through a wall nicely. At the moment I've just got 1 extra node but I might do 3 a "lead", "copper" and "gold" so they can look decorative. construct requirements are just 1 conduit + 2 lead ingots - wanted to keep them reasonably easy to make. Quick WIP screenshot showing light bulb on/off sitting ontop of the wall pass through (lead version). punch to turn on/off at the moment I might add a "switchbox" later so you can create light circuits and tie them to mesecons. I need to change the light bulb from a nodebox to a proper mesh as nodebox wallmounted cant accept multiple nodebox's and trying to use connected just results in some potentially weird looking behaviour.

Image
Just some thoughts but have you checked into lighting mods like More Lights and such? There are few mods that does give you alternative lighting sources.

Additionally you have to consider, why would people want to be using these? Will they enable specific functions that "any old light source" that won't do?

LV Lamps from Technic is a good start, at least those units will "flood" a 7x7x3 area so you don't need to "flood" the area with meselamps for farming for example. So while they suck LV current, they "trade in" the current for convenices.

auouymous
Member
Posts: 195
Joined: Sun Dec 07, 2014 09:39
GitHub: auouymous
IRC: air
In-game: auouymous

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by auouymous » Post

I agree, I've never used powered lighting unless it had an advantage such as placing invisible light sources to illuminate a very very large area. Does elepower have a "switch" that can cut power running to lights?

User avatar
IcyDiamond
Member
Posts: 175
Joined: Fri Mar 30, 2018 08:55
GitHub: LunaSquee
IRC: IcyDiamond
In-game: IcyDiamond
Location: Estonia
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by IcyDiamond » Post

sirrobzeroone wrote:
Fri Jul 02, 2021 00:20
this could be another one were Im not quiet understanding but the wind turbine was not working at all.
It is dependent on height, and yeah, the blades were broken from the start.

Great work so far. I've updated the topic with your github link now.
Web developer | Systems Administrator

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

IcyDiamond wrote:
Tue Jul 06, 2021 15:13
sirrobzeroone wrote:
Fri Jul 02, 2021 00:20
this could be another one were Im not quiet understanding but the wind turbine was not working at all.
It is dependent on height, and yeah, the blades were broken from the start.

Great work so far. I've updated the topic with your github link now.
Thanks Icy, glad to see you still ghosting around, thanks for the pointers on the bucket/acid as well on git :)

Lighting, yep working...might have got carried away, took advice so theres some useful and some fun things :)

~ three bulbs as mentioned...although LED is more a proxy bulb.

~ Then we have Fluro Strip light length three lights 3 squares long (yes 3 light nodes using the old invisible lite air trick)

~ next up led panels 1x1, 1x3 and 2x3 thought about a 3x3 but thats huge in game...works as above

~ Flood or spot light - this ones a bit of a headache as Im trying to allow tilt of +-20 degrees and rotation of +-45 degrees both in 1 degree steps - tilt done, rotate I have a working concept of how to calulate it out but its doing my head in a bit as the light can also be placed in any param2 rotation so a bit of math there (calculate x/y loc on circle from radius basically, plus pick correct axis depending on param2 to assign correct MT-axis to x&y)...anyways Its looking good it lights out to 30nodes and will have an incandescent/Fluro/Led version...I realised the code can probably be reused to make some nasty laser turret later on.....

~ last fun one which I havent even looked at fully but dosent look hard is a led panel which can go through 30 different colors with a formspec were it has settings for fixed color, fade from one to the other and random. Lets me play around with hardware coloring.

~ All lights can be punched on/off but I was looking at a switch which can then tie into mesacons or work standalone...ie sun goes down lights come on...I think mesecons has a light detector.the switch is a bit of work as I need a nice way to basically terminate network detection beyond switch when off and re-calculate when on, so not sure if Ill svae that for later

~ lastly add a chapter to the tome/guide for the above and add one of the missing backlog sections so I slowly document it all :)

That was a bit of a longer reply than I intended :)

User avatar
IcyDiamond
Member
Posts: 175
Joined: Fri Mar 30, 2018 08:55
GitHub: LunaSquee
IRC: IcyDiamond
In-game: IcyDiamond
Location: Estonia
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by IcyDiamond » Post

You're welcome. By the way, have you fixed these issues which were reported on the old git? https://gitlab.icynet.eu/evert/elepower/-/issues
Web developer | Systems Administrator

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

IcyDiamond wrote:
Wed Jul 07, 2021 14:48
You're welcome. By the way, have you fixed these issues which were reported on the old git? https://gitlab.icynet.eu/evert/elepower/-/issues
I fixed one but the other two are pending, I'll have a look at them though :).

Still working on lighting been a bit slower as schools back so more running around with after school activities.

Floodlights are 100% working on all param2 with a tilt of +-20 degress and a rotate of +- 45 degrees. Just need to finish of the object/mesh model, it'll be a bit heavy on node registration as I'll do 9 different versions so visually it'll appear tilted/rotated, although it wont match the angle/rotation exactly it'll at least be indicative if you look at it. Ui still needs some work:
Image

Fun 1x1 colored panel is done with 30 colors + black and white. I've included some presets plus a strobe and synchronise options. Unfortunatly I did have to create a global tick counter just to use as a fixed reference for synchronising the light sequence but thats all it is a counter, I think from reading around lua it shouldn't cause any issues unless your server is up and running more than 7 million years without a restart:
Image

Naturally still a bit of work to go but I think lighting will be useful beyond just sticking torches down everywhere...admittedly it makes more sense if torches burn out but thats upto server/game designers to include or not :).
Attachments
light_preview_1.png
light_preview_1.png (20.07 KiB) Viewed 2262 times
light_preview.png
light_preview.png (39.06 KiB) Viewed 2262 times

SciFurz
Member
Posts: 31
Joined: Tue Jun 01, 2021 22:51
Contact:

Solar panel needs param type light

by SciFurz » Post

The panel appeared as a black square until I added

paramtype = "light"

to the node registration definition.

Edit:
Same goes for the matter receiver and transmitter.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: Solar panel needs param type light

by sirrobzeroone » Post

SciFurz wrote:
Thu Jul 22, 2021 14:45
The panel appeared as a black square until I added

paramtype = "light"
Thanks always good to know people are checking things out...tough to track and check everything on your own :). I'll check those out I haven't looked much at the matter transmission code. Might be a minor bug in the swapping for active vs non-active variants.

Minor update on lighting, working on the recipes and I wanted to make more use of the existing machines in the recipes so they have more uses for making components. I wanted to use the compressor to compress the LED components together which meant I needed to increase it's inputs to two slots not one, then redefine the existing recipes.

It looked easy until I realised the item name was the key in the table so I can't have two enteries for the same item. eg steel plate = 1x steel ingot + 1x steel ingot getting squashed togther. The recipe would just store as 1x steel ingot.

I wanted to retain the current itemstack model but allow the same ingredient twice which meant placing ingredients inside a numerical key for the table (table in table). That meant a bit of working out were that code was used and how to change it. Which I'll admit I was more than a little nervous changing as it's at the very core of how machines work.

Fairly sure I have it working and it gives a sort of hybridized model for the machines were they can have same ingredients bit like normal crafting but you can also spec the same ingredient more than once and in stacks if you need....probably overkill there on combos (eg you could do 3 steel ingots + 1 steel ingot).

Whats that mean for actually using it absolutly nothing except that the next release I do which I'll note heavily compressing will change to two inputs and a couple of the recipes now give a bonus eg 4 mese fragment + 4 mese fragment = 1 mese crystal rather than 9 so a slight advantage to use compressing to create some things from bits. Downside I'm not 100% sure any placed 1 slot compressors will update to two slots...I think they will as the UI code refreshes whenever the power is checked (every second) but then I did see some odd behaviour when trying that out.

I'll start cleaning up all the temp code I have lodged in the code and testing more and then I can get back to creating recipes for lights....1 minor detour and there goes a week and a bit of time :).

I like to share picys when I can heres an ultra exciting picture of incandescent and CCF light bulb recipes :P - I used mese dust in place of "mercury" for the ccf - given mese rareness i used 1 mese fragment = 1 dust....I couldnt see the point to add a whole other liquid metal for 1 use:

Image
Attachments
light_preview_2.png
light_preview_2.png (52.45 KiB) Viewed 2262 times

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Elepower - Machines/Power/Fluids/Nuclear [elepower]

by sirrobzeroone » Post

Getting there, I've also added some new conduits so power can be more easily run through walls, I think I have 6 component recipes left to do then done at last.

1st picy shows new lighting conduits formed into lamp posts, with some example shades + 1 modern style lamp using led panel. In the background you can just see the floodlight lighting up 30 nodes infront of it, the red wool is spaced 5 apart.

Image
Image
Image
Attachments
elepower_lights_2.png
elepower_lights_2.png (183.88 KiB) Viewed 2262 times
elepower_lights_1.png
elepower_lights_1.png (193.89 KiB) Viewed 2262 times
elepower_lights.png
elepower_lights.png (917.71 KiB) Viewed 2262 times

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests