Changing Max enchanting/spellmaking magnitude

General discussion regarding the OpenMW project.
For technical support, please use the Support subforum.
User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Changing Max enchanting/spellmaking magnitude

Post by jirka642 » 11 May 2016, 17:27

It's just a plaintext file, so edit it with notepad or notepad++
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

ezze
Posts: 503
Joined: 21 Nov 2013, 13:20

Re: Changing Max enchanting/spellmaking magnitude

Post by ezze » 11 May 2016, 17:28

jirka642 mentions that the file just a xml file, so you need a plain text editor. It is a decade I don't use Windows but at the time there was Notepad that sucked. You can try Notepad2 or my favorite at the time crimson editor.

Edit: we wrote at the same time :D

PrimordialBronze
Posts: 39
Joined: 05 May 2016, 18:19

Re: Changing Max enchanting/spellmaking magnitude

Post by PrimordialBronze » 11 May 2016, 18:01

I have the POWER! :twisted: What of multiple spell effects for the same spell/enchantment?

User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Changing Max enchanting/spellmaking magnitude

Post by jirka642 » 11 May 2016, 18:27

PrimordialBronze wrote:What of multiple spell effects for the same spell/enchantment?
What about them? Just add more of effects from the list on the left...
EDIT: Did you mean like multiple fire effects in one spell? I think that would need some changes in source code...
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

PrimordialBronze
Posts: 39
Joined: 05 May 2016, 18:19

Re: Changing Max enchanting/spellmaking magnitude

Post by PrimordialBronze » 11 May 2016, 18:42

jirka642 wrote: EDIT: Did you mean like multiple fire effects in one spell? I think that would need some changes in source code...
Yes
EDIT: Typing desired values when you are bartering should lead naturally into typing desired magnitudes, yet it's implementation is lacking.

User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Changing Max enchanting/spellmaking magnitude

Post by jirka642 » 11 May 2016, 19:19

This one was pretty easy to find. The part of code that checks if you already added same effect you are trying to add is located here: https://github.com/OpenMW/openmw/blob/2 ... g.cpp#L641

If you wanted to disable it you would need to comment out lines 641-648 in "apps/openmw/mwgui/spellcreationdialog.cpp" and then recompile openmw.

I tested it out and it works correctly. It also looked like both the effects were casted correctly at the same time, so it definitely works.

If you are going to try this, then be warned that this could possibly create some ugly bugs, since some other parts of code could expect that every spell/enchantment have only one of the same type of effect. Someone like Scrawl or Zini would probably need to answer if this is safe, since they have a lot better understanding of codebase then me.

On the other hand, if this "fix" is safe it would be very easy to add option in openmw settings file to enable/disable it without messing with source code.
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

PrimordialBronze
Posts: 39
Joined: 05 May 2016, 18:19

Re: Changing Max enchanting/spellmaking magnitude

Post by PrimordialBronze » 12 May 2016, 00:27

How do you change the Enchanting formula values? Will wait on the same multiple effect spells till confirmation.

User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Changing Max enchanting/spellmaking magnitude

Post by jirka642 » 12 May 2016, 10:24

Do you mean like number of enchantment points enchantment needs in item, price or chance of failure when you are enchanting by yourself?

Enchantment points needed can be modified by changing GMST values "fEnchantmentConstantDurationMult" and "fEffectCostMult".

Price can be changed by changing GMST value "fEnchantmentValueMult".

Chance of failure can be modified by changing GMST values "fEnchantmentChanceMult" and "fEnchantmentConstantChanceMult".

If I understand it correctly, the GMST values should be changeable by plugins.
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

PrimordialBronze
Posts: 39
Joined: 05 May 2016, 18:19

Re: Changing Max enchanting/spellmaking magnitude

Post by PrimordialBronze » 12 May 2016, 18:50

Enchant + (0.25*Int) + (0.125*Luck) - (2.5*Enchantment points)
Enchant + (0.25*Int) + (0.125*Luck) - (5*Enchantment points)

fEnchantmentChanceMult Value = 3
fEnchantmentConstantChanceMult Value = .5

fEnchantmentChanceMult & (2.5*Enchantment points) do these correspond? If so why do the values 3 and 2.5 respectively differ?

User avatar
jirka642
Posts: 117
Joined: 23 Aug 2014, 11:39
Location: Czech Republic
Contact:

Re: Changing Max enchanting/spellmaking magnitude

Post by jirka642 » 13 May 2016, 11:03

The equations for enchantment chances should be something like this:
Normal enchant chance:
EnchantSkill + (0.25*Int) + (0.125*Luck) - [ 7.5 / fEnchantmentChanceMult * 1.0 * EnchantPoints ]
Constant enchant chance:
EnchantSkill + (0.25*Int) + (0.125*Luck) - [ 7.5 / fEnchantmentChanceMult * fEnchantmentConstantChanceMult * EnchantPoints ]
On GitHub as kunesj, on GitLab as kunesj.
OS: Linux Mint 18, CPU: Intel Core i5-3330, RAM: 16GB, GPU: GeForce GTX 650Ti, OpenMW: from source

Post Reply