Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 29 30 [31] 32 33 ... 38

Author Topic: DFusion - a lua based plugin system (integrated into DFHack)  (Read 149695 times)

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #450 on: November 06, 2011, 06:36:34 pm »

no it was not.  Didn't know.  THe instructions don't really elaborate (altho I'm learning from dfhack that this is the case).

Okay, now it's just crashing when I open Dwarf Fortress, but dfusion says it's running okay

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #451 on: November 06, 2011, 07:01:09 pm »

Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #452 on: November 06, 2011, 07:06:04 pm »

windows.  I'm using the lazy new pack, but I have a straight 31.25 I was using.  Wuz the difference?  It's capable of running in a window.  It's the standard version dl'd from bay12games.

I did get it working with dfhack r8 package. :)  Just not with the standalone package.

Tee hee 20 dorfs!
« Last Edit: November 06, 2011, 07:11:01 pm by thistleknot »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #453 on: November 06, 2011, 09:50:22 pm »

windows.  I'm using the lazy new pack, but I have a straight 31.25 I was using.  Wuz the difference?  It's capable of running in a window.  It's the standard version dl'd from bay12games.

I did get it working with dfhack r8 package. :)  Just not with the standalone package.

Tee hee 20 dorfs!

okay so you are using Lazy new pack and haven't downloaded the game normally so this means LNP interfering with Dfusion and/or LNP is legacy and not SDL.


but since you are running DFHacks Dfusion I can use this time to pimp dump this onfunction command set up so that you can no longer have rotten foods.

add this line to the dfusion/onfunction/plugin.lua file
Code: [Select]
function derot()
myoff=offsets.getEx("Items") -- first find out where "item vector" is
vector=engine.peek(myoff,ptr_vector) --  get list of items
for i=0,vector:size()-1 do --look at each item
flg=engine.peek(vector:getval(i),ptr_item.flags)
flg:set(5,0)
engine.poke(vector:getval(i),ptr_item.flags,flg)
end
end


function Dfolder()
DeathMsg()
Ghost()
makeghost()
end
function Mfolder()
derot()
end
function Bfolder()
Burn()
end
function Hfolder()
DeathMsg()
end
stick this under the first "onfunction.setcallback" line
Code: [Select]
--onfunction.SetCallback("Die",Dfolder)
onfunction.SetCallback("Move",Mfolder)
onfunction.SetCallback("Flip",Bfolder)
« Last Edit: November 06, 2011, 09:58:21 pm by Rumrusher »
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #454 on: November 07, 2011, 12:19:55 am »

lnp is sdl.  It's possible I was using legacy with another df I had (31.25).  But I'm not sure.  At this point I'm not sure if I care if the new dfhack r8 has the latest dfusion, cuz I got it worked with dfhack r8.

Update: I re-dl'd sdl 31.25, a-ok :)
« Last Edit: November 07, 2011, 07:59:44 pm by thistleknot »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #455 on: November 07, 2011, 02:45:36 am »

lnp is sdl.  It's possible I was using legacy with another df I had (31.25).  But I'm not sure.  At this point I'm not sure if I care if the new dfhack r8 has the latest dfusion, cuz I got it worked with dfhack r8.
dfhack only updated dfusion in r7, r8 just an addon to Minecraft. oh well hopefully you can prevent scattering and soon playing with "turn dead to zombies" mode in no time.

Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #456 on: November 07, 2011, 10:42:23 am »

Sorry if I sound dumb or the subject's been answered, but is there a way to make some of the embark creatures females? I seem to only have males on embark. And I plan on killing every single migrant who comes to my fort.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #457 on: November 07, 2011, 12:44:39 pm »

Sorry if I sound dumb or the subject's been answered, but is there a way to make some of the embark creatures females? I seem to only have males on embark. And I plan on killing every single migrant who comes to my fort.
well you could make a race of dwarves that the males lay eggs. race change one dwarf to that one, then run egg hatcher and race change the first female born to a normal dwarf.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

thistleknot

  • Bay Watcher
  • Escaped Normalized Spreadsheet Berserker
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #458 on: November 08, 2011, 12:23:17 pm »

Anyway I can add my own offset's?  I used cheat engine 6.1 to find 1 byte values that specify dwarf embark points (there's 7 dorfs) that are spent on skills.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #459 on: November 08, 2011, 01:37:04 pm »

yes it's under the offsets.txt file
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #460 on: November 10, 2011, 10:56:20 am »

Hm...well, that answers my question. Thanks!

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #461 on: November 16, 2011, 10:55:01 am »

Hm...I heard it is possible to make half-breeds...I have a half-elf raw file, now how do I do the whole human-elf breeding thing so I can put this raw into action? I know it involves race-changer, but the only functions I use are the ones pertaining to fortress mode (embark, friendship, migrants), so how do I attempt half-breeds?

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #462 on: November 16, 2011, 11:59:45 pm »

Hm...I heard it is possible to make half-breeds...I have a half-elf raw file, now how do I do the whole human-elf breeding thing so I can put this raw into action? I know it involves race-changer, but the only functions I use are the ones pertaining to fortress mode (embark, friendship, migrants), so how do I attempt half-breeds?
okay Dfusion from Dfhack removed Adventure tools warmist didn't add them back so you just have to use dfusion 3.8 or copy paste the race change function from that into Dfhack dfusion.

you need to race change the mother into the father race to have them mingle around and to get her knock up once knock up you either race change her into the half elf race or back to her normal race and give birth to horrible ugly spawn that will crash the game if you try to read their descriptions.

 I found a solution to that bug but it based around making sure the race you going to change into has the  same facial feature and body type as the mother so that dwarf fortress doesn't go nuts trying to figure out who's who.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

IamanElfCollaborator

  • Bay Watcher
  • Resident Shipper God and Freyjapiller
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #463 on: November 17, 2011, 10:36:51 am »

Hm...hopefully a human-elf hybrid should work if I make sure the bodies are the same. No half-orcs...

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v3.8
« Reply #464 on: November 17, 2011, 03:48:34 pm »

Spoiler (click to show/hide)

edit: here's my trait, Trigger folders for Onfunction and my WIP Voodoo functions* due to post space issues and I don't want to fill other threads with these codes over and over again hopefully these get added in to Dfhack.

Code: [Select]
function trait() --this here is the central hub for adventure mode ongoing functions based on the creature's race, this will work in fort mode if you set up one of the members in the area as the "adventurer"
RaceTable=RaceTable or BuildNameTable() --slow.If loaded don't load again
myoff=offsets.getEx("AdvCreatureVec")
vector=engine.peek(myoff,ptr_vector)
trai=engine.peek(vector:getval(0),ptr_Creature.race)
tra=RaceTable["KEEPER_INFECTED"] --all these are set for different creature races the adventurer could be, one can change this to what ever they want
tra4=RaceTable["FRAWD"]
tra2=RaceTable["KEEPER"]
tra3=RaceTable["DWARF"]
tra5=RaceTable["MAGE"]
tra6=RaceTable["INTERN"]

if trai==tra then --this is the 'folder' section that checks if the adventurer is either a Keeper infected and if so then runs the functions in it.
--ControlZom3()
keeptrack() --these are functions stored in the folder if the above is true dfusion will run the functions
ControlRace()
end
if trai==tra2 or Trai==tra4 then
ControlCiv3()
end
if trai==tra5 then
--Magi()
Keeptrack()
end
if trai==tra6 then
Nightfriend()
end
if trai==tra3 then
--ControlCiv3()
--wepbrn2()
ControlRace()
--Voodoo1()
end
Voodoo2() --this goes to a function that does the same thing Trait does but to items and tracks them through material and item type.
end
Code: [Select]
function Voodoo2() --stick normal spells here to add or make a spell you need to use Dfusion item edit to find out the item itmser,mat,submat,submat2 number
myoff=offsets.getEx("Items")
vector=engine.peek(myoff,ptr_vector)
for i=0,vector:size()-1 do --check all items
off=vector:getval(i)
itmser=ptr_item.getname(nil,RTI)
mat=engine.peek(off,ptr_item.mat)
submat=engine.peek(off,ptr_item.submat)
submat2=engine.peek(off,ptr_item.submat2)
lid=engine.peek(off,ptr_item.legendid)
RTI=engine.peek(off,ptr_item.RTI)
if itmser=="item_verminst" then --this checks if the item is a vermin
if mat==(293) then --this checks if the item is a certain type of vermin which as of now checks to see if it's a fluffly wambler
Nightfriend()
flg=engine.peek(off,ptr_item.flags) --this should destroy the wambler to prevent the above function to repeat each move
flg:set(17,true)
end
end
if itmser=="item_boulderst" then
if mat==(129) then
print("it really works")
Nightfriend()
end
if submat2==(305) then
--ControlZom3()
Zombieressurect()
end
if submat2==(306) then
print("teleport spell goes here")
end
end
if mat==(0) and submat2==(304) then
print("works")
end
if itmser=="item_statuest" then
if submat2==(275) then
print("this is the trigger")
end
if submat2==(306) then
print("teleport here")
itemwarp()
end
end
if itmser=="item_eggst" then
if mat==(129) then
print("it really works")
end
end
end
end
Code: [Select]
function Dfolder() --these folders are here because Onfunction doesn't run all commands if you attach them to the bottom, so I though why not make a function that does that for me. this is the on death folder which holds key commands that trigger if someone dies.
DeathMsg()
Ghost()
makeghost()
end
function Mfolder() --this is the on move folder which holds functions I want to run forever, or if someone moves. so playing adventure mode this will happen constantly
raceconvert()
--ControlCiv3()
derot()
--Zombieressurect()
--zombiearmy()
trait()
--Nightfriend()
makeghost()
end
function Bfolder() --this is the on building flip folder if someone pulls a level this triggers
Burn()
end
function Hfolder()--this is on hurt suppose to flip off when someone is damaged haven't found use for it as of now.
DeathMsg()
end
if mypos then
print("Onfunction already installed")
--onfunction.patch(0x189dd6+offsets.base())
else
onfunction.install()
dofile("dfusion/onfunction/locations.lua")
--onfunction.SetCallback("Die",Dfolder) --this is where the folders go
onfunction.SetCallback("Move",Mfolder)
onfunction.SetCallback("Flip",Bfolder)
end

so far
« Last Edit: November 27, 2011, 11:21:31 am by Rumrusher »
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes
Pages: 1 ... 29 30 [31] 32 33 ... 38