XCOM 2
Grimy's Loot Mod: Long War 2 OPEN BETA
Gnaughty 29 Jul, 2017 @ 5:11am
Issues with adding new weapons to loot entry tables
I'm currently trying to add weapons from Nigel's Halo 5 High Res Guns mod to the Grimy loot entry tables. As an example, I've copied the "AssaultRifle" line and pasted in a new line directly under that (but above "Shotgun") and changed the "DataNameContains" to equal "NH5_AR". The issue I run into is that when the loot box unlocks and gives me the options for the loot (i.e. rifle, medium armor, grenade launcher), the weapon option is "Shotgun" but I receive the NH5 Assault Rifle. So I'm getting the weapon I want, but the category label is wrong.

Here's the script. See anything I'm missing? I've got an increased chance entered for the NH5_AR for testing purposes.

;---------------------------------------------
;--- Loot Entry Tables ---
;---------------------------------------------
+IdentificationTable=(EquipSection="P", DataNameContains="SMG", Category="rifle", Chance=10, HasSMG=true, Affix="Primary")
+IdentificationTable=(EquipSection="P", DataNameContains="AssaultRifle", Category="rifle", Chance=15, Affix="Primary")
+IdentificationTable=(EquipSection="P", DataNameContains="NH5_AR", Category="rifle", Chance=40, Affix="Primary")
+IdentificationTable=(EquipSection="P", DataNameContains="Shotgun", DataNameDoesNotContain="SawedOff", Category="shotgun", Chance=10, Affix="Primary")
< >
Showing 1-12 of 12 comments
ImJustJoshin 20 Aug, 2017 @ 12:41pm 
In the mod description under future items it says this: "A localized string for each loot entry is needed (in a way that would make it easy for other mod authors to add to)" Did you do that? I have not had any trouble adding weapons.
ImJustJoshin 20 Aug, 2017 @ 6:47pm 
My test with Halo Reach Weapons Lw2 by Nigel Thornberry worked completely from showing up in the lootbox + displaying the proper name (Once you put it into the Localization config, like so, .ChoiceNames="Roll M7 Caseless SMG") along with giving the right weapon once clicked along with attachments and the mod snagged up the SMG's description to put in as a brief summary.
ImJustJoshin 20 Aug, 2017 @ 6:49pm 
In fact the only problem I had was with the ionic axe from the Alien Hunter DLC not showing a proper label if it was rolled.
Gnaughty 24 Aug, 2017 @ 6:09pm 
Thanks for the reply. No, I did not edit the Localization config. Is it necessary to edit the Localization config AND the Config file (i.e. loot entry table referenced above)? Or do I just need to change the Localization config and leave the loot tables alone?
ImJustJoshin 25 Aug, 2017 @ 4:55pm 
Both have to be done in order for it to work.
ImJustJoshin 25 Aug, 2017 @ 5:01pm 
Open up GrimyLootLW2.int and make a new entry for the .choicenames you should see in the first couple of lines

Edit: I believe the reason why the NH5_AR came up as a shotgun was due to the way the mod handles locating which .choicename to use and where the modded weapon was placed.

Look at it like this: For each entry count them as numbered pairs. Making the SMG 1 and in turn the very first .choicename also be 1 and display it when it is rolled. However because you didn't add the NH5_AR to the localization, in terms of this example, it was never given a pair but due to it's place in the loot table (It being the third entry) it stole the third .choicename which was "Roll Shotgun".

Unmodified

SMG 1 - .choicename "Roll SMG" 1 - Output: Gives you an SMG
AssaultRifle 2 - .choicename "Roll Assault Rifle" 2 - Output: Gives you an Assault Rifle
Shotgun 3 - .choicename "Roll Shotgun" 3 - Output: Gives you a Shotgun
SniperRifle 4 - .choicename "Roll SniperRifle" 4 - Output: Gives you a Sniper Rifle

What happened with you

SMG 1 - .choicename "Roll SMG" 1 - Output: Gives you an SMG
AssaultRifle 2 - .choicename "Roll Assault Rifle" 2 - Output: Gives you an Assault Rifle
Shotgun NH5_AR 3 - .choicename "Roll Shotgun" 3 - Output: Gives you an NH5 Assault Rifle.
SniperRifle Shotgun 4 - .choicename "Roll SniperRifle" 4 - Output: Gives you a Shotgun.

tl:dr Without the NH5_AR having a localization .choicename it will steal it from the next weapon that is suppose to get their's this case being the shotgun which in turn screws everything else following afterward.
Last edited by ImJustJoshin; 25 Aug, 2017 @ 5:25pm
iriemk 29 Aug, 2017 @ 6:46am 
@ImJustJoshin: Thanks for this guide above, now me Halo guns work fine. ^^

But: Did you get the Katana Pack Reloaded to work with this? I tried a lot, but no luck getting it to function consistently. Can't stop the boxes from spitting out T1 and T2 katanas, but already have fusion blades researched and built some swords.

After lots of trial and error, I arrived at this to get at least some plasma blades:
Edited GrimyLottMod.ini from Katana pack to look like this (commented out Vortex stuff, since I have not researched that yet and didn't want to mess with it); but even if I comment the CV and MG tiers out, they keep showing up:

+Sword_T1 = Katana_CV
+Sword_T1 = Wakizashi_CV
+Sword_T1 = Ninjato_CV

+Sword_T2 = Katana_MG
+Sword_T2 = Wakizashi_MG
+Sword_T2 = Ninjato_MG

+Sword_T3 = Katana_BM
+Sword_T3 = Wakizashi_BM
+Sword_T3 = Ninjato_BM

;+Sword_T4 = VortexKatana_BM
;+Sword_T4 = VortexWakizashi_BM
;+Sword_T4 = VortexNinjato_BM

Edited XComGrimyLootLW2.ini to look like this (upped chances for trial):

+IdentificationTable=(EquipSection="S", DataNameContains="Sword", Category="sword", Chance=1, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="Katana", Category="sword", Chance=20, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="Wakizashi", Category="sword", Chance=20, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="Ninjato", Category="sword", Chance=20, Affix="Sword")

Edited GrimyLootLW2.int to look like this:

.ChoiceNames="Roll Sword"
.ChoiceNames="Roll Katana"
.ChoiceNames="Roll Wakizashi"
.ChoiceNames="Roll Ninjato"

What am I doing wrong?

I also looked at the grimy integration of the the merc plama weapon sword to get a hint, but that thing only has one tier, the integration looks and behaves differently with the lockboxes :

...
+Sword_T1 = Sword_MercPlasma
...

I randomly get merc plasma swords whenever I get the option to roll for a sword, it automatically snags up the description from the localisation file and I did not have to mess with any grimy file for that to work...
ImJustJoshin 29 Aug, 2017 @ 9:20am 
Originally posted by iriemk:
@ImJustJoshin: Thanks for this guide above, now me Halo guns work fine. ^^

But: Did you get the Katana Pack Reloaded to work with this? I tried a lot, but no luck getting it to function consistently. Can't stop the boxes from spitting out T1 and T2 katanas, but already have fusion blades researched and built some swords.

After lots of trial and error, I arrived at this to get at least some plasma blades:
Edited GrimyLottMod.ini from Katana pack to look like this (commented out Vortex stuff, since I have not researched that yet and didn't want to mess with it); but even if I comment the CV and MG tiers out, they keep showing up:

+Sword_T1 = Katana_CV
+Sword_T1 = Wakizashi_CV
+Sword_T1 = Ninjato_CV

+Sword_T2 = Katana_MG
+Sword_T2 = Wakizashi_MG
+Sword_T2 = Ninjato_MG

+Sword_T3 = Katana_BM
+Sword_T3 = Wakizashi_BM
+Sword_T3 = Ninjato_BM

;+Sword_T4 = VortexKatana_BM
;+Sword_T4 = VortexWakizashi_BM
;+Sword_T4 = VortexNinjato_BM

Edited XComGrimyLootLW2.ini to look like this (upped chances for trial):

+IdentificationTable=(EquipSection="S", DataNameContains="Sword", Category="sword", Chance=1, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="Katana", Category="sword", Chance=20, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="Wakizashi", Category="sword", Chance=20, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="Ninjato", Category="sword", Chance=20, Affix="Sword")

Edited GrimyLootLW2.int to look like this:

.ChoiceNames="Roll Sword"
.ChoiceNames="Roll Katana"
.ChoiceNames="Roll Wakizashi"
.ChoiceNames="Roll Ninjato"

What am I doing wrong?

I also looked at the grimy integration of the the merc plama weapon sword to get a hint, but that thing only has one tier, the integration looks and behaves differently with the lockboxes :

+Sword_T1 = Sword_MercPlasma

I randomly get merc plasma swords whenever I get the option to roll for a sword, it automatically snags up the description from the localisation file and I did not have to mess with any grimy file for that to work...


You are very welcome iriemk, Im glad I could help! Now to your case I believe the problem actually lies with the Katana Pack as what this resembles is the old tier function (It doing _T1 through _T3) the outdated Grimy Loot Mod used to determine if you had higher tech weapons or not.

With this new mod, from what I have seen and from what I believe, it just adds _CV, MG, CG (If applicable. Meant for LW2 :D), BM according to the techs you have automatically as your game goes on. I believe if you edit out these lines entirely from the Katana Pack INI or just delete that ini all together (Last Resort) then the lockboxes 'should' just solely rely on the newer configs you already setup which should work fine.

With that said though I believe you will run into another problem later and that problem being the Vortex Katana/Wakizashi/Ninjato as it looks to me as a completely different sword but still apart of the Katana, Wakizashi and Ninjato tier list. I am not sure if this updated mod took into account of these three swords as I don't see anything like this...

+IdentificationTable=(EquipSection="S", DataNameContains="VortexKatana", Category="sword", Chance=3, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="VortexWakizashi", Category="sword", Chance=2, Affix="Sword")
+IdentificationTable=(EquipSection="S", DataNameContains="VortexNinjato", Category="sword", Chance=2, Affix="Sword")

If you find out that you do not get the Vortex version of these swords and already gotten the tech for it then you will have to add these lines in and a 'RequiredTech' line aswell sort of like this...

+IdentificationTable=(EquipSection="S", DataNameContains="VortexKatana", Chance=3, RequiredTech="Whatever Tech gives you the ability to create Vortex Swords.", Affix="Sword")

Ok with that all said and done let's move on to the MercPlasma Sword problem.

Im not sure what your intentions are for the MercPlasma sword. Do you want to seperate the Merc Sword from the regular sword so it isn't a random guess if you will get a Merc Sword or a regular sword or something? I don't know what to tell you right now aside from it may be taking place as a default sword but I am not sure in the slightest.

EDIT: Im going to take a look at somethings within the game itself to see how the Katana INI and grimy really get along together, is this the Katana mod your referring to?

http://steamproxy.net/sharedfiles/filedetails/?id=698579656&searchtext=Katana
Last edited by ImJustJoshin; 29 Aug, 2017 @ 9:33am
iriemk 29 Aug, 2017 @ 1:06pm 
Ok, from the start:

*Yes I am referring to Katana Pack Reloaded, sorry if there was confusion.

*The stuff in the GrimyLootMod.ini from Katana pack is already edited by me, what it had initially was only the first three lines, like this:

.Sword_T1 = Katana_CV
.Sword_T1 = Wakizashi_CV
.Sword_T1 = Ninjato_CV

But after that got me outdated lower-tier swords I started messing around.

*There is no problem whatsoever with the merc sword, sorry again if I did not make myself clear there: LW2MercPlasmaWeapons is the only "extra weapon" mod in my load order that did NOT require me to do anything to make it work with GrimyLoot.^^
Was just wondering if I should/could edit the katana loot integration to something similar-looking to make it work. What does the "Affix = Sword" part in the XComGrimyLootLW2.ini file refer to, the "Sword_T1" or the "Sword_MercPlasma"? I suspect this is what it hinges on.

*The Vortex stuff: I was wondering that myself, though since all three vortex thingies are listed as " _BM ", I guess it is meant to simply kick in after you have the required research. Thats what it did in my old vanilla campaign with the first grimy loot mod, I don't think I ever built a vortex sword myself. But for now it's all speculation on my side, until I have done that research in-game and can test it - unless you find out about it and can warn me of any pitfalls first.^^

Anyway, thanks very much, your help is much appreciated. But just for good measure, I'm going to the Katana mod now and nag Musashi about it too.^^
Last edited by iriemk; 29 Aug, 2017 @ 1:35pm
ImJustJoshin 29 Aug, 2017 @ 3:32pm 
Affix simply applies to what it is for Identification. For example any primary weapon would have an Affix of 'Primary', any Pistol would have an Affix of 'pistol' so for sword... well it's literally Sword which comes to another point.

Identification Table

All of the entrys of weapons are identified by Grimy through the Identification tables, regardless if it's apart of base game or mods, as long as it appears through the Identification Table or replacesan already existing weapon on the table then it can be rolled in the lockboxes.

An example of this process is shown with Nigel's Halo Reach Weapons with this case the SMG I implemented into Grimy.

Nigel's Halo Reach Weapon's did not come with any sort of intergation so had to be put in manually but once that was done Grimy did the rest.

Now armed with this knowledge this is what I believe:

Katana Pack Reloaded is using an Outdated form of intergation and only partially works and the Intergation ini should be deleted so that grimy can do the rest (Because you already did everything so it could run properly) until Musashi updates the file to the new format.

There would be no point in editing Katana Pack's Ini if Grimy can just grab everything that it needs to provided that you put in the entry and the localization entry (which you did).

EDIT: Played around a bit with it in game just rushing loads of Epics and Legendary and the only problem that has a risen so far was the description, It just says Katana for Katana's, Wakizashi for Wakizashi's and Ninjato for Ninjato's. Will play some more to see if it upgrade accordingly. NEVERMIND! The literal Brief description that was put by Musashi was just the name for the sword...

EDIT 2: OK I have done some testing and the results for the most part are curiously concerning. I deleted the Katana Pack Intergation as I recommended to you and it has worked... oddly. I gave myself all the techs that would unlock all the tiers of swords from arc to the fusion blade and then I spawned in and rushed about 80 Legendary boxes and clicked on only the modded swords. I got an inconsistent pulls ranging from plasma to conventional but when I went to look at them I only had plasma ones and everything else I cannot see which is odd because in the black market you can see and sell them if you wish... I think the problem is that the swords can't have 3 attachments because epic weapons with only two attachments I can see and use just fine. You try it out see if you can get it too work, maybe you have a mod installed that fixes some of the issues that Im facing with vanilla right now.
Last edited by ImJustJoshin; 29 Aug, 2017 @ 5:39pm
Vasshu 27 Mar, 2018 @ 12:41pm 
I know this is an old post, but im glad i stumbled on this. It just helped me tremendously. It makes perfect sense now thank you.
ImJustJoshin 30 Mar, 2018 @ 1:17pm 
Originally posted by | Oz | Vash:
I know this is an old post, but im glad i stumbled on this. It just helped me tremendously. It makes perfect sense now thank you.

No problem
< >
Showing 1-12 of 12 comments
Per page: 1530 50