Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dfhack scripts for Masterwork  (Read 4477 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Dfhack scripts for Masterwork
« on: January 29, 2015, 11:05:00 am »

Hey guys,

I'm redoing my mod, starting from scratch for the new version of DF, now that Toady released his last bugfix update. Many mod feature rely on dfhack to work, but sadly many scripts seem to be outdated or have no equivalent in the new version. I want to post about it here and keep progress, and if you know where to find a working version (or know how to fix/update a script) please post it here. :)

Outdated/Bugged:
Spawnunit => Make a new creature from scratch.
Points => Change the amount of embark points to a number you like.
Force Siege => Spawns an ambush or siege on the map edge.

I'll add more after I did more testing and found more scripts that don't work.
« Last Edit: January 30, 2015, 11:02:50 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 :::

expwnent

  • Bay Watcher
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #1 on: January 29, 2015, 11:30:27 am »

Warmist is supposed to be working on updating spawn unit.

Startdwarf is correct, it just relies on a global which wasn't located for the most recent version of DF on Windows.
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #2 on: January 29, 2015, 12:40:51 pm »

Errormessage:
Plugin: Search.dll (cannot enable plugin)
Plugin: Zone.dll (cannot enable plugin, is missing required globals: huge list of stuff)
Plugin: Strangemood.dll (is missing required globals: huge list of stuff)
Are you sure you're using the latest dfhack, and not prerelease 40.24-r0?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Dfhack scripts for Masterwork
« Reply #3 on: January 29, 2015, 12:57:41 pm »

Errormessage:
Plugin: Search.dll (cannot enable plugin)
Plugin: Zone.dll (cannot enable plugin, is missing required globals: huge list of stuff)
Plugin: Strangemood.dll (is missing required globals: huge list of stuff)
Are you sure you're using the latest dfhack, and not prerelease 40.24-r0?
Thank you, I'm on it. Will update and test.

EDIT: You were correct, I was running r0, not r1.
« Last Edit: January 29, 2015, 02:40:16 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 :::

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #4 on: January 29, 2015, 02:51:34 pm »

I made good progress on spawnunit, adapting an older version of IndigoFenix's construct creature, I made units that does not cause panic. I'll compare what I did with my current script and keep you informed on how it goes.

Edit: Okay so it work on a save and not another, fun. And on the very same save, if I retire the fort, stat another and use th same script, the spawned unit is hostile on reload.
« Last Edit: January 29, 2015, 06:00:26 pm by Boltgun »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #5 on: January 30, 2015, 03:00:42 am »

Warmist is supposed to be working on updating spawn unit.

Hehe.... "is supposed to" hehe...

expwnent

  • Bay Watcher
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #6 on: January 30, 2015, 10:53:12 am »

Do you plan on doing it? Eventually I'll get to it but it'll be at least a month at the absolute minimum because February is crazy for me.

You don't have to obviously but I'd like to know. It would make sense since you wrote the original.
« Last Edit: January 30, 2015, 11:06:59 am by expwnent »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #7 on: January 30, 2015, 03:14:26 pm »

Do you plan on doing it? Eventually I'll get to it but it'll be at least a month at the absolute minimum because February is crazy for me.

You don't have to obviously but I'd like to know. It would make sense since you wrote the original.
Well it's i haven't still found why c++ version (i hope we are talking about that?) fails in arena OR fort mode and actually was stuck there. Now there is an updated df and i should probably update c++ side.
I'll try my best (e.g. tomorrow? GMT+2) because i'm currently in df mode and it's not clear how long it will last :)

expwnent

  • Bay Watcher
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #8 on: January 30, 2015, 03:46:23 pm »

Ok, thanks!
Logged

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #9 on: January 31, 2015, 06:00:23 am »

So I tried again and compiled a few fixes I could collect from Rumshusher and IndigoFenix's scripts and here's where I'm at:
https://gist.github.com/Devduweb/9299841e7169445f8cce

A library version of spawnunit that can select a caste at random (currently ignoring ratios but that'll do for standard creatures), spawn any number of units and returns them in an array for further edition if needed.

The panic bug remains, I suspect it have something to do with site populations but I am surprised that, of all the worlds I generated, one save acts fine. In case this helps here's the save and the scripts :
https://drive.google.com/file/d/0B8QFWS9tHkaaY0o4TTdOWU44Nms/view?usp=sharing

The lucky save 'seemsok' keeps friendly units as friendly, the orthus near the wagon have been spawned by script for example. On the other save however, spawning an unit, then saving and loading will see the new unit go berserk. Perhaps you'll have a clue as to what difference between the saves is important.

The saves are modded games but I tested on a vanilla game and behaviors are unchanged.
« Last Edit: January 31, 2015, 06:39:07 pm by Boltgun »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #10 on: January 31, 2015, 03:40:51 pm »

amount, not ammount

Boltgun

  • Bay Watcher
  • [UTTERANCES]
    • View Profile
Re: Dfhack scripts for Masterwork
« Reply #11 on: February 01, 2015, 03:09:58 am »

Logged