Bay 12 Games Forum

Please login or register.

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

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

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #150 on: October 27, 2018, 03:16:32 pm »

Hey zaporozhets, I found a bug in my multishot script, and I believe you have the same problem.

To demonstrate, load up arena and spawn two winged animal people in the air equipped with multishot weapons (e.g. the blunderbuss).  You should get a null variable error from the "pelletProjectile" variable.

Here is my fix.  I changed the variable names from what my script uses to what your 0.5b script uses.  Double check that I didn't screw anything up, then stick it just after you try to make a projectile out of a created pellet.
Code: [Select]
  --if pellet is created midair then dfhack "helpfully" makes it a falling projectile
  --this prevents the above call from creating a projectile, so we need to "borrow" the one dfhack made
  if pelletProjectile==nil then
    local projLink=df.global.world.proj_list
    repeat
      projLink=projLink.next
      if projLink~=nil then
        if projLink.item.item==pellet then
          pelletProjectile=projLink.item
        end
      else error("error - cannot create projectile from new item for unknown reason") end
    until pelletProjectile
  end
I noticed that you don't manually init every part of the created projectile, so you may want to go through and check that there isn't anything weird left over from the old falling projectile your code is overwriting.  Otherwise, the above snippet should fix the bug.

While I am here, I might as well make a suggestion.  At the moment you are using eventful.onProjItemCheckMovement to run your script.  If you do it this way, there is one tick in which the player can see the fired projectiles before your script runs.  If you instead iterate through the projectile list (like I did above) every tick using dfhack.timeout then the player won't see the seam between df's internal logic and your dfhack powered hack job and it will all look silky smooth.
Logged
Fallout Equestria Redux - that's right, it's back

Brody

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #151 on: November 06, 2018, 04:19:27 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.

Is there a way to use another tileset, and then just get this mod to pull in ASCII tiles? I'm wondering if thats the cause of the problem I'm having, which is I installed my tileset, and then brought in some of this stuff and tried to cut in the overrides, but all I can build is the Gunsmith shop, muskets, and flintlocks. I set most things as buildable, and I can assign them as military equipment, but it doesn't give me the option to build.

Edit: Now I've gone and fucked something up. What do I need to do to get the game to recognize the additions to the objects folder?
« Last Edit: November 09, 2018, 06:13:06 pm by Brody »
Logged

Metaltooth

  • Bay Watcher
  • Icon of Sin
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #152 on: November 10, 2018, 04:05:40 pm »

Ive installed the mod and enabled everything via DF hack but I cant get the weapons to spawn in the item test area. In fact i cant seem to find any guns or way to make a gunsmith in fortress mode.
Ive done as your instructions said and installed the mod and enabled it, generated a new world but i cant find guns or a way to build them. any ideas?
« Last Edit: November 11, 2018, 08:48:13 am by Metaltooth »
Logged
o̗͕̘̯͈̺r̬e̶̻̗̲̹m͎̘̹͓̦̼̟͝o͕̮̦R͇̥̻̭͟ ̕ņ̗h̪̰̱o̢J͚̬̲ ̧͍̫̜̲͔̺é̤̩̫m̗͍̘̟͖͠ l͇̫̪͖͓̰͝l̕i̮k̻͈̺̱̗ ͙̱̠̥̳̱̘t҉̪s̢͈u͙͉̘̮͘m̳̜̞̳̞̝ ̴͖̠̖̤͕̱u̱̬͚̗͍͞o̢y̴ ̶͚̝̳͇̞e̢̠m̥̤̳̙̣̙̭͢a͚̳̞͉̭g ̛͙e̤̫͉̜͉͘h̗̘̱̤͚͘t̜̺͕ ̴͙͍͉̮̯ņ̘͉̼͓̲ͅi̜̻̰̫̘̠͕w̧̲̘ ̧͔̯o̱̳̘T̗͖

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #153 on: March 06, 2019, 06:08:21 am »

Bump, because I'd really like to see a v1 version of this.
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 #154 on: March 20, 2019, 06:36:18 pm »

Bump, because I'd really like to see a v1 version of this.
I appreciate it.
Recently started working on this again after a leave of absence. Currently completely redoing the wall-breaching/destruction system; explosions now have better z-level support, they are now spherical rather than squared, and can be of any size/height. They now use raycasting rather than instantaneously coming into existence in their entirety, meaning that if a wall withstands a blast, anything behind the wall will survive it.

On a more technical note, some methods are finally being moved to a shared-functionality utility module, meaning less code repetition and easier to read scripts for modders.

Proper blast mining is next on the table, but I've also been thinking a lot about changing the way weapons are constructed, requiring additional tool components (maybe something like 'small mechanisms' or just 'barrels'), but ultimately allowing them to be made of either wood or metal, as thefriendlyhacker suggested back in September. This will solve the current material problems with allowing the other civs access to the guns.

Got some future features planned, but I want to keep them under wraps until I figure out if I can actually manage it, it'll also be necessary to have an easier way for people to disable the parts of the mod they don't like or don't think fit the setting of their game.

Edit:
Making progress on terrain destruction. Had some problems with the explosion algorithm when the terrain destruction parameter was set, with there being 5 seconds per explosion where the game would be frozen, but I've been working on optimizing it where I'm able.
The whole thing is now taking between ~0.01 and ~0.06 seconds for a small 3*3*3 explosion and between ~0.09 and ~0.12 seconds for a larger 5*5*7 one.

« Last Edit: March 26, 2019, 10:22:33 pm by zaporozhets »
Logged

Dragonslayerelf

  • Bay Watcher
  • Respectable Dwarf
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #155 on: June 05, 2020, 12:45:37 am »

Bump - are the current raws/scripts compatible with 47.04? I know not much changed between the two, but checking anyway.
Logged

Kraiger

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #156 on: June 16, 2020, 06:22:43 pm »

Aside from the bugs listed by others, it does appear to work in 47.04.
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.

Luckyowl

  • Bay Watcher
    • View Profile
    • https://imgur.com/a/Bjjtz.png
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #157 on: November 13, 2020, 05:55:49 pm »

Hey, looking to see if anyone can help me out on installing this script.
Logged

Iä! RIAKTOR!

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #158 on: November 26, 2020, 08:39:01 am »

How it looks in ASCII? Whats about making weapons from all bronze-grade metals/alloys?
Logged

Tachytaenius

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #159 on: April 24, 2022, 05:14:57 am »

Bump, because I'd really like to see a v1 version of this.
I appreciate it.
Recently started working on this again after a leave of absence. Currently completely redoing the wall-breaching/destruction system; explosions now have better z-level support, they are now spherical rather than squared, and can be of any size/height. They now use raycasting rather than instantaneously coming into existence in their entirety, meaning that if a wall withstands a blast, anything behind the wall will survive it.

On a more technical note, some methods are finally being moved to a shared-functionality utility module, meaning less code repetition and easier to read scripts for modders.

Proper blast mining is next on the table, but I've also been thinking a lot about changing the way weapons are constructed, requiring additional tool components (maybe something like 'small mechanisms' or just 'barrels'), but ultimately allowing them to be made of either wood or metal, as thefriendlyhacker suggested back in September. This will solve the current material problems with allowing the other civs access to the guns.

Got some future features planned, but I want to keep them under wraps until I figure out if I can actually manage it, it'll also be necessary to have an easier way for people to disable the parts of the mod they don't like or don't think fit the setting of their game.

Edit:
Making progress on terrain destruction. Had some problems with the explosion algorithm when the terrain destruction parameter was set, with there being 5 seconds per explosion where the game would be frozen, but I've been working on optimizing it where I'm able.
The whole thing is now taking between ~0.01 and ~0.06 seconds for a small 3*3*3 explosion and between ~0.09 and ~0.12 seconds for a larger 5*5*7 one.


This looks wonderful!
Have you considered making a general explosion script/function as a contribution to DFHack? "modtools/explode" would be wonderful. I was thinking of doing it but shouldn't reinvent the wheel.
Something like
Code: [Select]
local utils = require("utils")

local function explode(pos, intensity, incendiary)
-- what you have been working on
end

if #{...} == 0 then return explode end
local validArgs = utils.invert({
"position", -- DF position
"intensity", -- float
"incendiary" -- bool
})
local args = utils.processArgs({...}, validArgs)
if not args.position then
qerror("Position not specified!")
end
local pos = {x = tonumber(args.position[1]), y = tonumber(args.position[2]), z = tonumber(args.position[3])}
if not dfhack.maps.isValidTilePos(pos) then
qerror("Invalid position!")
end
if not args.intensity then
qerror("Explosion intensity not specified!")
end
explode(pos, args.intensity, args.incendiary)
which is based on "modtools/create-unit"
« Last Edit: April 24, 2022, 05:18:06 am by Tachytaenius »
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #160 on: April 24, 2022, 06:04:33 am »

How did I miss this... The firearms mod... It is fantastic!

The lack of proper ranged weapons is what made it hard for me to develop the "Fallout" total conversion mod in the past. This looks just fantastic, I will definitely look into it.

One simple question: what is your opinion on taking your mod, changing gun values and using them in a separate mod/total conversion? With full credit given.
I had thoughts about bringing DF Fallout back for a while now. Would you allow that?
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #161 on: April 24, 2022, 08:02:04 am »

How did I miss this... The firearms mod... It is fantastic!

The lack of proper ranged weapons is what made it hard for me to develop the "Fallout" total conversion mod in the past. This looks just fantastic, I will definitely look into it.

One simple question: what is your opinion on taking your mod, changing gun values and using them in a separate mod/total conversion? With full credit given.
I had thoughts about bringing DF Fallout back for a while now. Would you allow that?

Bit of a necro since the creator hasn't been online since the beginning of the global pandemic (2020) mind you, but this thread really is great. Im sure they'd probably impart their blessing if you were responsible with it, in any case there are supplimentary credits on the OP you could add commented out in any sort of personal published adjustment.

I especially like normal period or fantasy weapons with the smoke as a really well thought out touch to make the modded experience more novel. Or the idea that putting your spotter dogs over your walls might leave them open to grenadiers inadventently blowing apart your structures meaning you have to replace it with metal out of practicality. Its been on my list of things to poke at, but i struggle with finding niches to stick it in then sticking to seeing it through to the end.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #162 on: April 24, 2022, 09:38:50 am »

Thank you for the comment. I do remember the open source spirit of most utilities here, but I like to ask permission nonetheless, to demonstrate my goodwill.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Tachytaenius

  • Bay Watcher
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #163 on: April 24, 2022, 12:08:44 pm »

How did I miss this... The firearms mod... It is fantastic!

The lack of proper ranged weapons is what made it hard for me to develop the "Fallout" total conversion mod in the past. This looks just fantastic, I will definitely look into it.

One simple question: what is your opinion on taking your mod, changing gun values and using them in a separate mod/total conversion? With full credit given.
I had thoughts about bringing DF Fallout back for a while now. Would you allow that?

Bit of a necro since the creator hasn't been online since the beginning of the global pandemic (2020) mind you, but this thread really is great. Im sure they'd probably impart their blessing if you were responsible with it, in any case there are supplimentary credits on the OP you could add commented out in any sort of personal published adjustment.

I especially like normal period or fantasy weapons with the smoke as a really well thought out touch to make the modded experience more novel. Or the idea that putting your spotter dogs over your walls might leave them open to grenadiers inadventently blowing apart your structures meaning you have to replace it with metal out of practicality. Its been on my list of things to poke at, but i struggle with finding niches to stick it in then sticking to seeing it through to the end.

The necro was mine actually :P
I'm making a gun mod too and though I'm fully reinventing the wheel for most of it I wanted to see if the explosions code would be releasable and if they'd want to contribute it to DFHack where I'm sure it'd be welcome.
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: [44.12] Musket-Mod v0.5c: Experimental Wall Breaching
« Reply #164 on: April 24, 2022, 12:46:22 pm »

Do you make it in free time whenever, or do you have an approximate ETA when you plan to release it?

I won't rush the mod I am working on, so it will take a while. If you are around with more ideas/extensions to the system, I could use either if you also give a permission.
I'm back at it, and currently I foresee hours of trying to balance "a pistol" vs "a rifle" vs "a typical armor" :D.

The best part of THIS mod is ability to change the shooting rate of guns. It is something that always made melee better.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository
Pages: 1 ... 9 10 [11] 12