Blood Magic

Blood Magic

90M Downloads

1.7.10 Ritual Checks Wrong LP

Blue64 opened this issue · 12 comments

commented

First off, I am watching the Repo, I know about the 1.8 Rewrite and the End of 1.7 support (at least for a while), but somebody needs to post it!

While I was attempting to debug my Well of Suffering Ritual, I noticed a _VERY_ unusual bug!

The Ritual upon Activation Attempt will _FIRST_ attempt to check the level of the Altar the Linked Blood Orb is in BEFORE checking the Orb it's self (I did this via a Crafted & Linked Tier 4 Orb in a Tier 4 Altar).

In my case, I required 50,000 LP to Activate with 20 LP per Damaging Tick (which is another issue within it's self, as I understand the Lore, it's supposed to be 20 LP/Tick irregardless of if it Damages something, a "Constant Drain" if you will, will submit that suggestion for 1.8 separately), my Orb contained 200,000 ~ 400,000 LP, yet the Ritual repeatedly stated "You feel a Pull, but are too weak." (basically, not enough LP in Soul Network). I had not recently died (about 2 hours since my last death), so Soul Fray was not a factor, but because my Tier 4 Altar only contained 20,000 ~ 40,000 LP, the Ritual repeatedly failed to Activate.

To further verify my theory, I pulled out my Tier 4 Blood Orb and tried again, thus bringing me just below 400,000 LP in my Soul Network (verified all of this via both WAILA & Divination Sigil), then placed the Tier 4 Blood Orb back in the Tier 4 Altar to soak up the rewards (Ender IO Powered Spawner going full blast placed under Well of Suffering Ritual, used a Modular Force Field System to contain all the mobs so they'd die properly. ProTip: Don't try that with Endermen, they'll teleport through. Oops! lol).

commented

The Ritual upon Activation Attempt will FIRST attempt to check the level of the Altar the Linked Blood Orb is in BEFORE checking the Orb it's self

It does no such thing. The ritual itself makes no tier based checks. You can run it on a Tier 1 altar for all it cares. The only tier check Master Ritual Stone makes is to make sure you have the correct Activation Crystal. Neither of them make any checks whatsoever to the capacity or current storage of the Altar. It syphons directly from your Soul Network which is stored in the World data.

20 LP per Damaging Tick (which is another issue within it's self, as I understand the Lore, it's supposed to be 20 LP/Tick irregardless of if it Damages something, a "Constant Drain" if you will, will submit that suggestion for 1.8 separately),

The lore is wrong. It is definitely supposed to be costPerRefresh * entityCount.

commented

huh, that's odd, because as more mobs spawned, the profits (LP into Altar) increased, and started becoming profitable (20 LP isn't exactly cheap without a Rune of Sacrifice installed lol)

Edit: I wasn't really stating the Tier because of potential Tier based checks, I was just putting that out there to quell any rumors about "well have you tried in a Tier 4?" (because I read that post in the Well of Suffering Bug post too) But it was most definitely checking the Altar's LP levels, getting a "not enough" result, and ending the search there. That is the bug.

I had created only a single Orb, and it was resting within the Altar during all of the failed attempts. I was really pouring the LP into the Orb too (enough to jump start 8 Well of Sufferings!).

P.S. How do you quote like that? I try it and I can't figure out how to end it... I also forgot the formatting to use to do it.

commented

Is this fixed in 1.8 at least? Or planned to be fixed? 1.7.10 was getting Altar LP and not reading Network LP. You may be confident about your code, but I had way overkill available for my Network, but my Altar was underneath the required LP limit. If you retrace my steps for the ritual you'll see it behaved how I stated. I payed close enough attention to verify the LP of the Altar was being checked. Idk how, but it was. Perhaps it triggered some fail safe and ended up with the Altar's LP as it's current network available instead of the Network's. I'm playing Offline Single Player.

commented

You may be confident about your code

I also showed you proof that it does not do as you say. There is literally no point in the code that your guess could be true. This is not an issue.

commented

Well then why couldn't I Creative Activation Stone the Master Ritual Stone with 8 times the required LP in my network? It failed activation.

commented

I'm sorry but you must have been doing something wrong... The ritual makes no checks whatsoever to the altar's tier, orb inside the altar, or even the altar itself. The ritual makes NO checks when it is activated, other than the correct configuration of ritual stones and the correct amount of LP. You failed one of these checks.

commented

Idk what to tell you guys, it was doing what it was doing, Idk how or why, but while my only orb was inside the altar, the ritual refused to activate until the altar contained enough LP. Idk how or why.

Ritual built in creative mode using Dawn capable Ritual Diviner (so able to auto build any ritual).

Activated via Master & Creative Activation stones both, crafted the Tier 4 Orb via standard Altar Blood Infusion.

Filled Altar by holding Right Click with a standard Sacrificial Knife (<AWWayofTime:sacrificialKnife>, as opposed to the Creative variety) while in Creative+ mode.

Ritual is completely symmetrical, so changed direction isn't a factor, but was tested.

Both rituals did eventually activate, first when I removed the Orb from the Altar (bringing me from 8x the LP to 7x the LP), and the second ritual later once the Altar LP went above the Activation Cost (according to the Divination Sigil).

I wasn't jumping all around doing a bunch of stuff for this test, I focused exclusively on this task as it occurred, originally I intended to further to debug the Well of Suffering not doing it's work (probably something to do with the Time keeping method used like they said), the Well of Suffering is also quite expensive, and was the only ritual used for this test.

I can give you my information all day guys, and y'all can be as adamant as y'all want, but I know what that ritual did, it took me about 10 min to figure out my Soul Network contained 4x the activation cost and it was still refusing to activate saying I didn't have enough LP (in it's normal mysterious way).

I did no construction nor any demolition during the LP testing phase (apart from once when I tore down the entire structure and rebuilt it from new materials, no change in behavior was observed)

It could be caused by the fact that my only Orb of any Tier that I'd ever crafted was placed within the Altar (that's a fairly blind guess), and perhaps the problem goes away if you have made a second Orb, but it's still behavior worth noting and verifying.

I told y'all step-by-step what I did, and y'all are acting like the code can't be messing up somewhere, like it's perfect or something, if it was perfect, y'all wouldn't need an issue tracker, and if it hadn't behaved in this way, I wouldn't have posted this issue.

One of those Arrays is returning the Altar LP levels instead of the Soul Network LP Levels, and that's the bug.

This isn't my first rodeo guys, I know y'all can find the problem (and at least ensure it's not going to occur in 1.8), I'm very meticulous about my bug reports, I always try to update my mods and reverify that the problem is in fact fixed (at least as far as MC1.7 is concerned) before I go ranting on and on, covering all the information normally requested per bug report, in high detail, with as much information as I could possibly provide to reproduce the bug, usually provided piecemeal as it becomes relevant.

I'd video record it for you if I could guys, complete with voice, but my Dual-Core laptop can barely run the game currently, I fear video recording might be more than it could handle, plus I'd still need to download & install the recording software too.

commented

I know y'all can find the problem

We cannot because there is no problem. Read the code. There is literally no way for what you're saying to happen.

commented

Lemme explain this more thoroughly.

I do not think my code is completely infallible. Nor do I think there is no possible way for bugs to happen in my code without be knowing it. The problem here is that you think that Altar LP and Soul Network LP are the same thing: they are not and have never been since Alpha 0.2.0. The LP in the altar is a fluid and the Soul Network LP is a number stored somewhere in the world data - two completely different locations and there is literally no way in hell I can mess that part up.

Let's look at this logically: before the WoS even looks for the altar, it needs to be activated. Since it is not activated yet, I would need to do an iteration of all of the altars in the area for this particular ritual. This piece of code would be easy for us to find. I don't even have a cache of altars, since I never use liquid LP in this manner.

The problem was probably this: you forgot to bind your activation crystal. While testing stuff, you probably right clicked and bound it to yourself without your knowing. When you then activated the ritual, it took the LP from your Soul Network. Before you had a chance to verify all of the levels, however, your altar probably drained the LP that was inside of it and put it into the contained blood orb using the normal methods - it just looked like the ritual took it from the altar.

This isn't my first rodeo: we have been trying to explain to you from the beginning that there was nothing wrong in the code because we checked and double checked the code, and we came to the conclusion that the explanation you provided had no chance of being the actual reason for the issues. Please, please don't ever think of myself as some "holier than thou" individual who does not care about other people's issues. I do care, but I have to draw the line somewhere. I'll unlock this thread for you to give your opinion on my explanation, but if you continue to just treat us as some uncaring individuals who do not seriously look into problems, we're probably not going to like each other.

Have a good day!

commented

I had forgotten that it was stored different (Fluid vs Val), but the first thing I double check is always if it's bound to me. I always try to bind when I first grab an item, and again every time it fails, I finally stopped trying to re-bind it to me around the 7th min into it.

I would also like to point out, it wasn't draining the 50,000 LP (nor any more, nor any less) for the ritual, from anywhere (until ritual activation success, which drained from the network) the only place the Altar was draining into was the Bound Tier 4 Orb (quadruple checked it was bound correctly by the 4th try) which was resting within it (expected behavior)

I'm sorry I offended you, but lately y'all have been giving me a rather difficult time, and it's felt like y'all have been accusing me of jumping at ghosts this entire thread, but it really did happen, and I really don't know what went wrong or where, all I know is that it worked once the Altar LP rose above 50,000 but not before it, and as I don't have any idea how to set up a dev environment to debug (plus I'm lacking quite a few programs (gradle, eclipse)) I reported it to someone who can do all that dev environment goodness and is familiar with the code, which is y'all.

The steps are simple enough:

1. New world
2. Set up Well of Suffering Ritual
3. Set up Altar
    * I had Tier 4 centered 2 blocks above Master Ritual Stone, Tier 2 layer was Rune of Self Sacrifice, the rest were Rune of Augmented Capacity
4. Craft Tier 4 Orb & bind it
    * Tier probably doesn't matter
    * probably doesn't matter if the Orb is Crafted in the Altar or given via NEI
5. Sacrificial Knife enough LP into the Altar
    * method most likely doesn't matter either, so long as it gets it's LP
6. With enough LP in Soul Network to activate Ritual, but not enough LP in the basin of the Altar, attempt to use a bound Ritual Activation Crystal
    * of appropriate Tier obviously
    * I used NEI to get this item, and thus first went after the Creative to see if I could avoid needing to actually pay to activate
        * if you guys want you could add that feature
            * but make it toggleable in the config if you do
7. Ritual: Failed?
    *Not intended behavior.
8. Error message in chat points at LP.
9. Only LP levels too low is the Basin of the Altar
10. Pump 4x the LP required into Soul Network
11. repeat steps 6-9
It basically continued on like this for an hour.

I may not know what broke, or where, or why. But it sure appears that the Ritual is failing due to it checking the Altar LP somehow, if I had to fathom a guess as to how, I am seriously favoring the "Only 1 Orb ever made and it's sitting in the Altar" as that could simply be a parser issue. Do you guys have a check somewhere to verify that the item you're reading is actually a Soul Network item? (Or at least making sure it's not reading the Altar because someone counted their Separators wrong?)

I mean, you guys are very smart, and you coded this mod very well, and it's all pretty straightforward code, not much jumping around, all that lovely stuff, and it's built like a brick (at least compared to some of the less stable mods I've had to get rid of) which is pretty awesome, but with behavior from the game outright looking like it's saying "not enough LP", and I've been absolutely gushing LP in for an hour, something is obviously fishy to say the least.

This could actually be where that mysterious "Tier 4 Altar to use the Ritual" rumor came from now that I think about it, unless they could activate, because the bug happens during Activation Check (not the pull, but the check,
the if {X =< #} part,
not the try {X =- #} part), again I don't know how, or why, all I can do is guess based upon the error messages which I am given and use deductive reasoning and common sense to attempt to figure it out. I do intend on scouring everything to do with all the Code y'all have already referenced (I may not know Java, but I know JavaScript, so I can at least follow along some…usually)

Again, apologies for offending y'all, but between y'all cutting 1.7.10 support completely, y'all being difficult, and my mods in my ModPack being about as compatible as a VHS Tape in a DVD player, I've been having a rough time. I've been helping out the MineTweaker GitHub a lot too (he took a vacation for Christmas lol), which has given me a chance to be slightly better familiar with the Java language as well.

Edit: clean up readability and fix grammar.

commented

I've tried this set of instructions before and can not reproduce it. Unfortunately, this has to be a case of "video or it didn't happen". For all we know the issue was there and it was fixed in 1.8. Until such an issue comes up again, we really can't do anything about it.

commented

Odd, hopefully you're right and it was fixed in 1.8.

If I do manage to record a video of it (don't expect amazing quality, it'll most likely be my cell phone recording my laptop screen), I'll post a link here

Ironically, I was just as stubborn about it not being a bug as you both when it was happening, I was like "Nah, I heard this noise before, I gotta be really thorough for these guys. I bet I forgot a step! Alright, from the top!" *a hour later* "WTF?! What's left to POSSIBLY forget?!"

I once spent 4 hours debugging an error in a config file because the error sent me to the wrong line lol