Equipment

by ElAdamo

Oh, you'd be surprised at the things you can learn while you're doing alterations.

Content
8 months ago
2.0
422
Combat Armor

b Not working?

8 months ago
(updated 8 months ago)

Is it compatible with Editor Extensions? I wanted to try testing this in the lab environment, but it doesn't seem like the equipments are doing anything there. They just cause the FPS/TPS to drop a lot whenever they are placed in an equipment grid, but the vitality doesn't increase the tank HP, and the pocket doesn't seem to increase the inventory size in either case.

(btw I think there should be a way to do the inventory thing without runtime hacks, as a built-in property of equipment in the base game, I think? I know this mod has a backpack equipment that works just like the space age toolbelt equipment, which works even without space age)

8 months ago

I have no idea if it's compatible with that mod. The features work fine for me... maybe some sort of mod interaction preventing it? Yes, there are probably other ways to do this now... this is an old mod.

8 months ago

I'll take a look at refactor when I get a chance.

8 months ago
(updated 8 months ago)

Probably the FPS dropping is because I forgot to turn off debug so it's printing to a file. I'll fix that when I get a chance. It's not terribly efficient... if you put in 64 1x1 equipment pieces it's going to run the check 64 times. I get the jitter too when I insert a lot of them at once.

8 months ago

I don't think the vitality would increase tank HP. I think it only works on a player. https://asciireactor.com/factorio/adamo-equipment/-/blob/master/control.lua?ref_type=heads#L30

8 months ago
(updated 8 months ago)

I noticed this was not working after the 0.3.3 bugfix as well. I ordered the operation wrong. That was probably what happened in your case. Sorry for the confusion... I was confused because even though this mod uses some silly control logic, it's been very reliable. Should be good now. And yeah, they did add an inventory bonus key to the prototype in 2.0, so I'll change it to use that eventually. No new keys for the other effects, though.

8 months ago
(updated 8 months ago)

Hmm, I just tried retesting again with v1.3.5 and couldn't tell if any of them were working (though I don't believe they were). The only mod I had enabled was this and Editor Extensions (the easiest way to get items and test things like this). Loaded into a normal map, added the equipments to my power armor, seemingly no changes.

I looked at another mod that similarly adds new bonus effects (I mentioned it earlier, Extended Vanilla: Personal Equipment), specifically also adds an equipment with crafting speed bonus, and doing the same test with that mod worked perfectly fine (so it's probably not Editor Extensions causing issues).

8 months ago
(updated 8 months ago)

Not to say you wouldn't find a bug, but I use this mod all the time, so I'm not sure where to start looking to figure out why it wouldn't work for you. The crafting bonus definitely says 0 with crafting equipment in your grid? It takes a lot of units to get a big bonus. I'll take a look at those other mods when I have a chance. Merry Christmas.

8 months ago
(updated 8 months ago)

I didn't realize any numbers were supposed to show up at all, actually! Hovering over the equipment, and I see "Manual crafting speed bonus" and "Health bonus", stack size 50, energy capacity 1.0kJ, max input 10.0 kW (and the equipment grids it can go into, of course).

Placing it into a power armor mk2 with just a portable fission reactor in it, and adding the Crafting module just adds Battery capacity: 1.0kJ. Same thing happens when adding the Vitality module; no other changes listed, and no "crafting bonus" is listed at all. (of course, nothing shows up at all when doing the same with the crafting speed equipment from the Extended Vanilla mod; I thought it was normal for these semi-hacky bonuses not to appear)

It could just be an incompatibility issue with Editor Extensions, but there's no easy way for me to test if it's working without that mod. I don't have any pure vanilla playthroughs far enough to research and craft to test otherwise.

And Merry Christmas to you as well!

8 months ago

Got it. The command to check is:

/c game.player.print(serpent.block(game.player.character.character_crafting_speed_modifier))

I'll check out that mod when I have the chance. I've been using the creative mod to create things in my test sandbox but sounds like that one could be useful.

8 months ago
(updated 8 months ago)

I tried it in the Editor Extensions lab, in a brand new Creative Mode save with cheats on, and in the closest thing I had to a vanilla playthrough, and still got a 0 when running that command (with crafting equipments inserted). I don't know what I'm missing...

8 months ago
(updated 8 months ago)

Hmm, that should work. It just requires a power source in the grid of the armor plus one of the items (that's why it's a battery -- just ensures that power is available). One piece of equipment will at least show a number greater than 0 with that command. You obviously know what you're doing so I'm assuming there is a bug. But I'm not sure how to recreate it yet.

Actually, come to think of it, I'm not even checking that it has power anymore. So just having the item in the grid should give you that number.

8 months ago
(updated 8 months ago)

Hmm, one thing I noticed from my most recent tests, under the script output, I got 12 repeated lines of "Player does not have a character." followed by alternating lines of "No armor or armor does not have a grid." and "No armor inventory found.", 8 times each. Those probably aren't supposed to happen that frequently?

The debug and log files haven't been touched since 12/18 (probably when I first tested the mod, when it had all the debugging enabled?).

8 months ago

Thanks, that's useful. So the debug is saying it can't find your character. Yes I'm sure it was from when you had the debug set -- there were some bugs at that time that I've fixed that would have potentially shown that error.

I looked at the code for the Editor Extensions mod and tried my mod with the mod turned on.

I get a crash error if I'm in ctrl+alt+E map mode and try to put the equipment in my armor. (Because there's no character -- I have to add a check for this, I had never considered a condition where the player has an armor but no character, however this is probably the case when the player is in a space platform as well.)

In normal play mode, I can put the crafting equipment in my armor, and for 8 pieces of equipment I get ~1.6 for my crafting speed modifier.

With 8 vitality modules in my armor, I go from 1300 to 3300 health.

/c game.player.print(game.player.character.health) is that command.

I'm really not sure, man. :-/ Obviously it's better to use the built-in function for the pocket module and I will change that but I don't see any reason the stuff shouldn't work for you as-is. We use it in our multiplayer game no problem. It shouldn't work on vehicle grids (although it might in some cases if the player is in the vehicle ... that would technically be a bug but my code is pretty aggressive at trying to find objects) but as long as you're putting it in your player armor grid it should just work. If you can tell me anything else about your situation -- confirm your armor and grid setup, maybe. I'm definitely open to that there are cases I haven't thought of that are preventing it from adding the bonuses.

I don't see any reason there would be incompatibility with any other mod other than if that mod is making over-writing changes to the particular bonuses I've targeted on the player or if the mod is removing the character object from the player. Editor Extensions does that but like I discovered in that case it causes an unrecoverable error.

8 months ago

or better yet, send me your save file

8 months ago
(updated 8 months ago)

I may have figured out part of the issue? It doesn't seem to work on the initial load of the game? In all of my tests, I never saved and then reloaded to check.

After starting up a new map in the Editor Extensions lab, and placing 1 of each equipment, got 0 crafting speed and 250 health as usual, but after saving and reloading, then placing the equipment back into armor again, I got 0.2 and 500 instead.

Here's a copy of the save, with equipments already in the armor, and the printed results I got. The numbers don't change until the equipment are removed and placed again

8 months ago
(updated 8 months ago)

Thanks for the update. I have some christmas celebrations today but will take a look at it late tonight.

So far this mod has really just been for me and our private server but now that I know I have your attention I'm more motivated to make this better, so I appreciate the feedback. Been using your reverse factory since like version 0.13.

New response