Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 14 15 [16] 17 18 ... 38

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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #225 on: March 10, 2011, 04:55:37 am »

Now another question: Can you play in two fortress this way :D (play in one-> adv mode-> travel -> fort mode in second-> adv mode->travel ->etc...)
Woah it worked... Unfortunately everyone killed each other (unpaused in arena mode) so horse traveled...
« Last Edit: March 10, 2011, 05:21:09 am by darius »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #226 on: March 10, 2011, 06:41:58 am »

Now another question: Can you play in two fortress this way :D (play in one-> adv mode-> travel -> fort mode in second-> adv mode->travel ->etc...)
Woah it worked... Unfortunately everyone killed each other (unpaused in arena mode) so horse traveled...
Mind Blown. wait so this will work if you took a Lair and convert it to a fort as well right? oh to remove/add "Is resident" from dwarves it's flag (51) so if I get as far as you guys in exploring Fort adv then running a code to search and remove add is key.
« Last Edit: March 10, 2011, 06:46:47 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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #227 on: March 10, 2011, 08:53:59 am »

Found an interesting thing... If you go to other fort with adventurer it no longer is same size as it was. I suspect that made me lose last fort (my only adventurer moved too far...)

Edit: nope that does not work... It just quits after a while... :/
« Last Edit: March 10, 2011, 09:01:38 am by darius »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #228 on: March 10, 2011, 05:51:05 pm »

Found an interesting thing... If you go to other fort with adventurer it no longer is same size as it was. I suspect that made me lose last fort (my only adventurer moved too far...)

Edit: nope that does not work... It just quits after a while... :/
so is there a way to save in fort mode once you get there in adventure mode?
also due to bad internet connections I couldn't grab the new non .21-20 update for Dfusion and couldn't test out the lair building. but here's the carry code.
Code: [Select]
function rum_tools.carry()
   myoff=offsets.getEx("AdvCreatureVec")
   vector=engine.peek(myoff,ptr_vector)
   indx=GetCreatureAtPos(getxyz())
   --[[print("grab person how? N S E W") -- this was supposed to make it possible to grab the person in any direction other than West but if you could get it to work be I'm okay with it.
   --repeat
   r=io.stdin:read()
   if r=="N" then
      enty=(engine.peek(vector:getval(0),ptr_Creature.y)+1)
      end
   elseif r=="S" then
      enty=(engine.peek(vector:getval(0),ptr_Creature.y)-1)
      end
   elseif r=="W" then
      entx=(engine.peek(vector:getval(0),ptr_Creature.x)-1)
      end
   elseif r=="E" then
      entx=(engine.peek(vector:getval(0),ptr_Creature.x)+1)
      end]]--
   repeat
   flg=engine.peek(vector:getval(0),ptr_Creature.flags)
   flg2=engine.peek(vector:getval(0),ptr_Creature.flags)
   --print("how high?")
   --entry=io.stdin:read()
   Crepos=engine.peek(vector:getval(0),ptr_Creature.x)-1 --+entx
   move=engine.peek(vector:getval(0),ptr_Creature.z)+1 --this was for stunning enemies who would just use their new position to attack you for friendlies best remove this
   --print("W and E")
   --entry=io.stdin:read()
   --move2=engine.peek(vector:getval(0),ptr_Creature.x)
   --print("N and S") old code I had before you release your version
   --entry=io.stdin:read()
   move3=engine.peek(vector:getval(0),ptr_Creature.y) --+enty
   engine.poke(vector:getval(indx),ptr_Creature.z,move)
   engine.poke(vector:getval(indx),ptr_Creature.x,Crepos)
   engine.poke(vector:getval(indx),ptr_Creature.y,move3)
   until flg:get(15) ==1 or flg2:get(1) ==1
end

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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #229 on: March 11, 2011, 05:30:16 pm »

*advertisement paid by Dragon hunters inc*
How are you boning your pray? Everybody knows that it needs extreeeemly sharp blades! Now guild of dragon hunters present newest creation:

Made by top mages in top towers! Buy yours today.
Price one(1) adamantinium coin
Logged

Thundercraft

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #230 on: March 12, 2011, 11:48:09 am »

Question:
The DFFD download page says that the DFusion download is:
Quote
For DF version:   0.31.21

So, is only guaranteed compatible with 0.31.21? Or is backwards compatible as well?
If it is the latter, then perhaps the download page should say this instead?:
Quote
For DF version:   Multiple
Or, at least the description should mention backwards compatibility...?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #231 on: March 12, 2011, 05:18:42 pm »

Question:
The DFFD download page says that the DFusion download is:
Quote
For DF version:   0.31.21

So, is only guaranteed compatible with 0.31.21? Or is backwards compatible as well?
If it is the latter, then perhaps the download page should say this instead?:
Quote
For DF version:   Multiple
Or, at least the description should mention backwards compatibility...?
I tried it's only for 31.21 you could attempt to get the offsets (-f)for any of the older versions but yeah you might end up not getting all features.
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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #232 on: March 12, 2011, 05:43:06 pm »

It's kind of backwards/forward compatible. But when a new version comes some fixes change the static offsets or something in patters.lua that may brake backwards compatibility. I know that DFHack approach is superior (supporting versions from long ago) but I tend to do things a bit more chaotically and another reason is that this way i support Toady One and his patches no mater what (so nobody would get stuck in version X and say that we don't update because program Y does not have support for X version yet.)
Logged

Thundercraft

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #233 on: March 13, 2011, 12:50:08 am »

Well, that's a problem for me.  :(

Recently, I was excited about the new features of the latest DFusion and so I downloaded the new version, while deleting the old version. Now I find out that DFusion is version specific (unlike DFHack). I had already decided to stick with .18 and my old fort for a while longer. (Also, I'm waiting for a few more bug fixes and for more mods to catch up.)

So now I'm really wishing I had not deleted the old version...

I was not expecting the same level of backwards compatibility as DFHack, with support for versions from long ago. But I was expecting support of at least a few recent versions. (I think the way DFHack does this is by keeping all the old offsets and some of the old code and it checks the version of DF you have installed, automatically matching the offsets and code with the correct version.)

I can appreciate that you support Toady and his new releases. But there were major changes and lots of bugs with the recent versions. And not everyone is willing to just abandon their well established forts and/or their megaprojects every time a new release comes out.

Perhaps you would consider uploading a couple of the most recent DFusion versions on a free file host such as mediafire or dropbox? At least, some of the more popular mods and tools do this, such as the Lazy Newb Pack, Phoebus' Graphic Set, and Ironhand's Graphics Set. For that matter, I doubt the Dwarf Fortress File Depot would mind if you kept a few of the old versions around a while.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #234 on: March 13, 2011, 01:43:03 am »

Well, that's a problem for me.  :(

Recently, I was excited about the new features of the latest DFusion and so I downloaded the new version, while deleting the old version. Now I find out that DFusion is version specific (unlike DFHack). I had already decided to stick with .18 and my old fort for a while longer. (Also, I'm waiting for a few more bug fixes and for more mods to catch up.)

So now I'm really wishing I had not deleted the old version...

I was not expecting the same level of backwards compatibility as DFHack, with support for versions from long ago. But I was expecting support of at least a few recent versions. (I think the way DFHack does this is by keeping all the old offsets and some of the old code and it checks the version of DF you have installed, automatically matching the offsets and code with the correct version.)

I can appreciate that you support Toady and his new releases. But there were major changes and lots of bugs with the recent versions. And not everyone is willing to just abandon their well established forts and/or their megaprojects every time a new release comes out.

Perhaps you would consider uploading a couple of the most recent DFusion versions on a free file host such as mediafire or dropbox? At least, some of the more popular mods and tools do this, such as the Lazy Newb Pack, Phoebus' Graphic Set, and Ironhand's Graphics Set. For that matter, I doubt the Dwarf Fortress File Depot would mind if you kept a few of the old versions around a while.
really one of my problems with Dfusion or any Warmist work is that removal of the old versions.
I miss out on getting the latest 19 patch before he updated it for 21. though you could copy and paste your old save over I did so with a .17 save up to .19 and a 31.10 to a 31.18 though this may be a costumer fix than a producer fix and being able to go download a older version should be there in DffD.
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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #235 on: March 13, 2011, 04:54:42 am »

Thundercraft try running DFusion with -f if that does not work. Try pasting into offsets.txt (its from 2.5 AFAIK its last version to work with 31.18):
Code: [Select]
AdvCreatureVec : 0x12a12c4
CreatureGloss : 0x12e5370
CreaturePtr : 0xacf848
CreatureVec : 0x12a12d4
CurrentRace : 0x10cdaf0
Legends : 0x12a1344
PlayerLegend : 0x1438bb4
StartDwarfs : 0x4f87e2
WordVec : 0x12e5520
Xpointer : 0x7127f0

If that does not work then i'll upload old versions somewhere...
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #236 on: March 13, 2011, 07:12:44 am »

did anyone ever complied the list of things you can do with DFMODE that was found out?
because between your double fort plan and Askot's really hard to pull off method of swapping. have any one else discover any thing new during the release of the new function?
Though now I'm wondering would a lair turn players fort would as a alternative to a site if retiring their adventure is out of the question?
edit: good news DFusion users I just work out the kinks of my carry code now you can carry any one north south east or west.
Code: [Select]
function rum_tools.carryEX()
   myoff=offsets.getEx("AdvCreatureVec")
   vector=engine.peek(myoff,ptr_vector)
   indx=GetCreatureAtPos(getxyz())
   print("grab person how? N S E W")
   --repeat
   r=io.stdin:read()
   if r=="N" then
      repeat 
      flg=engine.peek(vector:getval(0),ptr_Creature.flags)
      flg2=engine.peek(vector:getval(indx),ptr_Creature.flags)
      enty=engine.peek(vector:getval(0),ptr_Creature.y)+1
      entx=engine.peek(vector:getval(0),ptr_Creature.x)
      move=engine.peek(vector:getval(0),ptr_Creature.z)
      engine.poke(vector:getval(indx),ptr_Creature.z,move)
      engine.poke(vector:getval(indx),ptr_Creature.x,entx)
      engine.poke(vector:getval(indx),ptr_Creature.y,enty)
      until flg:get(15) ==1 or flg2:get(1) ==1
   elseif r=="S" then
      repeat
      flg=engine.peek(vector:getval(0),ptr_Creature.flags)
      flg2=engine.peek(vector:getval(indx),ptr_Creature.flags)
      enty=engine.peek(vector:getval(0),ptr_Creature.y)-1
      entx=engine.peek(vector:getval(0),ptr_Creature.x)
      move=engine.peek(vector:getval(0),ptr_Creature.z)
      engine.poke(vector:getval(indx),ptr_Creature.z,move)
      engine.poke(vector:getval(indx),ptr_Creature.x,entx)
      engine.poke(vector:getval(indx),ptr_Creature.y,enty)
      until flg:get(15) ==1 or flg2:get(1) ==1
   elseif r=="W" then
      repeat
      flg=engine.peek(vector:getval(0),ptr_Creature.flags)
      flg2=engine.peek(vector:getval(indx),ptr_Creature.flags)
      entx=engine.peek(vector:getval(0),ptr_Creature.x)-1
      enty=engine.peek(vector:getval(0),ptr_Creature.y)
      move=engine.peek(vector:getval(0),ptr_Creature.z)
      engine.poke(vector:getval(indx),ptr_Creature.z,move)
      engine.poke(vector:getval(indx),ptr_Creature.x,entx)
      engine.poke(vector:getval(indx),ptr_Creature.y,enty)
      until flg:get(15) ==1 or flg2:get(1) ==1
   elseif r=="E" then
      repeat
      flg=engine.peek(vector:getval(0),ptr_Creature.flags)
      flg2=engine.peek(vector:getval(indx),ptr_Creature.flags)
      entx=engine.peek(vector:getval(0),ptr_Creature.x)+1
      enty=engine.peek(vector:getval(0),ptr_Creature.y)
      move=engine.peek(vector:getval(0),ptr_Creature.z)
      engine.poke(vector:getval(indx),ptr_Creature.z,move)
      engine.poke(vector:getval(indx),ptr_Creature.x,entx)
      engine.poke(vector:getval(indx),ptr_Creature.y,enty)
      until flg:get(15) ==1 or flg2:get(1) ==1
   end
end
also I'm going to work on combining both the carryEX with my wagon mode so that one could push the companion along their journey which means companion storage and if I'm lucky quick warp to the wagon if their wounded.
« Last Edit: March 14, 2011, 01:18:52 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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #237 on: March 14, 2011, 04:25:55 pm »

I'm not sure but ptt_dfflag pattern changed a bit and might have broken some stuff... Maybe this would help:
Code: [Select]
function ptt_dfflag.set(self,num,val) --set to on or off one bit in flags
if(val==0) then val=false end --hehe c++ like fix...
if (self:get(num)~=val) then
self:flip(num)
end
end
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.8
« Reply #238 on: March 15, 2011, 03:14:43 am »

**
From Rumtech comes the wagonwarp for dumping items with time to spare or getting out of a lair with your hair. Call now and we throw in a free the Piggyback.The Piggyback has a mobile wagon attachment so anyone(on your friend list) could ride in 3x3 style. Yours now for easy 3 payments of 4 Slade coins.
Spoiler: "1-800-RUM-TECH" (click to show/hide)
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

addictgamer

  • Bay Watcher
  • Penguin Developer
    • View Profile
    • Github
Re: DFusion - a lua based plugin system v2.8
« Reply #239 on: March 15, 2011, 12:08:04 pm »

*Takes out 10 Slade coins*
Thank you kind sir. Keep the change ^_^

Edit:
Running SDL .21 in windows:
Quote
F:\df_linux_31_21\df_31_21_win\df_fusion>DfFusion.exe
lua working ok!
Running lua file:common.lua
Found plugins:
1).patterns.lua
2).embark
3).friendship
4).migrants
5).simple_embark
6).research
7).adv_tools
8).tools
3
launching friendship...
race num:226
Invalid peek type
plugins/common.lua:99: attempt to index local 'vec' (a nil value)
F:\df_linux_31_21\df_31_21_win\df_fusion>echo Kay, hit enter.
Kay, hit enter.

F:\df_linux_31_21\df_31_21_win\df_fusion>pause
Press any key to continue . . .
Races.txt:
Quote
DWARF
HUMAN
Am I doing something wrong? Or is there an offset problem?
« Last Edit: March 15, 2011, 12:32:27 pm by addictgamer »
Logged
I'm patiently waiting for the ability to mine and construct palaces in adventure mode.
Barony. A 3D, multiplayer roguelike I am developing.
Pages: 1 ... 14 15 [16] 17 18 ... 38