Bay 12 Games Forum

Please login or register.

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

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

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 2/21/15
« Reply #600 on: May 01, 2015, 05:37:05 pm »

Interesting, hah, it's a problem is what it is, now every time something picks a fight with me I have to sit and ask myself, do they feel lucky? Do they get to deal with whatever I'm whirling around like a little upside down bearded lawnmower, or do they get to take a trip over to that tree or cliff or goblin waaaaay over there?

As Rumrusher put it, "everyone starts looking like darts, and the forest is one big dart board."

I do feel like it would be nice there was some way to just have it be a flag off of propel but having a script do one or two things really well is better than trying to kludge it together and making a big mess right?

Huh, you don't happen to recall where the idea for propel came from out of curiosity? It's one of those problems I never had in fortress mode, but swap over to adventurer and the idea of being able to hop up into a tree seems awesome... it's so easy going the other way, after all.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 2/21/15
« Reply #601 on: May 01, 2015, 05:48:41 pm »

My version of propel came from me wanting large creatures like dragons to be able to more consistently launch my dwarves about with massive tail swipes and such, and then it expanded to me wanting air elementals to be able to cast spells like tornado that would fling creatures around randomly. All of this was written long before the most recent DF update, which means I never was even considering trees and such, since climbing wasn't a thing.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 2/21/15
« Reply #602 on: May 01, 2015, 08:21:56 pm »

Ah, now that I can understand, and yeah, I'm a 40.06~ newbie so I've only dabbled with the earlier ones before coming back to the current ones.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #603 on: May 04, 2015, 05:14:22 pm »

Alright, uploaded the new set of scripts. Note that no functionality has been changed, and the older scripts will still work, but I will no longer be updating those scripts. The new ones all use the script_environment system, which to non modders simply means that you will see an extra folder in your DF/raw folder. This allows for better handing off of saves without worrying which version of which script the person currently has loaded on their system.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #604 on: May 07, 2015, 01:09:52 pm »

I flipped through the new stuff.

I'm concerned about this line, specifically the

Code: [Select]
yes,upgrade = yes = ...

part. It looks like yes is assigned to something and the second result is ignored, then yes is set to itself and upgrade is always set to nil. I'm not sure what it actually does, but that's my guess.

persistantDelay should be persistentDelay in all cases.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #605 on: May 07, 2015, 01:14:48 pm »

That would be a foolish copy - paste error, and poor spelling. I will fix both.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #606 on: May 07, 2015, 02:07:49 pm »

PS: The link in your front post actually goes to the r2 scripts instead of the r3 scripts.
Logged

Box

  • Bay Watcher
  • [VERMINHUNTER]
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #607 on: May 09, 2015, 12:17:36 pm »

There's a typo on line 143 of quality-change.lua, it reads

Code: [Select]
if args.gloves then upgradeitem(args,df.item_glovest,unit,dur,args.gloves) end
and should be

Code: [Select]
if args.gloves then upgradeitem(args,df.item_glovesst,unit,dur,args.gloves) end
I don't know LUA, really, but by the naming scheme it looks like all the item names have "st" at the end and gloves only has a "t".


If you're trying to change the quality of gloves and get an error, try changing that!
« Last Edit: May 09, 2015, 12:20:19 pm by Box »
Logged
You should come inside the box.

Then you'll know what I mean.

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #608 on: May 13, 2015, 09:14:54 am »

Errors fixed, I really should keelhaul those item scripts and start over, but they work so that has gone onto the back burner. Before I do any more scripting updates I need to release this long promised class/spell example. Classes are all done, now just working on the ~600 spells.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #609 on: May 17, 2015, 08:01:29 pm »

I've tried looking around for an old save with a working version of that imbue material reaction+the relevant script, I've tried hacking together versions myself, I've tried assembling them with parts from similar scripts in masterwork and such, I'm baffled.

I know the [REACTION:LUA_HOOK_etcetc] part has to be in there, but I'm lost on getting the right syntax with the /item/subtypechange or itemchange or itemiupgrade or any of them that would do the same thing as the old "Vaci Sunajotho's Feather Dagger" or "Emo Artherost's Skull Helm" stuff, am I looking in the wrong place for the old format, or is there a newer simple way to do it I'm just derping out on?
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #610 on: May 18, 2015, 04:30:00 pm »

The old system that used the LUA_HOOK method can be found here https://github.com/Pheosics/Packaged_Scripts/blob/master/hack/scripts/base/item-imbue.lua and https://github.com/Pheosics/Packaged_Scripts/blob/master/hack/scripts/base/item-upgrade.lua. But that method only allowed changing the material into a different inorganic (imbue) or different subtype (upgrade).

I haven't yet written a script to allow the same versatility with the new system since at the time it wasn't possible to get the items from reaction-trigger, and now that it is I haven't had time to go back. But you can use the new https://github.com/Pheosics/v24-r3_Scripts/blob/master/hack/scripts/item/material-change.lua and https://github.com/Pheosics/v24-r3_Scripts/blob/master/hack/scripts/item/subtype-change.lua in the DFHack command line to change any item you want.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #611 on: May 18, 2015, 06:29:47 pm »

I can dig it, I poked around at it some but didn't have much luck so in the end I just added in skull materials to get the effect I was after.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #612 on: May 18, 2015, 06:46:16 pm »

The modtools/reaction-product-trigger seems really easy to use, all I really need to do is change my item/*-change.lua scripts to be able to have a list of items instead of just one and it should work.

@expwnent, is the list of input and output items generated by reaction-product-trigger in the same order as they are in the raws? Is it at all possible to get the user-defined name for the input items? (i.e. 'A' for [REAGENT:A:150:BAR:NONE:POTASH:NONE])?
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #613 on: May 18, 2015, 09:19:21 pm »

I have no idea about the order. Test it with devel/print-args.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: [DFHack] Roses' Script Collection Updated 5/4/15
« Reply #614 on: May 18, 2015, 09:34:54 pm »

Should be the string at df.global.world.raws.reactions.(v).reagents.(k).code I think, and yeah they're in the same order as they are in my raws from looking at a couple.
Logged
Pages: 1 ... 39 40 [41] 42