Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: My Minecraft Mods  (Read 5142 times)

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #15 on: January 05, 2014, 01:11:32 pm »

Messed around with Invasion Mod a bit.

I would really really like to play this mod with creative-build powers (but no other creative benefits) on a server.  Might be able to get away with NEI cheatmode...
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #16 on: January 05, 2014, 10:17:54 pm »

Or starting in creative, make a script to set you to survival after X minutes, and after setting up only that waiting for that timer.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #17 on: January 05, 2014, 10:28:21 pm »

Found a better way through modding.

Created a custom block that slowly1 generates items (or instantly, if its primed with a full stack2).  I can set those up in creative, then switch over to survival.

I also created an item that doubles my base health and keeps the hunger bar full, as staying fed is a little hard in the middle of a mob fight.  It also heals (v. slowly) for a slight boost in regeneration (downside: its hard to recover after dying).

End result is pretty good.
http://youtu.be/atuaA0qTxBY
And yeah, teamspeak crosschatter.

1I had to slow it down after recording.  Splitting sword stacks is hard!
2It was bugged when I recorded.  It would instantly regen in creative mode, but not in survival.  Fixed that afterwards.
« Last Edit: January 05, 2014, 10:30:08 pm by Draco18s »
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #18 on: January 06, 2014, 10:46:44 pm »

That block looks *nice*, as does the interface. You made that this quickly and just for this test?

Seems I miscommunicated but it turned out for the better.

Hmm, how hard would it be to do something like have something (probably a block, but maybe something more invisible) spawn with X probability beneath your bed every time you sleep, and after a set delay it'd start one of these invasions at the start of the next night? Or some other way of detecting "the players base"and some minimal level of advancement.

Also, what happens if you call whatever function checks for dark places to spawn mobs at 5x as often? ;)
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #19 on: January 06, 2014, 11:45:32 pm »

That block looks *nice*, as does the interface. You made that this quickly and just for this test?

The model was actually a reuse from something I'd made a while ago.

Made a new model for it tonight.  It turned into a 3D Printer. :P


I happened to use that mod as the base for this quick side deviation, as most of what I was going to need was already there, I just had to hook into it.

Quote
Hmm, how hard would it be to do something like have something (probably a block, but maybe something more invisible) spawn with X probability beneath your bed every time you sleep, and after a set delay it'd start one of these invasions at the start of the next night? Or some other way of detecting "the players base"and some minimal level of advancement.

Certainly doable.  There's a Forge hook for sleeping-in-a-bed.  Almost nothing uses it.

Quote
Also, what happens if you call whatever function checks for dark places to spawn mobs at 5x as often? ;)

Mob spawn code isn't that expensive.  But you would quickly hit the entity limit (there's a cap on the number of mobs that can spawn at one time, it's around 80).
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #20 on: January 07, 2014, 12:24:59 am »

Oh, I remember reading about that ring mod I think. for modjam right? That was you?

What is that cap per anyway? Server, player, chunk? And surely it's configurable and counts only natural hostile mobs right?


Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #21 on: January 07, 2014, 08:23:35 am »

Oh, I remember reading about that ring mod I think. for modjam right? That was you?

Wasn't Modjam.  The original version did take about two days though.  It's Ancient Artifacts, link in the OP.  You mentioned its in one of the modpacks you use.

Quote
What is that cap per anyway? Server, player, chunk? And surely it's configurable and counts only natural hostile mobs right?

Only hostiles and I am not sure if its per server or per player.  I do know, however, that Mo' Creatures (actually Custom Spawn Controller) will max it out, keeping as many mobs around the player as possible.  Because apparently it's fun fighting off lions and alligators that spawn literally 5 feet away the instant you kill one, while you're trying to build a solar array.  And also forgetting to spawn anything at all in custom dimensions with unexpected biomes (Mystcraft + BoP + Mo' Creatures = No hostiles).
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #22 on: January 07, 2014, 10:58:26 am »

Huh must be confusing it with something else then, or maybe someone ripped of your ring sprite.

But the GUI was thrown together that nicely that fast for this?

Hmm, you might give some tips about the feasibility of a block idea I've had for a while and plan to implement once I get the environment working. Basically a generic block with no tile entity or anything, but with an associated GUI, kinda like the vanilla crafting table. What it'd do is look up several surrounding blocks and open their GUIs (if any), simultaneously, and offset so they're not just on top of one another. I'm expecting it's not quite as easy as it sounds offsetting them without messing them up and making click events pass to the right one and such, but it it feasible to have anything remotely like this at all with a bit of ingenious workarounds?
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #23 on: January 07, 2014, 12:08:04 pm »

Huh must be confusing it with something else then, or maybe someone ripped of your ring sprite.

I ripped almost all of my item sprites.  I've modified them though.  Most to fit within either 16x16 or 32x32 squares, but some required heavy modification, others less.  Almost all of them have a colored overlay layer in addition, which required a separate sprite.

Quote
But the GUI was thrown together that nicely that fast for this?

Mostly required a little modification on the display pedestal GUI.  Added a second slot, pushed things around, added a line of text.  Took 20 minutes, tops.

Quote
Hmm, you might give some tips about the feasibility of a block idea I've had for a while and plan to implement once I get the environment working. Basically a generic block with no tile entity or anything, but with an associated GUI, kinda like the vanilla crafting table. What it'd do is look up several surrounding blocks and open their GUIs (if any), simultaneously, and offset so they're not just on top of one another. I'm expecting it's not quite as easy as it sounds offsetting them without messing them up and making click events pass to the right one and such, but it it feasible to have anything remotely like this at all with a bit of ingenious workarounds?

Would probably take huge workarounds.  Mostly because vanilla expects you to only have 1 inventory or GUI open at a time (the survival inventory being supplied as an extra when interacting with things like chests and furnaces, due to the fact that the player inventory is a publicly accessible object1,2).

In theory it's possible, though.  Might have to succumb to needing a TileEntity though.  Vanilla can get away with the crafting bench not needing a TE, but the kind of world-coordinate-needing thing you're talking about would need a TE passed to the GUI to know where to start looking for blocks.  A GUI otherwise would have to operate on the player's coordinates.

1I'd say it's supplied as a convenience if it weren't so utterly necessary for 90% of GUI interactions.  But you actually have to build it manually when opening another GUI window.
2Ironically, the horse inventory is not publicly accessible.  The only object that has access to it is the horse entity (which supplies it as a reference to the horse GUI).
« Last Edit: January 07, 2014, 12:09:49 pm by Draco18s »
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #24 on: January 07, 2014, 04:39:45 pm »

My idea was you'd pass the coordinates of the right click action or something like that. (so it'd probably act weirdly if you used some form of "remote clicking" from another mod) Not that having a tile entity would be any problem that was more a descriptive thing.

My main worries are things like GUIs using the same global variable for things and conflicting, or the last one to open grabbing all input, or not being able to differentiate GUI-opening form other right click actions, etc. The only things making me suspect it's possible at all is the NEI and that one sorting mod seems to open their GUIs simultaneously as arbitrary others, and that you can set different GUI sizes that have different offsets already.

Also, obviously the more custom interfaces like Thaumcraft and MPS are going to be troublesome. (and thaumcraft would be one of the things it'd be especially useful for so it cant be just ignored) Also, because of the said rebuilding of it manually of the player inventory each time, not getting 8 badly synced duplicates of it taking up most of the screen might be impossible without custom code for each block or relying on some standardization I don't know about.

###

Hmm, I had another mod idea today (that probably will never be made, since I have better ones from longer ago if I ever get around to modding myself). Basically, I were thinking about that once you've made one set of the best armor and weapon, you never really make any more unless you lose it, which leaves many mods unexplored. Similarly, you tend to make one tiny bedroom, and all the rest of your base is just big workshops and industries. Also, there is no use for things like buffing splash potions and the like currently.

So the mod idea, one block and one entity. Several various ideas for the block, called a "barracks" but basically it either is a kind of door and detects nearby doors. Then it searches for a room that fulfills the requirement of 1) only exit is that door, 2) has a bed, 3) has a chest with food. It will then spawn the entity after a while randomly, consuming the food, equip any armor or weapon in the chest, and stay in the room seeing to sleep in the bed during nights. Then, it'll start to follow you if you rightclick the barracks and fight for you. So basically like many of the clone and recruiting mods out there, but focused on logistics (housing, food equipment) of mass armies rather than leveling individuals, and balanced for automation.

(obviously afterwards you could trow in extra stuff like item usage on any level higher than zombies have, or different versions of the mob depending on the type of food)
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #25 on: January 07, 2014, 05:01:43 pm »

My idea was you'd pass the coordinates of the right click action or something like that. (so it'd probably act weirdly if you used some form of "remote clicking" from another mod) Not that having a tile entity would be any problem that was more a descriptive thing.

It's more that the open-GUI call only accepts certain parameters.  I would have to check if its possible to just pass x/y/z coords.

Quote
My main worries are things like GUIs using the same global variable for things and conflicting, or the last one to open grabbing all input, or not being able to differentiate GUI-opening form other right click actions, etc. The only things making me suspect it's possible at all is the NEI and that one sorting mod seems to open their GUIs simultaneously as arbitrary others, and that you can set different GUI sizes that have different offsets already.

Nah.  It'd be easier to fake it.  Build a modular GUI yourself and just go "oh, there's an anvil nearby, ok, doAnvilGuiProxy" rather than try and run the other GUIs which all hard-code their drawing coordinates and such.

Quote
Also, because of the said rebuilding of it manually of the player inventory each time, not getting 8 badly synced duplicates of it taking up most of the screen might be impossible without custom code for each block or relying on some standardization I don't know about.

And the other reason to do it yourself.  But you'd lose out on a lot of mod GUIs.  Miiiight be able to make it modular enough to supply an API and let other mods hook in.

Quote
Hmm, I had another mod idea today (that probably will never be made, since I have better ones from longer ago if I ever get around to modding myself). Basically, I were thinking about that once you've made one set of the best armor and weapon, you never really make any more unless you lose it, which leaves many mods unexplored. Similarly, you tend to make one tiny bedroom, and all the rest of your base is just big workshops and industries. Also, there is no use for things like buffing splash potions and the like currently.

So the mod idea, one block and one entity. Several various ideas for the block, called a "barracks" but basically it either is a kind of door and detects nearby doors. Then it searches for a room that fulfills the requirement of 1) only exit is that door, 2) has a bed, 3) has a chest with food. It will then spawn the entity after a while randomly, consuming the food, equip any armor or weapon in the chest, and stay in the room seeing to sleep in the bed during nights. Then, it'll start to follow you if you rightclick the barracks and fight for you. So basically like many of the clone and recruiting mods out there, but focused on logistics (housing, food equipment) of mass armies rather than leveling individuals, and balanced for automation.

(obviously afterwards you could trow in extra stuff like item usage on any level higher than zombies have, or different versions of the mob depending on the type of food)

That...could potentially be well done.
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #26 on: January 07, 2014, 05:30:26 pm »

Obviously I'd do a mockup with proxies for vanilla first, but thats all it'd be, a mockup demo. Without being able to do it for all the mod blocks, including ones with hidden code and no APIs, and ones I don't know about, the ENTIRE point is lost. The typical usage scenario is to be able to do things like having a crafting table, ME terminal, and Induction Furnace open at the same time and not have to switch back and forth between screens to craft complicated things. Might make a few proxies for things that are especially common or don't have interfaces of their own, but for many critical ones it's infeasible and I couldn't do enough ones that way for it to be worth it. "Crafting table which doesn't forget recipes and has an attached chest" already has been done plenty in other mods, and adding a furnace to it isnt a significant enough change to redo it.

On the barracks, the question never was if it could be done well in theory, but how much effort would be needed to do it good enough to be worth the effort.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #27 on: January 07, 2014, 06:33:58 pm »

Well for most you can abstract an interface down to "how many slots does it have" and guessing at a layout.

There are still some you won't be able to handle though.  Try these on for size:






Keeping in mind that within the context of that mod I'd actually want and need to use the first three sequentially.  The fourth one is kind of a debug block and isn't craftable, but again has unique functionality.

Then god forbid you try and support turtles at the same time...



Edits bercurz I kint speel.
« Last Edit: January 07, 2014, 06:36:02 pm by Draco18s »
Logged

Armok

  • Bay Watcher
  • God of Blood
    • View Profile
Re: My Minecraft Mods
« Reply #28 on: January 07, 2014, 07:30:18 pm »

Yea, I'm familiar with both those mods, and realize how hopeless interpreting or remaking them would be, and had them specifically in mind for this. Hence, why it needs to *actually* call the render code semi-blindly and pass input and such, not know what they do and then do the same thing.
Logged
So says Armok, God of blood.
Sszsszssoo...
Sszsszssaaayysss...
III...

Draco18s

  • Bay Watcher
    • View Profile
Re: My Minecraft Mods
« Reply #29 on: January 07, 2014, 11:15:54 pm »

Yea, I'm familiar with both those mods, and realize how hopeless interpreting or remaking them would be, and had them specifically in mind for this. Hence, why it needs to *actually* call the render code semi-blindly and pass input and such, not know what they do and then do the same thing.

Problem is that there are two classes involved.  One server side, one client side.

Server:
https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/inventory/ContainerPedestal.java
Client:
https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/GuiContPedestal.java

The client so it can draw stuff, the server to know which inventory you're interacting with.

Note that neither one takes any parameters on where it is to draw or place anything (and the server side one takes a TileEntity in its constructor!).

Not to mention custom Slot classes to allow/ban certain types of objects or perform other tasks.  Note, too, that the Slot class isn't even responsible for drawing the border around itself!
Logged
Pages: 1 [2] 3