Questions about the dehardcoding process
Posted: 15 Mar 2017, 17:20
Hello, I'd like to start dehardcoding some things but I don't want to do so in a way that would result in my pull request being rejected. How modular should dehardcoded gameplay mechanics be? If new features are now data driven then do they go in .omwaddons? If so then does there need to be an .omwmaster file included with openmw that loads with/before/after morrowind.esm containing the default settings for all the gameplay mechanics? What exactly can we dehardcode (shaders, gameplay mechanics, etc)?
The things I specifically want to dehardcode are:
Magic
>projectile (initial) velocity can now be per spell instead of a GMST and can be modified in spell customization (more velocity = higher cost)
>projectiles can have gravity added to them to reduce magicka cost
>any type of spell can have a parameter added that requires it to be charged for x seconds before it is ready, higher f = lower cost
>any type of spell can have an option to make it repeat every f seconds when the button is held (or toggle the repeat on/off)
>the equation that determines magicka cost of a spell
>allowing scripts to access spell data
Movement
>dehardcode equation that determines velocity so that you can make it so speed adds to velocity rather than sets it (meaning there is acceleration) and max velocity can be determined by something (like athletics)
being on ground without pressing movement buttons doesn't set your velocity to 0 but subtracts from it (friction)
make it so the jump button only makes the player jump when released and the duration that it's held can be used to determine jump magnitude
Hit detection
>instead of using a shitty cone, you check if the hitbox of the weapon is intersecting with the hitbox of an enemy
I haven't done rotated polygon collision before but there seems to be plenty of guides on it.
Shaders
>everything, people should be able to make the equivalent of ENBs except as .omwaddons
I don't really know how to do the shaders since I have no experience with them but I'd learn what I need to know in order to dehardcode them.
And of course all of this would be dehardcoded, I don't mean that I'd just write all this in C++ these are just the things I'd want to be able to do after dehardcoding.
The things I specifically want to dehardcode are:
Magic
>projectile (initial) velocity can now be per spell instead of a GMST and can be modified in spell customization (more velocity = higher cost)
>projectiles can have gravity added to them to reduce magicka cost
>any type of spell can have a parameter added that requires it to be charged for x seconds before it is ready, higher f = lower cost
>any type of spell can have an option to make it repeat every f seconds when the button is held (or toggle the repeat on/off)
>the equation that determines magicka cost of a spell
>allowing scripts to access spell data
Movement
>dehardcode equation that determines velocity so that you can make it so speed adds to velocity rather than sets it (meaning there is acceleration) and max velocity can be determined by something (like athletics)
being on ground without pressing movement buttons doesn't set your velocity to 0 but subtracts from it (friction)
make it so the jump button only makes the player jump when released and the duration that it's held can be used to determine jump magnitude
Hit detection
>instead of using a shitty cone, you check if the hitbox of the weapon is intersecting with the hitbox of an enemy
I haven't done rotated polygon collision before but there seems to be plenty of guides on it.
Shaders
>everything, people should be able to make the equivalent of ENBs except as .omwaddons
I don't really know how to do the shaders since I have no experience with them but I'd learn what I need to know in order to dehardcode them.
And of course all of this would be dehardcoded, I don't mean that I'd just write all this in C++ these are just the things I'd want to be able to do after dehardcoding.