Hi, it's been a while. Someone suggested on here learning Python, and so I have been. It's a ton of fun and I'm doing well with it. I have started on my own project, an app (for phones) that will basically be a "Morrowind Helper" thing. Now I'm doing this because I love Morrowind and so it makes learning easier, I am well aware of all the apps out there that do the things I want to do in terms of being a "Morrowind Helper", but it's for the practice. Anywho, I've been doing an alchemy script that will allow the user to make potions on the go, using all the apparatuses, and taking into account fatigue, skills, and attributes, and allows you to name the potion. The script then tells them the Effect magnitude, duration, worth in gold, name, and chance of success.
My issue comes in with the duration. It's not a straight 3X multiplier when using more than just the mortar and pestle. I've been using OpenMW to run Morrowind and make potions, and testing the results with vanilla Morrowind, and those all match up, but I can't get the duration to match up on my script. My question to you is, how did you do it? What math am I missing? The multiplier seems to range from 2.86 to 3.1 (so far) and that's not consistent either. I've tried all I know, so now I'm asking for help. When you have time, could someone give me some tips?
On a side note, I'm actually really enjoying learning to code and C++ is the next language I will get into once I'm comfortable with Python. My brother just made the jump from C++ to Python, and he's learning as well, and can help teach me a few things. If you know of any online courses or lectures on the C++ that are current, once I'm done, I'd be happy to try them out!
Learning to code and need some maths help
Re: Learning to code and need some maths help
Should be somewhere in MWMechanics::Alchemy.
EDIT: in case you're wondering - I just used "git grep" (or something equivalent) from my editor.
EDIT: in case you're wondering - I just used "git grep" (or something equivalent) from my editor.
Re: Learning to code and need some maths help
Isn't our wiki research page up to date anymore?
=> Research:Player Craft Skills
(Double-checking with the actual code is, of course, a good idea.)
=> Research:Player Craft Skills
(Double-checking with the actual code is, of course, a good idea.)
- ArashiAganawa
- Posts: 74
- Joined: 02 Feb 2017, 02:11
Re: Learning to code and need some maths help
I did check that out, and from what I'm reading (keep in mind I am new to coding so I'm probably missing something), you're getting duration and other information from variables and functions defined elsewhere. I'm not looking to copy your code, as that would not be a learning experience, but rather I'm looking to figure out how you make the duration work. Basically what I want to know is, how did you figure it out?Atahualpa wrote: ↑17 Jun 2020, 08:50 Isn't our wiki research page up to date anymore?
=> Research:Player Craft Skills
(Double-checking with the actual code is, of course, a good idea.)
Presently I have it as
Code: Select all
if (retqual >= 0.5 and calqual == 0 and alemqual == 0):
BPD = round(BPS) * 2.95
elif (retqual == 0 and calqual >= 0.5 and alemqual == 0):
BPD = round(BPS) * 2.95
elif (retqual >= 0.5 and calqual >= 0.5 and alemqual == 0):
BPD = round(BPS) * 2.86
elif (alemqual >= 0.5 and retqual == 0 and calqual == 0):
BPD = round(BPS) * 3.1
elif (alemqual >= 0.5 and retqual == 0 and calqual >= 0.5):
BPD = round(BPS) * 3
elif (retqual == 0 and calqual == 0 and alemqual == 0):
BPD = round(BPS) * 3
I looked up git grep. Is the UI easy on the eyes? Like, is there a high contrast version?
- AnyOldName3
- Posts: 2686
- Joined: 26 Nov 2015, 03:25
Re: Learning to code and need some maths help
UI? In Git grep?
Re: Learning to code and need some maths help
I'm on Vim plus a bunch of plugins, one of which is [fugitive](https://github.com/tpope/vim-fugitive). But as usual, I had to modify it to do what I want (I don't think tpope was too impressed). I'm lazy so I have a macro setup - just hit <F2> and look for something that might relate to what I'm looking for.
EDIT: running git grep from a terminal gives you a nice colour-coded output which you can pipe to less (but doing so loses the colour I think).
EDIT: running git grep from a terminal gives you a nice colour-coded output which you can pipe to less (but doing so loses the colour I think).
Re: Learning to code and need some maths help
A combination of info from experienced players, many volunteers doing empirical studies and possibly some magic (reverse engineering) when all else fails.ArashiAganawa wrote: ↑17 Jun 2020, 20:46 Basically what I want to know is, how did you figure it out?
- ArashiAganawa
- Posts: 74
- Joined: 02 Feb 2017, 02:11
Re: Learning to code and need some maths help
To be fair, I'm really really new to this, and am just hearing about all these programs for the first time
Reverse engineering sounds both fun and frustrating... and tempting.cc9cii wrote: ↑18 Jun 2020, 01:39A combination of info from experienced players, many volunteers doing empirical studies and possibly some magic (reverse engineering) when all else fails.ArashiAganawa wrote: ↑17 Jun 2020, 20:46 Basically what I want to know is, how did you figure it out?
Re: Learning to code and need some maths help
Personally I don't find much joy in that - it's just copying somebody else's work by navigating through assembler syntax.