Stargate Network

Stargate Network

3M Downloads

The ZPM function needs some documentation ,

Tsoccerguy3 opened this issue · 17 comments

commented

Hi Dok , need some Dokumentation

Don't know if this is a bug . You have to put the ZPM crystal into the ZPM cart and then remove and reinsert the ZPM crystal a second time before the power level shows . Otherwise power level is 0

Putting a IC2 power unit next to a ZPM cart with a ZPM cyrstal inside , causes an explosion . Makes sense , that ZPM is massively strong .

commented

the zmp cart is a tier 4 power output so mfsu

commented

Well isn't not exactly finished yet so there's that.

commented

Also conecting the zpm to ic2 conecter makes it explode

commented

In the most recent build available here: https://ore.spongepowered.org/Dockter/SGCraft I set the output power to "insane" (tier) and I think I've managed to fix all the input/output slot issues as well as NBT data saving.

commented

Shouldnt it be possible to power a Stargate with the power of a MFSU? Stargate is rejecting a call due to a missing ZPM. If i add a ZPM module (with ZPM installed) to the IC2 glass fibre cable, the call succeed.

The Stargate should just use a lot of energy from a mfsu if a zpm is not used...

commented

Can you give me a screenshot of your setup and tell me which version you are using?

The ZPM doesn't need a cable connection to function at the moment. I do a radius check around the base block of the stargate to detect power sources.

commented

Yeah, i checked this.. Does not need a cable.

But - i cant control the stargate using ComputerCraft if there is no ZPM but a MFSU connected to the gate with a IC2EnergyConnector...

    CRCRC
    R   R
    C   C
    R   R
    CRBRC    |-M
       O-----|

C = Chevron
R = Ringblock
B = SG Base
O = IC2 Energy Connector
(minus) = Glass Fibre Cable
M = MFSU (full, 40m EU)

With a computer connected with the ComputerCraft Interface i cant dial to another gate in the same dimenstion:

#> lua
lua#> sg = peripheral.wrap("stargate_<idx>")
lua#> sg.dial("xxxx-xxx-xx")
lua#  error zpmNotFound

I would expect a call to my gate....

Hint: I took a look into the code, there is a function called worldRequiresZPM or something like this but its seems returning false if the gate is in the same dimension....

There should be a config (boolean) to enable or disable this behaviour to use the zpm just as a good energy source.

commented

I've already fixed the bug of (in same world), gate thinking it needs a zpm in build 1.15.3, I will dig through the further details of your response shortly.

commented

Okay, there is another issue with the ZPM i think (conzeptional)

The ZPM Module works within the IC2 network. So if i've installed IC2 i could just install my ZPM's in - 3rd Floor and my Gate running in the 6th floor. But if you search for a ZPM in a radius to draw power from there, there is 1. no connection (not that realistic) and this mechanism is blocking us from using IC2 in general with the gate... We have to use a ZPM to control the gate if we'r not in the same dimension.

It should not matter whether im using a ZPM connected with a glass fibre cable or if im using a MFSU with a glass fibre cable... :/

So i modified the SGBaseTE with the following code:

        if (almuraEnabled && AlmuraAddon.worldRequiresZPM(originName, destinationName)) {
            long power = (long) AlmuraAddon.zpmPowerAvailable(world, this.pos, 4, false);
            if (!(power > 0)) {
                return diallingFailure(player, "zpmNotFound");
            } else {
                if (!(power > energyToOpen * distanceFactor)) {
                    return diallingFailure(player, "zpmLowPower");
                }
            }
            System.out.println("ZPM Power Required: " + energyToOpen * distanceFactor + " , distance factor: " + distanceFactor);
        }

almuraEnabled is a value fetched from the config.

Additionally i've remove the multiplier rule to a simple "if not in the same dimension = +500" logic to ignore the world rates.... This should be configurable per world instead of hardcoded...
But for sure, you could argument with "modified for Almura ..." - I can understand this... But publishing it on sponge/ore should make this more generic and useable for all players and not only for Almura Server's am i right? :)

Regards
SeaLife

commented

I need to tweak the radius check, right now its too large. I plan on making this all configurable once I've settled on a design.

commented

Ok, i'll modify this on my own (i try to) and will make a pull request afterwards. Which Goal i've to execute to get a working mod jar? Using "build jar" does not work quite well while "runClient" works flawless..

commented

use "gradlew build", the jar will end up in the /build/libs folder.

commented

I've made some big changes in the features/zpm branch. Read it, ask questions. Looking for feedback to this implementation.

I am not completely sold on this setup because Naquadah still has too high of a power value compared to EU, in my opinion at least.

commented

Found the issue that was giving you problems. api7 and feature/zpm both have the fix.

commented

I am testing several different implementations of the ZPM tonight so nothing is finalized.

commented

That 64 Naquadah equals to nearly 6 million EU is not that problem (at least for us) because you cant charge EU items with Naquadah except for the gate in a DHD...

So i modified the "findEnergySources" function to ignore the DHD completely if there is a ComputerConnector attached (CC or OC, doesnt Matter)
https://pastebin.com/c0PN4MBZ

You could extend this making a DHD useless (except for calling, but for energy transfer) if a power connector is attached....

So i would keep the strengh of Naquadah for a simple Stargate Setup but make Naquadah useless within a advanced setup using a computer to control the gate...

There is another solution: Naquadah Generator... SGC is using this to power the gate properly using Naquadah...
http://stargate-wiki.de/wiki/Naquadah-Generator

Make it work like a simple furnance generating EU with a decent rate from Naquadah to EU....

commented

I am also working on a naquadah generator