Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 147 148 [149] 150 151 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457142 times)

DrStalker

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2220 on: August 06, 2012, 03:05:19 pm »

Thanks Quietust.

How do I add entries into an array?  For example, I have two items:

Code: [Select]
[lua]# printall(df.global.world.artifacts.all[0].item.itemrefs)
0                        = <general_ref_is_artifactst: 0x15f1d720>
1                        = <general_ref_contained_in_itemst: 0x15f1d740>
[lua]# printall(df.global.world.artifacts.all[6].item.itemrefs)
0                        = <general_ref_contained_in_itemst: 0x1c349be0>

How do I add an extra entry to df.global.world.artifacts.all[6].item.itemrefs?  Trying to just create without doing anything special doesn't work:

Code: [Select]
[lua]# df.global.world.artifacts.all[6].item.itemrefs[1]=general_ref_is_artifactst
(interactive):1: Cannot write field vector<general_ref*>.1: index out of bounds.

Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r1
« Reply #2221 on: August 06, 2012, 03:25:05 pm »

First of all, that's a vector, not an array, so you need to use :insert(index,value) to add new stuff.

Second, you need to create a new object when inserting it - df.general_ref_is_artifactst:new(). Once you create it, you'll then have to actually populate its artifact ID.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

xavious

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2222 on: August 07, 2012, 07:13:27 pm »

Is it possible to edit an adventurers skills and if so, how? I lost all my skill in reading and I've been trying to find a way to restore it.

Sorry for the noob questions. I'm new to modding and not quite sure where to begin on my own.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r1
« Reply #2223 on: August 07, 2012, 07:32:12 pm »

Yes, it is possible. Exactly how, I don't recall - search through this thread and you should find something (there's a "brainwash"-type script which alters skills).
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

assasin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2224 on: August 08, 2012, 07:55:06 am »

everytime i use the dfusion easy_embark is crashes and shuts down. Yet I've read somewhere its one of the few things that works. Can anyone help?

edit-typo
« Last Edit: August 08, 2012, 07:58:29 am by assasin »
Logged

assasin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2225 on: August 09, 2012, 01:32:24 am »

just to confirm, this is to get different numbers of dwarves on embark in dfusion. and theres no bugs in th coding if it is.

Spoiler (click to show/hide)
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2226 on: August 09, 2012, 04:36:18 am »

just to confirm, this is to get different numbers of dwarves on embark in dfusion. and theres no bugs in th coding if it is.

Spoiler (click to show/hide)

Did you try this?:
The fix is still not included in this version. To fix it manualy:
Find this line in dfusion/common.lua, and replace ".text" with "Dwarf Fortress.exe":

Code: [Select]
local pos=string.find(v.name,".text") or string.find(v.name,"libs/Dwarf_Fortress")

Also small change:
Spoiler (click to show/hide)
It does not work with less than 7 dwarves, small hack is not sufficient to account for whatever DF does with those dwarves...
« Last Edit: August 09, 2012, 04:38:15 am by Warmist »
Logged

assasin

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2227 on: August 09, 2012, 10:26:43 pm »


Quote from: assasin on Today at 01:32:24 am

just to confirm, this is to get different numbers of dwarves on embark in dfusion. and theres no bugs in th coding if it is.



Spoiler (click to show/hide)



















Did you try this?:


Quote from: Warmist on July 19, 2012, 01:11:48 am

The fix is still not included in this version. To fix it manualy:


Quote from: ag on June 25, 2012, 02:13:47 am

Find this line in dfusion/common.lua, and replace ".text" with "Dwarf Fortress.exe":


Code: [Select]
local pos=string.find(v.name,".text") or string.find(v.name,"libs/Dwarf_Fortress")




Also small change:


Spoiler (click to show/hide)
















thanks
Logged

DrStalker

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2228 on: August 10, 2012, 12:13:10 am »

I'm starting to build a little library of minor scripts (make everyone happy, control who gets the next mood, convert all iron to steel, that sort of thing)

Where is the best place to upload them so others can use them as a reference?  So far the only script collection I've found has been vjek's userpage on the wiki.


Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2229 on: August 10, 2012, 01:09:28 am »

I usually dump my collection in either Dfusion's thread or make a pastebin dump.
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

Altaree

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2230 on: August 10, 2012, 08:43:54 am »

I'm starting to build a little library of minor scripts (make everyone happy, control who gets the next mood, convert all iron to steel, that sort of thing)

Where is the best place to upload them so others can use them as a reference?  So far the only script collection I've found has been vjek's userpage on the wiki.
You could fork the github repository, add your files and submit a pull request to the project.
Logged
Dan Pearson:
This is a game which calculates the volume of blood in every creature it generates so it knows how much alcohol it would have to consume to get drunk, an update which, remarkably, ended up covering people's fortresses in cat vomit.

ASnogarD

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2231 on: August 11, 2012, 02:56:13 pm »

Probably been mentioned but just in case...

I use DFHACK with the Lazy Newb Pack, when I run DF from the pack it starts dfhack properly, then I run Stonesense with no issue.
The issue is with the DF's Hotkeys, for some reason the Hotkeys names are typed as commands in dfhack... I am sure this is not intended.

software running :

Win7 64 bit
DF 34.11
DFHack 34.11.r1
Lazy Newb Pack v 13

from the pack I use Therepist and Soundsense.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r1
« Reply #2232 on: August 11, 2012, 03:44:33 pm »

Known issue - can't remember whether or not it's been fixed.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.34.11 r1
« Reply #2233 on: August 11, 2012, 05:41:06 pm »

Heh. It's not a bug, it's a feature ;)

Anyway, making it look for some prefix character to accept the hotkey as command could be better.

Something like
Code: [Select]
:commandwould be recognized, while
Code: [Select]
commandwouldn't.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r1
« Reply #2234 on: August 13, 2012, 01:44:58 pm »

I'm having some trouble figuring out how to pass arguments to lua scripts from DFHack. Here's what I've tried:

In DFHack:
Code: [Select]
myScriptNameWithoutDotLua doom1 doom2

Code: [Select]
print('print ...');
print(...)
print('printall ...');
printall(...);
--print('print ...[0]');
--print(...[0]); --this line causes a syntax error
local bob = ...;
local jim = ...;
print('print bob');
print(bob);
print('printall bob');
printall(bob);
print('print jim');
print(jim);
print('printall jim');
printall(jim);

Output:
Code: [Select]
print ...
doom1   doom2
printall ...
print bob
doom1
printall bob
print jim
doom1
printall jim

How do I access the arguments other than the first? "quasivariable" doesn't show up in any LUA documentation I can find.
« Last Edit: August 13, 2012, 01:48:23 pm by expwnent »
Logged
Pages: 1 ... 147 148 [149] 150 151 ... 373