Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 9 10 [11] 12 13 ... 18

Author Topic: Spellcraft Is <undefined> (v1.08) for 40d16  (Read 55362 times)

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #150 on: January 11, 2010, 11:28:28 am »

At first it was logic problem, now it probably some sort of hacking problem. Trying to call a function but after it df crashes. Worked for other function (print message) and not from trigger. Also from program that i use to hack df with (MHS) but it has some sort of guards (its written in help that it's really safe to call functions from MHS, would be nice to know how they do it). Now my function calling works like this: save context (all registers and flags) make space in stack, push arguments, push return address (into new allocated space just for that, where a breakpoint is set) resume thread. When breakpoint is reached restore state. (if needed results are extracted before state is restored)
« Last Edit: January 11, 2010, 11:39:56 am by darius »
Logged

Eagleon

  • Bay Watcher
    • View Profile
    • Soundcloud
Re: Spellcraft Is Reborn! (v0.8)
« Reply #151 on: January 11, 2010, 02:12:57 pm »

Hmm. Well, without looking at what's going on with a debugger I couldn't tell you for certain. But it sounds like either the function you're calling doesn't have all the data available to it to make it work properly at the time that you call it, or you're doing something with it that isn't handled by the function's internal logic. That's just my guess. I'd do some testing if that were the case, see what it references internally when it's called normally, and then see what those references look like when it's called by your program and it crashes.
Logged
Agora: open-source, next-gen online discussions with formal outcomes!
Music, Ballpoint
Support 100% Emigration, Everyone Walking Around Confused Forever 2044

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #152 on: January 11, 2010, 03:23:47 pm »

The worst part is that i can't use debugger (only one debugger can be attached to process and currently function calling is done by a hand made pseudo debugger). But yea i'll do more testing.
Logged

bartavelle

  • Bay Watcher
  • Coin coin!
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #153 on: January 12, 2010, 03:47:47 am »

The worst part is that i can't use debugger (only one debugger can be attached to process and currently function calling is done by a hand made pseudo debugger). But yea i'll do more testing.

You might try calling DF functions by either hooking or creating remote threads. That way you wouldn't have to debug the program to interact with it (you can still use Read/Write ProcessMemory).
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #154 on: January 12, 2010, 09:11:08 am »

thats what i plan to do post v1. Something like DFHack lib thread talked about. That way it would be nice and tidy.
Logged

Wiseacre

  • Bay Watcher
  • Licker of rogues
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #155 on: January 13, 2010, 06:38:47 am »

This doesn't work for Adventure mode, does it? I tried, and no fun. =/ I wanted to give my adventurer his arms back.
Logged
Doing youtube stuff now, check me out!
https://www.youtube.com/channel/UC0H15QEUIeG-GyFQY1Mu72Q

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #156 on: January 13, 2010, 09:27:32 am »

Really? I remember testing it with amulets of regeneration (on defend + regen) and imortality (on death + ressurect) , later bolts of berserk, dragon fire and similar. It all worked ok.  ???
Logged

Wiseacre

  • Bay Watcher
  • Licker of rogues
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #157 on: January 13, 2010, 03:41:05 pm »

Really? I remember testing it with amulets of regeneration (on defend + regen) and imortality (on death + ressurect) , later bolts of berserk, dragon fire and similar. It all worked ok.  ???

Huh. I tried a defensive regeneration combo, and a fire on attack sword. It is possible that I couldn't grow the arm back, because I had to retire him to make the fortress and brought him back to sift through the mess for the item I needed.
Logged
Doing youtube stuff now, check me out!
https://www.youtube.com/channel/UC0H15QEUIeG-GyFQY1Mu72Q

NRN_R_Sumo1

  • Bay Watcher
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #158 on: January 13, 2010, 08:42:35 pm »

Really? I remember testing it with amulets of regeneration (on defend + regen) and imortality (on death + ressurect) , later bolts of berserk, dragon fire and similar. It all worked ok.  ???

Huh. I tried a defensive regeneration combo, and a fire on attack sword. It is possible that I couldn't grow the arm back, because I had to retire him to make the fortress and brought him back to sift through the mess for the item I needed.

I think the main issue with regrowing his arms is, how does he pick it up without arms?
Logged
A dwarf is nothing but an alcohol powered beard.

Wiseacre

  • Bay Watcher
  • Licker of rogues
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #159 on: January 14, 2010, 02:12:30 am »

Really? I remember testing it with amulets of regeneration (on defend + regen) and imortality (on death + ressurect) , later bolts of berserk, dragon fire and similar. It all worked ok.  ???

Huh. I tried a defensive regeneration combo, and a fire on attack sword. It is possible that I couldn't grow the arm back, because I had to retire him to make the fortress and brought him back to sift through the mess for the item I needed.

I think the main issue with regrowing his arms is, how does he pick it up without arms?

Have you had a look at the mod I'm making? =D The Bots have three arms. Also, the defensive regeneration was on the armor he was wearing.
Logged
Doing youtube stuff now, check me out!
https://www.youtube.com/channel/UC0H15QEUIeG-GyFQY1Mu72Q

HungryHobo

  • Bay Watcher
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #160 on: January 15, 2010, 09:32:49 am »

darius this is truly remarkable!

It's almost a shame that the new release will stop  this incredible mod from working.
Young programmers should be hiking across remote mountains to beg you to take them as students.

On that notes any suggested reading material for those of us who would like to learn how to do the kind of memory hacks you're doing?
Logged

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #161 on: January 15, 2010, 01:24:12 pm »

Wiseacre: i could have messed up armor when "patching evil code" will check it out.
HungryHobo: Well there was a magazine "Hacker" for a few years, but later somehow it disappeared. Prob picked up most of from there. Usually sites talking about assembly, debugging and hacking/cracking have good stuff. (e.g tool i'm using MHS (memory hacking software) has a site, there was a lot of forum activity).

EDIT: just checked armour is detecting fine. Problem somewhere else.
EDIT2: this is annoying as hell. Made debuger function to transfer control to another debuger. Then ran it on other debuger AFTER the function was run (usually crashed DF) now it worked fine. (have a Giant recruit...) -.- Didn't reproduce.
« Last Edit: January 15, 2010, 03:28:20 pm by darius »
Logged

Hinasas

  • Escaped Lunatic
  • Playing roguelikes while watching animes....
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #162 on: January 15, 2010, 06:05:55 pm »

i seem to be having some trouble here... when i load SpellCraft.exe on the location select screen (fortress mode) and choose my equipment and embark, the game just freezes. i'm running the latest version, v0.28.181.40d, with the civilization mod and the  Dystopian Rhetoric graphics set. could these be interfering with SpellCraft?
Logged
I am hereby humbly joining the chorus of FFFFFFUUUUUUUUUUUUUUUUUUUUUUUUUU--

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #163 on: January 15, 2010, 06:07:35 pm »

You need to be running version 40d16 in order for this to work.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

darius

  • Bay Watcher
  • ^^
    • View Profile
Re: Spellcraft Is Reborn! (v0.8)
« Reply #164 on: January 16, 2010, 03:01:16 pm »

After so looong finally i am closer to the truth. Polymorph works on animals (thats for sure) but not on dwarves (with crashy results). Tried removing items and then polymorphing but that failed too. Now I think it could be only dwarves (as they could be in list of creatures that actually do jobs).

Edit: strange... Dwarfs belong to 3 vectors, pets to 4 vectors and wildlife also 4.
Edit2: doesn't work on merchant either. I guess it also won't work on goblins.
Edit3: Updated the program! (see link in first post) added new materials (silk, shell, leather, amber, ivory...) not sure how they will (won't) work. Also new (!!) greeting, polymorph (unfortunately you won't be able to turn your useless migrants into megabeasts) and Caravan (summons caravan (Although testing needed)) spells.
Edit4(too many edits...): Uploaded source to dffd: Here
« Last Edit: January 16, 2010, 05:07:16 pm by darius »
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 18