Dehardcode weapon types behaviour

Everything about development and the OpenMW source code.
Post Reply
User avatar
akortunov
Posts: 495
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

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: 252
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: 947
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: 495
Joined: 13 Mar 2017, 13:49
Location: Samara, Russian Federation
Github profile: https://github.com/akortunov

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: 322
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: 947
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: 4421
Joined: 29 Sep 2011, 10:13
Github profile: https://github.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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests