Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Okay I haven't modded in years, maybe a little help?  (Read 1815 times)

JakeSlayer

  • Bay Watcher
    • View Profile
Okay I haven't modded in years, maybe a little help?
« on: February 15, 2019, 07:45:34 pm »

Okay as of right now how does modding ranged weapons work? MAXVEL, SHOOTFORCE, ect, ect
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #1 on: February 15, 2019, 08:07:19 pm »

SHOOTFORCE is the momentum imparted to launched projectiles.

MAXVEL is the maximum velocity of a launched projectile (velocity is capped so feather wood bolts don't turn into railgun rounds).
Logged
Fallout Equestria Redux - that's right, it's back

JakeSlayer

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #2 on: February 15, 2019, 10:21:43 pm »

Okay. Does ammo stats affect damage in any way? Ergo would a larger projectile do more damage and a smaller one stab in more (for instance if I made a gun that shot a ball that was 50 VS a blunderbuss that fired a fistful of shot that was 3x as large (150) would that change how the damage worked?
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #3 on: February 16, 2019, 03:58:31 am »

Okay. Does ammo stats affect damage in any way? Ergo would a larger projectile do more damage and a smaller one stab in more (for instance if I made a gun that shot a ball that was 50 VS a blunderbuss that fired a fistful of shot that was 3x as large (150) would that change how the damage worked?
Yes, ammo affects damage. Essentially, projectiles are treated like any other attack, except the momentum of the attack is determined by the weapon's force and max velocity properties instead of the strength and skill of the wielder. Thus, the stats of the ammunition matter as much as they matter for an axe or a spear.
Logged
Fallout Equestria Redux - that's right, it's back

JakeSlayer

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #4 on: February 16, 2019, 10:08:00 pm »

Okay so is that related more by size or the specific attacks of the ammo? Like if the shot is 150 will it hit more but punch through less then then ball at 50 which would pierce more but hit less?
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

Sver

  • Bay Watcher
  • An army marches on its oiling and waxing
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #5 on: February 17, 2019, 04:02:23 am »

Formulae from the wiki:
Quote
Ranged Weapon Momentum: M = (w_density*w_size)/10^5 * min(10^5*(SHOOT_FORCE/20)/(w_density*w_size), SHOOT_MAXVEL/10)

(Vanilla) Bow and Crossbow Momentum: M = (w_density*150)/10^5 * min(10^5/(w_density*3), 20)
If 20 is smaller because the ammunition is density 1666 or less, M = w_density*3/100 = w_density*0.03
If 20 is larger because the ammunition is density 1667 or larger, M = 50

(Vanilla) Blowgun Momentum: M = (w_density*20)/10^5 * min(10^5/(w_density*4), 100)
If 100 is smaller because the ammunition is density 250 or less, M = w_density/50 = w_density*0.02
If 100 is larger because the ammunition is density 251 or more, M = 5

where:

M is the momentum.
w_density is the ammunition's density
w_size is the ammunition's size
SHOOT_FORCE is the ranged weapon's SHOOT_FORCE constant, which is used to determine its maximum momentum.
SHOOT_MAXVEL is the ranged weapon's SHOOT_MAXVEL constant, which is used to determine its maximum velocity, where ammo momentum = ammo mass * ammo velocity.

In short, to shoot heavier ammo effectively the weapon needs a higher SHOOT_FORCE. To shoot lighter ammo effectively it needs a higher SHOOT_MAXVEL. In the end, the ammo size doesn't matter all that much on itself. However, the attack properties of ammo matter quite a bit:

Quote
An edged attack undergoes the following comparison:

M >= (aSY/wSY + (A+1)*aSF/wSF) * (10 + 2*a_quality) / (Sha * w_quality)

where:

aSY is the armor's SHEAR_YIELD, which is based on its material
wSY is the ammo's SHEAR_YIELD, which is based on its material
aSF is the armor's SHEAR_FRACTURE, which is based on its material
wSF is the ammo's SHEAR_FRACTURE, which is based on its material
A is attack contact area
Sha is ammo material sharpness multiplier (1x for most metals, 1.2x for divine metal, 1.5x for glass, 2x for obsidian, 10x for adamantine and 0.1x for all other materials)
w_quality is ammo quality multiplier (1x for normal quality, 1.4x for fine, 2x for masterwork, etc.)
a_quality is armor quality multiplier

In general, smaller area equals better piercing, but less bleeding and/or torn limbs; ammo with a higher area also seems more likely to get damaged at hit. Higher penetration value is always better than a lower one.
« Last Edit: March 02, 2019, 10:42:17 am by Sver »
Logged
DF Combat Reworked
No overpowered force transfer, no easy life without a kidney, more functional variety among the weapons and other improvements.

JakeSlayer

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #6 on: February 17, 2019, 08:09:45 pm »

Okay here's a new type of question. I'm trying to make Kobolds playable but I can't figure out how to give them more primitive weapons like outta stone or wood. Is there a way to do so? I have been forced to give them up too iron smithing to allow them weapons of any kind but obviously, I don't really want to go past bronze as that kinda takes away from the early civ feel.
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

LeoCean

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #7 on: February 18, 2019, 04:37:27 am »

You could check out mephs tiletset it has options in the launcher that'd give them certain types of weapons to use. To make them harder or easier to deal with (I can't remember if it had kobolds but it had elves and goblins, giving kobolds wood or iron weapons wouldn't be that hard if you check the raws, however I don't think it included ranged weapons) He also created stone weapons.

Spoiler (click to show/hide)
Logged

JakeSlayer

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #8 on: February 19, 2019, 01:14:36 am »

I was attempting to make it all without borrowing from other modders...in the sense on copy/paste I DO want/need help honestly.
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #9 on: February 19, 2019, 12:07:09 pm »

Okay here's a new type of question. I'm trying to make Kobolds playable but I can't figure out how to give them more primitive weapons like outta stone or wood. Is there a way to do so? I have been forced to give them up too iron smithing to allow them weapons of any kind but obviously, I don't really want to go past bronze as that kinda takes away from the early civ feel.
Unless you give them the tag that allows for vanilla elves to have wood weaponry: [WOOD_WEAPONS] and [WOOD_ARMOR]. Unless you make a fake metal called "bone" or "rock" (which will then be possible to melt down), plus a reaction that produces it (doesn't need any reagents, just the metal as a product) you can't have civs carry around bone or rock equipment.

Mind you, however, that only matters for invaders/worldgen armies/npcs in general. If you want to have a kobold fort that is playable, you can just make a reaction that produces stone hammers or whatever pretty easily. However, you will only see them in your fort and only there.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

JakeSlayer

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #10 on: February 19, 2019, 10:41:30 pm »

Alright thanks to everyone who has helped me so far, it actually means a lot to me. I used to do this a lot and even planned to release my personal modifications out into the web by large. My next question is is there a way to add custom workshops? Like a gunshop or an armorer or such?
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

thefriendlyhacker

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #11 on: February 19, 2019, 11:06:41 pm »

Alright thanks to everyone who has helped me so far, it actually means a lot to me. I used to do this a lot and even planned to release my personal modifications out into the web by large. My next question is is there a way to add custom workshops? Like a gunshop or an armorer or such?
Yes.

See Here

Here is a gunsmith's workshop, for example.
Code: [Select]

[BUILDING_WORKSHOP:FORGE_GUNSMITH]
[NAME:Gunsmith's Forge]
[NAME_COLOR:4:0:1]
[BUILD_LABOR:MECHANIC]
[BUILD_KEY:CUSTOM_SHIFT_F]
[DIM:3:3]
[WORK_LOCATION:2:2]
[BLOCK:1:1:1:1]
[BLOCK:2:1:0:1]
[BLOCK:3:0:0:0]
[TILE:0:1:8:'+':'+']
[TILE:0:2:'+':'+':140]
[TILE:0:3:146:'+':'+']
[COLOR:0:1:7:0:0:7:0:0:7:0:0]
[COLOR:0:2:7:0:0:7:0:0:6:0:0]
[COLOR:0:3:7:0:0:7:0:0:7:0:0]
[TILE:1:1:8:'+':'+']
[TILE:1:2:229:'+':'+']
[TILE:1:3:146:'+':'+']
[COLOR:1:1:7:0:0:7:0:0:7:0:0]
[COLOR:1:2:7:0:0:7:0:0:7:0:0]
[COLOR:1:3:7:0:0:7:0:0:7:0:0]
[TILE:2:1:8:154:'+']
[TILE:2:2:229:'+':209]
[TILE:2:3:146:'+':'+']
[COLOR:2:1:7:0:0:7:0:0:7:0:0]
[COLOR:2:2:7:0:0:7:0:0:7:0:0]
[COLOR:2:3:7:0:0:7:0:0:7:0:0]
[TILE:3:1:8:154:128]
[TILE:3:2:229:210:209]
[TILE:3:3:146:'+':251]
[COLOR:3:1:7:4:0:7:0:0:7:0:0]
[COLOR:3:2:7:0:0:7:0:0:7:0:0]
[COLOR:3:3:7:0:0:7:0:0:7:0:0]
[BUILD_ITEM:1:ANVIL:NONE:NONE:NONE][CAN_USE_ARTIFACT]
[BUILD_ITEM:1:TRAPPARTS:NONE:NONE:NONE][CAN_USE_ARTIFACT]
[BUILD_ITEM:1:CHAIR:NONE:NONE:NONE][CAN_USE_ARTIFACT]
[BUILD_ITEM:1:TABLE:NONE:NONE:NONE][CAN_USE_ARTIFACT]
Logged
Fallout Equestria Redux - that's right, it's back

LeoCean

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #12 on: February 20, 2019, 07:03:22 am »

Borrowing from other modders isn't that weird, at least the workshops and reactions (creating weapons) and all that, is going to have the same finished product, it can't be stealing. At least if it isn't something unique(like mephs extra banners or stuff and actual tiles, but the txt buildings/weapons I'd really doubt it). If you stole their scripts then sure, you'd probably want to ask for permission.
Logged

JakeSlayer

  • Bay Watcher
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #13 on: February 20, 2019, 09:50:40 pm »

I know it isn't all that weird it's just a personal preference. Even when I was FAR more active in the community I preferred to add a more personal touch to my things. A new question and I'm kinda tinkering with it. How do egg-laying civs work in fort mode? Is one of my Kobolds just gonna explode eggs one day or will it work differently? Should I be changing them to just live births with a high chance of multiple-litters? Do the couples require bedrooms? And two questions this time or rather three I suppose...Is there a way to mod in a "slave" race for another race ERGO A "slave human" for the goblins? And is there a way to make a DRASTICALLY varying race? Ergo say a small, weak version and a big strong version?
Logged
VALLHALLA HUNGERS!!!
-JakeSlayer

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Okay I haven't modded in years, maybe a little help?
« Reply #14 on: February 21, 2019, 09:57:53 am »

I know it isn't all that weird it's just a personal preference. Even when I was FAR more active in the community I preferred to add a more personal touch to my things. A new question and I'm kinda tinkering with it. How do egg-laying civs work in fort mode? Is one of my Kobolds just gonna explode eggs one day or will it work differently? Should I be changing them to just live births with a high chance of multiple-litters? Do the couples require bedrooms? And two questions this time or rather three I suppose...Is there a way to mod in a "slave" race for another race ERGO A "slave human" for the goblins? And is there a way to make a DRASTICALLY varying race? Ergo say a small, weak version and a big strong version?
No couples require bedrooms for any race to have kids. All that is required is for two intelligent creatures to be of different genders and married. For egg-layers, the female will require a nest box before having any eggs. That's it.

Multiple litters does nothing for egg layers, since clutch number is its own token.

I suppose your "slave" creatures would work just like vanilla trolls do, so look at them.

I don't understand your final question.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?
Pages: [1] 2