Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Show off your mod creations or just a work in progress.
Post Reply
User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

Here is Part.38 where I:
- Talk About My Quiet Progress On The Mod The Past Few Months Since I Took A Bit Of A Break From It


User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

Just felt like making a recording about stuff I've been thinking about recently involving the creative process and other things. Figured since it is related alot to this mod and topic in general maybe somebody would find it useful/relatable in some way.


User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by pango »

A lot to unroll!

Looks like you wonder how to deal with complexity, and the solution is indeed not to make things simpler (assuming you already tried as you go), but to make complexity more manageable.
No matter who you are, there's always a maximum number of things you can keep in your head at a time. They're several engineering tricks to deal with complexity, but an important one is layering: split the responsibilities of your code into layers, each that can be understood on its own abstraction level without having to look at what other layers are doing in detail. This involves both some means of abstraction (like using functions, or classes), and practices (give meaningful and precise names to things, cleanly group things by responsibility).
This takes practice, in fact this is something you keep working on forever when you're a good developer.

It's also okay to not get it right upfront when you work on a project, because not only your project evolves, but how you understand the problem you're trying to solve also changes as you go; So refactorization is always necessary, check what the IDE you're using can help you rewrite, be sure to master versioning tools (say Git) to record each step so you're confident you can rollback to a working state and can attempt rewrites without fear. Use unit tests to be more confident you're adding no regressions.

Now more specifically about your mod, you say you don't prefer more lines to long lines.
Well, try to re-read your code in a few months, not to mention try to explain what your code is doing to someone else so (s)he's able to modify it. Your code deals with all aspects of the problem you're trying to solve at the same time, and is a low level translation of the consequences of the model of the problem you have in your head, rather than a translation of this model. Making some of the stuff you explained in this video (say, how you always do rounding in specific ways to avoid some problems, or how luck effect is added to an existing expression,...) something concrete in your code, could be functions, could be classes, rather than seemingly unrelated pieces of code all over the place, will both make your code more self-explanatory, and easier to modify.

Even more down the earth, try a few recipes (again, refactorization and versioning tools are your friends):
  • extract and give meaningful names to parts of long formulae;
  • as said before, create functions that encapsulate recurring logic (rounding, ways to generate random values, ways some specific aspect of the problem generally impact expressions,...);
  • try to express yourself in code rather than comments, when possible; Say, check what comments could be replaced by a meaningfully named function (comments are not always bad and cannot always be translated into code, don't apply that recipe blindly);
  • factorize code, say between alternatives since you mention that case, again using functions or methods.
(They're others things I often consider, like adding abstractions like interfaces around things I suspect will change soon or often. Obviously computer science is much larger topic).

I'm also wondering if you could translate the constraints you're talking about (balance the effect of different things one against another) using unit tests. Since randomness is often involved that looks tricky, but maybe checking that results averages are in the right ballpark after several thousands runs would be okay? Could require some statistics to work right...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

pango wrote: Wed Jan 25, 2023 6:13 pm A lot to unroll!
Thanks for the write-up Pango, I do appreciate the advice/tips/wisdom. I'll definitely keep what you said in consideration, I definitely need to change some of my practices when it comes to these "larger" in scope mods and projects.

It's easy enough to keep things readable and coherent when it's a relatively small project, but the larger they become the more forethought and effort is required to keep everything from becoming a mess of abstract glyphs and meaningless, long forgotten comments and variable names.

I also have to consider what you mention involving "unit tests" as well, as this is often something that concerns me is working on some system, but never knowing until I get to the end of that work if all I just did even works on a basic level yet.

But yeah, thanks for the reply, appreciate it.

User avatar
pango
Posts: 3358
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by pango »

Absolutely right, they're issues (and solutions) that are specific to "programming in the large", with several levels of "large", both in terms of programming practices and in terms of organization (teamwork is its own can of worms).

But I digress, if it gave you ideas of stuff to try, improve your craftsmanship, and come up with even more questions, I'm pleased ;)
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

Here is Part.39 where I:
- Just Talking About Some Progress On Chest Bashing And Loot Damaging Mechanics


User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

Here is Part.40 where I:
- A Messy Talk About The Progress On The Mod The Past Month
- Some Topics Include: The Magical Open Effect, Custom GUI, Custom Items, And Custom Sound Clips Added So Far


User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

Here is Part.41 where I:
- Showcase The Save-Data System Working Inside Dungeons, For The Custom Chest Objects, And The Resulting Loot-Piles
- Attempt To Explain The Difficulties I Was Having With The Save-Data And Loading Process, And How I Dealt With Them


User avatar
Magicono43
Posts: 1141
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by Magicono43 »

So I have finally released this mod to the public!

Here is the main forum post about it: viewtopic.php?t=6256

Here is the Nexus mods page: https://www.nexusmods.com/daggerfallunity/mods/451

I will probably make a video about this at some point. I know I failed pretty hard after a point on this "goal" that I initially wanted to make an entire video series from start to finish about the process of making this mod, but it just became too much of a hindrance to my progress on the mod itself.

But yeah, I'll try to make an update video about this at some point, but thanks all that have been following and I hope to work more on the mod for the features I still want to add after what I think is a deserved break from working on this specific project, now that I've been working on it alone basically the past 7 months :lol:

User avatar
thenameisthegame
Posts: 36
Joined: Sun Feb 19, 2023 10:02 pm

Re: Modding Video Series 1: "Locked Loot Containers", From Start To Finish

Post by thenameisthegame »

I say you deserve a good break! To have taken the time to even go through such depths to make that system of locked loot containers as well as make the youtube series about it is impressive.

I have tried real hard to break your initial release, and so far it seems to be more solid than ''release candidate'' worthy even! You know, like the ones we used to have where IF there was a day-one patch it would be to polish some features rather than ''fix something game breaking happening right after install'' kind of release. ;)

... I'll still let you know as soon as I find something that breaks (if I do) but don't feel rushed! Take it easy, maybe go play Morrowind with this mod:

https://www.nexusmods.com/morrowind/mods/52534

Ok so that might not be relaxing, but it sure will be distracting!

Post Reply