Bay 12 Games Forum

Please login or register.

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

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

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #45 on: January 31, 2014, 05:18:26 pm »

Those spawnflows look interesting to me. I know the first number is the type and the fourth number is the size, but I thought the second and third number were material type and subtype. Won't that make the dust and such spawned different for each persons raws?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #46 on: February 01, 2014, 03:27:29 am »

Those spawnflows look interesting to me. I know the first number is the type and the fourth number is the size, but I thought the second and third number were material type and subtype. Won't that make the dust and such spawned different for each persons raws?
They are used only for some types of flow. But yes in principle you need to get materials from raws (i.e. using dhfack.matinfo)

Raidau

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #47 on: February 04, 2014, 10:16:05 am »

Roses, could you please add position.code and profession conditions to your addsyndrome script?

I scanned your code but thats too complicated for me. Im currently working on quests and equipment generation for important units in adventure mode, but my own scripts are a bit.. unoplimized, since syndrometrigger has troubles handling many syndrome additions per a single frame :)
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #48 on: February 04, 2014, 12:12:50 pm »

What do you mean position.code and profession conditions?
Logged

Raidau

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #49 on: February 04, 2014, 12:55:04 pm »

What do you mean position.code and profession conditions?

add to this list of arguments

Code: [Select]
[SYN_CLASS:affected class]
[SYN_CLASS:affected creature]
[SYN_CLASS:affected syndrome class]
[SYN_CLASS:required tokens]
[SYN_CLASS:immune class]
[SYN_CLASS:immune creature]
[SYN_CLASS:immune syndrome class]
[SYN_CLASS:forbidden tokens]

following:
Code: [Select]
[SYN_CLASS:affected noble position]
[SYN_CLASS:affected profession ID]

where affected noble position is compared with dfhack.units.getNoblePositions(unit)[1].position.code
since nobles dont get several positions in worldgen, checking only [1] must be sufficient

and affected profession ID is unit.profession
« Last Edit: February 04, 2014, 12:58:58 pm by Raidau »
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #50 on: February 04, 2014, 01:52:21 pm »

Yeah I can look at adding those checks. I should probably start to think about a better way to pass arguments into the function though. Right now it already wants 12 inputs, which I think is already too many.

Maybe I can make it so you don't need to fill them in with NONE if you want to ignore them. (Something like putting AC_blah for affected class and such)
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #51 on: February 04, 2014, 03:09:42 pm »

I think it'd just be better to check for all positions.

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack Spells (linked to DFHack script collection)
« Reply #52 on: February 05, 2014, 11:01:05 am »

Has anyone managed to propel a creature upwards, in an arc?  Giving the z-velocity value a negative or a positive number seem to do the same thing.

Raidau

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #53 on: February 05, 2014, 12:36:19 pm »

I have an error when i try to use addsyndrome with radius:

Code: [Select]
Invoking: addsyndrome NB_SYN_PANIC 18 100,100,0 all NONE NONE NONE NONE NONE NONE NONE NONE
...ckr4\Dwarf Fortress 0.34.11\hack\scripts/addsyndrome.lua:265: attempt to call a userdata value
stack traceback:
...ckr4\Dwarf Fortress 0.34.11\hack\scripts/addsyndrome.lua:265: in function 'effect'
...ckr4\Dwarf Fortress 0.34.11\hack\scripts/addsyndrome.lua:287: in main chunk
(...tail calls...)

When radius is -1,-1,-1 it works
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #54 on: February 05, 2014, 12:44:51 pm »

Has anyone managed to propel a creature upwards, in an arc?  Giving the z-velocity value a negative or a positive number seem to do the same thing.

I thought I had tested it out (getting a dwarf to move up in z levels and then come crashing down), but I might have been mistaken. Have you even tried with very large z values?

I have an error when i try to use addsyndrome with radius:

When radius is -1,-1,-1 it works

Error on my part, I fixed it in the -1,-1,-1 case but forgot to fix it in the other case. If you want to fix it yourself you can just replace line 265 with line 255. Will upload the fixed version shortly
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack Spells (linked to DFHack script collection)
« Reply #55 on: February 05, 2014, 02:29:51 pm »

Has anyone managed to propel a creature upwards, in an arc?  Giving the z-velocity value a negative or a positive number seem to do the same thing.

I thought I had tested it out (getting a dwarf to move up in z levels and then come crashing down), but I might have been mistaken. Have you even tried with very large z values?

Yeah, it does the same thing with large positive z values as it does with large negative ones - slams the creature into the ground hard, but doesn't give it any air time.  I was hoping to use this script together with a soft, padded landing area to make an 'aerial transport' system.  Doesn't work though.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #56 on: February 05, 2014, 03:12:10 pm »

Hmm, interesting (and unfortunate). Maybe there is another tag somewhere that needs to be set? Do dwarves ever get air time in vanilla for any reason? I suppose you could just transport them up a few z levels and then give them a velocity in the x or y direction.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: DFHack Spells (linked to DFHack script collection)
« Reply #57 on: February 05, 2014, 04:17:00 pm »

Dust attacks can propel creatures into the air, so it must be possible.

Raidau

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #58 on: February 06, 2014, 01:27:28 am »

I think i have some progress, i created a script based on changefixed, but now  it checks unit's noble position and then adds item of specified type, subtype and material in inventory to a specified bodypart:)
test interaction for source of that script looks like this:

Spoiler (click to show/hide)

Yeah it would use some optimization :)
« Last Edit: February 06, 2014, 03:40:44 am by Raidau »
Logged
Marital status manipulator
Custom item descriprions
Natural Balance Mod (2013-2015) development suspended...

Roses

  • Bay Watcher
    • View Profile
Re: DFHack Spells (linked to DFHack script collection)
« Reply #59 on: February 06, 2014, 06:27:14 pm »

What I think I am going to do is put a check in the arguments section, if it sees you have all the arguments listed it will just take them as they are (basically it behaves exactly as it does now, so that it is backwards compatible). Then if there are less arguments than expected it will figure out which are which by some tag and set all others to NONE. That will make all of those SYN_CLASS:NONE tags unneeded.
Logged
Pages: 1 2 3 [4] 5 6 ... 42