Bay 12 Games Forum

Please login or register.

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

Author Topic: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching  (Read 12854 times)

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4b (Now with ingame customization menu!)
« Reply #30 on: August 23, 2018, 07:54:00 am »

I take it this works with Meph's launcher thingy?

Should do. If you have any problems let me know.

Oh god.
DF. Dune Fortress.
Dont give me ideas.
(yes, i meant like a siege engine flamethrower, maybe triggered by a lever or pressure plate)

I know right. Fortress, Sietch, what's the difference really?

That might be best for a flamethrower actually, would stop most of the accidents with forest fires & immolation of friendlies if the "splash zone" was a controlled environment as well as side-stepping the range bugs and problems with inventory checking.
Cool (or very hot) idea, makes me think of the tunnel flamethrower in Metro 2033.

Not sure how feasible it is to implement support for levers and pressure plates, however.
It seems possible (looking at scripts/lever.rb) to poll the levers to see if they're pulled (and thus presumably plates) every 100 ticks to sort of achieve a native-like effect, but I don't yet know how I would go about linking the thing to one lever specifically without doing something silly like making the flammenwerfer a door.
Something hacky might have to be done like make it spawn a gear assembly building upon a "prepare for linkage" reaction, linking the lever to the assembly, if possible transferring its mechanism link to the 'siege engine', storing the lever id in a table for manual polling) and then removing the assembly it to allow native lever linking behaviour.

Hopefully someone smarter than myself can think of a better way before I bungle it.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [44.12] Musket-Mod v0.4b (Now with ingame customization menu!)
« Reply #31 on: August 23, 2018, 10:45:48 am »

Ask warmist. He made something like that looong ago, but it was never really released.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4b (Now with ingame customization menu!)
« Reply #32 on: August 23, 2018, 11:45:21 am »

...
also, if MottledPetrel is correct when he says that
you could change reload time and shot frequency with dfhack
I would be interested in knowing how. I've spent more hours than I'd like to admit going through the data structures, trying to find some cooldown variable.
...
As for the mechs, I'm not that well versed in raws but I'm pretty sure that's an interaction token, so it isn't actually relevant for bow/gun firing rate (though you can simulate a machinegun or whatever by just giving the creature an interaction)
I see. I vaguely remember reading a certain skill might have a bearing on fire rate, whatever it was could be temporarily manipulated to modulate the rate to the desired amount.
...
Sorry I couldn't be more helpful to return the favour.
Ooh, ooh, ask me, ask me, I know things!

The variable (Firing Unit).counters.think_counter is set whenever a ranged weapon is fired.  The variable is set to a number that is related to a creature's weapon skill (agility and ranged combat don't appear to do anything, haven't checked any other attributes), and will lie somewhere between 80 (dabbling) and 40 (an obscenely high legendary rating), with 48 being the practical limit for legendary weapon users.   Once set, the variable ticks down until it reaches 0, at which point the creature can fire again that tick.  Adjusting the think_counter variable of a creature with dfhack will directly adjust the time until the creature fires again.
Logged
Fallout Equestria Redux - that's right, it's back

SpeardwarfErith

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4b (Now with ingame customization menu!)
« Reply #33 on: August 23, 2018, 11:57:40 am »

Ooh, ooh, ask me, ask me, I know things!

The variable (Firing Unit).counters.think_counter is set whenever a ranged weapon is fired.  The variable is set to a number that is related to a creature's weapon skill (agility and ranged combat don't appear to do anything, haven't checked any other attributes), and will lie somewhere between 80 (dabbling) and 40 (an obscenely high legendary rating), with 48 being the practical limit for legendary weapon users.   Once set, the variable ticks down until it reaches 0, at which point the creature can fire again that tick.  Adjusting the think_counter variable of a creature with dfhack will directly adjust the time until the creature fires again.

holy crap, I remember looking at that counter. I never even bothered considering messing with it, I immediately assumed it was related to how long until the creature can get another thought. You, sir, are a life saver. This opens up so many possibilities...
Logged
The swordsman Smoma Acaltekud: Hello Ago. Life is, in a word, death.
The swordsman Smoma Acaltekud stabs you in the lower body with his iron scimitar, tearing apart the muscle and tearing apart the left kidney!
The iron scimitar has lodged firmly in the wound!

Battle Royale Mode: A DFHack Script

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [44.12] Musket-Mod v0.4b (Now with ingame customization menu!)
« Reply #34 on: August 23, 2018, 01:33:30 pm »

...

Miniguns.

Quick-fire crossbows.

Differences between bow types.

Awesome!
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #35 on: August 23, 2018, 06:21:49 pm »

Added blunderbuss and blunderbuss pistol (I'm still confused as to whether calling it a dragon is correct or not but hey-ho).
Feedback would be appreciated, not sure if I got the feel right with only 4 pellets. Was thinking about balance and performance.

Thanks for the info about Unit.counters.think_counter, thefriendlyhacker. So much potential for new weapons!
« Last Edit: August 23, 2018, 06:31:14 pm by zaporozhets »
Logged

MottledPetrel

  • Bay Watcher
  • If only I knew what was going on
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #36 on: August 23, 2018, 07:23:27 pm »

You can call it a dragon pistol, an in-game name doesn't have to be accurate to a pinpoint. Also, for people who aren't familiar with fire arms it would probably be like naming a standard flintlock pistol a 'musket pistol'.
Logged
Got any spare, broken (or actually working) RAWs? Come drop them off at Modded Hell and we'll try to patch them in poorly with all the other eclectic mods we have. After all, confliction is what we do best.

My Mods: Fungus Expansion

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #37 on: August 23, 2018, 08:53:50 pm »

...
Thanks for the info about Unit.counters.think_counter, thefriendlyhacker. So much potential for new weapons!
I was planning on writing a rate of fire script myself at some stage, when I wasn't busy with other stuff.  But if you want to beat me to it (and let me "borrow" it), I will not be complaining.
...

Miniguns.

Quick-fire crossbows.

Differences between bow types.

Awesome!
Not only that, but if the script kept track of when/how many times a creature fired recently, it would be possible to have burst weapons.  You could also combine it with the multi-projectile shot script zaporozhets has for fun things like quad barrel or mag fed automatic shotguns with appropriate reload delays.

If you wanted a work around for limited ammo capacity on high ROF weapons like miniguns that would burn through the ~50 round capacity of a quiver rather quickly, you could likewise use the multi-projectile shot script to turn an "ammo belt" projectile into multiple normal projectiles.  Combine with a hypothetical ROF script to taste.  Yes, I have put a bit of thought into this.

While I am posting, here is a question.  Would it work if you created more projectiles on a projectile weapon's impact to simulate a fragmentation explosive?  That was an idea I came up with a while back, but I never got around to looking into the implementation details seriously.
Logged
Fallout Equestria Redux - that's right, it's back

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #38 on: August 23, 2018, 11:42:06 pm »

I was planning on writing a rate of fire script myself at some stage, when I wasn't busy with other stuff.  But if you want to beat me to it (and let me "borrow" it), I will not be complaining.

I'm quite eager to get started on implementing inhalable chemicals to use in gas cannisters and adding directed flows, I wasn't really planning on going further with fire rates right now.
The way I thought of doing it was just setting the think_counter when projectile.distance_flown == 0 (after an ammo type check ofc). Should be super simple once appropriate values are figured out.
I made an automusket just for fun though. www.pastebin.com/cXPpTvjL


makes me long for a dieselpunk industrial warfare mod set in the future of the DF universe

I'd like to see what other people come up with really, I'm quite inexperienced so more things to reference would be great. Just general scripting practices, you know. I could see where I've done silly things.

While I am posting, here is a question.  Would it work if you created more projectiles on a projectile weapon's impact to simulate a fragmentation explosive?  That was an idea I came up with a while back, but I never got around to looking into the implementation details seriously.

I can't see why it wouldn't, but my foresight usually leaves much to be desired.
Would look and read great with some flow effects and a custom ammo for it "urist is caught in a burst of boiling iron" then "the iron fragment strikes urist in the lower body, tearing the guts!"
Just create a bunch of projectiles with a loop like the blunderbuss does (but onProjItemCheckImpact like the rocket launcher explosion) and use the rng to set their target_pos. And thanks again for sharing, it's one of those things that people have always said is impossible.
« Last Edit: August 24, 2018, 04:20:20 am by zaporozhets »
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #39 on: August 24, 2018, 01:27:57 am »

Ooh, someone's finally gone and done this.

thefriendlyhacker's info should also let me reduce firing rate of the handcannons and arquebusses I have laying around from way back which is arguably less exciting than making machine guns but will actually let me fit them in with armor and crossbows balance-wise. Soooo, cool!

I've been tinkering with the cannon, and I think it should be feasible to make a gun that just shoots solid cannonballs and grapeshot as well as an (also stationary) organ gun. (something something check the input item type and loop the projectile function a bunch of times)
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #40 on: August 24, 2018, 04:03:04 am »

thefriendlyhacker's info should also let me reduce firing rate of the handcannons and arquebusses I have laying around from way back which is arguably less exciting than making machine guns but will actually let me fit them in with armor and crossbows balance-wise. Soooo, cool!

My first thoughts were along the same lines; finally being able to balance modded ranged weapons with native ones is just as important a part of thefriendlyhacker's discovery, I'd be interested to see your decision on the bolts-to-bullets fired ratio.
I do hope to see people making UZIs and other crazy things, too.

I've been tinkering with the cannon, and I think it should be feasible to make a gun that just shoots solid cannonballs and grapeshot as well as an (also stationary) organ gun. (something something check the input item type and loop the projectile function a bunch of times)

Have you had any problems with it? I've not had anyone report bugs which is quite strange.
I know they sometimes try and fire through closed doors if the nearest enemy is behind (they don't yet check for buildings on a tile) but I want to know if I should make the make the pathing function parameter dynamic, so as to be more reliable in choosing a clear path (at the expense of more overhead).
Has it worked well enough for you?

I agree with your thoughts, seems very feasible! Were you thinking of making it fire item_ammo (item_ammos?), or use a different method of stopping trapcomp fire altogether?
A static organ gun is a rad idea, much better than the affront to native balance I posted above.
I'd like to do something similar but with a lower fire rate than an organ gun firing weak rockets that veer away and oscillate at random to make a katyusha/nebelwerfer/hwacha thingy as a more sane version of the rocket launcher.

I said it before, but I look forward to seeing the fruits of your tinkering.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #41 on: August 24, 2018, 04:16:30 am »

Have you thought about less RL weapons and more in the line of magic weapons? 

Staff of fireball = rocket launcher alternative that fits df.

Or spelltome of rock barrage = shotgun-like effect.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #42 on: August 24, 2018, 06:08:47 am »

Have you thought about less RL weapons and more in the line of magic weapons? 

Staff of fireball = rocket launcher alternative that fits df.

Or spelltome of rock barrage = shotgun-like effect.

It's not something that's popped into my head really, I'm afraid. Magic just doesn't seem too dwarfy to me is the only reason I can think of as to why that is. In my headcanon they're more like the gnomes out of Masterwork (without the nature stuff), all clockwork and industry. I just wanted them to have guns with muzzle smoke and the other stuff was a natural extension of that.

Some of the scripts might make interesting magic, the comparison has been made to me before when I showed the launcher to some people before release, but when the magic update drops and we get the real thing to play with, all this stuff will hopefully look like a cheap imitation.
I like the idea of moving towards the industrial and then having it clash with the native magic.

Plus I dread to think of the compromises that would have to be made in the raws and naming different types of 'power crystal' ammo and things like that.
I'm struggling with chemical weapon names as it is: "blistering gas", "choking gas", "sleeping gas", "nerve gas" etc. Just terrible. I wanted cool names but I'm so bad at it. ;D

Magic weapons would open up lots of possibilities for strange and exotic things, though, but I'll probably leave it to someone with more of a love for the magic stuff unless I come up with something I can't not make. I don't really see me converting this into a full-blown sorcery mod.

I'm sorry if that disappoints you, I know putting rocket launchers in DF is stupid as hell but I just couldn't help myself. I'm sure it'd be easy enough for you to convert things to your liking given you made Masterwork, but if you had any difficulties you could always ask here or shoot (npi) me a pm and I'd be more than willing to help.
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #43 on: August 24, 2018, 06:44:25 am »

Have you had any problems with it? I've not had anyone report bugs which is quite strange.
I know they sometimes try and fire through closed doors if the nearest enemy is behind (they don't yet check for buildings on a tile) but I want to know if I should make the make the pathing function parameter dynamic, so as to be more reliable in choosing a clear path (at the expense of more overhead).
Has it worked well enough for you?

I agree with your thoughts, seems very feasible! Were you thinking of making it fire item_ammo (item_ammos?), or use a different method of stopping trapcomp fire altogether?
A static organ gun is a rad idea, much better than the affront to native balance I posted above.
I'd like to do something similar but with a lower fire rate than an organ gun firing weak rockets that veer away and oscillate at random to make a katyusha/nebelwerfer/hwacha thingy as a more sane version of the rocket launcher.

I said it before, but I look forward to seeing the fruits of your tinkering.

The cannon so far worked without outright bugs (I hadn't come across any situation where buildings were in the way yet). The only oddity I had was my gunner persistently shooting to the bottom right with nothing there for some time but I suspect that was due to me sabotaging the hostility check (I didn't feel like waiting for a nicely grouped bunch of goblins to show up, so my own dwarves and some bards volunteered for projectile testing) perhaps causing it to target something it shouldn't be.

Some features I do miss is targeting being restricted to cannon orientation. My planning was to make a heavier, fixed bombard on a 3x3 building plot that would only rotate on manual command (using a building transform script), and a light 1x1 swivel-mounted gun that could fire in any direction. Having large guns be mostly fixed, defensive things you would generally place along a shooting gallery welcoming entrance, the building collision issue might only be problematic with raised bridges.

I'd say that if targeting being blocked by buildings and orientation-restriction are both impossible with the current targeting implementation, it might be worth going with something with more overhead. Its not like the targeting script it run that frequently.

One other feature I would appreciate is a separate load and fire command, which I could probably implement myself once I figure out how to make very short-duration reactions. Being able to have accurate commands at when and where guns fire would help a lot in keeping down the number of hilarious friendly fire incidents.

Also yes, I was planning on using the ammo item time for projectiles, mostly for storage sake and to make cannonballs and grapeshot cartridges not show up in the item list for trap construction. From what I've tested they behave mostly the same as projectiles and while firing sawblades is inarguably cool, the mod I'm working with has a historic accuracy/realism premise to it so I can't exactly do that. I will have to console myself with adding edged damage to cannonballs to make sure they get the proper amount of dismemberment going.

Speaking of historic accuracy, shotguns are actually contemporary to vanilla DFs time period (late 1300/early 1400), if we interpret 'shotgun' to mean any gun loaded with shot instead of ball ammunition. Loading handcannons and artillery with a bunch of small projectiles instead of one big one was apparently not a huge leap in logic.

Edit: I'm not sure what to make of these two lines in the cannon script:

output_items[0].skill_used = input_items[0].mat_type
output_items[0].sharpness = input_items[0].mat_index

« Last Edit: August 24, 2018, 07:38:09 am by Grimlocke »
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.4c (Now with ingame customization menu!)
« Reply #44 on: August 24, 2018, 09:50:37 am »

The cannon so far worked without outright bugs (I hadn't come across any situation where buildings were in the way yet). The only oddity I had was my gunner persistently shooting to the bottom right with nothing there for some time but I suspect that was due to me sabotaging the hostility check (I didn't feel like waiting for a nicely grouped bunch of goblins to show up, so my own dwarves and some bards volunteered for projectile testing) perhaps causing it to target something it shouldn't be.

Hopefully that is just your tinkering, the current version has a test fire reaction for firing on domestic animals that circumvents some or all of the hostility check.

Some features I do miss is targeting being restricted to cannon orientation. My planning was to make a heavier, fixed bombard on a 3x3 building plot that would only rotate on manual command (using a building transform script), and a light 1x1 swivel-mounted gun that could fire in any direction. Having large guns be mostly fixed, defensive things you would generally place along a shooting gallery welcoming entrance, the building collision issue might only be problematic with raised bridges.

Good suggestions, I'm looking into it. Rotating the building by setting its x1/y1 and x2/y2 fields isn't working out for me, have you cracked it?
I think I'd have to make the building delete itself and create another in the new direction due to how twbt works with the sprites anyway but I'd be interested to know how if you managed it.

I'd say that if targeting being blocked by buildings and orientation-restriction are both impossible with the current targeting implementation, it might be worth going with something with more overhead. Its not like the targeting script it run that frequently.

Yeah, orientation restriction should be easy and cheap, it's more the pathing check that checks a line of tiles between the cannon and every possible target that could be heavy if I increased the sample rate of tiles to make building checks worthwhile. The rate would have to be dynamic otherwise it would check the same tiles multiple times at close range and skip some at long range.

One other feature I would appreciate is a separate load and fire command, which I could probably implement myself once I figure out how to make very short-duration reactions. Being able to have accurate commands at when and where guns fire would help a lot in keeping down the number of hilarious friendly fire incidents.

This seems easy enough to implement too, I'll do it after I get 'rotation' working. Not sure about reaction duration, armoks-blessing makes firing the cannon much quicker so I'd look at what that's doing. Might be as simple as the level of the skill used.

Edit: I'm not sure what to make of these two lines in the cannon script:

output_items[0].skill_used = input_items[0].mat_type
output_items[0].sharpness = input_items[0].mat_index

You can ignore/remove them, it's a hacky way of storing the venom type for gas cannisters in unused fields. Will be removed when I add new chemicals that can be inhaled, I'll be making the shells out of the new materials directly. I tried doing that with venom, they instantly melted, I wrote a script to permafreeze the cannisters made out of venom, they wouldn't go into stockpiles. \_(ツ)_/
Logged
Pages: 1 2 [3] 4 5 ... 11