Bay 12 Games Forum

Please login or register.

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

Author Topic: [DFHack] Roses' Script Collection Updated 5/4/15  (Read 118988 times)

Roses

  • Bay Watcher
    • View Profile
[DFHack] Roses' Script Collection Updated 5/4/15
« on: January 18, 2014, 03:47:55 pm »

This post will be linked to the DFHack script collection thread.

Update 2/21/15
ReadMe files have been included in the package.

Download scripts from github: https://github.com/Pheosics/v24-r3_Scripts
Download scripts from DFFD: (Not currently updated)

Basic (Interaction/Reaction/Command Line based) Scripts Included: (all scripts should contain documentation inside them)
  • Building Based Scripts
    • subtype-change - change the subtype of a building (i.e. change it from one custom building to another)
    • remove - deletes the building
  • Unit Based Scripts
    • attribute-change - change a units physical or mental attributes
    • body-change - change the temperature of a units body parts
    • boolean-change - don't use this, it will crash your game
    • skill-change - change a units skills
    • trait-change - change a units traits
    • counter-change - change the value of one of the various counters associated with a unit (e.g. pain, paralysis, stun, blood, etc...)
    • propel - turn a target unit into a projectile
  • Item Based Scripts
    • create - create an item that will last for a set amount of time
    • remove - removes an item from existence
    • material-change - change the material of a currently equipped item
    • quality-change - change the quality of a currently equipped item
    • subtype-change - change the subtype of a currently equipped item
    • projectile - create (or use item from inventory) an item that shoots from one location to another or falls from the sky
  • Tile Based Scripts
    • material-change - change the material of a tile
    • temperature-change - change the temperature of a tile
  • Flow Scripts
    • customweather - spawn custom weather effects that last for a specified duration
    • spawnflow - spawn one of the various flows
    • eruption - create water or magma in a radius about a unit/location
  • Special Scripts
    • counters - allows for custom tracking of things that is persistent across saves
    • teleport - teleport a unit or item to various locations
Intermediate (Raw/LUA_HOOK Based) Scripts Included: (these scripts are no longer included in current packages, they should all still work from previous packages, but new scripts have replaced their core functionality.)
  • building-upgrade - handles changing building subtypes based on reactions
  • item-copy - copies any item of any material with a single reaction
  • item-imbue - changes the material of an item with a reaction
  • item-improve - change the quality of an already created item using a reaction
  • item-upgrade - change the subtype of an already created item
  • teleport - move unit(s) or item(s) from one place to another using reactions
Advanced Scripts Included:
  • wrapper (this deserves it's own spot because it is so versatile, this post has an in-depth explanation of it's uses)
Custom In-Game Systems Included:
  • Classes System - in depth guide found here
    • Experience system, based on kills (customize how much each creature is worth)
    • Class upgrade trees (e.g. level 3 Warrior required for Knight, level 2 Knight and level 1 Priest required for Paladin)
    • Spell learning based on various requirements (e.g. attributes, skills, traits, class)
    • Completely configurable in external text file (follows format similar to DF raws for ease of use)
  • Civilization System - in depth guide found here
    • Define civilizations based on their entity
    • Civilization level up during gameplay
    • Add/Remove creatures/items/materials/etc... from civilizations as they level up
    • Add new noble positions to civilizations as they level up
    • Completely configurable in external text file (follows format similar to DF raws for ease of use)
  • Event System - in depth guide found here
    • Trigger random events based on specified requirements
    • Events are user specified scripts, allowing for things like spawn-unit
    • Requirements are things like wealth, export, inport, deaths, etc...
    • See this thread for an example
In Progress:
  • GUI - Unit Viewer
    • Check a units attributes and skills
    • Check a units active syndromes
    • Check a units known interactions
    • If used in conjunction with the Class System, it will show all classes, levels, and experience
    • See this thread for current workup
  • GUI - Journal
    • Track encountered creatures (descriptions, stats, etc...)
    • Allow modders to include extra information (reaction requirements, building requirements, material rankings, etc...)
    • Allow modders to hide certain information until certain requirements are met
    • Allow modders to add back story to their mods that is visible in game
  • GUI - Quests
    • Part of the Journal update
    • Allows modders to create generic and specific quests that offer rewards
    • Quests can be things like kill X goblins, export Y wealth, etc...
    • Rewards can be upgraded buildings, item rewards, class level ups, etc...
  • Spell Database
    • Full spell database using various scripts
    • To be used in my mod, but available for other modders to use
    • In depth spells, allowing for silencing, reflecting, immunities, resistances, vulnerabilities, and more
« Last Edit: May 07, 2015, 02:27:19 pm by Roses »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #1 on: January 18, 2014, 04:02:47 pm »

Quote
Storm.

I love you.  :)

Edit: If I understand it correctly, this would cover the entire surface with little eploxsions of good-thought inducing mist, regardless of where the creature that is targetted with the unit-id is actually standing. The radius 500 essentially covers everything, but since you said its only on the surface, it would simulate a map-wide rain, correct?

Code: [Select]
[SYN_CLASS:\COMMAND][SYN_CLASS:storm][SYN_CLASS:mist][SYN_CLASS:\UNIT_ID][SYN_CLASS:500][SYN_CLASS:100][SYN_CLASS:30]
Edit2: Couldnt get the storm example to work, I get a error message. The eruption on the other hand worked fine. It had some.... interesting results.

Spoiler (click to show/hide)

The water wasnt falling, I assume it was because it turned to ice after a bit. The creature using the reaction instantly died, and it even spawned water inside the rock. No idea what happens when you mine it (all miners and picks were encased in ice)

But... damn... magma landmines. ice landmines. Glorious inventions of dwarvenkind.

Edit3: Turned out the 500 for the storm was a bit out of bounds. It works. I tried miasma rain and mist rain. Both very nice to have for good/evil regions.

Spoiler (click to show/hide)

This makes me so happy. Finally custom rain.  :)  :)  :)
« Last Edit: January 18, 2014, 05:58:51 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 :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #2 on: January 18, 2014, 06:58:30 pm »

Darn, I was hoping that using the fov plugin to determine radius would account for map edges. I have a different version that doesn't use the fov plugin but its several more lines of code, I will change all scripts accordingly so that edge of map doesn't give errors.

As for the eruption, I had mixed results about water moving and falling using it at different times. I am not sure if the game has a set time it reupdates things like that, or if there are other flags I need to set. I will look into it. I could also probably make it so the liquids only get spawned on tiles that are dug out.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #3 on: January 18, 2014, 07:06:51 pm »

Well, the water hung in the air for some time, then froze. What I can tell you is that its only spawned on one z level, even if I set the height to 10. I had some skeletons that constantly spammed magma eruptions, but its was always just on ground level. Not that horribly important, but something isnt quite right. It still works from a gameplay perspective of course, it does spawn the eruption. Just only on one level.

Could you change the storm to be map-wide by default, without the unit-id and radius? Its weird to add an interaction to a creature far away from the surface, if all you want is some different weather. ;)
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 :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #4 on: January 18, 2014, 07:22:16 pm »

Currently the eruption is always only on one level, the height is the depth of the liquid at the center. I can change it to allow spawning the liquid on multiple z-levels. I'm not sure how the game handles spawning liquid in mid-air. Guess I will have to do some testing. A coloumn of magma could be pretty fun.

Yeah I can make a separate storm for map wide effects that don't need a unit-id.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #5 on: January 18, 2014, 07:24:39 pm »

Oh, I understand. So height is 1-7 for a max of 7/7 liquid. I somehow thought that a height of 10 would spawn a 10-tile high tower of the liquid. No worries then, I just understood it wrong.

Quote
Yeah I can make a separate storm for map wide effects that don't need a unit-id.
Yeah. :)

Where is deon btw? He would love to see all this. ^^

Edit: Tested web rains. Works as well, the webs remain. They have no real name, as webs take the material from the webber creature, but its using inorganics. the webs are just called " thread". Not sure if any specific tag in the inorganics can enable it. But they work just fine, even take the right color.
« Last Edit: January 18, 2014, 08:20:08 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 :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #6 on: January 18, 2014, 08:44:13 pm »

You should be able to specify the material for the webs. Try adding [SYN_CLASS:IRON] at the end. I have to admit I didn't thoroughly test all of the possibilities.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #7 on: January 18, 2014, 08:56:24 pm »

It does take on the material. It has the properties and color. Its just lacking the name. Like I said, its probably in the inorganic. The script works fine.

It probably just lacks [STOCKPILE_THREAD_METAL] to be accepted by the AI.
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 :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #8 on: January 21, 2014, 02:35:55 am »

Updated spell scripts:
  • Bugfix - Fixed map edge errors and tiles not being properly allocated in all scripts
  • Bugfix - Fixed water not flowing properly in eruption.lua
  • Bugfix - Liquids will no longer be spawned in hidden tiles with eruption.lua
  • Bugfix - Fixed a typo in imbueweapon.lua
  • Addition - eruption.lua now has another parameter, height (renamed old height parameter depth). Height allows columns of liquid to be made.
  • New Script - weather.lua (this one is for you Meph) Very similar to storm.lua except it affects the entire map and has a duration attached to it.

Please let me know if you find any errors or if something doesn't appear to be working like it should (or if my descriptions could use some clarification).
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #9 on: January 21, 2014, 09:18:42 am »

:)

Thanks for the weather script. I will give it a test run today. You might want to change the name, because there is already the weather plugin for rain, snow and sunshine.

Edit:Tested the weather. I called it syndromeweather and rained some dragonfire. Works fine. :)
« Last Edit: January 21, 2014, 10:32:26 am 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 :::

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #10 on: January 22, 2014, 12:50:06 am »

I've got another set of edits that I have lined up (mostly just allowing a -1 for radius to target a single unit instead of a whole tile). Before I commit the changes though, is there anything else anyone would like to see done?
Logged

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #11 on: January 22, 2014, 08:58:23 am »

Damn that will accelerate my mod development a lot, thank you!
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #12 on: January 22, 2014, 09:29:02 am »

Teleport.

Build workshop A. Run reaction "Open blue portal". Uses \LOCATION to give location1 to script.
Build workshop B. Run reaction "Open orange portal". Uses \LOCATION to give location2 to the script.
Reaction in each: Activate portal. All items/creatures on location1 are teleported to location2.
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 :::

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #13 on: January 22, 2014, 11:23:31 am »

Teleport.

Build workshop A. Run reaction "Open blue portal". Uses \LOCATION to give location1 to script.
Build workshop B. Run reaction "Open orange portal". Uses \LOCATION to give location2 to the script.
Reaction in each: Activate portal. All items/creatures on location1 are teleported to location2.

I planned to do this : Build 2 colored portals, a reaction from those send the unit to another portal of the same color. A second reaction send all items and pets in a radius of 3 to the other portal.

The only limitation of this system is that someone must build the destination in the first place.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells (linked to DFHack script collection)
« Reply #14 on: January 22, 2014, 11:25:25 am »

That would be amazing. I think I suggested that over a year ago, now and then reminding people that this suggestion exists. :P
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 :::
Pages: [1] 2 3 ... 42