IC2 Experimental Reactor Planner open beta

  • I guess my issue is not understanding why he used 2 for single as a base rather then 4 when they say one uranium cell produces 4 on its own.


    I know this reply is a few months late, but look at the formula for [Triangular Numbers](https://en.wikipedia.org/wiki/Triangular_Numbers). The formula is:


    0.5 * (n * (n+1)


    So, if 4 is the base, then the amount for single uranium is likewise:


    4 * (0.5 * (n * (n+1)))


    Since 4 * 0.5 is 2, that's why you see 2 in the code.


    -----


    Speaking of code, I noticed that placing a single Heat Vent increases causes the tool to say "10 iron" for the costs, but from what I can tell, it only costs 8.5 iron, and always has only cost 8.5 iron. You can see a recipe for it [here](http://crafting-guide.com/brow…strial_craft_2/heat_vent/), or by using JEI in the game. I looked in the code to see how it is calculated, and I just see that it is hardcoded to 10:


    Code
    1. public static final MaterialsList MATERIALS = new MaterialsList(
    2.         10, java.util.ResourceBundle.getBundle("Ic2ExpReactorPlanner/Bundle").getString("IRON"),
    3.         1, java.util.ResourceBundle.getBundle("Ic2ExpReactorPlanner/Bundle").getString("TIN"),
    4.         16.0 / 3, "Copper");

    As far as I count, you need 1.5 iron for the iron bars, 4 iron for the plates, and 3 iron for the electric motor, making a total of 8.5.


    Since all the other types of heat vents use the basic heat vent in their material calculations, and since every commonly used reactor contains heat vents of some type, the iron calculations in the official list of reactor designs are wrong on every single reactor listed. Am I just misunderstanding something about the crafting here?


    I also noticed that the heat exchanger code for transfer() looks extremely buggy. Your notes say that you adapted the code from IC2 code, so then I went and checked it, and wow, it matches. I find that to be a bit, um, unsettling. Is there a way that we can file bugs against the IC2 code?


    Likewise, your code for adjustCurrentHeat() returns a negative value in cases where the component overflows and in cases where it underflows. I checked IC2 decompiled code and saw the same thing. Since you are trying to mimic what we see in the game, you did the right thing, but wow, that is really interesting. I'm wondering if it is possible to abuse these bugs and make a reactor that performs far better than it should.

  • I also noticed that the heat exchanger code for transfer() looks extremely buggy. Your notes say that you adapted the code from IC2 code, so then I went and checked it, and wow, it matches. I find that to be a bit, um, unsettling. Is there a way that we can file bugs against the IC2 code?

    Likewise, your code for adjustCurrentHeat() returns a negative value in cases where the component overflows and in cases where it underflows. I checked IC2 decompiled code and saw the same thing. Since you are trying to mimic what we see in the game, you did the right thing, but wow, that is really interesting. I'm wondering if it is possible to abuse these bugs and make a reactor that performs far better than it should.

    Bug reports can go on Mantis if there's something awry, if you don't especially want to create an account there you can just post in here) . I doubt there is any normal scenario where overflowing could happen, at least to any kind of advantage, but a lot of the reactor logic is quite old so imperfections are possible.

    145 Mods isn't too many. 9 types of copper and 8 types of tin aren't too many. 3 types of coffee though?

    I know that you believe that you understood what you think I said, but I am not sure you realise that what you read was not what I meant.


    ---- Minecraft Crash Report ----
    // I just don't know what went wrong :(


    I see this too much.

  • Speaking of code, I noticed that placing a single Heat Vent increases causes the tool to say "10 iron" for the costs, but from what I can tell, it only costs 8.5 iron, and always has only cost 8.5 iron.

    ...

    As far as I count, you need 1.5 iron for the iron bars, 4 iron for the plates, and 3 iron for the electric motor, making a total of 8.5.

    I agree that 10 iron is incorrect, and I'm not sure quite where that came from - in August 2015 I changed the planner to show raw materials instead of components (as requested earlier in this thread), and if I had goofed and thought iron bars were 1:1 with iron ingots, that would have led to a recipe of 11 iron instead of 10. However, your total of "8.5 iron" is ignoring the fact that iron bars have to be crafted in batches of 16 (from 6 iron). If I changed the planner to calculate the iron cost of a heat vent as 8.5, designs with heat vent counts of 1, 5, 9, 13, etc. would undercount the effective iron requirements by 4.5. I haven't figured out how to deal with this yet.

  • In my opinion, if you want to only give one number for the heat vent, it should be 8.5, not 9. If you round up for every heat vent, then the total is going to be off by a lot.


    People who are competing to come up with the most effective design are probably looking at this as "I want to make 5-7 reactors, and get the most EU for the resources I spend". To most of us, we don't mind making a few extra iron bars for the first reactor, because we know that they'll eventually get use somewhere else. We just don't want to spend more on that first reactor than need.


    Also, we may have some iron bars already in our inventory before our first reactor! I don't think that there's any way to accommodate that.


    If you do want to do something far more complicated, you could output something at the end that says "Iron cost: 112-115 ingots". That would indicate to people that if they have 115 ingots, they can build this entire reactor without any more mining. If they are making multiple reactors, the average cost will be 112. Also note that although this concept is pretty easy, it could be somewhat difficult to implement. I'm not saying it's a necessary feature, haha!


  • I looked at the other components that use iron bars in their recipes, and they had the iron counts double what they should be for those iron bars. The only explanation I can think of is that maybe I was looking at the GregTech 5 crafting recipe for iron bars (6 iron rods to 8 iron bars, and if I make the rods by using a file instead of in the lathe or extruder, they take a full ingot each, but that's wasting iron, and by the time a GT5 player is ready to build a nuclear reactor, more material-efficient ways to make iron rods (and iron bars) should be available.


    Also, we may have some iron bars already in our inventory before our first reactor! I don't think that there's any way to accommodate that.

    Considering that iron bars are required for the scuba helmet that is part of the complete hazmat suit, I'd be surprised if you didn't, come to think of it.


    Anyway, material counts should be fixed in v2.2.1.