Would there be any way to make it recognize upgrade tier of craftables as well? I wanted to layer on the first version of G Odo LBG but it just applies the final form.
Is there a reason Reinforcement Level 5 Artian weapons do not properly apply onto other weapons, or am I doing something wrong?
For SnS for example, I'm trying to apply the Verdoloto SnS, onto the Kuara Clairsword SnS, but it ends up being the normal Artian Verdoloto SnS without the special effects and unique shield.
Huh, I guess I never considered that. It's frankly unfathomable to me that you actually want the Artian appearance... but there's no reason it can't work. It's just a bit more complicated to handle it than normal weapons.
Well, there are some decent mods that make Artian weapons look better. I'm also using the MDF-XL mod so I can change the color of weapons, and parts of armor that can't normally be colored.
If I was stuck with the metallic green for Artian weapons, I for sure would never want to use them.
In any case, cool if you can make it work, but no big if it's not possible.
Would it be possible to make the "Apply globally" setting remember whether it's checked or not? Currently I have to uncheck it every time i launch the game. (not that i HAVE to uncheck it of course, I just prefer it that way)
Not sure if "difficult", but it wouldn't be "smooth", let's say.
The game already has support for weapons having nonstandard appearances, to handle artian weapon upgrades (and presumably future official layered weapons will use the same functionality.) This is in the form of a function the game calls that's basically "given this weapon and these artian upgrades, what model should I use?"
That's what this and most layered weapon mods hook into, overriding the answer to the question of which model should be used. Then the game just takes it from there. It's a very simple, safe, and stable method, since it's just making a tiny tweak to functionality that's already natively present in the game.
Unfortunately kinsects don't run through this system.
It would be possible to change kinsects appearance, but it would have to be done via other means, and those would be more tenuous. MDF-XL may be able to do it (I haven't checked), as it uses other methods to override appearances, but judging by comments it's also causing performance problems and not working properly since TU1... kind of demonstrating why I don't want to do things that way.
Hi, thanks for the mod I've enjoyed it. But recently there's an error happening through the REFramework on the Script Generated UI. When you click on the "Weapon Layering" button, the UI becomes red and says "... :Missing TreePop()" . Is this something going on with my Device or is it the mod?. I use REFramework v1.5.9.1.
That error would only happen if there was another error first. I'm going to need a bunch of more information:
1. Expand the ScriptRunner section in RE Framework. What error is listed there? Please copy the whole thing, including file name and numbers. 2. What weapons do you have equipped when this happens? Both primary and secondary. 3. Please send me the file "<MHW folder>/reframework/data/WeaponLayering.json"
Thanks for replying!. Before I continue, the script fix itself. I left my game idle until I've moved by the game to single player lobby, then when I read this and was about to see the ScriptRunner, there's no error, and the Weapon Layering button is working again. But I tried to restart the game then the error is there again. Here's the info
1. The error in the ScriptRunner is as follow: Last Script Error: sol: runtime error:...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:76: attempt to index a nil value (upvalue 'VariousDataManager') stack traceback: ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:76: in upvalue 'initPerformanceTypes' ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:182: in upvalue 'getArtianTable' ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:245: in upvalue 'getWeaponTable' ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:487: in function <....onsterHunterWilds\reframework\autorun\WeaponLayering.lua:470> 2. My Primary is Artian SnS, and my secondary is Artian LS 3. Current WeaponLayering.json is non existent as I've tried to reinstall it to fix this, but I have the last one before I've deleted it.
Oh, and I forgot to note. The ScriptRunner Error is when I start the game. Then when I picked my character, the initPerformanceTypes and getArtianTable line is gone. The error still persist when I enter a recommended lobby, making me still unable to use the script. But I noticed you can turn on and off the script on from the ScriptRunner tab, so I tried to turn it off then on the .lua again then the error stopped, and the Weapon Layering button is usable again. So maybe I've found a temporary fix?
Thanks for the detailed error dump. That along with the information that it's only when you start the game was enough.
It was essentially a variation on the error that I fixed in 1.2.1, only happening a bit later. Your game is loading very slowly... or at least loading different components in an unusual order.
Anyway... it should really be fixed this time, in 1.2.2. I added a bunch of safeguards for game loading not being done yet and made sure it keeps running without errors anyway.
Since you got that error though, it means that by the time your character needs to be created for the main menu / loading screen, the game hasn't yet initialized all the artian information that this mod needs, and layering won't work properly yet. Meaning your weapons probably won't be layered correctly in the main menu.
Edit: Hrm... I could just store the required information for use in future launches though... Version 1.2.3 coming soon!
Alright, version 1.2.3 works around the issue by storing the information the mod needs in the config file, so even if the game is slow to start, I already have a copy from the last run.
You'll need to make some change to the config to make it save (just toggle a setting back and forth for example.) After that, things should work correctly no matter how weird the startup timing gets :)
I just added version 1.2.3 of the mod and I get the following error on startup and every time I press reset scripts:
sol: runtime error: ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:147: bad argument #1 to 'for iterator' (table expected, got nil) stack traceback: [C]: in function 'base.next' ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:147: in local 'loadConfig' ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:153: in main chunk
75 comments
Something seems to be going wrong with detailed ids for DB. Not sure what/why yet...
You may need to reconfigure layering for the weapon - delete the old setting from the Saved list and layer it again.
For SnS for example, I'm trying to apply the Verdoloto SnS, onto the Kuara Clairsword SnS, but it ends up being the normal Artian Verdoloto SnS without the special effects and unique shield.
I'll see what I can do tomorrow.
If I was stuck with the metallic green for Artian weapons, I for sure would never want to use them.
In any case, cool if you can make it work, but no big if it's not possible.
Great job, Thank you!
Currently I have to uncheck it every time i launch the game. (not that i HAVE to uncheck it of course, I just prefer it that way)
The game already has support for weapons having nonstandard appearances, to handle artian weapon upgrades (and presumably future official layered weapons will use the same functionality.) This is in the form of a function the game calls that's basically "given this weapon and these artian upgrades, what model should I use?"
That's what this and most layered weapon mods hook into, overriding the answer to the question of which model should be used. Then the game just takes it from there. It's a very simple, safe, and stable method, since it's just making a tiny tweak to functionality that's already natively present in the game.
Unfortunately kinsects don't run through this system.
It would be possible to change kinsects appearance, but it would have to be done via other means, and those would be more tenuous. MDF-XL may be able to do it (I haven't checked), as it uses other methods to override appearances, but judging by comments it's also causing performance problems and not working properly since TU1... kind of demonstrating why I don't want to do things that way.
1. Expand the ScriptRunner section in RE Framework. What error is listed there? Please copy the whole thing, including file name and numbers.
2. What weapons do you have equipped when this happens? Both primary and secondary.
3. Please send me the file "<MHW folder>/reframework/data/WeaponLayering.json"
1. The error in the ScriptRunner is as follow:
Last Script Error: sol: runtime error:...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:76: attempt to index a nil value (upvalue 'VariousDataManager')
stack traceback:
...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:76: in upvalue 'initPerformanceTypes'
...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:182: in upvalue 'getArtianTable'
...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:245: in upvalue 'getWeaponTable'
...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:487: in function <....onsterHunterWilds\reframework\autorun\WeaponLayering.lua:470>
2. My Primary is Artian SnS, and my secondary is Artian LS
3. Current WeaponLayering.json is non existent as I've tried to reinstall it to fix this, but I have the last one before I've deleted it.
Oh, and I forgot to note. The ScriptRunner Error is when I start the game. Then when I picked my character, the initPerformanceTypes and getArtianTable line is gone. The error still persist when I enter a recommended lobby, making me still unable to use the script. But I noticed you can turn on and off the script on from the ScriptRunner tab, so I tried to turn it off then on the .lua again then the error stopped, and the Weapon Layering button is usable again. So maybe I've found a temporary fix?
It was essentially a variation on the error that I fixed in 1.2.1, only happening a bit later. Your game is loading very slowly... or at least loading different components in an unusual order.
Anyway... it should really be fixed this time, in 1.2.2. I added a bunch of safeguards for game loading not being done yet and made sure it keeps running without errors anyway.
Since you got that error though, it means that by the time your character needs to be created for the main menu / loading screen, the game hasn't yet initialized all the artian information that this mod needs, and layering won't work properly yet. Meaning your weapons probably won't be layered correctly in the main menu.
Edit: Hrm... I could just store the required information for use in future launches though...
Version 1.2.3 coming soon!
You'll need to make some change to the config to make it save (just toggle a setting back and forth for example.)
After that, things should work correctly no matter how weird the startup timing gets :)
Cheers!
sol: runtime error: ...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:147: bad argument #1 to 'for iterator' (table expected, got nil)
stack traceback:
[C]: in function 'base.next'
...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:147: in local 'loadConfig'
...onsterHunterWilds\reframework\autorun\WeaponLayering.lua:153: in main chunk
Fixed in 1.2.4. Thanks