Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Macro Pack (creates Fat and Tallow stockpiles in vanilla DF 31.25)  (Read 687 times)

Reelyanoob

  • Bay Watcher
    • View Profile

I made this compact VBS script, which when run (put in a file called macros.vbs in you macro directory, then double-click), expands out to create a bunch of DF macros.  You need windows xp+ to run it, but the created macros should work on any DF. These genned macros are also a LOT more compact and faster than the ones you can make in-game. Still, the vbs is ~1k, and it gens 72k of macros.

Created Macros are :-

Trade - swipes a pages of trade goods.
Fat - Create a fat-only stockpile (accurate for vanilla DF 31.25)
Tallow - Create a Tallow-only stockpile (DF 31.25)
Wax - Create a Wax-And-Pudge only stockpile (DF 31.25)
Plate - Create a pressure plate, activated by creatures, then drops min weight to lowest.

The only things you need to change for the fat,tallow,wax stockpiles to work is the first line of the vbs script. BM needs to be set to the number of Bogeymen fat/tallow pairs in your possible fats list, and FB should be set to the number of Forgotten Beasts. Each fat/tallow pair counts as one. These values seem to vary by world, and the values of 10 and 2 is just what I had in my world. Please let me know if this is not working in your game for any reason.

It's super-cryptic to save space.
Code: [Select]
BM=10:FB=2
Dim F:t=vbTab:e=t+"End of group":ts="STOCKPILE":tz="_SETTINGS":tp=ts+tz
Set S=CreateObject("Scripting.fileSystemObject")
Sub W(T)F.WriteLine(T)End Sub
Sub X(X1)W(t+t+X1):W(e)End Sub
Sub Y(U,C)FOR I=1 TO C:X(U):NEXT End Sub
Sub K(C,D)CALL Y("STANDARDSCROLL_"+D,C) End Sub
Sub KD(C)CALL K(C,"DOWN")End Sub
Sub KU(C)CALL K(C,"UP")End Sub
Sub PD(C)CALL K(C,"PAGEDOWN")End Sub
Sub KR(C)CALL K(C,"RIGHT")End Sub
Sub Z(C,D)FOR I=1 TO D:X("SELECT"):KD(C):NEXT End Sub
Sub CS(Q)X("D_"+ts+"S"):X(ts+"_CUSTOM"):X(ts+"_CUSTOM"+tz):KD(1):X(tp+"_ENABLE"):X(tp+"_FORBID_ALL"):KR(1):KD(13):If Q Then X(tp+"_PERMIT_SUB")
KR(1)End Sub
Sub TF:CALL Z(2,40):Call Z(3,2):Call Z(2,132):Call Z(3,1):Call Z(2,137+FB+BM)End Sub
Sub TW:PD(5):Call Z(0,1):KU(3):Call Z(0,1):PD(16):KU(2):Call Z(0,1)End Sub
Sub MS(H)Set F=S.CreateTextFile(H+".mak",TRUE):W(H)End Sub
Sub MX:W(t+t+"CUSTOM_CTRL_R"):W(e):W("End of macro")End Sub
MS("Fat"):CS(0):TF:MX
MS("Tallow"):CS(1):TF:TW:MX
MS("Wax"):CS(0):TW:MX
MS("Trade"):Call Z(1,15):MX
tb="HOTKEY_BUILDING_TRAP":bt="BUILDING_TRIGGER_"
MS("Plate"):X("D_BUILDING"):X(tb):X(tb+"_TRIGGER"):X(bt+"ENABLE_CREATURE"):Call Y(bt+"MIN_SIZE_DOWN",49):MX
« Last Edit: April 25, 2011, 12:36:15 am by Reelyanoob »
Logged