Looking for spells, movement ideas, general modding help.
Posted: Wed Sep 11, 2024 4:20 am
I actually got some of the logic stuff working finally for traps to the point that I'm comfortable with it, but now I'm into spells and movement stuff and hitting roadblocks... I'm a bit surprised these two things are so complicated to mod around because it's like 60% of the game.
Ok the movement one would take some mad wizardry but I could see a script that:
On key press or item (screen following object) press (would be kinda cool to have a button to press for it, or ctrl + space)
If NOT moving (PartyComponent:isMoving(false))
Check if the forward 9 squares have a collider (not sure how to GameObject:getPosition() with good data..)
If they don't, move up to 9 squares but stopped by anything that has a collider (Maybe this could just be a short lived spell that gets shot extremely fast? if it hits anything your position is the nearest tile to impact/dead of the projectile)
Script is adaptable from 9 so you can make it jump less squares so it can be tailored to strength.
For spells I'm at a loss, I tried following: https://www.grimrock.net/forum/viewtopic.php?t=9416
I have the spell defined, I have the fireball redefined, but I have no idea where or how to add the onCastSpell. I even think I found the 'data component' that was mentionned but no idea what to do with it. I didn't actually implement a lot because the fail cases I simply abandoned, but there was point I was getting really deep into reading someone's spell mod from nexus and I'm hours into this with nothing to show. I'm a bit surprised there isn't just a "this is how to make a spell mod" video. I started getting into all sorts of not being able to define an object errors and got really confused. It's stripped down to bare essentials again, but I honestly have no idea where to put that onCastSpell, and calling the data bit in the init didn't seem to help or do much of anything. My last attempt was a party.lua which gives me "attempt to index a function value".
Then lastly I was poking around model files and wondering how to get normal maps to map properly in blender. I know they don't have to, it's just crazy how many steps were taken to seemingly make modding an absolute nightmare... I think the closest I got was:
Green + Blue Value Mix 100%, then that GB has the alpha added as Red (Although mixing it as value is also a possibility, both seem to have weird lighting) Then that output stuck in a normal map and applied.
Anyone have the correct approach?
What else... I got a lot of my last posts stuff working which is awesome. I made my own particle fire light, made one that flickers (which I'll probably scrap but it was a good exercise), and managed to make some great logic stuff work with switches (to solo out components and then reset it all) that makes me excited to make more.
Ok the movement one would take some mad wizardry but I could see a script that:
On key press or item (screen following object) press (would be kinda cool to have a button to press for it, or ctrl + space)
If NOT moving (PartyComponent:isMoving(false))
Check if the forward 9 squares have a collider (not sure how to GameObject:getPosition() with good data..)
If they don't, move up to 9 squares but stopped by anything that has a collider (Maybe this could just be a short lived spell that gets shot extremely fast? if it hits anything your position is the nearest tile to impact/dead of the projectile)
Script is adaptable from 9 so you can make it jump less squares so it can be tailored to strength.
For spells I'm at a loss, I tried following: https://www.grimrock.net/forum/viewtopic.php?t=9416
I have the spell defined, I have the fireball redefined, but I have no idea where or how to add the onCastSpell. I even think I found the 'data component' that was mentionned but no idea what to do with it. I didn't actually implement a lot because the fail cases I simply abandoned, but there was point I was getting really deep into reading someone's spell mod from nexus and I'm hours into this with nothing to show. I'm a bit surprised there isn't just a "this is how to make a spell mod" video. I started getting into all sorts of not being able to define an object errors and got really confused. It's stripped down to bare essentials again, but I honestly have no idea where to put that onCastSpell, and calling the data bit in the init didn't seem to help or do much of anything. My last attempt was a party.lua which gives me "attempt to index a function value".
Then lastly I was poking around model files and wondering how to get normal maps to map properly in blender. I know they don't have to, it's just crazy how many steps were taken to seemingly make modding an absolute nightmare... I think the closest I got was:
Green + Blue Value Mix 100%, then that GB has the alpha added as Red (Although mixing it as value is also a possibility, both seem to have weird lighting) Then that output stuck in a normal map and applied.
Anyone have the correct approach?
What else... I got a lot of my last posts stuff working which is awesome. I made my own particle fire light, made one that flickers (which I'll probably scrap but it was a good exercise), and managed to make some great logic stuff work with switches (to solo out components and then reset it all) that makes me excited to make more.