Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 16 17 [18] 19 20 ... 42

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

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells official v1.1
« Reply #255 on: June 27, 2014, 02:22:22 am »

I have a suggestion for the upgradebuilding script.

A fourth syn class after the timer, that adds an announcement, after the timer ran out. Examples:

SYN_CLASS:here, SYN_CLASS:succubus_trader, SYN_CLASS:100800, SYN_CLASS:"A succubus merchant has left". This example upgrades a workshop to a succubus merchant stall that stays for 3 months, before leaving, reverting the workshop back to an empty merchant stall, notifying the player that the merchant left.

SYN_CLASS:here, SYN_CLASS:cathedral, SYN_CLASS:0, SYN_CLASS:"A church has been upgraded to a cathedral". This example permanently upgrades a building to the next higher choice, and lets the player know what happened.

This gives more player feedback, which is always important when introducing new game mechanics using dfhack.
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: DFHack Spells official v1.1
« Reply #256 on: July 02, 2014, 01:15:37 pm »

Sorry for the double post, but this is about a completely different topic:

Can upgradebuilding somehow be combined with the counters? Lets say a buildings runs 20 reactions, after that it triggers upgradebuilding?

My idea was this:
Merchant building, which allows you to buy any item for gold/silver/copper coins. It also buys things.
For every time that you buy an item for coins, the counter gets +1.
If the counter is 20, the building transforms into a "sold-out merchant stall" for 1 season.
This building has only one reaction, which does nothing and says: "Come back shortly, we are out of stock"

This way people can use these buildings as often as they like, but if they use it more than 20 times, the building is blocked, for one season. "Oh, you bought 20 weapons? The merchant is out of stock, wait till he gets more goods."
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 official v1.1
« Reply #257 on: July 02, 2014, 01:34:59 pm »

An interesting idea, I don't think that counters can handle it the way they are implemented right now, but the option can be added to attach counters to buildings. The only problem I foresee is that if I have a building with an ID of 5 and run some counters on it then decunstruct it and build a different building (also an ID of 5 since that slot was freed up) the counters from the first will be applied to the second. I will have to think of a way to avoid this.

I actually just went through the counters script and I noticed that there was some problems with it, so I will need to fix it up anyway. so I can add this functionality relatively soon.

As for your other request, I am actually hoping to allow messages from most of my scripts, but I am holding off on any major changes until the new system is settled on, since I will need to make a lot of changes for that.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells official v1.1
« Reply #258 on: July 02, 2014, 01:45:56 pm »

"the new system" means expwnents new way of triggering scripts?

PS: Dont know if that interests you, but I am using your upgradebuilding script on over 200 buildings now. ^^ Most of the kobolds and human workshops.
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 official v1.1
« Reply #259 on: July 02, 2014, 01:46:59 pm »

"the new system" means expwnents new way of triggering scripts?

Yeah, gonna need to rewrite a lot, but it shouldn't take too long.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells official v1.1
« Reply #260 on: July 02, 2014, 01:49:20 pm »

Yeah for breaking all the syntax I use. Again. (nothing against you or expwnent, but damn its a lot of work. Mostly the testing afterwards.)
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 official v1.1
« Reply #261 on: July 02, 2014, 01:58:19 pm »

Yeah for breaking all the syntax I use. Again. (nothing against you or expwnent, but damn its a lot of work. Mostly the testing afterwards.)

Well actually I am going to change my scripts and run expwnent's conversion script on all of my test reactions and such, and do a bunch of testing myself, so you *probably* won't need to do that much testing after the change. From what I can see it seems a fairly straight forward change, and it will be more intuitive to write new reactions.

That being said, there are a couple scripts (mainly the wrapper script) that I am a little scared to move over, so we will see how easy it truly is.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells official v1.1
« Reply #262 on: July 05, 2014, 06:23:36 am »

Do you know what happens to reagents that are used as buildmats, if the buildingupgrade is temporary?

Lets say I do REAGENT:1:ANVIL:NONE:NONE:NONE PRESERVE_REAGENT, and the anvil becomes part of the building, and after 1 year the buildings transforms back... is the anvil gone, is it still a buildmat in the building, or will an anvil item appear?
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 official v1.1
« Reply #263 on: July 05, 2014, 12:19:43 pm »

Right now it will remain a buildmat in the building. I wanted to make it so it will re-appear, but I had some trouble with that.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells official v1.1
« Reply #264 on: July 05, 2014, 12:24:22 pm »

Ok, thanks. I am not using it for anything right now, just wanted to know for future ideas.
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 official v1.1
« Reply #265 on: July 05, 2014, 02:26:37 pm »

Since you are one of the main people that use these features, what do you think should happen to the reagents? I think I figured out how to get them to appear for normal use again (turns out its just switching a flag from true to false, pretty easy)
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack Spells official v1.1
« Reply #266 on: July 05, 2014, 03:01:17 pm »

I havent thought about it yet, because I dont have any features that fit this... A workshop that is temporarily upgraded and requires specific buildmats...

If you want the reagents to disappear, you can just not add the preserve-reagent tag, so the most sensible option for the preserved ones would be to get them back. That gives modders both options.
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 :::

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Spells official v1.1
« Reply #267 on: July 17, 2014, 04:38:49 am »

I'm looking at projectile.lua: how much have you played around with it? If you spawn a projectile directly on top of a target unit, will it hit them? Do you know how projectile collisions with a weapon compare to weapon hits?
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack Spells official v1.1
« Reply #268 on: July 17, 2014, 04:42:02 am »

https://github.com/Pheosics/DFHack_spells/blob/master/selected.lua

Toward the end, a feature in Lua you might not know of but would probably like:

Code: [Select]
dfhack.run_script(x, table.unpack(args))
It'll make it so you can get rid of all those cases for different numbers of arguments.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells official v1.1
« Reply #269 on: July 17, 2014, 08:25:26 am »

I'm looking at projectile.lua: how much have you played around with it? If you spawn a projectile directly on top of a target unit, will it hit them? Do you know how projectile collisions with a weapon compare to weapon hits?

I haven't done much science concerning the projectiles. I played around with the different values, but thats about it. I also am not sure how the projectile collisions compare to normal hits, but I do know that they can do some serious damage. I tested by having steel spear projectiles and it seemed to do some serious damage.

https://github.com/Pheosics/DFHack_spells/blob/master/selected.lua

Toward the end, a feature in Lua you might not know of but would probably like:

Code: [Select]
dfhack.run_script(x, table.unpack(args))
It'll make it so you can get rid of all those cases for different numbers of arguments.

The selected.lua script is actually an older version and I should remove it from my github, the current version is wrapper.lua and it does have the table.unpack() in it.
Logged
Pages: 1 ... 16 17 [18] 19 20 ... 42