Mod Details

Kiki-MarkFIR

Kiki-MarkFIR 1.0.2

Created by  kikirio

2.7K Downloads

SPT 0.0.0 Compatible

A couple of options for marking your loot found in raid.

Latest Version 1.0.2
SPT 0.0.0

Updated Mar 6, 2023 at 12:38 PM

Version Notes

updated for 3.6.

This download is externally hosted.
Always scan for viruses.
ReadMe.

Sets all found items to being found in raid, regardless of raid outcome.

If the config option markEVERYTHING is set to true, it will mark all items on your charector as FIR regardless if brought into raid, and regardless of raid outcome. (true / false default = false)

With reference to the original and a shoutout to Jiblet for asking someone to update it.

If you love what I do, why not buy me a coffee?

Install instructions.

Open the zip with winzip/winrar/7zip etc, and drag the containing folder into the main folder of your AKI install.

UhHRFjL.gif

Version 1.0.2
Download Mod Version
SPT 0.0.0
Latest Compatible SPT Version

2.0K Downloads

Created Mar 6, 2023 at 12:38 PM

Updated Mar 6, 2023 at 12:38 PM

Virus Total Results

updated for 3.6.

Version 1.0.0
Download Mod Version
Unknown SPT Version
Latest Compatible SPT Version

651 Downloads

Created Jan 27, 2023 at 12:13 AM

Updated Jan 27, 2023 at 12:13 AM

Virus Total Results
iszlev

can anyone figure out how to make this mod work for 3.9.x? i tried doing it myself but i keep effin up

0 Likes

Yeah I figured it out. It is very easy, compared this mod with one that works in 3.9.x.

I recommend Notepad++ or something similar to do this.

To update this mod, do the following:

  • Download the version 1.0.2
  • Install it like any other mod
  • Open the mods folder
  • Replace the contents of package.json with this:

{ “name”: “markfir”, “version”: “1.1.0”, “main”: “src/MarkFIR.js”, “license”: “NCSA”, “author”: “Kiki”, “sptVersion”: “3.9.*”, “loadBefore”: [], “loadAfter”: [], “incompatibilities”: [], “isBundleMod”: false, “scripts”: { “setup”: “npm i”, “build”: “node ./packageBuild.ts” }, “devDependencies”: { “@types/node”: “^14.15.3”, “@typescript-eslint/eslint-plugin”: “^4.33.0”, “@typescript-eslint/parser”: “^4.33.0”, “bestzip”: “2.2.1”, “eslint”: “7.26.0”, “fs-extra”: “^10.1.0”, “glob”: “^8.0.3”, “tsyringe”: “4.6.0”, “typescript”: “4.6.4” } } - Open the src folder

  • Replace the contens of MarkFIR.ts with this:

import type { DependencyContainer } from “tsyringe”; import { InraidController } from “@spt/controllers/InraidController”; import { InRaidHelper } from “@spt/helpers/InRaidHelper”; import type { IPreSptLoadMod } from “@spt/models/external/IPreSptLoadMod”; import type { IPostDBLoadMod } from “@spt/models/external/IPostDBLoadMod”; import type { IPostSptLoadMod } from “@spt/models/external/IPostSptLoadMod”; class MarkFIR implements IPreSptLoadMod, IPostDBLoadMod, IPostSptLoadMod { private container: DependencyContainer private config = require(“../config/config.json“) public preSptLoad(container: DependencyContainer): void { this.container = container if(this.config.markShopFIR === true) if(this.config.markFleaFIR === true) container.afterResolution(“InraidController”, (_t, result: InraidController) => { result.markOrRemoveFoundInRaidItems = (offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void => { return this.InRaidControllerReplacement(offraidData, pmcData, isPlayerScav) } }, {frequency: “Always”}) if(this.config.markEVERYTHING === true){ container.afterResolution(“InRaidHelper”, (_t, result: InRaidHelper) => { result.addSpawnedInSessionPropertyToItems = (preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData => { return this.InRaidHelperReplacement(preRaidProfile, postRaidProfile, isPlayerScav) } }, {frequency: “Always”}) } } private InRaidControllerReplacement(offraidData: ISaveProgressRequestData, pmcData: IPmcData, isPlayerScav: boolean): void { const InRaidHelper = this.container.resolve<InRaidHelper>(“InRaidHelper”) offraidData.profile = InRaidHelper.addSpawnedInSessionPropertyToItems(pmcData, offraidData.profile, isPlayerScav) } private InRaidHelperReplacement(preRaidProfile: IPmcData, postRaidProfile: IPmcData, isPlayerScav: boolean): IPmcData { for (const item of postRaidProfile.Inventory.items) { if (“upd” in item) { item.upd.SpawnedInSession = true } else { item.upd = { SpawnedInSession: true } } } return postRaidProfile; } } module.exports = {mod: new MarkFIR()} - Optional: Go into the config folder and open config.json

  • In there set “markEVERYTHING” to true. This will set all items brought into raid as FIR too.
3 Likes
DarthCat

@UselessAqua
i love you

0 Likes
Soulblade

UselessAqua Hey, maybe you can help again I’m on SPT versio 3.9.10
I did the edit you suggested and it doesn’t work. I just throws error in console:

Mod: Kiki-markfir 1.1.0 is not compatible with the current version of SPT. It was made for SPT: 3.9.* Please check for an updated version of this mod. You may encounter issues - no support will be provided!

Errors were found with mods, NO MODS WILL BE LOADED

0 Likes
Brin

You’re not on 3.9.x, you’re on 3.10.x, which is why none of your mods are loading: The package.json change above tells the server it’s a 3.9.x mod, which the server sees as an outdated mod.

The other issue is that there appears to have been a change to how “found in raid” status is handled/recorded in the profile: Previously pretty much everything in the profile had a “SpawnedInSession”: value that was either “true” or “false” (TLDR: “true” == FIR, “false” == not FIR).

With 3.10.x, it looks like the behavior to strip FIR was changed from “flip the value from true to false” to just delete the entire “SpawnedInSession”: variable for that item.

In order to work, either the mod will need to be updated to add the missing “SpawnedInSession”: variables to items that don’t have it, which the code above does not do, or the base SPT code will need to be changed to revert back to the old behavior.

0 Likes
kikirio

This is why getting users to just change the package.json is not a good call.

0 Likes
SpartanOperator

Hey Kiki, this is my favourite mod, is it being updated?

0 Likes

Hey, I figured it out, you have to change a few lines inside the code.

Made an other commend on how to update / make the mod compatible with spt version 3.9.x.

0 Likes
Not_Izaah

Doesn’t work as of 3.7.6, upon extracting I am met with a black screen and this is what the console says (image included):

TypeError: InRaidHelper.addSpawnedInSessionPropertyToItems is not a function

TypeError: InRaidHelper.addSpawnedInSessionPropertyToItems is not a function

at MarkFIR.InRaidControllerReplacement (Z:\SPT- Versions\SPT - 3.7.6\user\mods\Kiki-MarkFIR\src\MarkFIR.ts:40:40)

at InraidController.markOrRemoveFoundInRaidItems (Z:\SPT- Versions\SPT - 3.7.6\user\mods\Kiki-MarkFIR\src\MarkFIR.ts:22:21)

at InraidController.savePmcProgress (C:\snapshot\project\src\controllers\InraidController.ts:126:14)

at InraidController.savePostRaidProgress (C:\snapshot\project\src\controllers\InraidController.ts:99:18)

at InraidCallbacks.saveProgress (C:\snapshot\project\src\callbacks\InraidCallbacks.ts:44:31)

at RouteAction.action (C:\snapshot\project\src\routers\static\InraidStaticRouter.ts:17:49)

at InraidStaticRouter.handleStatic (C:\snapshot\project\src\di\Router.ts:50:63)

at HttpRouter.handleRoute (C:\snapshot\project\src\routers\HttpRouter.ts:79:62)

at HttpRouter.getResponse (C:\snapshot\project\src\routers\HttpRouter.ts:44:30)

at AkiHttpListener.getResponse (C:\snapshot\project\src\servers\http\AkiHttpListener.ts:150:38)

TypeError: InRaidHelper.addSpawnedInSessionPropertyToItems is not a function

TypeError: InRaidHelper.addSpawnedInSessionPropertyToItems is not a function

at MarkFIR.InRaidControllerReplacement (Z:\SPT- Versions\SPT - 3.7.6\user\mods\Kiki-MarkFIR\src\MarkFIR.ts:40:40)

at InraidController.markOrRemoveFoundInRaidItems (Z:\SPT- Versions\SPT - 3.7.6\user\mods\Kiki-MarkFIR\src\MarkFIR.ts:22:21)

at InraidController.savePmcProgress (C:\snapshot\project\src\controllers\InraidController.ts:126:14)

at InraidController.savePostRaidProgress (C:\snapshot\project\src\controllers\InraidController.ts:99:18)

at InraidCallbacks.saveProgress (C:\snapshot\project\src\callbacks\InraidCallbacks.ts:44:31)

at RouteAction.action (C:\snapshot\project\src\routers\static\InraidStaticRouter.ts:17:49)

at InraidStaticRouter.handleStatic (C:\snapshot\project\src\di\Router.ts:50:63)

at HttpRouter.handleRoute (C:\snapshot\project\src\routers\HttpRouter.ts:79:62)

at HttpRouter.getResponse (C:\snapshot\project\src\routers\HttpRouter.ts:44:30)

Console Log

1 Like
mutaco

same thing here

0 Likes
Brin

Seems to still work on 3.7.0 & 3.7.1

0 Likes
Bloo

How did you get it to work on 3.7.1? I get a long error on raid end and then an infinite black screen with map ambiance.

0 Likes
Brin

I just copied the folder this mod from my mods folder in my 3.6.1 install into my 3.7.1 install, and it worked without issue. With that in mind, I see three likely possibilities:

1: Your black screen issue was caused by a different mod, or an incompatibility between this mod and another you were already running.
2: Something got corrupted. Redownload the mod & extract using 7zip. If that doesn’t fix it, maybe try doing a second install of SPT and copying your current mods & profile over to see if your issue is a corrupted SPT install (When I’ve run into weird issues, outside of ~3.5.6, it was almost always due to either outdated mods that were truly incompatible, or it was fixed with a reinstall).

3: The SPT devs tend to do stealth hotfixes for a day or two after each release, so it’s possible that we’re using slightly different builds of 3.7.1, and the version you’re using is newer.

1 Like
blocky3321

would it be possible to add an option that also marks the items fir immediately after they are bought?

0 Likes
Brin

There are a few config toggles that can do that.

For purchases from traders, Aki_data\Server\Configs\trader.json: “purchasesAreFoundInRaid” should be changed to “true”

For purchases from Flea, ragfair.json: Same as above.

0 Likes
Orbitas

Thanks so much for remaking this, I am touched and so happy!

Would it be at all possible to add a config option to only mark FIR if the raid was survived/successful? Since that’s how I made it originally I think

0 Likes
kikirio

Hey dude, No worries I will look into it, everything was commented out in your last iteration other than

for (const item of postRaidProfile.Inventory.items) { if (“upd” in item) { item.upd.SpawnedInSession = true } else { item.upd = { SpawnedInSession: true } } } which is what I yoinked from you.
I will see if I can figure out a method to allow for all the options. (I do not have much time atm, so some patience will be needed, as there was not something immediately obvious for how to do this.)

1 Like
dreammasta

Please update

1 Like

I have a life. It will be done when I get around to it.

1 Like
Flo

Sweet thanks a lot

1 Like
gaaxrus

can you add FIR for items bought on flea market

0 Likes
Jiblet

This mod gives you a workaround for that. you can buy something from the flea, stick it in your secure container, enter a raid and die (or be a big brave boy and make it all the way through alive) and it will be marked as FIR.

Not as direct as what you want but it gets the job done and doesn’t feel quite so cheaty because at least there’s a potential risk.

0 Likes
kikirio

I have had a bit of a look, and I can’t see an obvious solution for that. The above method will have to do for now.

0 Likes
gaaxrus

ok, thx for your work!

1 Like
Brin

“Can you add FIR for items bought on flea market?”

There’s an option in the default config options for this:

\Aki_Data\Server\configs\ragfair.json

Change “purchasesAreFoundInRaid” from “false” to “true”.

2 Likes
Brin

Also, if you want items purchased from traders to be FIR, the toggle is:

“newItemsMarkedFound”

and it’s found in “inventory.json” in the same config folder.

0 Likes
Jiblet

Ooh you spicy legend. Thanks!

1 Like

Details