Dehardcode weapon types behaviour

Everything about development and the OpenMW source code.
User avatar
akortunov
Posts: 621
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Dehardcode weapon types behaviour

Post by akortunov » 02 Jan 2019, 19:49

Related feature request.

Related branch: https://github.com/akortunov/openmw/tre ... efactoring
The main idea is to move most of weapon type-specific logic from a lot of different switches to the table, and then probably to move it to omwaddon or config file.

Also I tried to add custom weapon types to this table:
1. One-handed spear, which use the Spears skill.
2. Throwing spears with custom sheathing bone.
3. Battle claws, which use the Hand-to-Hand skill.
Basically, it work.

Can we de-hardcode this table now, or we strictly should wait until 2040's, when OpenMW-CS will be more or less finished?

User avatar
Amenophis
Posts: 265
Joined: 30 Oct 2011, 04:34
Location: Fortaleza - Ceará - Brasil

Re: Dehardcode weapon types behaviour

Post by Amenophis » 02 Jan 2019, 21:01

Loving that! This a great step ahead of MWSE/Morrowind current capabilities. Please, make it happen, Zini.
My fixes and tweaks on vanilla and modded quests for Morrowind.
http://www.nexusmods.com/morrowind/mods/43107/?

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

Re: Dehardcode weapon types behaviour

Post by Atahualpa » 04 Jan 2019, 14:48

So, what exactly would we need in OpenMW-CS?
  • New record "Weapon Type" with corresponding entries
  • New subview "Weapon Types" which allows us to manipulate Weapon Type records.
  • De-hardcode static weapon type list and replace it with - what? A list read from the .omwgame/.omwaddon file?
Looks like we'd need to change the .omwxxx file formats (which may or may not be a good idea pre-1.0). We'd also need to consider how we handle mods containing different weapon type lists (or adding/removing certain types).

Or am I overcomplicating things?

User avatar
akortunov
Posts: 621
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Dehardcode weapon types behaviour

Post by akortunov » 04 Jan 2019, 16:03

Atahualpa wrote:
04 Jan 2019, 14:48
De-hardcode static weapon type list and replace it with - what? A list read from the .omwgame/.omwaddon file?
[/list]
If we really will do it, probably it would be better to setup default records first (with vanilla behaviour), and allow to override them or add new ones.
If all added or modified weapon type records will be in the separate plugin, modder will be able to use new types either via OpenMW-CS or Enchanted editor (since there will no be unsupported records in plugins with weapon instances).

silentthief
Posts: 398
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Dehardcode weapon types behaviour

Post by silentthief » 04 Jan 2019, 16:36

akortunov wrote:
04 Jan 2019, 16:03
If we really will do it, probably it would be better to setup default records first (with vanilla behaviour), and allow to override them or add new ones.
If all added or modified weapon type records will be in the separate plugin, modder will be able to use new types either via OpenMW-CS or Enchanted editor (since there will no be unsupported records in plugins with weapon instances).
(disclaimer - not a dev, only throwing speculation here)

Yeah simplest answer seems to be to set up weapon groups/types which seems like it has already been sort of done based upon the characters skillsets. This means that mod users create a new weapon and assign it a type (and associated animations) from a list of available options. This means that for weapon types that don't fit it would need a way to add custom animations (think like if you wanted to make a lasso ala red dead redemption as a weapon type)

ST
ps - I realized that I basically restated what akortunov said so (shrug) anyone have any other ideas/options/reasons why this would not be the method?

PPS - I hope that this also eventually allows access to other actions too (such as someone using hand to hand being able to have expanded animations such as kicks and other attacks, other movement options such as crawling/climbing, etc)
"Hurry, hurry! Last boat to Solstheim! Until the next one. Hah-ha-hah."

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

Re: Dehardcode weapon types behaviour

Post by Atahualpa » 04 Jan 2019, 17:20

akortunov wrote:
04 Jan 2019, 16:03
If we really will do it, probably it would be better to setup default records first (with vanilla behaviour), and allow to override them or add new ones.[...]
Yes, I totally agree. That's bascially what Zini did in the design document - although, in this regard, we should probably disable changing the default records for the time being.

Anyway, I'd like to hear some input from Zini first.

silentthief wrote:
04 Jan 2019, 16:36
ps - I realized that I basically restated what akortunov said [...]
:lol:
silentthief wrote:
04 Jan 2019, 16:36
PPS - I hope that this also eventually allows access to other actions too (such as someone using hand to hand being able to have expanded animations such as kicks and other attacks, other movement options such as crawling/climbing, etc)
That'd be great. - Damn, version 1.0, where are you?

User avatar
psi29a
Posts: 4640
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Dehardcode weapon types behaviour

Post by psi29a » 19 Jan 2019, 21:47

Looks like it is reality... Zini is still on holiday. I'll try to get in contact with him.

User avatar
akortunov
Posts: 621
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Dehardcode weapon types behaviour

Post by akortunov » 21 Jan 2019, 05:14

In theory, it is posssible to store weapon type settings in the openmw.cfg, as weather type or blood type settings.
In this case we will not need to change ESM format at all and weapon type config will look like this:

Code: Select all

fallback=WeaponType_0_Name,Short Blade 1H
fallback=WeaponType_0_ShortAnim,1h
fallback=WeaponType_0_LongAnim,weapononehand
fallback=WeaponType_0_Sound,Item Weapon Shortblade
fallback=WeaponType_0_AttachBone,Weapon Bone
fallback=WeaponType_0_SheathBone,Bip01 ShortBladeOneHand
fallback=WeaponType_0_Skill,0
fallback=WeaponType_0_Class,0
fallback=WeaponType_0_AmmoType,0
fallback=WeaponType_0_TwoHanded,0
fallback=WeaponType_0_Rotate,0
The main issue for now - we need an ability to fill dropdown list in the editor by all Name strings (for now lists are hardcoded). The same thing with blood types.

User avatar
AnyOldName3
Posts: 1564
Joined: 26 Nov 2015, 03:25

Re: Dehardcode weapon types behaviour

Post by AnyOldName3 » 21 Jan 2019, 16:50

I thought the point of fallback settings was that they were things lifted from Morrowind.ini that we're planning on ditching and making part of the OMWAddon format post-1.0. We're failing the 'lifted from Morrowind.ini' criterion here.
AnyOldName3, Master of Shadows

User avatar
akortunov
Posts: 621
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation

Re: Dehardcode weapon types behaviour

Post by akortunov » 03 Feb 2019, 09:55

Any other opinions?

Post Reply