Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tank mod #12923

Merged
merged 14 commits into from Jul 22, 2015

Conversation

Projects
None yet
6 participants
@chaosvolt
Copy link
Contributor

commented Jul 13, 2015

I've been toying with and working on this idea quite a bit recently, as posts on other topics have hinted at. And having figured out how mod dependencies, I can use what'll be a Blazemod-dependant mod.

Vehicle Additions:

  1. Three different types of tank. There's the atomic mini-tank, the light tank, and the main battle tank.
  2. Tanks spawn, somewhat rarely, in the same vehicle groups that APCs use.

Item Additions and Tweaks:

  1. 120mm cannons. Rather than messing with the debug-only tankgun on the off change it's used for something, I instead made variants with the desired properties. Both are bulky, heavy, and must be mounted to use. You have a single-shot version, and one with a built-in autoloading mechanism. In practice this is reflected in how much volume for shells the mounted gun has. In addition to finding them on tanks, dismantling a tank drone will now yield the autoloading version.
  2. 120mm shells are available in a rare few item groups, and from its most notable user. Aside from no longer using the insanely-high price debug items use, they also gain a whopping 10 volume. They're now actually a separate item from the tankbot shells, in order to fix the ammo type's name so that I can add types beside HEAT at a later date.

Monster tweaks:

  1. Tankbots will drop at least a single 120mm shell on destruction, in addition to its usual spawns. Good luck farming them, it's hardly a sustainable way to get more ammo.
  2. As already mentioned, dismantling a broken tankbot will yield a 120mm cannon.

The extra stuff that would bloat this PR too much has been removed for the time being, to add in a later PR.

chaosvolt added some commits Jul 13, 2015

chaosvolt
Tanks Mod
This is something I've been messing with for a little while recently. It
was actually the source of a few recent vehicle part additions I cooked
up, due to a need for heavy-duty quarterpanels and another choice of
turret-friendly seating.

Vehicle Additions:
1. Three different types of tank. A light tank, a main battle tank, and
a rare atomic mini-tank.
2. Tanks spawn, somewhat rarely, in the same vehicle groups that APCs
use.

Item Additions and Tweaks:
1. Big beefy engines built for bulky [s]b[/s]vehicles. One is a
souped-up electric motor with a fixed 1200 displacement (and
correspondingly large power draw), the other is a diesel engine with
variable displacement of 1600-2400. This range is based off the
assumption that, if the game had a diesel equivalent to the V12, it
would have the same 800-1600 range. Either way, fuel cost is high and
so's the noise.
2. 120mm cannons. Rather than messing with the debug-only tankgun on the
off change it's used for something, I instead made variants with the
desired properties. Both are bulky, heavy, and must be mounted to use.
You have a single-shot version, and one with a built-in autoloading
mechanism. In practice this is reflected in how much volume for shells
the mounted gun has. In addition to finding them on tanks, dismantling a
tank drone will now yield the autoloading version.
3. 120mm HEAT shells have been tweaked some, in addition to being made
available in a rare few item groups, and from its most notable user.
Aside from no longer using the insanely-high price debug items use, they
also gain a whopping 10 volume.

Monster tweaks:
1. Tankbots will drop at least a single 120mm shell on destruction, in
addition to its usual spawns. Good luck farming them, it's hardly a
sustainable way to get more ammo.
2. As already mentioned, dismantling a broken tankbot will yield a 120mm
cannon.
chaosvolt
Update 2
Forgot a few things I'd left behind from earlier testing and other work.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

Also, as someone noted, being able to reuse 120mm tank cases for crude canister shot or other basic projectiles would be interesting, but I need info on what all is required to make such a thing. What would one use for the primer, for example?

EDIT: I could also further expand on this via adding 105mm guns, self-propelled artillery or other AFVs, installing/removing an autoloader if possible, etc.

@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Jul 13, 2015

What would one use for the primer, for example?

I'd think you'd have to manufacture your own, except for the fact that reloading tank shells is the sort of thing that should probably stay beyond the player's means.

I could also further expand on this via adding 105mm guns, self-propelled artillery or other AFVs, installing/removing an autoloader if possible, etc.

Are we becoming World of Tanks now?

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

Maybe. If there was a very high-level book for it, and all the Fun recipes booklearned-only, it might be feasible if the primer can be handmade.

Even then I'm not suggesting the player be able to make explosive shells. Canister shot and a big, nasty slug on steroids would be as complex as it gets.

EDIT 3: Doh! Found an example. It seems to be electric, if the image is correct: https://en.wikipedia.org/wiki/M829

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

Also, I was pondering an idea for an additional source code PR that would also be useful for this mod. Mainly, replacing the fixed spawning of military cargo trucks in certain areas (mainly checkpoints) with a vehicle group, allowing it to be moddable.

EDIT: In any case, I think I have a rough series of events that the player would need to puzzle out to make makeshift reloads:

  1. Remove the spent electric primer from the spent shell. This is not something the average person would know anything about, so if it's possible for uncraft recipes to be booklearned-only, it'll have to be.

  2. Restore the spent primer to usable condition. If it is electric like what info I've found suggests, this would be feasible instead of having to craft a makeshift electric primer. Either way it would need an understanding of how electric primers work, so booklearned AND requiring electronics skill.

  3. Replace the renewed primer in the used case, and add the required propellent and projectile. Propellent requirement would presumably be immense, though less so if using shot. No warheads though, as that would be stretching the boundaries of plausible. The player would be limited to makeshot canister and KET rounds, at most.

    3a. In fact, a hand press wouldn't have the molds needed to make a slug massive enough to use for a tank shell. You would have to handmake the slug through a separate recipe, THEN use it in the assembly recipe.

    3b. Shells are often stored dissembled to various extents for safety. The M830 120mm shell is an example that's notable for storing the propellent in a bag to add later. This implies the press function may in fact not be needed, other tools might be though.

  4. The resulting complete ammo would obviously be inferior to the proper shells, and even inferior to any purpose-made KET or canister rounds I add later on.

EDIT 2: Regardless of feasibility, it's understandable if this idea proves to be not a good thing to add.

@karlnp

This comment has been minimized.

Copy link
Contributor

commented Jul 13, 2015

considering how insane a prospect making small arms primer is, I suspect making tank shells is well beyond anyone's means who isn't a major manufacturing arm of an ammunition company.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

Possibly, yes. Maybe adding premade electric primers to military supplies and allowing the assembly of new rounds that way instead? Even then the player would need to remove the old primer, which is again doable but likely needs to be learned via book.

But again, it seems for modern shells, assembling from its components is a thing that can be done, but it's still specialized knowledge.

EDIT: In the meantime though, ensuring the existing additions are acceptable is higher up on my to-do list. In-between trying to stop failing at another PR ( #12926 ) that'd compliment this one, at least. ;_;

"color" : "light_cyan",
"symbol" : ",",
"material" : ["superalloy", "null"],
"volume" : 15,

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Jul 13, 2015

Contributor

"massive"? 15 volume?
Also, superalloy is light rather than tough. Hardsteel would fit better.

"description": "A 120mm cannon from a tank. Obviously it needs to be mounted on a vehicle to fire.",
"price": 90000000,
"material": "hardsteel",
"flags": ["NEVER_JAMS", "MOUNTED_GUN"],

This comment has been minimized.

Copy link
@Coolthulhu

Coolthulhu Jul 13, 2015

Contributor

As far as I recall, "MOUNTED_GUN" does nothing to prevent using it without having a vehicle attached.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 13, 2015

Ack. Hmm. What is the flag that prevents the M134 from being used

As for the electric motor, I based it off the enhanced motor, so either I forgot to tweak the volume, or didn't add enough.

EDIT: Oh. Well merde, it's the flag that controls needing terrain to fire. Doh.

EDIT 2: Oh! Blaze's turrets use a capacity of 0 on the item to make it unusable when in item form.

Chaosvolt and others added some commits Jul 13, 2015

Chaosvolt
Update 3
1. Beefed up weight and volume of supercharged electric motor.
2. Removed "mounted gun" flag from tank guns, and gave them a clip size of 0. This is what ensures the can't be fired uninstalled.
chaosvolt
Update 4
1. Added a self-propelled howitzer, with a 155mm main gun. It has a
different layout from the other Merkava-like vehicles, being designed
with the M109A6 in mind, aside from deviations due to lack of info and
the need to make a 2D vehicle.
2. Fixed some minor things like random bits of roofing in areas not
needing them.
3. Minor tweaks to make light tanks and howitzers have less fuel
capacity than the main battle tank.
4. Item group adjustment to allow 155mm shells to spawn, while being
rarer than 120mm.
5. Vehicle group assignment for the self-propelled howitzer.
6. Small addition that will allow tanks to spawn if a vehicle group
addition ( #12926 )
gets merged, ensuring tanks will use it right off the bat. If it doesn't
get merged before ( or doesn't get merged at all ), then the addition
does nothing and can be safely removed later on if required.
chaosvolt
Update 5
1. Whoops. 150 range is maybe a bit too much in game terms.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2015

Also pondering what other types of vehicles might be worth adding, if anyone had suggestions.

@karlnp

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2015

Forklift.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2015

I was tempted to suggest tractors, technicals, and other less tanky vehicles. Though I was pondering more armored fighting vehicles in particular, as right now the howitzer sticks out like a sore thumb as the only technically-not-a-tank. XP

EDIT: Though if I do add some things like that...ooh. Would it be feasible to mod mapgen files to spawn them in certain areas?

EDIT 2: Though, then again...we can't really make a forklift do any lifting.

@Zireael07

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2015

Forklift could work as an easily draggable equivalent to the wheelbarrow/cart.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2015

Not sure though. Thing is you can't use a vehicle to pick up and haul around furniture or any such thing. It could work as a vehicle with some form of cargo storage on the front, possibly detachable.

@karlnp

This comment has been minimized.

Copy link
Contributor

commented Jul 15, 2015

Really? Why not? I was thinking earlier how it was silly that I can't put a shopping cart into a pickup without disassembling it.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2015

I have no idea how one would code such a thing, sadly. ;-;

chaosvolt
Update 6
1. Added two more not-tanks. One's ye olde technical, the other is
something completely different, a tractor.
2. Tweaked modinfo due to there being more to the mod now than just
tanks.
3. Vehicle group entries for the new vehicles, and mapgen tweaks added
to test out the idea of spawning modded vehicles in other locations.
Mainly via bandit cabins sometimes having appropriate vehicles, and rare
appearances of a tractor at the ranch.

Once I figure out that forklift idea, I can think of a few good uses for
mapgen magic...
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2015

Tractors, whee. Now if only one could build tillers to churn up the ground with them...

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2015

Are we becoming World of Tanks now?

Don't tempt me. <3

chaosvolt and others added some commits Jul 16, 2015

chaosvolt
Mobile Gun System, 105mm cannons
1. Added a mobile gun system. Lightly armored, wheeled, uses a
remote-controlled 105mm cannon instead of a conventional turret.
2. 105mm cannons and ammo.
3. Gave the atomic mini-tank a 105mm gun instead of the 120mm gun.
Chaosvolt
City_vehicles vehicle group
1. KiwiTrinsic is PRing a change to vehicle groups that'll combine city_wrecks and city_parked, so adding that here. If/when it gets merged, I can then remove the city_wrecks definition on here, and if it isn't that's another easy fix.
chaosvolt
Forklift addition
1. Added an electric forklift, with pointy implements of low-capacity
storage. Find them at your local home improvement superstore or mall.
Forklifts! They've got what zombies crave!
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2015

Hmm. Still pondering the idea of new primers spawning in the right areas to allow an easily-restricted way to make more tank rounds. However, if I knew how easy/hard it is to replace electric primers for tank rounds...

EDIT: Meh, that can always be saved for another PR, I'd rather ensure the current additions are suitable for merging.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 18, 2015

...crap. I just discovered that it seems to be creating duplicate versions of the replaced mapgen areas that have the modded properties, and I can't figure out how to overwrite them.

EDIT: Ahah. Figured out how to mapgen-hax it to replace correctly.

chaosvolt
Mapgen Fixes and Bandit Bulldozer
1. A friend requested I added something with a flamethrower. Two words:
Bandit Bulldozer.
2. Fixed the issue with clones of the modded mapgen files occurring
instead of replacements. Bandit cabins and camps can correctly spawn the
array of bandit vehicles. Mall loading bays and home improvement
superstore back rooms can correctly spawn forklifts. And ranch barns can
correctly spawn tractors.
3. Technical tweaks, and I mean the vehicle. Turret has a seat for it,
and has symetrical fuel tanks.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 19, 2015

It tool an inordinate amount of rearranging just to give the bandit camp the chance of spawning just one larger vehicle. I could've ust shifted the spawn points and that'd be it, but I wanted the entrances and main grounds of the camp to be wide enough for it to be logical.

EDIT: Well, I was gonna mapgen-hax farms too, but it didn't works so well. Meh. I think I'm fined with it as it is. Also holy shit I've sextuple-posted? Scheisse.

chaosvolt
Bulldozer fix 1and mapgen fixes
1. Bulldozer ram now looks right.
2. Added a chance of finding forklifts in warehouses, alongside trucks.
@nyararan

This comment has been minimized.

Copy link

commented Jul 20, 2015

just to point out -

electric gun primers are MUCH easier to produce when compared to chemical primers in small arms

Essentially a electrical primer is just something that produces a spark inside the shell to set off the powder. If you can make a working toaster you can probably build a makeshift electrical primer for artillery shells. (then you just run a current through said shell and BOOM, working cannon :D)

https://en.wikipedia.org/wiki/Primer_%28firearm%29#Electric-primed (source)

if you want to know about the nightmare that is chemical primers for small arms:
https://en.wikipedia.org/wiki/Primer_%28firearm%29#Internal_priming
seriously, reloading small arms in cdda must have been done be magic... there is no real way to do so otherwise

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 20, 2015

Interesting, though if I DO add reloading shells, I'd rather start with assembling from re-primed cases, with added propellent and either a new shell or a makeshift handload.

For now though I want feedback on current content, I can always add shell handloads another PR. If this thing ever gets merged. XP

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2015

It's quite big, so a full review will take some time, but here are some suggestions:

  • Rather than adding a new engine type for each tank, give them multiple engines. This will also make them less loud.
  • Having 3 different tank calibers will make them hard to use. At the same time most of the rounds are nearly identical.
  • Description in ammo mentioning HEAT rounds only kinda limits it. A round could be high explosive, incendiary, armor-piercing etc.
  • The PR is huge, this will certainly (and did already) delay mergetesting. If you want it to be mergetested in some nearby future, you should split it up: start with just the vehicles that can be constructed using existing parts and their relevant vehicle groups, then add ones that require new parts, finally ones that require mapgen changes.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2015

Meep. Ah, sorry. And true, this PR is huge, plus it hasn't really been that long. Was more a lack of feedback that was worrisome. Thank you, then.

  • Multiple engines was somewhat inefficient, but I'll test how many V8s it takes to power an MBT. That would be odd given most tanks in reality tend to use larger engines rather than mulitple, far as I know. Still, could go with that.
  • I suppose toning it down to just one caliber of tank round would be viable, though I did like the idea of multiple weight classes, if you will, of cannon and ammo. Still, the only tank where what KIND of cannon is actually important is for the self-propelled howitzer. If I tone this PR down to literally just the 3 tanks, then I can figure how best to implement the howitzer later.
  • I originally wanted to overwrite the ammo type for 120mm to remove HEAT from its title, but that prompted a "duplicate ammo type" error. What I SHOULD do is make a separate ammo type for player-usable shells, and leave the tankbot ammo alone.
  • And...hmm. Issue with adding the vehicles that can be made using existing parts is that the tractor and bandit bulldozer are the only ones so far that can be made solely using already-existing parts, and both are rather dependent on mapgen changes to exist. However, reducing the number of new parts that tanks need to just the gun will make tanks either to implement.
@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jul 21, 2015

Tanks aren't exactly energy efficient IRL.

The problem with adding extra engine types is that we don't have good balancing for those. It doesn't make sense to make motorbikes with tank engines IRL, but here it does. We don't have a proper distinction between power, torque, output at given load etc., so a bigger engine is usually a straight upgrade over a smaller one. Even in tiny vehicles.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2015

Hmm. True. I'm working on trimming the fat from mod as we speak, with current content zipped up fpr later messing around with.

Will need to test the end result of splitting the engines, though.

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2015

Huh. Seems it has no trouble at all with splitting electric engines, so the atomic mini-tank won't have the issues with adjust the number of minireactors that I was afraid it'd have.

The light tank and MBT now have rather hilariously low acceleration.

EDIT: Huh. It seems the acceleration is related directly to max safe speed, so MOAR ENGINES is the solution yet again.

Chaosvolt
Back to Basics
Gentlemen, behold! I...er, this PR, has lost weight! With this!
*procures chainsaw*

1. Back down to just the 3 tanks. The other vehicles will be re-added in
a later PR.
2. 120mm ammo is now different from the kind tankbots use, so I can
change its ammo type name without any lunacy or load errors occuring.
3. Mini-tank has the 120mm auotloader gun again, as tank guns have been
pared down to basics for now. I might re-add 155mm in whatever PR
re-adds the howitzer, but the 105mm is still a tad redundant.
4. Instead of big custom engines the tanks now use multiple mundane
ones. This works absolutely fine for the mini-tank, but had to mess with
things to get the diesel tanks to not crawl at a snail's pace. They
still have similar performance as their imensely loud turbine versions,
but with higher fuel consumption.
5. Mapgen hax have likewise been removed. None of the tanks are
dependant on them to exist, unlike the civilian and bandit vehicles.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 21, 2015

There we go, should be more manageable I hope. ^^"

@nyararan

This comment has been minimized.

Copy link

commented Jul 22, 2015

more fun facts:

the volume of a cylinder, and hence a bullet/tank shell is denoted by π × r² × h

this mean an increase in caliber of 1.25 times original (100>122>155) works out to roughly a 1.8 times increase in damage

meaning a 155mm size gun has 3x more boom compared to a 100mm
also muzzle velocity and range increases because its calculated by π × r² × h / π × r² for muzzle velocity and a horrific equation that is used to calculate air resistance based on mass respectively

:P gun calibers mater cause they have powers :P

@Coolthulhu Coolthulhu self-assigned this Jul 22, 2015

@Coolthulhu

This comment has been minimized.

Copy link
Contributor

commented Jul 22, 2015

Main battle tank design is really confusing, especially considering that in ASCII display all armored parts have color of the armor. Its size makes it way worse.
Unarmored internals would help a bit. Currently all other military vehicles only have armored exterior.

There seems to be some sort of mismatch between ammo type and gun ammo type, because I couldn't load any of the tank guns with 120mm that spawn with them.

@Coolthulhu Coolthulhu removed their assignment Jul 22, 2015

@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 22, 2015

Ack. Okay, guess I'll tone down the armoring, and check what I did wrong for the ammo. O.o

EDIT: And will mess with the archived version's ammo stats.

EDIT 2: Ahah, I see what I screwed up with the ammo. I added a new ammo type and chaned the tank to spawn with that new ammo, but forgot to change what ammo type the tank guns use.

chaosvolt
Tank armor tweaks and cannon fixes
1. Made the interals of the tanks unarmored, to be consistant with other
armored vehicles in the game. General rule of thumb seems to be that,
with the exception of the commander's seat, if it has a roof it's not
getting armor.
2. Fixed the tank cannons. Turns out I changed the ammo type for the new
ammo and made it spawn in the vehicle, but forgot to change the ammo
type for the cannons themselves.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 22, 2015

Should I do anything else for visual tweaks? Also pondering whether or not to move the driver's camera controls to the commander's station, versus just giving all three important positions camera access (especially since now, more engines means more alternators and thus I can afford to add 1 more camera viewer).

Chaosvolt
Weight adjustment
1. Bumped up 120mm ammo's weight, due to some changes to ammo properties on the archived version.

@Coolthulhu Coolthulhu self-assigned this Jul 22, 2015

Coolthulhu added a commit that referenced this pull request Jul 22, 2015

@Coolthulhu Coolthulhu merged commit 311a2ca into CleverRaven:master Jul 22, 2015

1 check passed

default This has been rescheduled for testing as the 'master' branch has been updated.
@chaosvolt

This comment has been minimized.

Copy link
Contributor Author

commented Jul 22, 2015

Meep. And thank you for the merge. ^^

@chaosvolt chaosvolt deleted the chaosvolt:tank-mod branch Jul 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.