Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 39 40 [41] 42 43 ... 61

Author Topic: [MODDING] 0.47.x General modding questions thread - lots of new stuff!  (Read 138363 times)

ArrowheadArcher

  • Bay Watcher
  • Obsessed with !!Carp!!
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #600 on: January 02, 2021, 02:22:20 am »

Not sure if this is a modding question, but I want to convert to 1 meter to cubic centimeters and vice versa for realism. I'm currently using this, but I don't know how accurate it is: http://www.endmemo.com/cconvert/cm3m.php

Another modding question would be how to get civs to use/make a material exclusively, like rock, bone, or bronze/copper for bronze age or prehistoric mods.

 
Logged

DarthRubik

  • Bay Watcher
  • Likes Rubik's Cubes for their colorful pieces
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #601 on: January 02, 2021, 03:27:36 pm »

Try changing the material line to CDI:MATERIAL:CREATURE_MAT:INORGANIC:DR_FIRE_IMMUNE_COATING:UNDIRECTED_VAPOR]

It should then form a cloud around them, but it will be inhaled/contact them immediately. With liquid glob it's probably not able to hit itself.

I did do that and just doing that causes the secret holder to sometimes inhale the vapor and get the syndrome.....But the solution to that is the following:

The syndrome that produces the vapor will also add an effect (it doesn't matter what it is) for 100 ticks (in my case I just removed the "CAN_SPEAK" tag).  That syndrome will have the same [SYN_IDENTIFIER:<whatever>] so that while the CAN_SPEAK is removed the inhalation doesn't go into affect.

It is a far from perfect system, but it is semi-functional......Thanks Eric Blank for pointing me in the correct direction.

As to ArrowheadArcher's question:

Not sure if this is a modding question, but I want to convert to 1 meter to cubic centimeters and vice versa for realism. I'm currently using this, but I don't know how accurate it is: http://www.endmemo.com/cconvert/cm3m.php

Another modding question would be how to get civs to use/make a material exclusively, like rock, bone, or bronze/copper for bronze age or prehistoric mods. 

I don't think it is meaningful to convert meters to cubic centimeters (unless I am misunderstanding something here?)  So I am not sure what the goal of that is.

As for the other question (this is my understanding, which may not be perfect):

Everyone has access to raw materials (except elves, which have some hardcoded logic): ie anything in the ground.

Then the [PERMITTED_REACTION] tags add reactions that an entity can use.  For instance dwarves have the following:

Spoiler (click to show/hide)

which lets them make steel.  But everyone can make iron stuff because they all have access to raw materials.

Like I said....I am fairly new to this, but I believe that is how that works
Logged

UristVanHelsing

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #602 on: January 02, 2021, 04:09:43 pm »

This is a noobish question as I have little to no modding experience beyond raws, but how do I trigger these new fancy interactions like summoning in-game? I assume I have to make my interaction and put it into a raw file, but I'm not sure how to use dfhack to cause it to trigger.
Logged
You could always spread it around and paint the floor of your house with the blood of your enemies.
You could very well go for a Christmas themed house, all green and red from blood and vomit. Deck the halls with spilled intestines. Fa la la la la, la la la la!

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #603 on: January 03, 2021, 03:25:33 am »

Does anyone know the actual numbers behind quality rolls for item crafting?
Toady offers some information with the SKILL_ROLL_RANGE token, but the information seems ambiguous/wrong:
Quote
[SKILL_ROLL_RANGE:<basic range>:<multiplier>]
   The skill roll is: random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1)
   random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11.
   The default multiplier is 5.
For the basic range to always be 1 or more, it'd need to be x+1.
It also doesn't account for attributes, which I know (at least in the past) have an effect on skills rolls, so either that's changed/it's not the case for raw-defined reactions/that information isn't included in the formula.
It also doesn't really mention what the skill roll actually amounts to in the end - when a roll turns up a value of 19, what does that actually mean in terms of the quality that's assigned?

The wiki also mentions that a series of dice rolls are made at successively higher difficulty levels to determine quality. Does that mean that there are multiple checks performed against higher and higher difficulties and the quality keeps rising until a check fails; or that a single check is made and that result is compared against a table to get the quality of the item, and the "series of rolls" bit just alludes to the fact multiple random rolls are included in that one check? (that information was added in this edit in 2016 without any comments about the source :c)

ArrowheadArcher

  • Bay Watcher
  • Obsessed with !!Carp!!
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #604 on: January 04, 2021, 03:23:43 am »

How do I make a reaction that checks to see the wear of an item, say for example clothes. Are there non-modding workarounds for this as well?
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #605 on: January 04, 2021, 06:15:04 am »

How do I make a reaction that checks to see the wear of an item, say for example clothes. Are there non-modding workarounds for this as well?

Not possible to my knowledge unfortunately having no basis on tokens or tags even though "fixing" is straightfoward depending on how you want to approach it, the best readily accessible option is to gather broken objects into their relevant refuse stockpile or guide them there with a dumping order.

Deconstructing a item into its components to be rebuilt is a common kind of modification. Excluding DFhack applicaton utilities for a finer scope of course.

Here's a old discussion about such a topic. with the innocence of another time. Using a interim reagent to draw material from is a good shout, like a "cloth repair kit" or something to make it more difficult.
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #606 on: January 04, 2021, 06:27:11 pm »

Does anyone know the actual numbers behind quality rolls for item crafting?
Toady offers some information with the SKILL_ROLL_RANGE token, but the information seems ambiguous/wrong:
Quote
[SKILL_ROLL_RANGE:<basic range>:<multiplier>]
   The skill roll is: random(basic range) + random((skill level * multipler)/2 + 1) + random((skill level * multipler)/2 + 1)
   random(x) returns a number between 0 and x-1, so basic range is always 1 or more.  The default is 11.
   The default multiplier is 5.
For the basic range to always be 1 or more, it'd need to be x+1.
It also doesn't account for attributes, which I know (at least in the past) have an effect on skills rolls, so either that's changed/it's not the case for raw-defined reactions/that information isn't included in the formula.
It also doesn't really mention what the skill roll actually amounts to in the end - when a roll turns up a value of 19, what does that actually mean in terms of the quality that's assigned?

The wiki also mentions that a series of dice rolls are made at successively higher difficulty levels to determine quality. Does that mean that there are multiple checks performed against higher and higher difficulties and the quality keeps rising until a check fails; or that a single check is made and that result is compared against a table to get the quality of the item, and the "series of rolls" bit just alludes to the fact multiple random rolls are included in that one check? (that information was added in this edit in 2016 without any comments about the source :c)

Measure of best guess is that its exactly the same as some of the activities like combat when it applies to doing a particular job such as herbalism, example chosen specifically because it is reliant and trains the memory mental attribute. The wiki tracks attribute linked jobs pretty comprehensively. I wouldnt pay any attention to the nitty gritty math as it has likely changed significantly but rather to the direct roll modifiers that deal in division malus still being applicable ontop of what you write out in your skill roll as all of the enclosed are actually proven to make your dwarf worse at workshop tasks.

Now if we must consider what is detractive, how exactly is it applied, does it entirely replace the affected reactions natural skill rolls per station, should we be writing out more detailed fields? Toady left it a little bit too vague on the functionalities but a possible clue emerges that it seems to be posessing a natural cap, which may determine that after 30 levels of default skill going way over legendary 15 more times the skill roll must find a purpose no longer operate.
Code: ("From String Dump") [Select]
<required_skill_ip_total>
</required_skill_ip_total>
Rolling it back to a much smaller number, it'd perhaps mean that a SKILL_IP of 2 through the modifier actively either maxes out or simply stops improving in terms of speed & quality, and to apply this logic also means that a certain attribute stops being beneficial after its cap, which is a more natural 11, which could very well fit into 0 - 5000 if taken in steps of 454 (though anybody's guess how to access it, it may be hardcoded that looms 'Always' process kinesthetic as a priority skill roll, so this field means nothing on a custom workshop)

Putting it together, basic range and modifier, works until skill level x, and attribute 454(xnum) with the +1's probably not counting for anything, probably expecting that being focused adds another *1 modifier like it makes dwarves more competent at combat.


I know i ask more questions than i answered, possibly got it all wrong but id like to thoroughly know and understand it too.

How i look and feel at the moment after reading back this mad collection of e-scribbles.
Spoiler (click to show/hide)
Logged

Bolverkr

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #607 on: January 05, 2021, 01:02:46 am »

I'm working on a bunch of spell-type acquired powers for adventure mode, and scrolling through the lot of them is becoming a hassle. Is it possible to categorize them like crafting reactions with the [CATEGORY:____] token? Is there a counterpart for interactions?
Logged

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #608 on: January 05, 2021, 01:48:22 am »

I dont believe there is any way to do that, no. I've been thinking about that becoming a growing problem in Spellcrafts with the ever-growing list of abilities, but the only way to cull the list is to make them temporary and require re-starting the syndrome with a permanent "Preparing" interaction. But, they take a few ticks before they show up in the list.

I have noticed they come in order of, i think, just the order they show up in the raws, so you can put them in a particular, memorable order.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

ArrowheadArcher

  • Bay Watcher
  • Obsessed with !!Carp!!
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #609 on: January 07, 2021, 01:11:23 am »

How do I make civ creatures instantly into adults? I've used this:

Code: [Select]
[BABY:0]
[CHILD:1]

in civ creatures raws to speed up adulthood in order to get more free labor, but I don't know if getting rid of BABY would make them adults as soon as they are born.
Logged

Atkana

  • Bay Watcher
  • [CURIOUSBEAST]
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #610 on: January 07, 2021, 02:21:13 am »

How do I make civ creatures instantly into adults? I've used this:

Code: [Select]
[BABY:0]
[CHILD:1]

in civ creatures raws to speed up adulthood in order to get more free labor, but I don't know if getting rid of BABY would make them adults as soon as they are born.
BABY and CHILD are both optional tags that define both that the creature has that life stage, and when that life stage ends. If you want creatures to instantly be born adults, simply don't give them a baby or child stage by not including those tags.
« Last Edit: January 07, 2021, 02:54:37 am by Atkana »
Logged

FantasticDorf

  • Bay Watcher
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #611 on: January 07, 2021, 03:09:01 am »

I dont believe there is any way to do that, no. I've been thinking about that becoming a growing problem in Spellcrafts with the ever-growing list of abilities, but the only way to cull the list is to make them temporary and require re-starting the syndrome with a permanent "Preparing" interaction. But, they take a few ticks before they show up in the list.

I have noticed they come in order of, i think, just the order they show up in the raws, so you can put them in a particular, memorable order.

It can be DFhacked, according to my sources in some veeery old modifications which have a complex wizarding and levelling up system. Applying the golden rule of good modding that if its already done, half the code work you're doing on your own will be done for you.

Checking that the Rose script change-class.lua(url going broadly to the 2014 thread) wont explode in your face or crash against modern DF internal restructures and not know what to do is a completely seperate matter.

Edit: Here's Rose's public debut of classes

« Last Edit: January 07, 2021, 03:48:36 am by FantasticDorf »
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #612 on: January 09, 2021, 06:57:04 am »

How do I make a reaction that checks to see the wear of an item, say for example clothes. Are there non-modding workarounds for this as well?
No such option unfortunately, otherwise I would have used it in my "unravel sock to thread" type reactions. DFhack might be able to access the wear-number of items.
Can limit "don't use if has improvement" though with [NOT_IMPROVED].
https://dwarffortresswiki.org/index.php/DF2014:Reaction#Modifiers
« Last Edit: January 09, 2021, 07:09:19 am by TomiTapio »
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884

ArrowheadArcher

  • Bay Watcher
  • Obsessed with !!Carp!!
    • View Profile
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #613 on: January 09, 2021, 03:30:29 pm »

Is it possible to make a reaction that repairs armor via the use of coal and bars? Could this also be done by the use cloth for clothes. This requires DFHack, as the raws can't check the wear of the item, but I think I can be directed to or find a script that can.
Logged

TomiTapio

  • Bay Watcher
  • OldGenesis since 2012
    • View Profile
    • My Flickr animal photos
Re: [MODDING] 0.47.x General modding questions thread - lots of new stuff!
« Reply #614 on: January 09, 2021, 07:39:56 pm »

Is it possible to make a reaction that repairs armor via the use of coal and bars? Could this also be done by the use cloth for clothes. This requires DFHack, as the raws can't check the wear of the item, but I think I can be directed to or find a script that can.
See the repair and resize reactions of this mod:
http://www.bay12forums.com/smf/index.php?topic=162300.0
Logged
==OldGenesis mod== by Deon & TomiTapio. Five wood classes, four leather classes. Nine enemy civs. So much fine-tuning.
47.05e release: http://dffd.bay12games.com/who.php?id=1538
OldGenesis screenshots: https://twitter.com/hashtag/OldGenesis?src=hashtag_click&f=image
My Finnish language file: http://dffd.bay12games.com/file.php?id=14884
Pages: 1 ... 39 40 [41] 42 43 ... 61