Shader issue with old "Custom shaders with SkinnedEffect" tutorial

Hi, I’m pretty new to effects in Monogame. My game currently uses the SkinnedEffect effect to render my models, which works nicely for textures and animations, but I want to change the lighting. I found this old tutorial for XNA Archived: Tutorial: Custom shaders with SkinnedEffect for XNA 4 , but when I try to build CustomSkinnedEffect.fx I get an “Unexpected token ‘(’ found. Expected Compile” error and two “Unexpected token ‘(’ found. Expected CloseBracket” errors, pointing to line 174, or the 4th line below:

Technique SkinnedEffect
{
Pass
{
VertexShader = (VSArray[VSIndices[ShaderIndex]]);
PixelShader = (PSArray[PSIndices[ShaderIndex]]);
}
}

I had a bit of a google before posting here and found Unexpected token error on in Effect file · Issue #4053 · MonoGame/MonoGame · GitHub, so I’m guessing the issue is because it’s trying to pass arguments?, but I’m not sure how fix the issue when it’s coded like an array. Does anyone know how to get it working in Monogame?

You can check the upgraded Skinned Model effect sample here in the XNAGameStudio Archive
MonoGame Skinned Model example

And you can check the rest of the archive including some of the premium XAN → content from back in the day to help too
XNAGameStudio Archive: The Education library from the Xbox Live Indie games repository, valuable for MonoGame Developers for advanced samples (github.com)

MonoGame can’t handle the array lookups inside the technique section. You have to create a separate technique for every ShaderIndex and then select the technique you want in C#, instead of setting the ShaderIndex.