Bay 12 Games Forum

Please login or register.

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

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

Bharani

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #150 on: January 02, 2011, 03:10:00 pm »

Hey. Just got Dfusion and started playing with to heal a dwarf. I posted this in the runesmith thread, but thought I'd try here, too, since the question is about Dfusion.

I'm trying to heal a dwarf with a yellow lower leg who is being ignored by the others and is starving to death.
Using DFusion while in fort mode. Do I use adv_tools? If so, this is what I get when I try to change adventurer, I get this (it IS fort mode):
plugins/patterns.lua:33: attempt to perform arithmetic on local 'num' (a nil value)
If I use change race, it asks me to enter a race in all caps, and then gives me the above error message no matter what I enter.
Any way to heal a dwarf in fort mode using Dfusion?
I've also done dfusion -r to update the offsets.txt.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #151 on: January 02, 2011, 05:08:33 pm »

Hey. Just got Dfusion and started playing with to heal a dwarf. I posted this in the runesmith thread, but thought I'd try here, too, since the question is about Dfusion.

I'm trying to heal a dwarf with a yellow lower leg who is being ignored by the others and is starving to death.
Using DFusion while in fort mode. Do I use adv_tools? If so, this is what I get when I try to change adventurer, I get this (it IS fort mode):
plugins/patterns.lua:33: attempt to perform arithmetic on local 'num' (a nil value)
If I use change race, it asks me to enter a race in all caps, and then gives me the above error message no matter what I enter.
Any way to heal a dwarf in fort mode using Dfusion?
I've also done dfusion -r to update the offsets.txt.
what version of dwarf fortress do you have... if it's 17 then sorry this only works for 18.
if you have 18 then did you select your dwarf first by using the Look command If not then next time have the pointer on top of the wounded dwarf the program need to know the exact direction the creature is.
If you did that and it's 18 then it must been you hitting the swap adventure function when your in fort mode.
and isn't it -f not -r for getting offsets for dfusion?

edit: I was wondering does the perma adventure swap also grant access to retiring as that character or do I need to swap back to the adventurer after I'm done.
« Last Edit: January 02, 2011, 09:42:57 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

Bharani

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #152 on: January 02, 2011, 10:34:28 pm »

Hey. Just got Dfusion and started playing with to heal a dwarf. I posted this in the runesmith thread, but thought I'd try here, too, since the question is about Dfusion.

I'm trying to heal a dwarf with a yellow lower leg who is being ignored by the others and is starving to death.
Using DFusion while in fort mode. Do I use adv_tools? If so, this is what I get when I try to change adventurer, I get this (it IS fort mode):
plugins/patterns.lua:33: attempt to perform arithmetic on local 'num' (a nil value)
If I use change race, it asks me to enter a race in all caps, and then gives me the above error message no matter what I enter.
Any way to heal a dwarf in fort mode using Dfusion?
I've also done dfusion -r to update the offsets.txt.
what version of dwarf fortress do you have... if it's 17 then sorry this only works for 18.
if you have 18 then did you select your dwarf first by using the Look command If not then next time have the pointer on top of the wounded dwarf the program need to know the exact direction the creature is.
If you did that and it's 18 then it must been you hitting the swap adventure function when your in fort mode.
and isn't it -f not -r for getting offsets for dfusion?

edit: I was wondering does the perma adventure swap also grant access to retiring as that character or do I need to swap back to the adventurer after I'm done.
Ah, didn't realize that I needed to use the "look" mode to select the dwarf. Thank you! It's crashing after I changerace-save-reload, but at least it's doing something now!
And yes, it's -f. My mistake.

EDIT: Yes! By changing him to an elf, and then back to a dwarf, I avoided a crash and although it didn't heal him, it made the other dwarves recognize he needed help. Fun and useful tool. Thanks for your help!
« Last Edit: January 02, 2011, 11:14:27 pm by Bharani »
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #153 on: January 03, 2011, 12:17:27 am »

to heal you need to swap out the body type of the creature.
which is why I mention DEMON_1 or BRONZE_COLOSSUS(not really for swapping body parts but for a indestructible powerhouse that never needs sleep.) so that the game will dump the info on the old parts for new ones and if you swap back the game should replace those parts with new ones.
Though best to wait awhile before healing or the wounds will reopen and you might get blood all over your floor.
if you want to play around with flags runesmith had then poke though this thread for some tips on doing so.
(but for the new version just fill in this "adv_tools.menu:add("[insert what it should say here]",adv_tools.[the function name goes here]) also always back up plugins before digging around and adding for the off chance of breaking the code don't know how.
edit: oh and daruis I forgot to bring this up but that zombie mode and select all doesn't work.

edit:shock about editing this again but I'm working on a caravan mode function that will make those who want to RP as wandering settlers or a makeshift Oregon Trail mod.
so far all I have for code is this
Code: [Select]
function adv_tools.wagonmode()
--first three lines same as before (because we will need an offset of creature at location x,y,z)
myoff=offsets.getEx("AdvCreatureVec")

vector=engine.peek(myoff+16,ptr_vector)
indx=GetCreatureAtPos(getxyz())
--indx=0
--print(string.format("%x",vector:getval(indx)))
flg=engine.peek(vector:getval(indx),ptr_Creature.flags) --get flags
flg:set(1,0)
flg:set(74,0)
engine.poke(vector:getval(indx),ptr_Creature.flags,flg)
r=io.stdin:read() -- repeat for it too work... also creature will be dead.
flg:set(1,0) -- brings back to life
flg:flip(74) -- will scuttle if not repeat.
engine.poke(vector:getval(indx),ptr_Creature.flags,flg)
end
Code: [Select]
adv_tools.menu:add("caravan mode",adv_tools.wagonmode)
so far all is fine for looking like a wagon but storing items may lead to some troubles, if you care about the person that being turn into a wagon then they will never come back when you retire or the case having a wild animal might lead to your entire group betrayal or if seeing how it's dead the lost of all it's items from the first scuttle making you have to use the get item code and force the creature to pick up all those items.

adding items should be easy(after getting it to work) as dropping the stuff in the middle wagon tile remove the caravan mode from the creature (by going over it again which will remove it for you and pausing the utility the other steps where done by booting up another version of Dfusion), swap to them pick up the item and swap back, then unpause the utility that had caravan mode running.
« Last Edit: January 16, 2011, 05:55:32 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

Fwoosh

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #154 on: January 16, 2011, 07:17:07 pm »

Not being a programmer, I don't completely understand how to use this so I could really use some help. I have a pet that keeps getting an infection and dying so I want to prevent this by healing it. From what I've understood from this thread you can heal a creature by changing it to another kind of creature and then changing it back. I've tried messing with this but can't understand how to use it. Can anyone help me figure this out?
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #155 on: January 16, 2011, 07:31:56 pm »

Not being a programmer, I don't completely understand how to use this so I could really use some help. I have a pet that keeps getting an infection and dying so I want to prevent this by healing it. From what I've understood from this thread you can heal a creature by changing it to another kind of creature (save/travel) and then changing it back (save/travel). I've tried messing with this but can't understand how to use it. Can anyone help me figure this out?
Well this cures missing limbs and damaged nerves though I hadn't gone and fix infections with this.
Though if it's a syndrome based infection then you're best bet is to change into a creature who won't be effected by this Syndrome and wait it out. unless it was a cut that was left unchecked then try changing to DEMON_1 and play with your pet in that state for awhile before swapping back.
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

Fwoosh

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #156 on: January 16, 2011, 08:36:50 pm »

Thanks, that sounds like that could help. Its an infected wound so I guess the demon would be the option to go with. However, my main problem is that I really just can't figure out how to make the program actually do that. I just can't seem to understand how to give the program commands. It just keeps crashing whenever I do anything. An example of what to type in with fill in the blanks or something would be great. Please help a poor non-programmer that is completely lost.  :(
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #157 on: January 16, 2011, 08:52:29 pm »

Thanks, that sounds like that could help. Its an infected wound so I guess the demon would be the option to go with. However, my main problem is that I really just can't figure out how to make the program actually do that. I just can't seem to understand how to give the program commands. It just keeps crashing whenever I do anything. An example of what to type in with fill in the blanks or something would be great. Please help a poor non-programmer that is completely lost.  :(
well sadly you have to use the pointer on top of the creature for it to work. the code for Adv_tools all are on the getting the 'xyz' for finding the creature id to do any work on it.
so hitting either the look, talk, throw, fire, commands to bring up the pointer and aim it at the creature then activate the command. no programming needed. hope this makes this clear to understand.
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

Fwoosh

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #158 on: January 16, 2011, 09:16:27 pm »

Ok, so if I am getting this right what I have to do is put the cursor over the pet using look and then go to the Adv_tools. Would I then use the change adventurer tool? Where does the demon part come in? Thanks for all the help you are giving me one this.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #159 on: January 16, 2011, 09:39:52 pm »

Ok, so if I am getting this right what I have to do is put the cursor over the pet using look and then go to the Adv_tools. Would I then use the change adventurer tool? Where does the demon part come in? Thanks for all the help you are giving me one this.
the demon part comes from using race changer the different random body parts replaces all the ones the creature had including the infected one.
swapping back will lead to the game inputting the specific body parts for that race and stick new ones than remembering the old body. So swapping to an elf won't work due to sharing the same anatomy with a dwarf where swapping to a 1 legged elephant will.

though I want to know what animal/creature your pet is?
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

Fwoosh

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #160 on: January 16, 2011, 11:34:09 pm »

Its a Blightscale Dragon from Legendary Lands. I embarked on the spot just so I could capture the stupid thing and so I can't have it dying from a stupid broken leg infection. If it dies I'll never have my dragon army of doom! Also, my problem is that I don't know what to actually type in. So far I get that I put the cursor over the dragon and then type in the instructions, which I know are part of the Adv_tools section. I just don't know what specifically to type in. Step by step instructions might be necessary.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #161 on: January 17, 2011, 03:10:09 am »

Its a Blightscale Dragon from Legendary Lands. I embarked on the spot just so I could capture the stupid thing and so I can't have it dying from a stupid broken leg infection. If it dies I'll never have my dragon army of doom! Also, my problem is that I don't know what to actually type in. So far I get that I put the cursor over the dragon and then type in the instructions, which I know are part of the Adv_tools section. I just don't know what specifically to type in. Step by step instructions might be necessary.
wait fort mode then you best brush up on Deon's creatures Raw name or you might end up not getting back that Blightscale Dragon. oh now I can understand and give a proper step by step.

best back up the save incase anything goes horribly wrong(I didn't go through all this with out save scumming)
hover over your dragon using the look command then go into race changer then change into a Human/Dwarf/Demon since it's body parts are so not humanoid or random gen.
save seeing you can't travel or sleep on it then reload the game and check up on the dragon hopefully you save while pause and not unpause due to the case of the game thinking it has human/dwarf/Demon parts but has dragon wounds still active which to me means the game can't find the parts
now your half dragon half random animal let's say Cat will walk around with no rot on their limbs... unless cat share the same limb parts then you have a rot limb kitty swap to a different creature... like a Demon.
now after a few ticks clear out the bad body it had you can swap back to your dragon.
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

Fwoosh

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #162 on: January 17, 2011, 06:44:05 am »

Thank you so much for helping me all this time. I think I almost have it now. I just don't know what to literally type in. When I just type in the number for change race the whole thing crashes. I've tried typing the 3 with DEMON_1 after it in different ways but it just says incorrect choice. One example of what exactly to type and I think I have this figured out. Thanks again for all the help you are giving me.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #163 on: January 17, 2011, 02:39:18 pm »

Thank you so much for helping me all this time. I think I almost have it now. I just don't know what to literally type in. When I just type in the number for change race the whole thing crashes. I've tried typing the 3 with DEMON_1 after it in different ways but it just says incorrect choice. One example of what exactly to type and I think I have this figured out. Thanks again for all the help you are giving me.
well is it on top of the creature, and did you type in all caps CAT then save?
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

Fwoosh

  • Bay Watcher
    • View Profile
Re: DFusion - a lua based plugin system v2.4
« Reply #164 on: January 17, 2011, 03:02:26 pm »

The cursor is on top of the creature. When I type the 3 for the change race option the program just closes. If I type CAT and the 3 on the same line then it just gives an incorrect choice message.
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 38