Page 1 of 2

Dehardcode weapon types behaviour

Posted: 02 Jan 2019, 19:49
by akortunov
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?

Re: Dehardcode weapon types behaviour

Posted: 02 Jan 2019, 21:01
by Amenophis
Loving that! This a great step ahead of MWSE/Morrowind current capabilities. Please, make it happen, Zini.

Re: Dehardcode weapon types behaviour

Posted: 04 Jan 2019, 14:48
by Atahualpa
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?

Re: Dehardcode weapon types behaviour

Posted: 04 Jan 2019, 16:03
by akortunov
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).

Re: Dehardcode weapon types behaviour

Posted: 04 Jan 2019, 16:36
by silentthief
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)

Re: Dehardcode weapon types behaviour

Posted: 04 Jan 2019, 17:20
by Atahualpa
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?

Re: Dehardcode weapon types behaviour

Posted: 19 Jan 2019, 21:47
by psi29a
Looks like it is reality... Zini is still on holiday. I'll try to get in contact with him.

Re: Dehardcode weapon types behaviour

Posted: 21 Jan 2019, 05:14
by akortunov
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.

Re: Dehardcode weapon types behaviour

Posted: 21 Jan 2019, 16:50
by AnyOldName3
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.

Re: Dehardcode weapon types behaviour

Posted: 03 Feb 2019, 09:55
by akortunov
Any other opinions?