LemADEC / WarpDrive

A warp drive mod for minecraft
70 stars 40 forks source link

Ship forcefield and related hull blocks #112

Closed Sable501 closed 8 years ago

Sable501 commented 8 years ago

Hello, I was recently trying out certain forcefield mods that had less than desirable results, no surprise there as one is currently abandoned and the other relies on an experimental build of IC2. So, I thought why not make the cloaking device capable of providing shielding? You have all the items in place, the cloaking coils also double as shielding coils. It would balance game play, as you'd have to choose between being shielded or being cloaked. Also, it would allow for players to make truly custom shielding systems for their ships, and not have to use additional mods. The shields would work as long as they have energy, and damage dealt saps energy; a simple formula that can be altered in the config could be 1 half-heart = . So, people who use different energy systems can alter it to be more fitting to whatever they use, like RF for instance. Finally, it would release this wonderful mod from being dependant on less stellar mods, at least in respect to shielding.

Sincerely, Sable501

Sable501 commented 8 years ago

Oh, as an afterthought, make it so that if the shielding system does not have enough energy to completely block an attack, then allow the attack to pass through completely; or add it as an option in the config. This would prevent players who have solar and/or nuclear powered vessels from being invulnerable, or at least highly resistant, to attacks as they are always generating power. It would also be useful, as it could potentially free up some RAM by reducing the amount of calculations that would have to be done for calculating how much damage is dealt with x amount of energy remaining and so forth.

LemADEC commented 8 years ago

I think we already have a ticket about hull and shielding in there :). There's more CPU load in checking nearby blocks and accessing tile entities than in computing damage effects.

The idea currently is to have progressive charging of shielding blocks, instead of hard 'unbreakable' ones like most others do. Also, it'll be shaped to your ship hull and you'll have to place shield projectors periodically to transfer the load. This will encourage localized/area effects to the shield.

Sable501 commented 8 years ago

Ah, I see. I didn't know you already had something specific in the works. Well, I hope you find something in there useful, possibly. I wouldn't mind knowing the specifics of what you have in mind.

CaptainMegavolt commented 8 years ago

Wasn't the current plan something like "shield capacitors" which provide energy to the shield, but the capacitors can only be charged so fast, so that bigger capacitor bank=stronger shield. That way, the strength of the shield is somewhat proportional to the size of the ship, since only huge capital ships can support a huge shield capacitor bank.

Sable501 commented 8 years ago

That's kind of what I had in mind. Essentially, I was more curious about the actual mechanics of it. I like using Open Modular Turrets and MCHeli, as well as a few other mods, and I was curious as to how or if it handles damage dealt; especially in regards to damage dealt from weapons in other mods. A great example of this is that Flans Mod vehicles/aircraft cannot destroy/damage MCHeli aircraft/turrets and vice versa. So, now that I know how it deals with energy, or at least I have a better idea, I'm curious as to how the shield itself works. Specifically, I'd like to know if things, people/shots/lasers/things that deal damage, from inside the shield or are attached to the ship itself can deal damage even though they are shielded; essentially, if it's in, can it go out? Also, I personally believe that while a shield should be able to block all incoming damage, provided it has sufficient power/energy to do so, I think people should be able to get past it; or at least a config option to enable it. The reasoning behind this is that one of the best strategies to taking down large powerful ships is landing a boarding party and bringing it down from the inside.

CaptainMegavolt commented 8 years ago

That makes sense. Pretty much what I was thinking too. I'm no good at programming (at the moment) so I'm not sure how something like this would be coded, but I kind of imagines shields being represented ingame as "bubbles", scaleable entities that encompass the ship within their area.

LemADEC commented 8 years ago

Minecraft is a 'block' game in essence, hence the shield needs to be 'block' based as many interaction will just ignore the entity aspect. Ultimately, I want to have different kinds of protection with different technologies, each having pros and cons:

Another requirement is the volume, you shouldn't be able to multiple the energy storage by 1000x and remains in a single block. You can improve storage efficiency with better materials, but there should be an impact on your ship volume.

If you want to help, try to fill a damage table describing the different interactions.

CaptainMegavolt commented 8 years ago

That looks amazing! Although, in the case of the damage table, what interactions do you mean exactly? How different weapons interact with different shields? And on the subject of shield efficiency, as I mentioned in one of my previous posts on this issue, I suggested having shield recharge rate and total shield power and efficiency depend upon large banks of shield capacitor blocks. The capacitors come in tiers, with each higher tier being able to hold slightly more shield energy and being slightly more efficient. I say only slightly as the intent is to have the actual size of the capacitor bank be the main deciding factor in the shield's strength, so that the physical size of your ship limits how strong your shields are. I see this as a sort of balancing mechanic, so that huge capital ships, which are slow and unwieldy, have stronger shields than smaller, more agile craft. In a battle this would result in big slow capital ships tending to stay in one place more and fire their weapons from a relatively stationary position while their powerful shields absorb the brunt of their enemies attacks, whereas the smaller ships are always on the move, trying to avoid shots while attacking, since their weaker shields can't take nearly as much.

I admit the "bubble" thing was a little farfetched. Blocks do honestly make more sense, although I wonder how would the mod handle the shield moving with the ship? would the ship simply instantly reform its shields after a jump, or would the shield have to be inside of the warp field?

Sable501 commented 8 years ago

Shields can be charged by energy or machines that produce energy; these could be solar, gas, steam, nuclear, etc. RF engines use a multitude of materials to produce power, Galacticraft has coal, fuel and solar powered engines that can be used as well. NuclearCraft can output power in the form of RF, and is quite compatable with it, and a nuclear fission or fusion reactor is a popular choice in sci-fi to power star ships.

Energy cells in RF are reasonable, as well as energy storage modules from Galacticraft. They take a reasonable amount of materials and resources to produce and make fairly balanced energy banks; in my opinion anyway.

Hull repair could possibly be achieved with help from OpenComputers/ComputerCraft in the form of schematics. Essentially you supply the necessary materials, and it will build it or replace what's missing.

Repelling enemies could be achieved by applying a damage effect, similar to lava, so enemies would have to be extremely tough or have equipment to nullify or resist this effect.

Teleportation inhibitors could keep people from teleporting within an area. I suggest the teleporters have a "frequency" that allies can share amongst themselves to allow them to teleport within the area; although if enemies guessed or knew the correct frequency, then they would be able to teleport at will, which is a plus or a minus depending on how you look at it.

As far as protection from different types of damage, kinetic and energy, it makes constructing damage tables a little more difficult; at least for the damage table I have in mind. It may also make cross-mod compatability a little more difficult as it will have to determine whether incoming damage from another mod is energy or kinetic based. An alternative that I believe would be fair and more compatable with other mods follows: Make the shield systems adjustable, and loosely based on vanilla blocks. What I mean by this is that the player can adjust the shield systems to better protect from rapid, low damage attacks to slow, high damage attacks; using a slider bar perhaps? In essence, you could have shields with less damage absorbtion, but a low energy consumption rate; and shields with high damage absorbtion, but a high energy consumption rate. This would make shields that are adjusted for slow, high damage attacks vulnerable to rapid attacks, as they will waste a lot of energy blocking rapid, low power attacks; but with a nice GUI with a slider bar or something, smart, tactical players can make on-the-fly adjustments to their shielding systems depending on their oppenents' weapon systems. However, shields that are adjusted to excel against rapid, low power attacks, will suffer against high power attacks; so high power attacks will "punch" through. This alternative is based on shielding systems used in several other sci-fi games, and it was a balanced and pretty fun way of tackling the issue in my opinion.

As far as the slider system and damage table, I suggest something that utilizes as much of vanilla Minecraft as possible; as most weapons from mods will damage vanilla blocks. The tiers I suggest are Dirt, Sandstone, Stone, Cobblestone, Iron, Ender, Obsidian.

*= scale derived from: http://minecraft.gamepedia.com/Breaking#Blocks_by_hardness Dirt=0.75, Sandstone=4, Stone=7.5, Cobblestone=10, Iron Block=25, Ender Chest=112.5, Obsidian=250

You could potentially have Bedrock as an option for 500 or something.

Using these blocks as a reference, we can calculate the damage done by attacks. So, say we have our shields set to Cobblestone. It will block attacks that can't destroy Cobblestone, and for the sake of this example, let's say each attack drains 10 units of energy. So, say we have someone with a gatling gun and they unleash a volley of fire and put out 100 shots. This doesn't penetrate the shield, but 1000 units of energy have been used. Conversely, Let's say we have our shield set to "Obsidian" and it consumes 250 units of energy per hit. So, the same gatling gun fires another 100 shots, they are obviously blocked, but 25,000 units of energy will be consumed.

Now, for the high damage example. Let's say we have a laser that can destroy Iron Blocks, but cannot destroy Obsidian. If we have our shield set to Obsidian, the shot is blocked and 250 units of energy is consumed. Now, let's set our shield to Cobblestone and fire the same laser at it. Clearly, the shield cannot block the shot and it will penetrate the shield. You could introduce an upgrade of some sort that allows shields to auto-adjust based on the strength of the previous attack.

Speaking of upgrades, this allows the introduction of shield upgrades that make the shield more effective against low power attacks, high power attacks, more energy efficient, etc. You can also have multiple tiers of shielding systems that allow for more and more upgrades.

LemADEC commented 8 years ago

Shield blocks are part of the ship except they don't count towards it's volume stats.

As I was saying earlier, there's a few mods with excessively compact energy storage, hence the idea to have a 'Shield tank' that refills slowly through a dedicated 'Shield charger'. At some point, players can increase the number of chargers to compensate for the tank size.

There's already a discussion for Shipyards.

Obviously, teleporters are tuned on a specific frequency :).

In essence you propose to adjust the recharging speed of the shield with a leaking percentage to sustain it (faster recharge means more overall energy in the shield but also more leakage).

Here are different kind of damage to sustain:

The main concern is resistance because it doesn't scale linearly like hardness.

Sable501 commented 8 years ago

Yes, by having the shield blocks simulate the hardness of vanilla blocks, we can better determine the damage dealt. For example, lets place a nuke, like the one from NuclearCraft, and place it on a shield set to Stone. It will "destroy" all stone blocks within a 50 block radius; which is what happens when you set the nuke on a field of stone. The same nuke set on a field of Iron Blocks will destroy all Iron Blocks within a 30 block radius. The nuke has no effect on Obsidian. So, by "attuning" the shield blocks to match the hardness of a vanilla block, it would make damage calculations easier and more comprehensive; possibly.

LemADEC commented 8 years ago

Hardness and resistance are 2 different properties of a block: Bedrock has -1 hardness and 18000000 blast resistance (-1 means 'unbreakable').

IC2 Reinforced stone has 80 hardness and 540 blast resistance. Obsidian has 50 hardness and 6000 blast resistance (180 with IC2). IC2 Basalt block has 20 hardness and 135 blast resistance.

Enchanting table has 5 hardness and 6000 blast resistance (540 with IC2). Anvil has 5 hardness and 6000 blast resistance (540 with IC2). Ender chest has 22.5 hardness and 3000 blast resistance (180 with IC2). Water has 100 hardness and 500 blast resistance (90 with IC2). Flowing water has 100 hardness and 500 blast resistance (90 with IC2). Lava has 100 hardness and 500 blast resistance (90 with IC2). Flowing lava has 100 hardness and 500 blast resistance (not nerfed by IC2?).

Block of iron/diamond/coal, iron bars have 5 hardness and 30 blast resistance. Spawner, Iron door have 5 hardness and 25 blast resistance. Cobweb has 4 hardness and 20 blast resistance. Furnace has 3.5 hardness and 17.5 blast resistance. Wooden door, Iron/diamond ores have 3 hardness and 15 blast resistance. Chest and crafting table have 2.5 hardness and 12.5 blast resistance. Nether brick have 2 hardness and 30 blast resistance. Stone slabs and mossy cobbestone have 2 hardness and 30 blast resistance. Stone and Stone bricks has 1.5 hardness and 30 blast resistance. Bookshelf has 1.5 hardness and 7.5 blast resistance.

Sandstone, nether quartz block & wool have 0.8 hardness and 4 blast resistance. Normal/Golden/Detector/Activator rails have 0.7 hardness and 3.5 blast resistance. Grass, wheat & gravel have 0.6 hardness and 3 blast resistance. Lever, dirt & sand has 0.5 hardness and 2.5 blast resistance. Logs, leaves, flowers, torch, fire, tnt have 0 hardness and 0 blast resistance.

Sable501 commented 8 years ago

Ah, allow me to reword that then. When I said "hardness", I should have said "properties". I should of said that each setting would give the shield the properties of the respective block; but not the textures obviously. Essentially, each setting would make the shield behave as if it had been constructed out of that block. So, a shield set to Cobblestone would behave as if there was a layer of Cobblestone wrapped around your ship; although it uses energy when struck and is replaced if it is "destroyed" provided there is enough energy to do so.

Pretty much I'm suggesting that you tap into the properties of vanilla blocks to create the shields.

Sable501 commented 8 years ago

Oh, without adding additional mass or volume to the ship.

LemADEC commented 8 years ago

Yes, following the block properties is a must to support other mods. I've updated the properties table to give you a better sense on why we're missing a damage table.

I'm pretty sure WarpDrive needs to adjust blocks properties like IC2 does, probably including other mods too to solve the damage equation. For example, ExtraUtilities compressed cobblestone is stronger than obsidian.

Sable501 commented 8 years ago

Where would I find the properties table? Also, I recommend a mod called Artifice. It adds blocks with varying degrees of hardness and blast resistance without overwriting the properties of existing blocks; the blocks are also relatively simple and fairly cost effective to make. I actually use the blocks to construct my ships.

Sable501 commented 8 years ago

Or give me an example of a damage table, and I'll create multiple tiers of damage tables. Give me the damage table of Bedrock and Dirt to act as my Max and Min values.

LemADEC commented 8 years ago

While pretty being pretty neat, the Artifice mod is having SMP issues, including dup bugs, so I can't rely on it, sadly. We're in the process of adding our own 'hull' blocks to WarpDrive with more 'color' than just gray/black.

Let me add a few more to the list.

Sable501 commented 8 years ago

Oh, and I suggest an option for IC2 users is a config option that allows the utilization of damage tables that are IC2 specific. Whilst those of us who don't care too much for IC2 can use a vanilla damage table. I could probably do both, but I'd need to know the maximum resistance damage and blast radius, achievable by your laser; let's assume you can make it as big as you want.

Sable501 commented 8 years ago

Darn. Well, email the property list, and an example of a damage table. Also, if you like, I can take a crack at the hull block properties, and make a few tiers of those as well for players who like a heavily armored and shielded ship.

LemADEC commented 8 years ago

Those properties comes from the code itself, there's probably a mod out there to dump them in text form.

Let's use this google sheet to work on that => https://docs.google.com/spreadsheets/d/1arD6QUGbFoyjrmSH1xr9p9G8nchQXaW1E80Z4-nqdbI/edit?usp=sharing

LemADEC commented 8 years ago

The laser cannon is configurable in terms of 'Max energy per laser medium' x 'Max number of laser medium per cannon' x 'booster bonus (5 * 0.7 by default)' - 'consumption per block traveled'.

CaptainMegavolt commented 8 years ago

For simplicity's sake, I think that shields should not differentiate between kinetic and energy attacks and just repel everything.

Also, another idea: Regenerative hull. Nanotechnology blocks that can repair themselves. In game mechanic terms, hull blocks that are difficult to craft, but will rebuild themselves using electricity.

LemADEC commented 8 years ago

I was thinking about repair station or bots that rebuild the ship hull over time using resources

LemADEC commented 8 years ago

The complicated part with the shield is to compute it's shape around the ship.

CaptainMegavolt commented 8 years ago

Yeah... I wonder how that would be accomplished. Perhaps the shield could be linked to the warp controller, and use the ships total length depth and width parameters from the warp controller to define the shield's height width and depth, using some sort of program to generate an elliptical three-dimensional shape using those parameters.

LemADEC commented 8 years ago

The shield will follow the shape of the ship. Ship core presence is mandatory.

LemADEC commented 8 years ago

We've found a better way to build the shield shape using Constructive Solid Geometry. This gonna be fun :)

CaptainMegavolt commented 8 years ago

:D

_--MarvinMegavolt

On Wed, May 4, 2016 at 6:45 AM, LemADEC notifications@github.com wrote:

We've found a better way to build the shield shape using Constructive Solid Geometry. This gonna be fun :)

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/LemADEC/WarpDrive/issues/112#issuecomment-216836417

CaptainMegavolt commented 8 years ago

Hey, just noting that Aidan C. Brady, the Mechanism developer, is making an updated ICBM mod called DefenseTech, which may also include shields at some point( but not at the moment)

LemADEC commented 8 years ago

I've tried the latest Mekanism and DefenseTech; the former remains a lag machine for clients (10+s not responding when opening your inventory is game breaking) and the latest is still fairly buggy. So, I'm not looking forward for his forcefield remake. The original ICBM is almost release and they've a forcefield coming up too, that one gonna be interesting...

CaptainMegavolt commented 8 years ago

Strange,I don't get lag when opening my inventory with Mekanism.

LemADEC commented 8 years ago

Force fields are now part of the mod. Hence closing.