MachineMuse / MachineMusePowersuits

Minecraft mod, take 2
234 stars 103 forks source link

[1.14.4 ?] planning and progress #936

Open lehjr opened 5 years ago

lehjr commented 5 years ago

I've decided to skip 1.13.2 and go to 1.14.2 1.14.4. As always, there will be some changes to the mod due to changes in Minecraft and Forge.

I'll update this as time goes on...

eyeonus commented 5 years ago

Let me know when you have the Patreon set up, I'll give you what I can afford.

lehjr commented 5 years ago

Thanks. When I figure it out I'll probably put a link in the the Don't-README

lehjr commented 5 years ago

I noticed that the JEI commits have a temporary work around for the textures. I’ll have to investigate later on. Biggest things on the todo list are the config settings for modules, texture loading for models, and porting/rewriting the GUI code. Pretty much all the model code is now in capabilities.

lehjr commented 5 years ago

Since I'll probably have to redesign and rewrite all of the GUI stuff, I guess this would be a good time to add a crafting tab to the Tinker table.

lehjr commented 5 years ago

I spent some time porting Scannable to 1.14.3, not completely, but enough to figure out what I need to do in terms of setting up the GUI stuff. Unlike the 1.13.2 port, there is stuff that actually works without crashing. So at least there's that.

eyeonus commented 5 years ago

W00t! Hooray for the lack of crashing!

lehjr commented 5 years ago

Yeah, the block search thing is only working for the one module where you can select a specific block to find. The that scanning effect where it lights up the world doesn't seem to work but the block thing does. It's off vertically by about a block, but it does work.

lehjr commented 5 years ago

Looks like GUI's are going to be "fun". From what I can tell, they all need a container, a registered "container screen" for the GUI, a registered container type, an INamedContainerProvider, and being a container gui, they can only be opened from the server side, so to open a gui with a key, you have to create a custom packet for that to send to the server and then handle that request on the server side.

For normal Tinker Table stuff, this is might actually be a good thing though it will take more work initially to port the existing code. For the mode selection stuff though, that's not so good and I may have to revert to the old shift mouse wheel method of mode changing.

eyeonus commented 5 years ago

I hate you, whoever decided server-side only was a good idea.

lehjr commented 5 years ago

Most gui stuff is container based anyway. For the Tinker Table stuff and modules being items, this doesn't change much. All the overlays still work fine. So the only real issue is the mode selection. I did some testing with it earlier and it didn't go well. After I get a better handle on the rest of the GUI stuff I'll revisit it.

eyeonus commented 5 years ago

I shall continue to hope, because I very very much prefer the new mode to the shift mode.

(And not because I coded it.)

lehjr commented 5 years ago

According to some proof of concept testing, I should be able to save the mode changing GUI you wrote. However, there are some issues with opening/closing it which will have to be sorted out. I won't be able to fully test it until I set up a way to actually install modules instead of populating the list from the player inventory, but for now, the outlook is good. With any luck, I'll be able to salvage most of the GUI system.

eyeonus commented 5 years ago

Awesome!

lehjr commented 5 years ago

In build 23 we just got back the ability to register textures, so there's even more good news. :D

eyeonus commented 5 years ago

W00t!

lehjr commented 5 years ago

2019-07-05_12 50 04

lehjr commented 5 years ago

Some progress

lehjr commented 5 years ago

2019-07-06_15 35 16 A little more working. Scrolling still broken though. Padding around the modules and items could be a increased a bit too. But tool tips and selection are working.

eyeonus commented 5 years ago

Looking good!

lehjr commented 5 years ago

The crafting GUI will probably look something like this: crafting_table2

lehjr commented 5 years ago

2019-07-15_00 32 07 more progress on that. The crafting table side is almost done (just need to replace the button. The recipe book side is a conceptual thing where the background image was replaced with an MPS themed image. Slow progress because much of this container stuff is new to me.

One of the things I'm working on with this port is getting the GUI's to resize properly on window resize. It's coming along slowly, but it is still moving forward.

eyeonus commented 5 years ago

So will the table be able to craft anything, then? Or just MPS stuff?

If the former, are you planning on making it better than the standard table in any way, in similar vein to the crafting bench in Tinker's Construct?

lehjr commented 5 years ago

For right now, it will probably just be an MPS themed crafting setup. Part of the challenge of working with 1.14.3 is there' are still a lot of garbled names, so it takes time just to figure out what things do.

lehjr commented 5 years ago

I hit a major snag with the config system. Due to the way it's coded, it looks to be impossible to have soft coded references. That's a bigger issue than it sounds because the hard coded references are null until the config builder builds, and capabilities are initialized before this happens. Basically, it's going to be a lot more work.

Edit: I did some testing in an example mod and found found a way to not have to use hard coded references. Also found some of my config settings were wrong.

lehjr commented 4 years ago

Finished the crafting Gui. I've been working on the rest of the GUI stuf, mostly experimentingf. Turns out that you CAN use a GUI without a container, so there will end up being a mix of both. Most of the GUI's will probably be rewritten. The installation GUI will likely be similar to that of Scannable, but with the dynamically drawn stuff rather than static background images. tweaking stuff shouldn't be too much different. 2019-08-01_18 24 48

LuisG244 commented 4 years ago

Wow, just re discovered this mod that I was sure I wouldn't see anymore of since I last saw MM ceased development. I'm so excited to be playing with modular power suits on such a new version like 1.12, which just happens to be the most recent version I play on MC anyway since I'm waiting on Amulet...

Dude I was wondering if you could make the plasma cannon max explosiveness like x10 stronger (5 creepers instead of .5), that's something I always wanted to see with the mod. I'll send a few bucks to the patreon since I'm so stoked this mod is still technically in development. Thanks for work you do :)

lehjr commented 4 years ago

@LuisG244 Thank you, much appreciated. Unfortunately, I haven't even heard from MM in over 2 years. And because of that, I've had to switch to my own repos for 1.14.4 development since I can't change the default branch. I also can't add/remove team members on the CurseForge page, so I'll probably have to create a new project page for 1.14.4 and beyond as well, that is, if CurseForge can get their act together.

Regarding the settings for the plasma cannon, that specific setting would be plasmaCannon.plasmaExplosiveness.voltage.multiplier in the config file.

LuisG244 commented 4 years ago

@lehjr wow!! Thank you so much I never knew this was something I could do on me end. (Turns out x10 explosiveness is pretty crazy) I will continue supporting the mod on your paetron :) best of luck and I'll be watching for you repos since you cant do much on here with MM being gone

lehjr commented 4 years ago

So far the testing with modules as items has been going pretty well. The module selection setup that @eyeonus did is now working again, but the installation/removal needs to be split from the module tweak setup. I'm still trying to come up with a module installation/removal GUI that makes sense , since the old one will no longer work with items. I'm currently using this just to be able to install the modules for testing, but I'll need a better solution before I can release the mod. 2019-08-12_11 12 02

lehjr commented 4 years ago

I was loading up my 1.12.2 workspace but the assets weren't loading. I actually lost DAYS trying to pinpoint the source. Turns out, this fix from 4 years ago works https://stackoverflow.com/questions/27623326/minecraft-forge-not-loading-textures

Anyway, my plan is to try to stick as close to the original as possible. It will be a little bit more complex due to modules being craftable instead of just having install costs, but the overall functionality won't be that different. The biggest change will probably be a crafting grid instead of just the install costs by the install button to show whether or not the player has the items needed to craft the module if the player doesn't already have one in their inventory.

trekkie22 commented 4 years ago

Sorry for being slightly offtopic, but you really should make that Patreon more visible. Needed some time to find it. Your good work needs to be much more honored.

lehjr commented 4 years ago

I haven't really had much time for dealing with the patereon stuff as I've been been struggling with the GUI code, primarily with the container stuff. I've finally gotten a lot of it figured out, but I still need to implement a crafting grid for the "craft and install" option. I'll try and document this later, but basically it's just a way to be able to install a module without having to craft it separately.

lehjr commented 4 years ago

Unfinished but this is the general idea

2019-09-14_14 23 50

lehjr commented 4 years ago

With any luck, we're looking at 2-3 weeks for the first [EARLY] alpha builds. I could give everyone a detailed description of the current state of things, but the reality is that things are moving faster than I can write about them. Modules are mostly done (75-80%?), GUI stuff is 3/4 done (missing cosmetic), recipes still need work and only the "vanilla" ones are being worked on due to lack of other mods being available. Modules for supporting other mods will need to be addons. There just isn't any way around it.

eyeonus commented 4 years ago

How hard is making addons?

lehjr commented 4 years ago

All depends on the mod really. Most modules would end up extending whatever item from the mod. Everything is based around capabilities now rather than implementing interfaces directly on the item. So there's no more optional interfaces and method stripping. There's also no way of conditionally registering an item, at least not in the context of whether another mod is installed or not. So for the use case here, dependencies are no longer soft dependencies. That means things there's bound to be redundant modules just to support other mods.

eyeonus commented 4 years ago

There's no way to check if a mod is installed or not prior to item registration? That seems... shortsighted.

lehjr commented 4 years ago

The problem is lots of things are multithreaded now, including mod loading. There is intermod communication, but it doesn't fire early enough to avoid registering items. And due to multithreading, reference stripping at runtime isn't possible. This means things like this don't exist anymore: https://github.com/MachineMuse/MachineMusePowersuits/blob/1.12.2-experimental/src/main/java/net/machinemuse/powersuits/item/tool/ItemPowerFist.java#L64-L74

And without that, extending classes and referencing them without the base class being present will likely crash during loading.

lehjr commented 4 years ago

Most likley this will just lead to mod interaction being done with addons. It's really not the end of the world. In fact, for MPS, it makes development much simpler because I don't have to load what feels like every mod ever written. My load time is under a minute now, instead of 3-4 minutes.

lehjr commented 4 years ago

So far so good. The heating/cooling code still needs a bit of work, and the cooling system module and fluid tank module still need work, but most other modules are actually working. I'm currently working on the cosmetic system and should be done with that in the next couple days. All in all, it looks like the first alpha should be ready by the end of next weekend.

eyeonus commented 4 years ago

The whole addon thing feels like it's going to be a lot more hassle in the long run than the optional dependency thing. The better load time is great, obviously, but that load time savings is going to go away as soon as you start working on the addons. Plus the having to maintain multiple projects rather than just the one....

I don't know how many addon packages you were planning on doing, but I do know that at some point, you'll have to load up everything- the MPS package, all the addon packages, all the mod dependencies- and make sure it all works together without issue.

So, sure, right now loading time is great because not loading all the mods, but it seems like a temporary reprieve. As soon as you start working on anything involving other mods, that's going to start disappearing.

So, when you get this thing working like you want, all the non-edge-case bugs taken care of, and begin to work on the stuff that involves other mods, I honestly think it would actually be easier for you to keep the whole optional dependency thing rather than doing the addon thing.

I could be wrong, after all, I'm not the one doing the work, in which case ignore me and carry on.

But, if you would prefer the optional dependencies rather than huge slew of tiny addon packages, I have done some research:

I found a thing that looks like a way to get the old optional interface functionality.

https://www.minecraftforge.net/forum/topic/63802-how-to-add-compatibility-with-other-mods/?do=findComment&comment=301062

lehjr commented 4 years ago

I don't see how that would even work in this case since again, there is no way to conditionally register items. And that's just it, every addon MPS implements, except power, is based on another mod's item. Even attempting that would be an unimaginable spaghetti mess. Remember, no matter how you do it, these become hard dependencies during development, even if they are soft dependencies for the end user. And once these mods become dependencies, you're at their mercy. You can't simply disable parts of the code that they have broken between versions. During development, load times can be crippling, which is why shy away from 1.12.2 maintenance. When you make small changes and need to reload to check them, 2-3 minute load times not only kill your productivity, they kill your motivation. Quite frankly, if I had all of those dependencies and the load times to go with it in 1.14.4, I would probably just give up.

eyeonus commented 4 years ago

Well, that's what I'm saying. Whether you have the modules in the main MPS package, or in one or more addon packages, you're still going to have in-dev hard dependencies that will increase the load time.

The only way to not have that is to literally never have an addon in MPS that is based on another mod's items.

Okay, that's not entirely true. If it at some point becomes possible to reload just one mod without having to reload everything, that would also do it. Or somehow making it so that the other mods aren't hard dependencies during development, so you only actually need to load the mods you're testing with. But those both sound like never-gonna-happen things.

lehjr commented 4 years ago

The dependencies for each addon is only for that addon, not for all of them. I will not be working with all of the addons at once, only one at a time.

eyeonus commented 4 years ago

So you won't be testing to make sure that all the addons play nice with each other?

lehjr commented 4 years ago

In a normal gaming environment, sure. In a development environment, no. Why, because it's a pain in the ass since there's no automatic deobfiscating of the /libs folder anymore. So yeah I can build dev versions of everything, but that's not going to tell me how things are actually going to work for an end user.

eyeonus commented 4 years ago

Alright, so how are you going to handle cross add-on duplication?

Like right now, there's the ic2 battery recipes, and the TE recipes for the same batteries.

If someone has both of those installed and so decides to get both the IC2 and TE add-ons, how will MPS decide which recipe to use?

lehjr commented 4 years ago

The long and short of it is, there are reasons why I'm doing things the way that I'm doing them and none of them are to make your life harder, but rather to make my life easier.

As to what recipes get used and what don't, keep in mind that those other mods aren't even out yet. So at the moment, it doesn't even make sense to worry about them. but for the sake of argument, what ones get used, that's a matter of using a config setting and using a condition handler. But the server controls that, not the player. Having a config setting checking if a mod is loaded isn't the same as having an item that extends an item from another mod.

eyeonus commented 4 years ago

I'm not even thinking about whether it would be harder for me or not.

If you want to go the addon route, that's your decision, I'm just thinking of potential problems in case they're something you yourself haven't already.

I'm trying to be helpful, not difficult, in other words.

I'm still not convinced you won't need to load all the addons in dev at least once in a while to make sure everything plays nice together, but you're the guy that knows the code, not me, so I'll admit there's a very, very good chance that I'm wrong.

lehjr commented 4 years ago

It's not a matter of whether I want to go the addon route. The reality is that there are fundamental changes in Forge that turn this once easy road of optional addons into a nightmare to accomplish. It's simply just not worth the frustration, let alone the work to accomplish it.