Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 5 6 [7] 8 9 ... 38

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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v1.95
« Reply #90 on: November 26, 2010, 07:24:30 pm »

K tried fixing it... now it also prints ALL creatures (formating sux but <some very important excuse>) and their race number (that gives general idea about what are they). I'm not sure if the fix works for ALL df version now but it does on 31.18.
Logged

Shinziril

  • Bay Watcher
  • !!SCIENCE!!
    • View Profile
Re: DFusion - a lua based plugin system v1.95
« Reply #91 on: November 28, 2010, 05:27:01 pm »

New version works, although in certain areas it can print several hundred creatures, resulting in the relevant ones running off the top of the list (presumably due to catching a larger-than-average portion of cavern critters or demons or some such).  Not really a huge problem; you just need to move somewhere else where this doesn't happen. 

The armor I've outfitted my single NPC companion has allowed him to last long enough to become a Legendary Spearman.  He's pretty damn badass at this point; he has seventy-odd personal kills at this point, and is perfectly capable of holding his own against several lesser-skilled bandits and murdering them all without any help.  He's even started to one-shot people, "BOOM headshot!" style.  Plus, he has a lovely collection of scars from back before I got him armor (amazingly none of which caused major disability). 

Adventurer Swap definitely makes NPC allies vastly more viable (particularly if they drop an item due to an injury that heals, like when he dropped his spear due to a broken wrist).  Now I just need to find a beach somewhere that doesn't freeze (this entire continent seems pretty cold, unhelpfully) and get him to at least Adequate Swimmer so he won't die if he randomly falls in a murky pool again . . . had to savescum twice due to that so far >_>
Logged
Quote from: lolghurt
Quote from: Urist McTaverish
why is Dwarven science always on fire?
Because normal science is boring

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v1.95
« Reply #92 on: November 29, 2010, 03:36:31 pm »

New version works, although in certain areas it can print several hundred creatures, resulting in the relevant ones running off the top of the list (presumably due to catching a larger-than-average portion of cavern critters or demons or some such).  Not really a huge problem; you just need to move somewhere else where this doesn't happen. 

The armor I've outfitted my single NPC companion has allowed him to last long enough to become a Legendary Spearman.  He's pretty damn badass at this point; he has seventy-odd personal kills at this point, and is perfectly capable of holding his own against several lesser-skilled bandits and murdering them all without any help.  He's even started to one-shot people, "BOOM headshot!" style.  Plus, he has a lovely collection of scars from back before I got him armor (amazingly none of which caused major disability). 

Adventurer Swap definitely makes NPC allies vastly more viable (particularly if they drop an item due to an injury that heals, like when he dropped his spear due to a broken wrist).  Now I just need to find a beach somewhere that doesn't freeze (this entire continent seems pretty cold, unhelpfully) and get him to at least Adequate Swimmer so he won't die if he randomly falls in a murky pool again . . . had to savescum twice due to that so far >_>
well with the swapping you could just make a reaction that trains swimming.
though I'm wonder is there a way DFusion can 'tame'/calm down/ befriend creatures? so that I could test if people can play as a Dungeon Master/ Demon Trainer and maintain a lair filled with monsters they can swap around and train and bring with?
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.0
« Reply #93 on: November 29, 2010, 07:34:46 pm »

Just tried rumrusher's idea. Results are in: can make them follow temporarily that is till you finish traveling/sleep or e.g. save/load. Also it does not make them friendly. But its fun to make demon follow you and then travel to a castle where he kills puny humans. Updated program. Oh and also they hang around if you leave them somewhere.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #94 on: November 29, 2010, 09:15:15 pm »

So before I test this, this means any friendly but won't agree to join characters will perma-join with you using this or will they revert? (either way this makes moving second tier companions possible).
I wonder if I could get a no ties adventurer to keep a fresh form hell demon by his/her side.
well this seems like a great test on bogeymen. Wait how many times one has to kill something before the game gives the creature a name, because seeing how fusion doesn't pick up profession/nick names this makes finding the one demon you control out of the 100 that live underground a pain.
Still will enjoy walking night creatures back to towns for massive slaughter or seeing if I can rent a stay in their homes.

edit:well I prove that swapping to said character will lead to your adventurer to zerk and kill it on sight.
sucks to be the zerba demon. now to test if normal folk can be effected as well... and next see if temp control of 2nd tier companions still follow 1st tier companions?

edit: found out if a companion(or I guess any one) recruits a companion it removes that companion from the adventurer's list of companions. so yeah I just learn how to dump companions in hovels now.
by having a high fame companion recruit another then swap to that one and recruit those I want to retire. Now all I need to do is find a place where I can dump these guys in with out coming back and finding them all dead from a demon attack or. lairs are death traps waiting to happen and hovels can lead to confusion.

fake edit: also having the creature follow the companion doesn't make it friends with other companions, case in point the poor pond grabber got shank by acharged and chewed on by one of my lady consort after I re-friend it it was shanked by a lord consort later.
the poor thing didn't even counterstrike or hit back.

edit: so to make terms for this
1st tier companions are ones you(the adventurer) can recruit
nth tier companions are the companions' companions who can't travel unlike 1st tier but will follow the their tier leader(2nd tiers are known to follow 1st tiers but 3rd tiers are after 2nd for following someone(2nd) who following a 1st tier)
___'s companions are 1st/nth tier companions that follow a non-companion (ei some body swapped creature who isn't apart of the adventurer's group.)
and finally Interns who are companions formed from the "make creature follow" command, who can travel with you but only once, and if a demon or wild creature will be attacked by other tier companions.
Also with the creature follow command one can make nth tier companions able to travel... I don't know the effects of removing someone from someone's group would do yet but this can lead to less painful long walks with large groups.

wait normal friendly folks seem to be fine when you save and load.
but I'm in the middle of testing tweak on a demon fort right now.
« Last Edit: November 29, 2010, 10:52:39 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

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #95 on: November 30, 2010, 06:14:11 am »

Um... interesting thing happened: the creature i left in a cave (human fisherman) "attacked" me when i was travelling (had a message you feel uneasy and he appeared standing next to me...)
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #96 on: November 30, 2010, 01:52:48 pm »

Um... interesting thing happened: the creature i left in a cave (human fisherman) "attacked" me when i was travelling (had a message you feel uneasy and he appeared standing next to me...)
yeah really weird too, you think you just mod the trait to have the "loves adventuring" and removes all blocks so you can ask them your self.
oh while moving some men (after dumping 2 children in the cave I went back and pick up a lady, a cook, and a consort) then some how from swapping back to my old body kogan teleported through the floor and the old spot the bronze was, weird.
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

latogato

  • Escaped Lunatic
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #97 on: December 01, 2010, 06:54:38 pm »

DFusion does not works for me. My human adventurer with 4 party members standing on a road. DFusion is running but almost all the options gives an application error. The simple_embark does nothing, waiting until control-c.

DF version: 0.31.18 Legacy and SDL

The offsets.txt:
AdvCreatureVec : 0x12a12c4
CreatureGloss : 0x12e5370
CreaturePtr : 0xacf848
CreatureVec : 0x12df5a0
CurrentRace : 0x10cdaf0
StartDwarfs : 0x4f87e2

I wrote some extra lines at the end of the offsets.lua:
--print ("Base",offsets.base())
print ("StartDwarfs",offsets.get("StartDwarfs"))
print ("CreatureVec",offsets.get("CreatureVec"))
print ("CreaturePtr",offsets.get("CreaturePtr"))
print ("CreatureGloss",offsets.get("CreatureGloss"))
print ("CurrentRace",offsets.get("CurrentRace"))

It seems all the offsets are nil. The offsets.base() also give an application error, so i commented it out.

StartDwarfs     nil
CreatureVec     nil
CreaturePtr     nil
CreatureGloss   nil
CurrentRace     nil
lua working ok!
Running lua file:common.lua
Running lua file:patterns.lua
Found plugins:
1).embark
2).friendship
3).migrants
4).research
5).simple_embark
6).tools

I'm completely clueless, why the offsets are nil. :(
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #98 on: December 01, 2010, 08:24:52 pm »

yeah the new version as mention before won't work well with others except for .18 sdl

so have you tried -f?
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.0
« Reply #99 on: December 01, 2010, 09:22:52 pm »

Hmm it does not seem to be as simple as running with "-f" maybe your Os is doing something bad? Have you tried running as an admin? offsets.base() should never fail (the most simplest function ever). Maybe something is corrupted? Rumrusher did you try v2.0?

Edit:And offsets are nil if they are not loaded yet. Offsets.lua defines how to find offsets because of that it still does not have offsets loaded. To see real addresses try pasting in init.lua just in the beginning.
« Last Edit: December 01, 2010, 09:38:29 pm by darius »
Logged

latogato

  • Escaped Lunatic
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #100 on: December 02, 2010, 10:02:53 am »

I looked again the error message and it's said exception C000001D happened.
Google said it's means an illegal instruction.
After that i started debugging the dfusion.exe
It's turned out the dfusion.exe using SSE2 instructions and my old cpu doesn't understand them. SSE2 was introduced with the Pentium 4.

Part of the code:
4298CE   MOV DWORD PTR [EBP-14],EAX
4298D1   MOVD XMM0,DWORD PTR [EBP-14]
4298D6   BYTE 66    <--- Oops, unknown instruction. Google said SSE2 instructions begin with 0x66.
4298D7   BYTE 0F    <--- 0F D6 means movq which is a SSE2 instruction.
4298D8   BYTE D6

It is a shock to me. :D I know my computer is old but until now i never had a problem with it... except some video card related problems.
Is there a hope for a non-SSE2 compiled dfusion.exe?
Some arguments for it:
- I'm sure i'm not the only one with that problem. Others just not persistent enough.
- DF seems not using SSE2, i have no problem with it.
- I want this mod! :)
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #101 on: December 02, 2010, 11:57:00 am »

Try one from this file. And write if any of them works. I hope that this is from my code not from lua lib or something... Oh and if it works pls tell which one. And i did not know that compiler puts SSE code into the exe i did not give it the flags to do it.
« Last Edit: December 02, 2010, 12:02:51 pm by darius »
Logged

latogato

  • Escaped Lunatic
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #102 on: December 02, 2010, 01:57:14 pm »

I think Lua binaries doesn't use SSE2 because they try to make them portable.

I tried the Dfusion.exes and all of them work fine! 8)
That's awesome, thank you! :D
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #103 on: December 02, 2010, 02:12:52 pm »

Great. It means that GCC implies that computers are not that old when compiling (it also implied that everyone is using 64bit at first :) )
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.0
« Reply #104 on: December 02, 2010, 08:07:02 pm »

so darius did you ever try dumping minions into a abandon fort?
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 ... 5 6 [7] 8 9 ... 38