Questions about the dehardcoding process

Everything about development and the OpenMW source code.
User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

Questions about the dehardcoding process

Post by halbe » 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.

User avatar
Zini
Posts: 5504
Joined: 06 Aug 2011, 15:16

Re: Questions about the dehardcoding process

Post by Zini » 16 Mar 2017, 12:44

The dehardcoding is a post 1.0 plan. We currently do not have the means to deal with it cleanly. Therefore pretty much all dehardcoding PRs would be rejected.

I have a huge plan for the great de-harcdoing, but I haven't put it fully to paper (or file) yet. Trying to finish that now or even to explain the major points would exceed the time I have available for OpenMW by a huge margin.

Sorry to shoot you down like that. But the dehardcoding is one of the tasks we can definitely not tackle before 1.0.

User avatar
halbe
Posts: 58
Joined: 14 Feb 2017, 03:55

Re: Questions about the dehardcoding process

Post by halbe » 16 Mar 2017, 15:43

Zini wrote:The dehardcoding is a post 1.0 plan. We currently do not have the means to deal with it cleanly. Therefore pretty much all dehardcoding PRs would be rejected.

I have a huge plan for the great de-harcdoing, but I haven't put it fully to paper (or file) yet. Trying to finish that now or even to explain the major points would exceed the time I have available for OpenMW by a huge margin.

Sorry to shoot you down like that. But the dehardcoding is one of the tasks we can definitely not tackle before 1.0.
Ok no problem, maybe I'll go work on some bugfixes instead :)

Though perhaps I could maybe get a hint of the general idea of what your plan is?
Spoiler: Show

User avatar
DestinedToDie
Posts: 1129
Joined: 29 Jun 2015, 09:08

Re: Questions about the dehardcoding process

Post by DestinedToDie » 16 Mar 2017, 15:51

What would need to be done for us to get to post 1.0 dehardcoding? Perhaps halbel could work towards that.

User avatar
raevol
Posts: 2781
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Questions about the dehardcoding process

Post by raevol » 17 Mar 2017, 02:40

Shadows.

User avatar
Zini
Posts: 5504
Joined: 06 Aug 2011, 15:16

Re: Questions about the dehardcoding process

Post by Zini » 17 Mar 2017, 09:02

In a few sentences: The idea behind the de-hardcoding is moving hard-coded data into new types of records, that will be automatically filled in when playing on older content files with data compatible with the current harrdcoded mechanics. There is a bit of renovation of the file format required, before we can move on. And we also need some enhancements to the scripting language, because some of the de-hardcoding can't be done via static data, so we will need to use scripts there.

What we are missing right now is as mentioned above a bit of ground work with the file format and even more importantly a fully functional editor (biggest thing missing is still the terrain editing, which is a huge and complex task). Without the editor we can not make use of the de-hardcoding in content files (because TES-CS obviously does not support these features). Any enhancements we would currently make could not be used by content creators and are therefore pointless.

User avatar
psi29a
Posts: 4200
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Questions about the dehardcoding process

Post by psi29a » 17 Mar 2017, 09:11

One thing that would help is the remove the need for morrowind.ini, you can still import it but there should be sane default values already so that OpenMW can move on as not just a Morrowind engine drop-in replacement but also as a stand-alone engine for omwgame files. :)

@Zini: is this something that could now be worked on?

User avatar
Zini
Posts: 5504
Joined: 06 Aug 2011, 15:16

Re: Questions about the dehardcoding process

Post by Zini » 17 Mar 2017, 13:53

We will move the values from the ini file to GMSTs and other records eventually. Post 1.0.
But the default values would still have to come from the cfg file. We can of course provide defaults in the global/local version of the cfg file, so that OpenMW will still run properly even if no ini file is imported. Someone would just have to come up with reasonable and copyright-free defaults and add them to the cfg files (openmw.cfg and openmw.cfg.local in files). That doesn't even need coding skills.

We have a tracker issue for this task: https://bugs.openmw.org/issues/3442

User avatar
Atahualpa
Posts: 908
Joined: 09 Feb 2016, 20:03

Re: Questions about the dehardcoding process

Post by Atahualpa » 18 Mar 2017, 22:14

Ehm, regarding a possible copyright violation: When do we consider a given list of default values legal? Are there any qualitative and quantitative requirements apart from the "it must not be a perfect copy of Morrowind's default values" premise?

User avatar
psi29a
Posts: 4200
Joined: 29 Sep 2011, 10:13
Github profile: https://github.com/psi29a/
Contact:

Re: Questions about the dehardcoding process

Post by psi29a » 19 Mar 2017, 09:03

What we did in the OpenMW Template was do our best to remove anything with Bethesda's trademarks... meaning anything that refers to the Elder Scrolls universe. Obviously things like 'strength' and 'intelligence' are generic enough but strings/text involving Morrowind specific things like the gods' names are likely to be a problem.

If someone makes a PR, that would be a great place for people to review so that there are many eyes on the problem. :)

Post Reply

Who is online

Users browsing this forum: lysol and 3 guests