EU Calculator

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Dybbuk

New Member
Jul 29, 2019
12
0
0
I've been learning php, sql, c#, and other languages in school, but I want to solely practice C# for this project. So I thought I would make a simple/complex EU calculator.

The main reason I made this topic is to gather what people want in it, and allow features/fixes to be decided by the community. If you want certain features, input, or fixes - Visit the Official Github, and open a issue.

Current Stable Version 0.3.4

Download

Features:
All IC2 power generators (Excluding Reactors)
All GregTech power generators (Excluding Fusion Reactors)
Live updated EU/t when changing amounts
Chart showing produced EU (Disabled for now - Version 0.3.4)
Menu bar!

To-Be-Added

Redo Chart for produced power
Total PRODUCED power
Total CONSUMED power (Includes all machines that used EU)
Storage devices
Buildcraft MJ's



Screenshots
IC2 machines!



33xwv3l.png

On the fly calculations!

1268q5h.png


Calculate GregTech machines at the same time!

htwlk7.png

Crashed? Found a bug?:

Post a issue on how you did it!

Want to help?

I need translators! Not everyone can read English!

PM me via Here, or make a issue on github
 

NovaSkye

New Member
Jul 29, 2019
4
0
0
I like it!
Even though its simple, it helps.
Maybe you could make some other types of generators too!
 

San

New Member
Jul 29, 2019
94
0
0
Needs more features!

I'd like to see:
-Checkboxes for each generator avaliable
-Configurable production rates for generators that output at different values (nuke reactors, solar panels, etc)
-Uptime/downtime calculation (A generator might only be getting fuel 50% of the time for instance)
-Tabs for what modpack you're using (Other modpacks might have other methods of generating EU, idk)
-Energy loss calculation for cables based on length and loss rate
-Separate calculations for production rate, consumption rate for what machines you're using, and surplus power.
-Inport/export save files in the form of .txt for easy sharing of layouts
-Power grid mapping in the form of flowcharts
 

Dybbuk

New Member
Jul 29, 2019
12
0
0
Good Idea, and I see you made a issue on the enhancements you wanted. Thank you.
 

ILoveGregTech

New Member
Jul 29, 2019
788
0
0
Dude..
I love this idea. Simple yet awesome.
I am jealous of anyone who can code anything.
Good job man! Keep the work going :)
 
  • Like
Reactions: Dybbuk

Dybbuk

New Member
Jul 29, 2019
12
0
0
Macintosh version?

It might be a possibility, but I can't see that far.

Version 0.2 released.
Link updated.

Some tweak with performance, and added Solar Panels.

Water Mill (Manned, over options will come soon) is in development.

Issue #2 is broken again...
 

NovaSkye

New Member
Jul 29, 2019
4
0
0
This is coming along nicely since the last time I looked at it :p
I really like the ideas San had up there! Looking forward to the new adds later on :) Maybe ill start getting into machines and stuff more instead of just mining all the time an the twilight forest :p
Keep it up!
 
  • Like
Reactions: Dybbuk

Dybbuk

New Member
Jul 29, 2019
12
0
0
New update out, better system made. Made it look a little bit nicer!

Nuclear system, along with Water Mills will be implemented soon hopefully.
 

NovaSkye

New Member
Jul 29, 2019
4
0
0
I really like what you have done with it! Looks pretty and your adding the stuff we wanted :D
Cant wait for the water mills to be added!
 

RavynousHunter

New Member
Jul 29, 2019
2,784
-3
1
Hmm...I've a suggestion for you. It seems, from your code, that you plan to make adding more machines less of a bother. All well and good, however, I believe I've a method that'd work better, and allow you to design a tool that'd let you easily (and quickly) create new machines that can be plugged into the program at runtime. My suggestion involves serialization. Basically, what you'd have is a single class that'd represent a generic machine: a name, EU/t output, configurable output, etc. Something like...

Code:
using System;
using System.Text;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
 
[Serializable()]
public sealed class Machine : ISerializable
{
  public string Name;
  public int    EUOut;
  public bool   ConfigOutput; //Can the optput be configured by the user?
 
  public Machine()
  {
    this.Name         = "Generic Machine";
    this.EUOut        = 16;
    this.ConfigOutput = false;
  }
 
  public Machine( Machine other )
  {
    this.Name         = other.Name;
    this.EUOut        = other.EUOut;
    this.ConfigOutput = other.ConfigOutput;
  }
 
  // Deserialization constructor, this is called
  //  when we use the deserialization method in
  //  our main program code, as detailed later.
  public Machine( SerializationInfo info, StreamingContext ctxt )
  {
    this.Name         = (string) info.GetValue( "Name",         typeof( string ) );
    this.EUOut        = (int   ) info.GetValue( "EUOut",        typeof( int    ) );
    this.ConfigOutput = (bool  ) info.GetValue( "ConfigOutput", typeof( bool   ) );
  }
 
  // Serialization function.  This is called
  //  automatically when we use the serialization
  //  method in the tool code, as detailed later.
  public void GetObjectData( Serialization info, StreamingContext ctxt )
  {
    info.AddValue( "Name",         this.Name         );
    info.AddValue( "EUOut",        this.EUOut        );
    info.AddValue( "ConfigOutput", this.ConfigOutput );
  }
}

Now, when you get to your actual form/tool code, you'd want somethin like...

Code:
// Form code for deserialization.
//  Requires System.Runtime.Serialization,
//  System.Runtime.Serialization.Formatters.Binary, and
//  System.IO
 
Stream          stream    = File.Open( filename, FileMode.Open );
BinaryFormatter formatter = new BinaryFormatter();
 
Machine machine = (Machine) formatter.Deserialize( stream );
 
 
 
// Tool code for serialization.  Has the
//  same requirements as deserialization.
//  Assumes you have a local variable called
//  "machine" of type Machine.
 
Stream          stream    = File.Open( filename, FileMode.OpenOrCreate );
BinaryFormatter formatter = new BinaryFormatter();
 
formatter.Serialize( stream, machine );

Probably know all this, but I figured I'd throw in my $0.02. I've used this method before with several projects, and lemme tell ya, it saves a lot of time and frustration when it comes to scripting your programs and making 'em more flexible.