Bay 12 Games Forum

Please login or register.

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

Author Topic: Putnam's DFHack scripts  (Read 119010 times)

D_E

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #165 on: April 04, 2013, 05:57:30 pm »

Found a copy-paste error in itemsyndrome:

Quote
local function creatureIsAffected(unit,syndrome)
   <snip>
   for caste,creature in ipairs(syndrome.syn_immune_creature) do
      local immune_creature = creature.value
      local immune_caste = syndrome.syn_affected_caste[caste].value
      if immune_creature == unitracename and immune_caste == castename then affected = false end
   end
   return affected
end


Logged
Mods I've done:
Zelda mod-mod, Beta in the Wild DF 47.04
Illithid Empire mod DF 31.25 (update canceled)
Spotter's Guide to Illithids (Genesis mod-mod) genesis 3.19a4 (update canceled)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #166 on: April 04, 2013, 06:13:41 pm »

...that's not an error, I'm pretty sure.

D_E

  • Bay Watcher
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #167 on: April 04, 2013, 06:52:21 pm »

...that's not an error, I'm pretty sure.

It should be:
Quote
   for caste,creature in ipairs(syndrome.syn_immune_creature) do
      local immune_creature = creature.value
      local immune_caste = syndrome.syn_immune_caste[caste].value
      if immune_creature == unitracename and immune_caste == castename then affected = false end
   end
or it causes a lua error and fails to function. Unless I messed it up somehow.
Logged
Mods I've done:
Zelda mod-mod, Beta in the Wild DF 47.04
Illithid Empire mod DF 31.25 (update canceled)
Spotter's Guide to Illithids (Genesis mod-mod) genesis 3.19a4 (update canceled)

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #168 on: April 04, 2013, 08:13:57 pm »

Ah, I see! It probably won't come up with an error, but it will prevent function.

RickRollYou2

  • Bay Watcher
  • [START_BIOME:EARTH]
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #169 on: April 20, 2013, 09:16:36 am »

Even with a goblin selected and me calling "force siege GOBLIN" the dfhack console tells me to highlight a civ unit? Calling "force siege" calls a dwarven siege, naturally.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #170 on: April 20, 2013, 11:39:29 am »

Even with a goblin selected and me calling "force siege GOBLIN" the dfhack console tells me to highlight a civ unit? Calling "force siege" calls a dwarven siege, naturally.

Should be fixed.
« Last Edit: April 20, 2013, 12:02:49 pm by Putnam »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #171 on: April 21, 2013, 08:09:34 am »

Just to make sure, before I start:
Quote
DFHACK_MIASMA
DFHACK_MIST
DFHACK_MIST2
DFHACK_DUST
DFHACK_LAVAMIST
DFHACK_SMOKE
DFHACK_DRAGONFIRE
DFHACK_FIREBREATH
DFHACK_WEB
DFHACK_GAS_UNDIRECTED
DFHACK_VAPOR_UNDIRECTED
DFHACK_OCEAN_WAVE
DFHACK_SEA_FOAM
DFHACK_DISAPPEARS

I add one of these to a material, lets say... iron.

Quote
[INORGANIC:IRON]
   [MAX_EDGE:10000]
[REACTION_CLASS:DFHACK_MIASMA ] =>> here it is
   [USE_MATERIAL_TEMPLATE:METAL_TEMPLATE]
   [STATE_NAME_ADJ:ALL_SOLID:iron]
   [STATE_NAME_ADJ:LIQUID:molten iron]
   [STATE_NAME_ADJ:GAS:boiling iron]
   [DISPLAY_COLOR:0:7:1]   [BUILD_COLOR:0:7:1]
   [MATERIAL_VALUE:8]
   [SPEC_HEAT:450]
   [MELTING_POINT:12768]
   [BOILING_POINT:15150]
   [ITEMS_WEAPON][ITEMS_WEAPON_RANGED][ITEMS_AMMO][ITEMS_DIGGER][ITEMS_ARMOR][ITEMS_ANVIL]
   [ITEMS_HARD]
   [ITEMS_METAL]
   [ITEMS_BARRED]
   [ITEMS_SCALED]
   [SOLID_DENSITY:7850]
   [LIQUID_DENSITY:6980]
   [MOLAR_MASS:55845]
   [IMPACT_YIELD:542500]
   [IMPACT_FRACTURE:1085000]
   [IMPACT_STRAIN_AT_YIELD:319]
   [COMPRESSIVE_YIELD:542500]
   [COMPRESSIVE_FRACTURE:1085000]
   [COMPRESSIVE_STRAIN_AT_YIELD:319]
   [TENSILE_YIELD:155000]
   [TENSILE_FRACTURE:310000]
   [TENSILE_STRAIN_AT_YIELD:73]
   [TORSION_YIELD:155000]
   [TORSION_FRACTURE:310000]
   [TORSION_STRAIN_AT_YIELD:189]
   [SHEAR_YIELD:155000]
   [SHEAR_FRACTURE:310000]
   [SHEAR_STRAIN_AT_YIELD:189]
   [BENDING_YIELD:155000]
   [BENDING_FRACTURE:310000]
   [BENDING_STRAIN_AT_YIELD:73]
 

Any projectile, be it bolt, arrow, ballista bolt or boulder flung by a catapult (or a weapon thrown by an adventurer) that is made of iron, will disperse a cloud of miasma upon impact. Is this correct?

And REACTION_CLASS:DFHACK_DISAPPEARS would help clearing up the map, whenever a creature spams around interaction based shots, like my turrets. The ammo tends to lie around much and makes the countryside look ugly. That would clean it up automatically?

What exactly does DFHACK_OCEAN_WAVE & DFHACK_SEA_FOAM do? Whats the difference between MIST and MIST2? How is the direction of the effect handled by flows, firebreath, dragonfire and webs?

Sorry for all these question. But wait, there is more. Any infos on the FPS problem that might have to do with the itemsyndrome? Any fix, or at least a workaround? Maybe making the syndromes last 500 ticks and the code runs every 499 ticks... thats at least a lot less then the 150 currently.
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #172 on: April 21, 2013, 12:13:52 pm »

1. Yes.

2. I would hope so, yeah :P

3. OCEAN_WAVE is the waves you see when embarking on the ocean. Sea foam is similar. They can be used to, say, extinguish fires after an explosion, I think.

4. I have no idea what the difference between MIST and MIST2 is :P

5. AFAIK, the direction seems to be semi-random.

Yeah, lengthening the duration for itemsyndrome should be good. It's one line (the dfhack.timeout line in the callback() function; the number is the ticks), so it's an easy fix. I also optimized the checks a bit.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #173 on: April 21, 2013, 12:27:53 pm »

Cool, is it a sure thing that you'll increase the duration to 499, I'll start adjusting accordingly?  Or still to be determined?

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #174 on: April 21, 2013, 12:28:27 pm »

Pretty sure, now. That'll make it way faster.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #175 on: April 21, 2013, 01:36:07 pm »

Yeah, I updated it for that. Also added functionality to projectileExpansion:

[REACTION_CLASS:DFHACK_FLOW_SIZE] allows you to adjust the size of flows. For example:

      [REACTION_CLASS:DFHACK_DUST]
      [REACTION_CLASS:DFHACK_FLOW_SIZE]
      [REACTION_CLASS:20]

makes a very small amount of dust where the projectile hits.

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #176 on: April 21, 2013, 01:59:19 pm »

Nice  8)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #177 on: April 21, 2013, 02:19:00 pm »

Awesome. :) I will test waves and foam and see what they actually do. Then the flowsize... will be fun. :)

500 ticks are 4,5 RL seconds at 100FPS btw, I dont think anyone will complain about the syndrome staying that long active after you dropped the item.

Do you know how the weather plugins work? I always thought its sad that it only allows normal weather, and not evil rains. Would be fun to actually determine the material that falls from the sky... a meteor shower, maybe some radioactive rain for deons fallout mod, a healing rain...
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 :::

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Putnam's DFHack modder's utilities
« Reply #178 on: April 21, 2013, 05:39:45 pm »

Updated the plugins in my dfhack, I didnt change any code... wanted to test the projectile features, saw this in the command:



EDIT: Mh.. I continued testing other stuff, genned a new world, created similar items, no error log. No idea where that came from, I cant seem to replicate it.
« Last Edit: April 21, 2013, 06:18:10 pm by Meph »
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Putnam's DFHack modder's utilities
« Reply #179 on: April 21, 2013, 08:01:20 pm »

I can see what the issue is. It's nothing to worry about, I'm pretty sure. Apparently fish have no material type. Better figure out what they do have instead.

EDIT: They do have a race and a caste, but checking for that causes issues with everything else in the game...
« Last Edit: April 21, 2013, 08:07:32 pm by Putnam »
Logged
Pages: 1 ... 10 11 [12] 13 14 ... 44