Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 171 172 [173] 174 175 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1113444 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2580 on: May 06, 2015, 02:44:15 pm »

Box: What's wrong with teleport.lua? It was working for me the last time I checked (which was at least after v0.40.20, if not v0.40.24).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2581 on: May 07, 2015, 02:12:50 am »

Questions:

1. If I give a unit several interactions is it possible to tell them not to use them all right away? Can I give them any logic behind using them? (besides the USAGE_HINT) Or staggering their usage?
2. Is there a function for computing the weight of a unit? I know there is the dfhack.units functions for figuring out speed and age and such, wondering if there is one for weight.
3. If I use add a syndrome with add-syndrome command with modtools/item-trigger -onEquip is it smart enough to know to remove the syndrome when the item is unequiped or do I need to add an -onUnequip version?
4. Similarly, does -onEquip only work if the actual inventory changes? What happens if I use another script to change one of the items material or subtype? Will it still run -onEquip or -onUnequip?
5. Does -onStrike only run if the target is wounded? What about if the attack is blocked/parried/dodged?
6. With the decoupling of movement and attack speeds, does CE_SPEED_CHANGE still affect both or just movement?
7. I am planning on either making a seperate plugin or an addition to the item-trigger script by allowing for -onParry and -onBlock. Currently the only way I see to do that is by using the eventful onReport and parsing the report for the required information. Is there another way to do it? Possibly an onAction event? I suppose if I make it a seperate plugin I could make it something like action-trigger and allow for dodging and such too?

3. You need onUnequip.

4. It will not fire on material, it might fire on subtype. edit: I think it checks the item id so if you're careful and change it in all the right places you *might* be able to make it trigger by changing its id to the next unused one and updating everything accordingly but it would be easy to get that wrong and crash/corrupt the game so be careful.

edit2: It will definitely work if you change the id of the item, but you'd have to make sure you find every df structure that refers to that object and update it. Do a search through the xml for "id" or "item" and see the places where item ids are written down. You may run into issues if it's an artifact or named item.

5. Only if wounded. It will not fire if blocked or parried or dodged.

7. For now you'd have to do onReport, but it's easier than you think because blocks and parries and dodges are a specific element of the event_type enumeration. You might still have to parse for the attacker / defender and the weapon. I can add that to EventManager for the next version so it can reuse the code for figuring out who's who.

edit2: onAttack also won't work on counter-strikes (probably).

See also: https://github.com/DFHack/df-structures/blob/master/df.announcements.xml#L2
« Last Edit: May 07, 2015, 12:48:56 pm by expwnent »
Logged

Dramegno

  • Bay Watcher
  • Gobo the other white meat
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2582 on: May 09, 2015, 01:17:23 pm »

Hello, hopeful that this is the right place to ask this question if not please point me to the right elf.
I am experiencing a saving system issue I am using masterwork reborn .006 with the save backups enabled. now the seasonal saves work without issue, but saves saved with the dfhack quicksave command and with the vanilla save and quit option either doesn't actually save at all or gets put in what ever backup save is in the lowest rung on the list.

If you need more information tell me

also I first asked this in the masterwork reborn thread and I was told that nothing in M.R. should effect the saving system.
Logged
So, it's AnimaRytak, mighty Void God, versus the greatest cluster[FOWL] my incompetence can engineer.

I will be so god damn proud if AMBASSADOR bites your head off.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2583 on: May 09, 2015, 01:48:21 pm »

Are you loading from a backup? DF will always save to the folder it was loaded from.
Also, DFHack's quicksave command will save to the folder you loaded and won't create a backup.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Dramegno

  • Bay Watcher
  • Gobo the other white meat
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2584 on: May 09, 2015, 02:55:46 pm »

I have no choice but to load from the seasonal autosave backup folders. when I load the initial save that is not in a backup folder it still saves(vanilla quit/dfhack quicksave) to the last backup folder listed if it saves. seasonal autosaves always create a new backup folder. also when I check the details view of my save folder the current folder's date modified is the time I performed the quit save(haven't checked with the quicksave) and no other save folder would have a matching time.
Logged
So, it's AnimaRytak, mighty Void God, versus the greatest cluster[FOWL] my incompetence can engineer.

I will be so god damn proud if AMBASSADOR bites your head off.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2585 on: May 09, 2015, 03:17:56 pm »

I have no choice but to load from the seasonal autosave backup folders.
What do you mean? What's wrong with your original save folder (the one without a date appended)?

Quote
when I load the initial save that is not in a backup folder it still saves(vanilla quit/dfhack quicksave) to the last backup folder listed if it saves.
Are you saying that DF is saving to a different folder than the one you loaded from? To make sure you're loading the correct world, what's displayed if you run ":lua print(dfhack.getSavePath())" ?

Quote
also when I check the details view of my save folder the current folder's date modified is the time I performed the quit save(haven't checked with the quicksave) and no other save folder would have a matching time.
If the original folder (without a date) is being updated, I'm not sure what the issue is.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Dramegno

  • Bay Watcher
  • Gobo the other white meat
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2586 on: May 09, 2015, 03:28:54 pm »

Quote
Are you saying that DF is saving to a different folder than the one you loaded from? To make sure you're loading the correct world, what's displayed if you run ":lua print(dfhack.getSavePath())" ?
sorry I misspoke, I haven't tried quicksave on the inital save.

Quote
What do you mean? What's wrong with your original save folder (the one without a date appended)?
the inital save folder still has the inital save from embark, it does not update this folder. I got the first save folder and then the backups from the begining from each season.

When I said that the current folder is marked as being modified I was talking about the folder named current in the save folder. this folder is empty

[edit:] something that the person told me in the masterworks reborn thread that the fact that by backup save folders have two different dates in the name and that it seamed weird to him/her.
« Last Edit: May 09, 2015, 03:31:19 pm by Dramegno »
Logged
So, it's AnimaRytak, mighty Void God, versus the greatest cluster[FOWL] my incompetence can engineer.

I will be so god damn proud if AMBASSADOR bites your head off.

Usul

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2587 on: May 09, 2015, 04:11:11 pm »

I have troubles with item-trigger, I can't seem to make it work with materials.
I tested this
Code: [Select]
modtools/item-trigger -checkInventoryEvery 1 -material CREATURE_MAT:GREAT_GREY_WOLF:COVENANT -command [ modtools/add-syndrome -syndrome abysswalker -target \\UNIT_ID ] -onEquip
with this material
Code: [Select]
[USE_MATERIAL_TEMPLATE:COVENANT:METAL_TEMPLATE]

[STATE_NAME_ADJ:ALL_SOLID:abysswalker]
[STATE_NAME_ADJ:LIQUID:abysswalker]
[STATE_NAME_ADJ:GAS:abysswalker]
[PREFIX:ancient]
in the proper files
and dfhack keep saying 'attempted to index a nil value'
I tried with DWARF:SKIN instead of GREAT_GREY_WOLF:COVENANT to see if it was my material, but it still doesn't work.
I was trying with a ring if that matters, does anyone see what I did wrong ?

Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2588 on: May 09, 2015, 04:12:51 pm »

and dfhack keep saying 'attempted to index a nil value'

right click window bar

highlight edit

click "mark"

highlight error

press enter to copy

paste it here

Usul

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2589 on: May 09, 2015, 04:24:15 pm »

yeah sorry you are right I should've posted the error

Code: [Select]
... Fortress 0.40.24/hack/scripts/modtools/item-trigger.lua:62: attempt to index
 a nil value
stack traceback:
        ... Fortress 0.40.24/hack/scripts/modtools/item-trigger.lua:62: in funct
ion 'handler'
        ... Fortress 0.40.24/hack/scripts/modtools/item-trigger.lua:102: in func
tion 'equipHandler'
        ... Fortress 0.40.24/hack/scripts/modtools/item-trigger.lua:111: in func
tion <... Fortress 0.40.24/hack/scripts/modtools/item-trigger.lua:105>
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2590 on: May 09, 2015, 04:33:35 pm »

You didn't actually define an item, which it apparently needs.

Usul

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2591 on: May 09, 2015, 04:45:14 pm »

Thanks I thought I could specify just the material to target whatever item is made of that, I guess I can't, then.
Hum, it seems it accept only specific ID, so no generic RING for me. I guess I'll have to do what I want another way

EDIT:It's weird I tried without any item and INORGANIC:BRONZE and it worked for everything in the Arena but the crutches and the rings I made with a reaction. I'm lost.
« Last Edit: May 09, 2015, 05:04:02 pm by Usul »
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2592 on: May 09, 2015, 10:24:57 pm »

hi, i made a simple edit to the putontable script that "builds" items into your wagon, but what i would really like is to be able to put items "inside" buildings and containers. is it possible with this same style lua script?
or perhaps using gmeditor?
« Last Edit: May 09, 2015, 10:47:47 pm by Snergler »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2593 on: May 10, 2015, 12:41:32 am »

Hmmm, if you can put an item in a wagon like that it should work the same way because I was playing around in df.global.world.buildings and figured out how to move a wagon so I could put it inside a carved out chunk of mountain, all of the items came with it.
Spoiler (click to show/hide)
Logged

Snergler

  • Bay Watcher
  • The world is the same as ever.
    • View Profile
Re: DFHack 0.40.24-r3
« Reply #2594 on: May 10, 2015, 03:02:48 pm »

i managed to build the item as part of the wagon with the script, then used gm-editor to change the in_building flag to false.
the item remains in the wagon but is no longer "built" into it, so success!
but i have a ways to go before doing it with a script, thanks for pointing me in the right direction :)
Logged
Pages: 1 ... 171 172 [173] 174 175 ... 360