Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 8 9 [10] 11 12

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

Kraiger

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #135 on: September 25, 2018, 03:21:32 pm »

Is there a convenient entity file lying around?
Logged
This is a masterful image of Machunguroho, Torchsilver, the alicorn, a dark iron bastard sword, a volcanic aurum battle axe, a felsteel heater shield, and an emerald golem. The golem has been struck down. Torchsilver is making a triumphant pose.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #136 on: September 26, 2018, 06:31:50 am »

Hey, I just realized that overrides work for ammo in flight too. Dragondeplatino mentioned it.

So, you can have bullets and cannonballs flying around, instead of arrows, if you want to.
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.5c: Experimental Wall Breaching
« Reply #137 on: September 27, 2018, 09:04:55 pm »

Sorry for being inactive for a bit, personal circumstances led to a temporary progress halt and my laptop has been down for the count too. Also been waylaid by a nautical side project.
Blast mining is indeed being considered, though I'm leaning ATM towards it being a workshop that can be loaded with varying levels of explosive as I've no experience with levers (but thefriendlyhacker's explosive support is intriguing and ingenious).
Destruction function now has z-level support and variable explosive size (though not yet in a circle) so Vordak's ideas will be possible, could be similar to cannon rotation whereby it can be set to explode radially or directionally with a reaction.
Appreciate all the idea discussion, it's a great help.

Is there a convenient entity file lying around?

I'm afraid not, the mod has injected the appropriate entity stuff into the existing entity file(s) for a while now so people who didn't have any experience with modding could disable weapons they didn't like.
All the stuff is in text files in scripts/musket/entity/ and would need to be manually cobbled together. You could also use musket-settings to modify the existing entity file(s) and copy out the stuff you need.
I'm curious and I'd like to be of more help, what did you need it for?
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #138 on: September 30, 2018, 06:57:21 am »

Alright, I got something presentable at last for both the ranged weapon script and the artillery script. Both are working as intended, I even got the organ gun to work satisfying. I ended up snubbing the job completion trigger entirely and just faking work completion timers with a timeout command, which lets me do some neat stuff like leading each organ gun barrel one by one with only one job set to repeat. It fetches some fairly basic properties per artillery type now, like rate of fire for multibarrel guns and reload times. It bases hitrate and reload rate on firer skill, a shoot force property the works exactly the same as vanilla ranged weapons and lets ranged-mod handle the remaining stuff like smoke and piercing effects. I still want to expand it a bit more to let me load them with stacks of ammunition rather than single items and add let the repeat jobs increase experience properly (and let botched job like a fire command that finds no ammo to fire NOT generate experience), but right now both scripts work well enough to let me finally update my main mod.

Pasties for ranged-mod and arty-mod respectively, more details in their -usage sections: https://pastebin.com/VZ0M5F6T https://pastebin.com/bq9kutS9

And a topic in the utils subforum: http://www.bay12forums.com/smf/index.php?topic=172239
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #139 on: September 30, 2018, 09:52:51 am »

*looks around*

*sees this quite impressive thing*

Impressive!

The talk on explosive mining reminds me of dwarven power mining bug with sky support.
I'm an idiot, I didn't realize gas cannister liquids had to have the [SYN_CONTACT[ or [SYN_INHALED] tags for them to have any effect. Makes chemical weapons pretty useless when used with almost all of the native liquids.

I guess I'll eventually have to try and add some raws for new ones and a maybe a laboratory to make them in. There are plenty of effects to choose from, but deciding on names and reagents will be difficult.
About this...Since modding stone boiling points post-embark works, I wonder whether temporarily tagging the syndromes with that in df.global.world.raws on explosion would work.

Though one may consider it undesirable.

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #140 on: October 01, 2018, 09:41:32 pm »

Alright, I got something presentable at last for both the ranged weapon script and the artillery script. Both are working as intended, I even got the organ gun to work satisfying. I ended up snubbing the job completion trigger entirely and just faking work completion timers with a timeout command, which lets me do some neat stuff like leading each organ gun barrel one by one with only one job set to repeat. It fetches some fairly basic properties per artillery type now, like rate of fire for multibarrel guns and reload times. It bases hitrate and reload rate on firer skill, a shoot force property the works exactly the same as vanilla ranged weapons and lets ranged-mod handle the remaining stuff like smoke and piercing effects. I still want to expand it a bit more to let me load them with stacks of ammunition rather than single items and add let the repeat jobs increase experience properly (and let botched job like a fire command that finds no ammo to fire NOT generate experience), but right now both scripts work well enough to let me finally update my main mod.

Pasties for ranged-mod and arty-mod respectively, more details in their -usage sections: https://pastebin.com/VZ0M5F6T https://pastebin.com/bq9kutS9

And a topic in the utils subforum: http://www.bay12forums.com/smf/index.php?topic=172239

I had a quick look when it released and was very impressed with all the stuff you added (I'll need to take another look for the pseudo-completion timer stuff which I missed).
Wish I had the intelligence to make (or even use) modtool-style scripts but I find them very confusing to work with.
Not had much time to play with it in game yet though which is a shame, looking forward to seeing the organ gun in action.

Stack-loading will be really useful for a fixed MG, was thinking of using a preservable magazine item but straight-up stack loading sounds better.
Not sure what to suggest for failed fire skill gain.
Do you know about setting job.expire_timer = 20 and job.flags.store_item = true to make the job expire rather than complete?
Just seemed like something that might be useful to you.

About this...Since modding stone boiling points post-embark works, I wonder whether temporarily tagging the syndromes with that in df.global.world.raws on explosion would work.

Though one may consider it undesirable.

Thanks, I just hope better modders than I continue to run with it. DF needs guns!
Tried a few things regarding venom: flipping syndrome contact bits (did nothing afaict), attempted to insert the needed line into the raws (crashed), couldn't get anything to work. Must have just been inexperience.
In the end I just used the mods settings menu to backup all creature raws and then edit any venoms it finds to work on contact. Not a great solution, but it was all I could do at the time.

Don't suppose you have an example of how you changed boiling points to hand? NP if not.
Your way would be far superior, not sure why one might consider it undesirable given it could presumably be changed back after the bang, you might have to explain your thinking on that one.
Logged

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #141 on: October 01, 2018, 11:16:37 pm »

Alright, I got something presentable at last for both the ranged weapon script and the artillery script.
...
I had a quick look when it released and was very impressed with all the stuff you added (I'll need to take another look for the pseudo-completion timer stuff which I missed).
Wish I had the intelligence to make (or even use) modtool-style scripts but I find them very confusing to work with.
Not had much time to play with it in game yet though which is a shame, looking forward to seeing the organ gun in action.
Heh, fun fact. I am also in the progress of writing a general purpose set of ranged scripts.  They have a shared back end that controls their ordering and passes tags between them so the individual scripts can communicate to each other.   It is still a WIP, but at the moment I have implemented variable rates of fire for hand-held projectile weapons (and it is done in a way that can mimic magazine fed weapons) and multi-shot projectiles.  All I have to do is write a third script that alters velocity (which should be easy) and I can replace all the glob projectile interaction based weapons in my mod with real bullets.
About this...Since modding stone boiling points post-embark works, I wonder whether temporarily tagging the syndromes with that in df.global.world.raws on explosion would work.

Though one may consider it undesirable.
...
Your way would be far superior, not sure why one might consider it undesirable given it could presumably be changed back after the bang, you might have to explain your thinking on that one.
I can probably answer that one.

Changing it's contact/inhale properties is only safe if Dwarf Fortress handles checks concerning contact/inhaled syndrome bearing mats in a stateless way.  If it does keep any sort of state, you run a serious risk of blundering into the programmer's equivalent of !!fun!!, undefined behavior.

Let me give an illustrative example. Lets say that the game mimics the effects of breathing without having to track it explicitly by keeping an array of counters and IDs for contact/inhale syndrome bearing materials that each creature is has recently been exposed to, and when a counter runs out the code for handling that syndrome is run again if the creature is still being exposed appropriately to that material.  Lets say you change a mat's syn to be inhaled, and expose a creature to it.  That creature now has a counter+ID for your mat.  Between it's initial exposure and the counter running out, you change it back to not inhaled.  When the counter runs out, the code that handles inhaled or contact syndrome bearing mats runs on something that has neither a contact or inhaled syn.  What happens? Well, it could assume anything passed to it is one or the other and check with a simple if (syn.inhaled==1) statement, thus treating your mat as contact and breaking any inhaled poisons you do this trick with some of the time.  It could check both types, return the default value of 0/null/false, which could result in correct behavior if 0/null/false is what the code returns if the syndrome isn't supposed to be applied any more...or it could crash the game on the spot by dereferencing a null pointer if it is always meant to return an object.  And of course the checks for if it is contact/inhaled at all could be within the code that gets executed when the counter runs out, meaning it is completely safe to pass that code whatever the hell you want.  Nobody but Toady knows.

This is why when reasonably possible you should try to change DF's memory such that the variables you are altering describe the in-game behavior you are trying to alter in its entirety.  That way, all you have to do is change the set of variables from one valid in-game state to another, and the game will continue to run with the new valid state.  Changing syndrome properties is not the sort of thing you should do when alternatives are possible, because creatures have a lot of data in them about what syndromes affect them, and you have to understand all of it to ensure that you aren't breaking the game in some weird to diagnose manner by changing the materials to something which conflicts with data that may be held within the data structure of individual creatures (or data held somewhere else, for that matter).
Logged
Fallout Equestria Redux - that's right, it's back

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #142 on: October 02, 2018, 03:27:33 am »

If it doesn't work, it doesn't work. Gotta use more complex options (such as tagging people caught in geographical location of the cloud with modtools/add-syndrome; note that DF creatures don't breathe all the time so deadly fog isn't guaranteed to hit the whole squad).

Beyond what thefriendlyhacker said (I find if I change something I shouldn't it almost always crashes, but I haven't written any mods) and more in line with editing the raws before worldgen, there's also that by making the syndromes contact ones changes their behaviour everywhere outside the gunshells (i.e. GCS venom pools become legitimate weapons) and such approach not getting other mods a player might use for venom-loading.

Changing stone boiling points is an old practice - here is a reference. I've seen it in mid-action on some dfma maps.

zilpin

  • Bay Watcher
  • 437 forever!
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #143 on: October 14, 2018, 03:02:19 pm »


Wall destruction is impressive.

I'll be watching this.
Logged

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #144 on: October 17, 2018, 11:35:28 am »

I just updated my own mod with some fixes including updated targeting that you might find to be of some use. The old one didn't account for floors existing when shooting up/down, and didn't consider fortifications as something it could shoot through. I also used dfhack.units.getUnitsInBox to get only units in potential range rather than iterating through every single unit on the map and sorted them by distance from the gun before checking other conditions.


I set the targeting bounding box in checkDirection to prevent it from having to recalculate that on every shot:
   gunTable[gun.id].muzzlePos = xyz2pos(gun.centerx, gun.centery - 1, gun.z)
   gunTable[gun.id].targetBox1 = xyz2pos(math.ceil(gun.centerx + range[2] * 0.82), gun.centery - 1, gun.z + range[2])
   gunTable[gun.id].targetBox2 = xyz2pos(math.ceil(gun.centerx - range[2] * 0.82), gun.centery - range[2], gun.z - range[2])

Hope some of that is of some use.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!

Forwe

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #145 on: October 17, 2018, 12:22:33 pm »

Hey, excuse me for a possibly stupid question, but does this mod work nicely with Adventure Mode? I mean, will Blunderbusses shoot in a cone and Machine Guns have short reload times, etc?
Logged

DWARFFRAWD

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #146 on: October 23, 2018, 12:01:12 am »

Can you add tilesets that work properly with this mod?

Or, can you teach how to make tileset to support this mod?
Logged

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #147 on: October 24, 2018, 06:37:54 pm »

Hey, excuse me for a possibly stupid question, but does this mod work nicely with Adventure Mode? I mean, will Blunderbusses shoot in a cone and Machine Guns have short reload times, etc?

No such thing as a stupid question, nothing was made with adventure mode in mind and so there are many oddities, but as best I can tell all the weapons still function properly they just don't look nearly as cool.
For example the lightning gun is one of the most script heavy weapons and whilst it works, you'll only see the lightning briefly if at all due to the differences in timescale between fortress and adventure modes.
I'd only recommend it if you really really want guns, your mileage may vary.

Can you add tilesets that work properly with this mod?

Or, can you teach how to make tileset to support this mod?

Sure, what tileset did you want me to add?

If you want to make a tileset work yourself, you'll want to navigate to "Dwarf Fortress/data/init/overrides.txt" and add:
Spoiler (click to show/hide)
after the other tileset definitions (lines beginning with [TILESET:).

Then you'll want to add:
Spoiler (click to show/hide)
Somewhere with the other overrides (not sure it matters where).
Logged

DWARFFRAWD

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #148 on: October 24, 2018, 07:19:21 pm »

Hey, excuse me for a possibly stupid question, but does this mod work nicely with Adventure Mode? I mean, will Blunderbusses shoot in a cone and Machine Guns have short reload times, etc?

No such thing as a stupid question, nothing was made with adventure mode in mind and so there are many oddities, but as best I can tell all the weapons still function properly they just don't look nearly as cool.
For example the lightning gun is one of the most script heavy weapons and whilst it works, you'll only see the lightning briefly if at all due to the differences in timescale between fortress and adventure modes.
I'd only recommend it if you really really want guns, your mileage may vary.

Can you add tilesets that work properly with this mod?

Or, can you teach how to make tileset to support this mod?

Sure, what tileset did you want me to add?

If you want to make a tileset work yourself, you'll want to navigate to "Dwarf Fortress/data/init/overrides.txt" and add:
Spoiler (click to show/hide)
after the other tileset definitions (lines beginning with [TILESET:).

Then you'll want to add:
Spoiler (click to show/hide)
Somewhere with the other overrides (not sure it matters where).


Oh, thanks for kind instruction. :D
Sorry for my insufficient explanation.
 
But i mean,
In readme file, it said this mod works only in ascii or meph graphic set.

Can i make it change to works with other graphic set?

I had played in ascii version but now i want to change graphic to spacefox.
« Last Edit: October 24, 2018, 07:26:50 pm by DWARFFRAWD »
Logged

zaporozhets

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #149 on: October 26, 2018, 06:47:21 pm »

Oh, thanks for kind instruction. :D
Sorry for my insufficient explanation.
 
But i mean,
In readme file, it said this mod works only in ascii or meph graphic set.

Can i make it change to works with other graphic set?

I had played in ascii version but now i want to change graphic to spacefox.

The problem is that the tileset included with the mod is at 32x32 resolution, whereas spacefox is 16x16.
You could try simply halving the resolution, but I had a quick go in GIMP and it looks pretty bad without retouching everything.
Ideally new graphics would need to be drawn for everything at that resolution, but I'm no artist and I'm finding free time a little hard to come by ATM to even make something as paltry as my ability would allow.
Sorry I can't be more help, I do want to add compatibility for smaller tilesets at some point.
Logged
Pages: 1 ... 8 9 [10] 11 12