Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal essence tanks (all types) can't reload their type of essence or have said essence inserted into them #304

Open
AmarinReyny opened this issue Dec 6, 2022 · 28 comments

Comments

@AmarinReyny
Copy link

Title says it all, pretty much.

@chaosvolt
Copy link
Owner

Do vanilla tanks such as the gasoline fuel cell work?

@AmarinReyny
Copy link
Author

Do vanilla tanks such as the gasoline fuel cell work?

Yep.

@chaosvolt
Copy link
Owner

Hmmm, I'll see if there's any JSON changes to them that might affect it, not sure what could be different.

@AmarinReyny
Copy link
Author

Hmmm, I'll see if there's any JSON changes to them that might affect it, not sure what could be different.

For what it's worth, I tried messing around in the JSON files for the tanks, the essence, and quite a few other things, trying to see what was different from the vanilla tanks, and changing things to make the essence tanks function more like the vanilla ones. When that didn't fix it, I then tried changing it so that the tanks would reload with essence gems as magazines rather than just essence directly. That also didn't work. Hopefully, you have more success with fixing it than I did.

@AmarinReyny
Copy link
Author

Also, just to clarify, I'm using DDA, not BN.

@chaosvolt
Copy link
Owner

I don't see any JSON differences here that would explain it, yeah. My only guess here is that they broke handling of containers being loadable with solid fuels, since essences are solid while gasoline are liquid.

@AmarinReyny
Copy link
Author

I don't see any JSON differences here that would explain it, yeah. My only guess here is that they broke handling of containers being loadable with solid fuels, since essences are solid while gasoline are liquid.

Huh... I hadn't considered that. Any idea what should be done about it?

@chaosvolt
Copy link
Owner

I'm looking at it further, and I noticed that the battery loader has a different container type, counts as a magazine well for loading entire batteries into. So I'll test to see what happens if I rig it to work like the essence gems.

@chaosvolt
Copy link
Owner

So far no luck getting other methods to work, will test more when I get home. In the meantime it'd be a good idea to open an issue on their end pointing out that solid fuels seem to be broken, as I'm fairly certain at least one of their CBMs uses it, probably in Aftershock.

@AmarinReyny
Copy link
Author

AmarinReyny commented Dec 6, 2022

So far no luck getting other methods to work, will test more when I get home. In the meantime it'd be a good idea to open an issue on their end pointing out that solid fuels seem to be broken, as I'm fairly certain at least one of their CBMs uses it, probably in Aftershock.

Will do, though first I'll try asking if that's actually the case.

@chaosvolt
Copy link
Owner

Good luck, not yet sure how to fix it otherwise, though magitech essence batteries might be a workable hack...

@AmarinReyny
Copy link
Author

Good luck, not yet sure how to fix it otherwise, though magitech essence batteries might be a workable hack...

Might be. I take it essence gems have been ruled out, then?

@chaosvolt
Copy link
Owner

They aren't magazines in terms of item type, so don't think they'd be able to load in right off the bat. If I figured out how to make them both a magazine and have armor data perhaps...

@AmarinReyny
Copy link
Author

AmarinReyny commented Dec 7, 2022

They aren't magazines in terms of item type, so don't think they'd be able to load in right off the bat. If I figured out how to make them both a magazine and have armor data perhaps...

It looks like they did change it, according to the response I got here.

EDIT: Replied to the wrong comment of yours. Still, we got confirmation of one thing, at least.

@Hirmuolio
Copy link

Hirmuolio commented Dec 7, 2022

The pull request that changed bionics: CleverRaven/Cataclysm-DDA#61049

Updating the cbm to work with the new DDA system should be pretty simple.

Add new item that acts as container for the cbm fuel. Just a basic container with these flags: [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ]) and a container pocket that takes the fuel item only.
Add this item as pseudo item to the bionic.
Maybe adjust the fuel item mass/volume and its material energy.

But making this mod work for both CDDA and BN would be much harder. Maybe you could have the item properties for both versions in the json but then CDDA would throw errors about invalid properties.

@AmarinReyny
Copy link
Author

AmarinReyny commented Dec 7, 2022

The pull request that changed bionics: CleverRaven/Cataclysm-DDA#61049

Updating the cbm to work with the new DDA system should be pretty simple.

Add new item that acts as container for the cbm fuel. Just a basic container with these flags: [ "INTEGRATED", "UNBREAKABLE", "PERSONAL", "NO_REPAIR", "ALLOWS_NATURAL_ATTACKS", "BIONIC_FUEL_SOURCE" ]) and a container pocket that takes the fuel item only. Add this item as pseudo item to the bionic. Maybe adjust the fuel item mass/volume and its material energy.

But making this mod work for both CDDA and BN would be much harder. Maybe you could have the item properties for both versions in the json but then CDDA would throw errors about invalid properties. Or BN could port that feature over.

That's already been done - the problem is that, even with the containers added by the bionic matching that new format to a t, they still can't accept the fuel that's supposed to go into them (essence and its variations).

@AmarinReyny
Copy link
Author

AmarinReyny commented Dec 7, 2022

Did you also add material to the essence? The system works mostly by item material instead of item itself.

Not sure why this isn't displaying on this page despite me getting an email about you saying this, but meh.

I just looked at the relevant files, and yeah, the essence does have a material listed, which matches up with contents in the mod's materials.json file.

(Also, just to clarify, I'm not the one who created/maintains this mod. That would be Chaosvolt. I'm just some nerd who noticed a problem while playing CDDA with the Arcana mod.)

@chaosvolt
Copy link
Owner

Linked issue (CleverRaven/Cataclysm-DDA#62617) shows the main root problem, the "solid fuel won't work in container-type pockets" issue. As noted, manually inserting does not work either. The expected could would be the max volume of the container open, which I already made sure is larger than the size of the relevant essence items.

If that can't be fixed, I'm...reasonably certain I might have to resort to hacks involving adding in magazines to store essence, like how Battery System works. This assumes bionic fueling via a magazine well doesn't have any special case hacks for the benefit of undroppable ammo (like battery units), otherwise it gets more complex.

But making this mod work for both CDDA and BN would be much harder. Maybe you could have the item properties for both versions in the json but then CDDA would throw errors about invalid properties.

Arcana already has a separate version for Bright Nights, and the CBM works fine in it currently, due to not tying CBM refueling to the pocket system. It still has some issues, mostly not playing nice with trying to treat a comestible as bionic fuel (I'm not sure DDA's system can easily parse trying to feed a CBM a comestible loaded as if it were ammo either, though), and not being able to use more than one fuel option without needing sub-bionics as seen here (less of an issue in DDA version since the containers can be unloaded, but 90% certain it'd still preclude mixing ammo types and thus you'd need multiple fuel tanks to actually use more than one fuel option).

@chaosvolt
Copy link
Owner

Apologies for the delays, I'll be busy tomorrow as well but will see if I can either look into tinering with other possible workarounds or acting on any advice that may come up if any other possible JSON fixes come up.

I could've sworn mainline DDA had at least one example of a CBM that runs on solid fuel in one of the in-repo mods? Either way that does seem like something they'd have use for eventually. For example, if it doesn't already exist you'd expect Magiclysm to tinker with taking the same idea as the essence surge cell and implementing some way to get CBM power from crystallized mana.

@Perrin974
Copy link

I am not sure of how much use this will be, inserting manually does work for me. [R]eloading does not however.
image

Running DDA experimental build 2022-12-05-0646 [bea66a7]
Arcana was downloaded on the 2022-12-09

There is a single change I made, in ammo.json I removed the "ZERO_WEIGHT" flag from the essence types, Although that was due to having an issue with autopickup not working for essence, after removal it now seems to work fine. But inserting already worked beforehand.

I wonder if this might be related to the topic issue too or by design, I can't get the essence gems to auto insert picked up essence.

@chaosvolt
Copy link
Owner

Hmm, so insert works? Does the XBM at least then use it for fuel afterward?

@AmarinReyny
Copy link
Author

AmarinReyny commented Dec 11, 2022

I am not sure of how much use this will be, inserting manually does work for me. [R]eloading does not however. image

Running DDA experimental build 2022-12-05-0646 [bea66a7] Arcana was downloaded on the 2022-12-09

There is a single change I made, in ammo.json I removed the "ZERO_WEIGHT" flag from the essence types, Although that was due to having an issue with autopickup not working for essence, after removal it now seems to work fine. But inserting already worked beforehand.

I wonder if this might be related to the topic issue too or by design, I can't get the essence gems to auto insert picked up essence.

That's strange... Every time I try to insert the essence, it says my inventory is empty. Also, autopickup worked fine for me without me removing the ZERO_WEIGHT flag (though it still didn't auto-insert into anything).

@AmarinReyny
Copy link
Author

Okay, so after messing around in-game a bit, I decided to just see what the pocket settings on the tanks were. I didn't see anything that immediately raised suspicion, but I did decide to just clear all settings for the pocket, and somehow that enabled me to insert essence into the tanks. Is there somehow something that automatically changes the settings for the tanks once the CBM is installed?

@chaosvolt
Copy link
Owner

There shouldn't be anything that'd do that, no. Sounds like yet more nonsensical nested container code behavior. :/

@AmarinReyny
Copy link
Author

I tried using the regular essence surge cell, and it didn't do anything despite being activated and fueled, but my character's bionic power was close to full anyway, so that might be why. I then tried the dull variant, and that did end up using some dull essence, and in the process providing my character with more bionic power.

@Perrin974
Copy link

Hmm, so insert works? Does the XBM at least then use it for fuel afterward?

It does I can enable the CBMs dull essence gives 4kj, blood gives 200kj, regular essence 1200kj, I haven't gotten crystallized essence to work yet but that is mostly because of the huge amount of power it provides I would assume.

Okay, so after messing around in-game a bit, I decided to just see what the pocket settings on the tanks were. I didn't see anything that immediately raised suspicion, but I did decide to just clear all settings for the pocket, and somehow that enabled me to insert essence into the tanks. Is there somehow something that automatically changes the settings for the tanks once the CBM is installed?

I do use a rather elaborate setup and tweaked every pocket available, it might well be possible I messed with that without realizing it. my blood essence tank currently looks like this, not sure if this is the "standard" setting.
image

@chaosvolt
Copy link
Owner

Hmm, that still seems problematic if insert works but reload doesn't. Any news on a fix, should I assume that insert is the intended workaround, or should I work on a hacky workaround of my own involving adding magazines to load with essence?

@chaosvolt
Copy link
Owner

So I just tested this on the latest build. All four can have essence inserted into them by going to their item in the inventory menu and hitting the "insert" command. They all recharge as intended when turned on too, though the power values for blood essence, regular essence, and crystalized essence are all wildly off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants