Jump to content

My Humble Request Of The Devs


Coolcat600

Recommended Posts

May I make the humble request (which I have seen murmured about elsewhere as intended) that before the last and/or final update, the lua files be fully separated out into individual and properly grouped files?

 

Example: DoAgeWorld() is part of the logic of the game world.  As is HandleDeathCleanup().  And so they were naturally put in the same file.  

 

But as someone interested in disabling the XP, setting up a quest system (yes, I know, didn't work for you guys, but hey - I've got to find something to keep myself from doing real work) or simply implementing a "softcore" mode for those new to the game and frustrated with the roguelike deaths that are then permanent I find it difficult to implement this change without having a high likelihood of interfering with other mods, if not breaking the game (and thus not having it load).

 

If "HandleDeathCleanup()" and it's local functions could be put into a separate folder and then called into the gamelogic folder via a require (much like other functions) and would allow someone to specifically target the HandleDeathCleanup() and any other death related functions without worrying about overwriting someone's modding or core game mechanics.

 

A good example is the DeathScreen.  It is encapsulated and is, in itself, complete.  It calls in what it needs, and anything that wouldn't be reused elsewhere is created locally and used.

 

I look through the brain files and other luas and I see a significant number of files separated out - is it possible to continue this (again, I know it has been, to some degree, stated as something that is intended).  But if we separated every function out to where only functions that would only be called by the main function of the file would be included in the code, we'd be able to overwrite specific functions without worry of breaking anything.  Yes, it breaks (to a degree) older mods, but it makes future modding easier.

 

I know this is the trend - I saw it in the post, I just want to humbly request that we continue to drill things down until each function is encapsulated in its own lua and only local functions that are only going to be used by that function are put in with it.  Facilitating this environment would allow more successful and productive modding and extend the life of the game due to the ability to use multiple mods stacked on each other.

 

One other request - a mod "load order" and, if it isn't already in place, a modcheck that determines if two mods are trying to write the same file (and then say "which do you want", and then move that one to the appropriate position on the load order).

 

Anyway, time to go use my donut-induced sugar high elsewhere.

Link to comment
Share on other sites

May I make the humble request (which I have seen murmured about elsewhere as intended) that before the last and/or final update, the lua files be fully separated out into individual and properly grouped files?

 

Example: DoAgeWorld() is part of the logic of the game world.  As is HandleDeathCleanup().  And so they were naturally put in the same file.  

 

But as someone interested in disabling the XP, setting up a quest system (yes, I know, didn't work for you guys, but hey - I've got to find something to keep myself from doing real work) or simply implementing a "softcore" mode for those new to the game and frustrated with the roguelike deaths that are then permanent I find it difficult to implement this change without having a high likelihood of interfering with other mods, if not breaking the game (and thus not having it load).

 

If "HandleDeathCleanup()" and it's local functions could be put into a separate folder and then called into the gamelogic folder via a require (much like other functions) and would allow someone to specifically target the HandleDeathCleanup() and any other death related functions without worrying about overwriting someone's modding or core game mechanics.

 

A good example is the DeathScreen.  It is encapsulated and is, in itself, complete.  It calls in what it needs, and anything that wouldn't be reused elsewhere is created locally and used.

 

I look through the brain files and other luas and I see a significant number of files separated out - is it possible to continue this (again, I know it has been, to some degree, stated as something that is intended).  But if we separated every function out to where only functions that would only be called by the main function of the file would be included in the code, we'd be able to overwrite specific functions without worry of breaking anything.  Yes, it breaks (to a degree) older mods, but it makes future modding easier.

 

I know this is the trend - I saw it in the post, I just want to humbly request that we continue to drill things down until each function is encapsulated in its own lua and only local functions that are only going to be used by that function are put in with it.  Facilitating this environment would allow more successful and productive modding and extend the life of the game due to the ability to use multiple mods stacked on each other.

 

One other request - a mod "load order" and, if it isn't already in place, a modcheck that determines if two mods are trying to write the same file (and then say "which do you want", and then move that one to the appropriate position on the load order).

 

Anyway, time to go use my donut-induced sugar high elsewhere.

 

 

use priority = 0 in your modinfo, a lower number means a later load

Link to comment
Share on other sites

Why?... By the way, I wouldn't say that's a humble request. That's just lots of copy + pasting for almost nothing

 

Continued existence and creation of content for the game?  The easier it is to mod without breaking or conflicting with other mods the easier it is to continue to remain relevant.  I want to make several mods (I'm going to wait until all updates to the game are made and then work on them, plus I'll have a little more time then, for now I'm just reading through the code as I can).  But in order to do that, it requires a breakup of different files in order to ensure that a) I won't conflict with other mods by changing the same file and b) that I won't be altering functions that I don't have to.

 

It seems like it would benefit little, but this would greatly increase mod compatibility while also (at least IMO) making it simpler to mod due to the fact that you can say "X.lua does X, Y.lua does Y" instead of "X.lua does X, Y and Z".

 

Personal preference I suppose though.  I just like the idea of things being separated out more.  Technically, from a programmers perspective, I don't understand why multiple functions are declared within the same lua when they do not make use of each other.  One of the benefits of this way of coding is to localize everything in a single file so that any time X breaks, you go to file X and tweak it to get it to work.  If X fails to compile and there's 3 different functions in it that have wildly different uses, you're going to have a harder time debugging.  Plus, what is the point in local/global scope if everything is going to be in the same file anyway?  I realize it is separated, but what is the point in doing it halfway?

 

use priority = 0 in your modinfo, a lower number means a later load

 

While a later load in priority might be great for someone, such as myself, who is aware of it - say Joe Anybody comes by and downloads two mods, both which do different things overall, but both make an edit to the same lua among its other mods.  Which behavior do you want?  Well, the user is the one who wants to decide, but if the person using the mods has to go in and change the priority, they're less likely to combine mods in order to get their intended resultFor example, mod A modifies the fire pit to burn X and output charcoal automatically.  Mod B changes the firepit to generate ash from the same item, but also changes the behavior of the campfire to do the same rather than just the firepit.  Lets say you wanted both.  You'd either have to rely on the mod authors getting together and saying "hey, I know we're commonly used together so we'll set our priorities to account for this" or you have to do it yourself.

 

As someone familiar with code, I wouldn't care.  But anyone else would instantly be intimidated and turned off.  If it was a matter of an up/down arrow that modified the priority within the modinfo.lua automatically it would make it a lot simpler to say "make sure X loads higher/lower than Y to ensure the intended result".  Good examples would be the way torchlight 2 has a mod load order (though, I don't want anything that complex, just a simply in-game editor, I suppose that one could be fashioned via a mod to do it automatically, so one could say "do it yourself" if you want it done).

 

Edit: Also, if everyone is declaring priority=0 then there is no point to priority.  Without a way to manage it for the common user the common user will have to rely on the modders to police themselves, which is never a particularly wise idea.

Link to comment
Share on other sites

You want to leave it to the user to decide load order? Good luck with that. If the modders can't even do it, what chance does someone who doesn't understand Lua have? The mods aren't built at all for that kind of segmented modularity.

 

priority = 0 is the default, you can use what you want.

 

Edit: I mean, just to start somewhere, there's no standardized way to add to or overwrite things. Let's take a component for example. I can think of at least 5 ways to overwrite a component function, I use 2 myself and I have seen the other 3 in use. So, how do you explain things like why accessing meta-tables is "hackish" and why 3 of the ways might work with the other 2 but only on tuesdays when it's raining outside? Keep in mind we're now talking to someone who has no knowledge of Lua and most likely no knowledge of coding whatsoever. And they are then supposed to... what?  Go through the mods' code and determine for themselves what should be loaded first or not?

Link to comment
Share on other sites

It might be a huge hassle or even impossible to code this prioritizing method as an ingame tool for the end-user.

But (caveat: speaking as someone who knows zero about code) if it's a global setting in modinfo (instead of on each separate lua), i do believe the person installing the mods could very well be the one in charge of that decision.

It should be an advanced (hidden) option for when mods collide, but it could prove to be a life-saving last resort option for when it happens.

It would just be a matter of doing a trial-and-error approach, while at the same time selecting which mods are indeed indispensible to the player (who is the only appropriate judge of that). Which would mean, even if doing priority changes doesn't solve the issue, at least, in the end, the player might be able to play with only his least favorite mod disabled.

Considering most players are should be aware the risk of breaking the game increases in proportion with the amount of mods you apply to it, i don't expect any sane person to have 20-30 mods enabled at the same time. So we're really just talking about tuning the load order of a couple of conflicting mods, not about code-hunting to see which mods tweak the same component. Unless the conflict is very obscure, or we're talking about several mods that change huge numbers of files, the conflict when installing a new mod (say for a campfire) should be evident (if you have another campfire mod). Why wouldn't anyone be capable of using such an option?

 

Or is my non-coder mind simplifying/misunderstanding all this?

Apologies in advance if that's the case. Feel free to ignore the post.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...