Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Urist Da Vinci

Pages: 1 ... 22 23 [24] 25 26 ... 169
346
DF Modding / Re: tissues, organic metaloids, ractions, and body parts.
« on: March 29, 2014, 11:30:47 pm »
What does the body detail plan for the eyes currently look like?

Remember your eyes are all [CATEGORY:EYES]

347
DF Modding / Re: tissues, organic metaloids, ractions, and body parts.
« on: March 29, 2014, 04:05:24 pm »
...
*** Error(s) finalizing the template BLODHSTRAND
BLODHSTRAND:Unrecognized Material Token: MATERIAL_TEMPLATE
...

Yeah. I dont have the slightest clue why this is happening.
...

[TISSUE_TEMPLATE:BLODHSTRAND]
   [TISSUE_NAME:Blodhstrand:NP]
   [TISSUE_MATERIAL:MATERIAL_TEMPLATE:BLODHSTRAND_TEMPLATE]
   [HEALING_RATE:15]
   [THICKENS_ON_STRENGTH]
   [SCARS]
   [RELATIVE_THICKNESS:2]
   [NERVOUS]
   [PAIN_RECEPTORS:7]
   [CONNECTS]
   [INSULATION:80]
   [TISSUE_SHAPE:STRANDS]
...

If you look at the default tissue templates, you see things like [TISSUE_MATERIAL:LOCAL_CREATURE_MAT:SKIN].
It is also valid to use materials like [TISSUE_MATERIAL:INORGANIC:BRONZE].

So if I put [TISSUE_MATERIAL:LOCAL_CREATURE_MAT:DERP] into a tissue template, I would have to add [USE_MATERIAL_TEMPLATE:DERP:SOAP_TEMPLATE] to the creature's raws.

348
Updated the OP script to not show layers if there was a zero quantity of that item in the butchering results. This makes some of the lists easier to read.

Here is a modified version of the script that only works on corpse or body part items.

Code: (butcherItem.lua) [Select]
--Calculates butchering results. Alpha version. Target a dead corpse item or body part item.

item=dfhack.gui.getSelectedItem()
if item==nil then
print ("No item under cursor!  Aborting!")
return
end

itemtype=-1
if item:getType()==23 then
itemtype=23
itemname="CORPSE"
end
if item:getType()==45 then
itemtype=45
itemname="CORPSEPIECE"
end
if itemtype==-1 then
print ("Not a valid item!  Aborting!")
return
end

print(itemname, df.global.world.raws.creatures.all[item.race].creature_id, df.unit.find(item.unit_id).name.first_name)
print("Creature size (base, current): ", item.body.size_info.size_base, item.body.size_info.size_cur)
totalvol=0
totalbone=0
missingparts=0
testrecord={}

bodyinfo=df.global.world.raws.creatures.all[item.race].caste[item.caste].body_info

for partnum,v in pairs(bodyinfo.body_parts) do
for layernum, vv in pairs(v.layers) do
--START MAIN LOOP

partsize = math.floor(item.body.size_info.size_base * v.relsize / bodyinfo.total_relsize)
modpartfraction= vv.part_fraction
partname = v.name_singular[0].value
layername = vv.layer_name

if layername == "FAT" then
--currently can't link to or check tissue flags, so can't see if custom tissue resizes based on stored energy
modpartfraction = item.stored_fat * modpartfraction / 2500 / 100
end

if layername == "MUSCLE" then
--should update to consider strength bonus due to curses etc.
modpartfraction = item.body.physical_attr_value.STRENGTH * modpartfraction / 1000
end


volume = math.floor(partsize * modpartfraction / v.fraction_total)
totalvol=totalvol+volume
finalresult = math.floor(volume/2500)

if volume < 26 and (partsize < 26 or vv.flags.CONNECTS==false) then
--this is an approximation of the actual game code
finalresult=0
else
if finalresult < 1 then
finalresult=1
end
end

--is layer or part missing? in actual code this was checked earlier?
if item.body.components.body_part_status[partnum].missing==true then
finalresult=0
missingparts=1
end
if item.body.components.layer_status[vv.layer_id].gone==true then
finalresult=0
missingparts=1
end

if layername == "BONE" and v.flags.TOTEMABLE==false then
totalbone=totalbone+finalresult
end

if testrecord[layername]==nil then
if finalresult>0 then
testrecord[layername]=finalresult
end
else
testrecord[layername]=testrecord[layername]+finalresult
end

--END MAIN LOOP
end
end

print(" ")
printall(testrecord)
print("Bone (minus skull):", totalbone)
if missingparts==1 then
print("BODY IS MISSING SOME PARTS OR LAYERS (i.e. combat damage)")
end
print(" ")

I am not quite sure what people would use this for. Prioritizing recovery of slain enemy war animals for butchering?

349
Oh, so this is a translator between english to the languages defined in the raws? From the thread title I thought it translated from english to "Tarn Adams language". Like, someone took the devlogs or df talk transcripts and analyzed them for word usage.

350
Well, other than the fact that the migrants will probably all be drained of blood quickly and that everyone will die quickly,...

Only if they sleep in an unsecured area. Having done a vampire fort test before, if the vampires go a while without drinking, they will all dogpile the first migrant who sleeps. It is hilarious to see the entire fort pack themselves into the poor migrant's bedroom.

351
DF Dwarf Mode Discussion / Re: Fortress Depth
« on: March 27, 2014, 08:56:23 pm »
In my best fortresses, I made a starter dwelling underground near the surface, but away from where I wanted the main fort to be. The starter fort would later be repurposed or abandoned as the main fort came into existence.

352
DF Dwarf Mode Discussion / Re: An interesting occurance
« on: March 26, 2014, 02:25:58 am »
Falling 26 z-levels in open air, which takes 40 ticks (time units) to accomplish, causes creatures to explode. Falling in water will cause them to slow down.
I can still explode things? Awesome. Now I have to build a fortress with the sole purpose of covering the ground in blood.

If ANY "new projectile", such as a dropped/dumped item, minecart, or projectile "shotgunned" from a minecart hits a creature and the item is heavier than the creature, the creature will be propelled as fast as the object was going. If the item is fast enough and there is a wall/floor close by, the creature can hit it and explode.

To recap: If you chuck a heavy boulder from 30z up, it can land on someone and cause them to explode. Same thing happens if you pinch someone against a wall with a heavy supersonic minecart.

353
Utilities and 3rd Party Applications / Re: DFHack 0.34.11 r3
« on: March 26, 2014, 02:18:02 am »
creature_raw.tissue (i.e. world.raws.creatures.all[123].tissue) - which currently has USERDATA listed
https://github.com/angavrilov/df-structures/blob/master/df.creature-raws.xml#L1100

Current tissue_template struct (for reference)
https://github.com/angavrilov/df-structures/blob/master/df.creature-raws.xml#L1272

We sort of guessed that the creature-specific tissue info was stored in creature_raw. The format of the data currently covered by the USERDATA is very similar to tissue_template, except that it is 0x120 long instead of 0x110. The extra 0x10 in length is inserted as follows:
Code: [Select]
offset size field type field name
0xf0 0x2 int16_t tissue_mat_state (unchanged from tissue_template)
0xf4 0x2 int16_t UNK?
0xf6 0x2 int16_t HEATDAM_POINT
0xf8 0x2 int16_t COLDDAM_POINT
0xfa 0x2 int16_t IGNITE_POINT
0xfc 0x2 int16_t MELTING_POINT
0xfe 0x2 int16_t BOILING_POINT
0x100 0x2 int16_t SPEC_HEAT
0x102 0x2 int16_t UNK?
0xf4 0x1c stl-string tissue_shape_str (offset increased by 0x10 from tissue_template)

Otherwise the data is a straight copy of the format of tissue_template (from 0x0 to 0xf0)

354
DF Dwarf Mode Discussion / Re: An interesting occurance
« on: March 25, 2014, 11:05:46 pm »
Falling 26 z-levels in open air, which takes 40 ticks (time units) to accomplish, causes creatures to explode. Falling in water will cause them to slow down.

We know almost all the mechanics behind the new 3D velocities - the information is just scattered across a dozen forum posts here and there.

355
I know some mods use it heavily (mine for one), it is interesting to know.

EXTRA_BUTCHER_OBJECT appears to drop items in a 1:1 relationship with the number of host organ parts dropped. However there appears to be a bug that only the first item has a material.

What do you mean that only the first item as a material?

When I made lungs drop stones instead of gizzards, then I got 2 lungs in the butchering results rather than 1 gizzard. There was also a "conglomerate gizzard stone" and a "  gizzard stone".

356
I didn't see it in my quick look through, but you might want to include an EXTRA_BUTCHER_OBJECTS the creature might have. It really isn't needed in the script, but for completeness sake you may consider doing it.

Funny, that code is only used at present for giving gizzard stones to birds, yet domestic poultry birds won't drop it because they are too small to even drop the gizzard. Only appears to drop from crocodiles, beak dogs, and the monstrous cavern bird(s).

EXTRA_BUTCHER_OBJECT appears to drop items in a 1:1 relationship with the number of host organ parts dropped. However there appears to be a bug that only the first item has a material.

357
DF Modding / Collaborative new arena.txt design for next DF version?
« on: March 24, 2014, 01:47:29 am »
Here is what we know so far from Toady One about the arena in the next version:

Last bits with hiding in grass or in shrubs, effect from being prone or next to an obstacle (it gives a bonus there, even if it wouldn't always make sense, until we have things like being able to look around corners). It also gives you quite a bit of feedback now on what factors are influencing your visibility.

 I was starting in on tracking finalization when I became dissatisfied with having to hunt down certain situations, so I added some more options to arena mode. The map file can be given grass, dirt or sand, and the temperature, time, weather/clouds and fog level can also be set. You can pump the temperature up to dragonfire if you want to see the arena water channels boil off and the grass ignite, or you can put it down to deathly cold if you want to watch everything freeze. Playing around with stealth in heavy fog is also entertaining.


Let's see, you can set the combat state in the arena now, from lethal combat without quarter down to brawls and horseplay, and you can also turn morale on and off -- I did that mainly to test yielding and to fix some issue there with aardvarks surrendering and so on. Unarmed combat is more survivable, and on the other hand you don't have to actually damage somebody's brain to knock them out now.

Given the extra options for stealth, jumping, or climbing, the current arena design seems inefficient. The forum may be able to come up with a better one if we work together.

1. At a broad conceptual level, what set pieces should the arena contain? I am thinking of a "parkour course", and perhaps a "don't go into the long grass!" lawn.

2. Have you modified "\data\init\arena.txt" for your own purposes? Is there a change that you use often or highly recommend? For example, I added a closed fortification bunker to the bottom right "castle" to seperate ranged attackers from melee victims during testing.

3. Do you think some of the current arena features are pointless? I don't use all those repetitive open underground rooms.

4. Any links to interesting arena designs, or arena.txt-modifications?

359
For each tissue layer in each body part of a creature, the game calculates the volume of the layer and compares it to thresholds. This determines if you get anything from the part/layer, or if you get several items.

This lua script gives the butchering results for a specific living creature:
Code: (butcher.lua) [Select]
--Calculates butchering results. Alpha version. Target a living creature.

unit=dfhack.gui.getSelectedUnit()
if unit==nil then
print ("No unit under cursor!  Aborting!")
return
end

print(unit.name.first_name, df.global.world.raws.creatures.all[unit.race].creature_id)
print("Creature size (base, current): ", unit.body.size_info.size_base, unit.body.size_info.size_cur)
totalvol=0
totalbone=0
missingparts=0
testrecord={}


for partnum,v in pairs(unit.body.body_plan.body_parts) do
for layernum, vv in pairs(v.layers) do
--START MAIN LOOP

partsize = math.floor(unit.body.size_info.size_base * v.relsize / unit.body.body_plan.total_relsize)
modpartfraction= vv.part_fraction
partname = v.name_singular[0].value
layername = vv.layer_name

if layername == "FAT" then
--currently can't link to or check tissue flags, so can't see if custom tissue resizes based on stored energy
modpartfraction = unit.counters2.stored_fat * modpartfraction / 2500 / 100
end

if layername == "MUSCLE" then
--should update to consider strength bonus due to curses etc.
modpartfraction = unit.body.physical_attrs.STRENGTH.value * modpartfraction / 1000
end


volume = math.floor(partsize * modpartfraction / v.fraction_total)
totalvol=totalvol+volume
finalresult = math.floor(volume/2500)

if volume < 26 and (partsize < 26 or vv.flags.CONNECTS==false) then
--this is an approximation of the actual game code
finalresult=0
else
if finalresult < 1 then
finalresult=1
end
end

--is layer or part missing? in actual code this was checked earlier?
if unit.body.components.body_part_status[partnum].missing==true then
finalresult=0
missingparts=1
end
if unit.body.components.layer_status[vv.layer_id].gone==true then
finalresult=0
missingparts=1
end

if layername == "BONE" and v.flags.TOTEMABLE==false then
totalbone=totalbone+finalresult
end

if testrecord[layername]==nil then
if finalresult>0 then
testrecord[layername]=finalresult
end
else
testrecord[layername]=testrecord[layername]+finalresult
end

--END MAIN LOOP
end
end

print(" ")
printall(testrecord)
print("Bone (minus skull):", totalbone)
if missingparts==1 then
print("BODY IS MISSING SOME PARTS OR LAYERS (i.e. combat damage)")
end
print(" ")
I suppose a similar approach could be used to find the min and max amounts for creatures from the species. It depends on a lot of variables, which can be seen if you examine the script, so I am not going to spend time on that.

Feel free to ask questions or suggest improvements.

EDIT: updated script to not show layers with zero butchering results

360
I don't understand what you did. Perhaps you could repeat your post, using proper words like "adamantine".


Many people know that you can use DFHack or reactions to make unusual objects, like fish bone windows or cheese anvils.

Pages: 1 ... 22 23 [24] 25 26 ... 169