Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 [30] 31 32 ... 243

Author Topic: DFHack 50.13-r1  (Read 811690 times)

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #435 on: November 22, 2017, 01:47:58 am »

IIRC, addReactionToShop either didn't work at all, or worked very poorly last time I tried to use it.

Some completely useless info on it not working here. Damn, I wish I could remember how and why it didn't work.

Edit: it may have been fixed at some point though, so if it works let me know. Can't have outdated info clogging the mind...
I think addReactionToShop has some limit on shops...
It's only for workshop and furnace. Workshop here is most workshops (?). Easiest way to see is probably add event on onPostSidebar to print a message and just see.

P.S.: looking over the code there is a way to change add other type jobs. Did not try though, because it's setting the default df button to add different job type. Lua Code here

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #436 on: November 22, 2017, 03:31:43 am »

Ahh, that jogged some memories loose. I have added hardcoded jobs to workshops a bunch, just not reactions.

The reason I never modified the sidebar button lists to add reactions to workshops where that is possible is simple: It does not play nice with the manager. Not working with the manager is ok for a small number of otherwise critical hardcoded jobs, but it is terrible UX for reactions when you could just add them properly.

In any case, the procedure for adding a reaction to a workshop is simple: Use eventful.postWorkshopFillSidebarMenu, create new button objects, and insert them into df.global.ui_sidebar_menus.workshop_job.choices_all and .choices_visible

Creating buttons is a matter of creating and populating (IIRC) df.interface_button_building_new_jobst objects. Which is what eventful does I think, so...
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Amostubal

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #437 on: November 22, 2017, 12:33:52 pm »

hmmm Okay I'm half way there.... here's the issue so far... I have the shop added into the entity menus just fine from the change-build-menu thanks Milo.  The AddReactiontoShop  also seems to work... except they are unaccessible, in red, as if they don't have the right reagents, the reactions have 0 reagents so it can't be that.

so... I guess the issue is I need to add the reactions to the entity too? somehow? that was the part I was trying to avoid.  As I want them to appear only when I want them to become available.

But the way I have it working right now is avoiding the AddReactiontoShop all together.
Added the permitted reactions to the entity and the building only through script when I want it to be add it.  I'm going to stick to that, because at least I can restrict the building being available to begin with... I just wont have tiered abilities at the shop that way...  but that's okay,  the current script doesn't need that, and I can think of other ways to do that, that I've done before.
« Last Edit: November 22, 2017, 12:37:14 pm by Amostubal »
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #438 on: November 22, 2017, 01:04:18 pm »

except they are unaccessible, in red, as if they don't have the right reagents, the reactions have 0 reagents so it can't be that.

Now I remember! That was the problem! I'm pretty sure I never figured out why it did that, so I gave up and worked something else out.

By the way: If you want, it would be fairly easy to write a script that removed reactions from the sidebar list just before it is shown, but after the game populates it. You just use the same method as in my last post, but instead of adding new buttons, you iterate the list and remove the ones you don't want. (The procedure should be similar to what change-build-menu does to remove workshops, just with different lists and greatly simplified due to being able to use eventful to trigger the code).

The only issue is that, last I knew, eventful.postWorkshopFillSidebarMenu did not work for furnaces.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #439 on: November 22, 2017, 03:28:27 pm »

I think you could have the reaction (and building) present in the entity from the beginning but delete it from the menu everytime the menu is opened up, unless a certain flag is set. That way it would be like "adding" the reaction when a specific criterion is meant, but in actually it would be just not removing it. I planed to do something similar for creating tech trees
Logged

Amostubal

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #440 on: November 23, 2017, 05:08:18 am »

except they are unaccessible, in red, as if they don't have the right reagents, the reactions have 0 reagents so it can't be that.

Now I remember! That was the problem! I'm pretty sure I never figured out why it did that, so I gave up and worked something else out.

By the way: If you want, it would be fairly easy to write a script that removed reactions from the sidebar list just before it is shown, but after the game populates it. You just use the same method as in my last post, but instead of adding new buttons, you iterate the list and remove the ones you don't want. (The procedure should be similar to what change-build-menu does to remove workshops, just with different lists and greatly simplified due to being able to use eventful to trigger the code).

The only issue is that, last I knew, eventful.postWorkshopFillSidebarMenu did not work for furnaces.
I think you could have the reaction (and building) present in the entity from the beginning but delete it from the menu everytime the menu is opened up, unless a certain flag is set. That way it would be like "adding" the reaction when a specific criterion is meant, but in actually it would be just not removing it. I planed to do something similar for creating tech trees

Basically that's what I did... actually since its a complex script setup; the buildings are added to a abnormal location (MACHINES not WORKSHOP or FURNACES) I just built a quick reader that reads the opening of the raw file for the building list and a few other interesting bits of info.  It also reads the opening to the reaction list which stores a section of info for reaction-triggers and could contain other bits of info later for restrictions.... all of this is done prior to the object token so DF itself ignores it all completely as if its a comment section.  What it allows is the dynamic construction of the reaction triggers and putting the buildings wherever the player wants.  even added in a section for entity control so the first part of the info for each building is the entity allowed the item ie "- MOUNTAIN BUILDING INFO....." means the building will only be added to Dwarfs.  Lastly which I'm not going to bother, I can work out restrictions in similar ways and stop reactions from being accessible, although I totally ignored it this project... since I'm already restricting via not entering the buildings into the entity build menu until the script is turned on.

The smaller project which I'm working on that the whole of the code is based off is named "pipe-dreams" which will be an integrated part of LDF, but will also be standalone launched when I get it completed... probably in a week... even though it wont be ready for the new DF version until the next DFHack is ready.  Its based on some of your scripts Roses, I hope you don't mind.
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #441 on: November 23, 2017, 03:38:14 pm »

except they are unaccessible, in red, as if they don't have the right reagents, the reactions have 0 reagents so it can't be that.

Now I remember! That was the problem! I'm pretty sure I never figured out why it did that, so I gave up and worked something else out.

By the way: If you want, it would be fairly easy to write a script that removed reactions from the sidebar list just before it is shown, but after the game populates it. You just use the same method as in my last post, but instead of adding new buttons, you iterate the list and remove the ones you don't want. (The procedure should be similar to what change-build-menu does to remove workshops, just with different lists and greatly simplified due to being able to use eventful to trigger the code).

The only issue is that, last I knew, eventful.postWorkshopFillSidebarMenu did not work for furnaces.
I think you could have the reaction (and building) present in the entity from the beginning but delete it from the menu everytime the menu is opened up, unless a certain flag is set. That way it would be like "adding" the reaction when a specific criterion is meant, but in actually it would be just not removing it. I planed to do something similar for creating tech trees

Basically that's what I did... actually since its a complex script setup; the buildings are added to a abnormal location (MACHINES not WORKSHOP or FURNACES) I just built a quick reader that reads the opening of the raw file for the building list and a few other interesting bits of info.  It also reads the opening to the reaction list which stores a section of info for reaction-triggers and could contain other bits of info later for restrictions.... all of this is done prior to the object token so DF itself ignores it all completely as if its a comment section.  What it allows is the dynamic construction of the reaction triggers and putting the buildings wherever the player wants.  even added in a section for entity control so the first part of the info for each building is the entity allowed the item ie "- MOUNTAIN BUILDING INFO....." means the building will only be added to Dwarfs.  Lastly which I'm not going to bother, I can work out restrictions in similar ways and stop reactions from being accessible, although I totally ignored it this project... since I'm already restricting via not entering the buildings into the entity build menu until the script is turned on.

The smaller project which I'm working on that the whole of the code is based off is named "pipe-dreams" which will be an integrated part of LDF, but will also be standalone launched when I get it completed... probably in a week... even though it wont be ready for the new DF version until the next DFHack is ready.  Its based on some of your scripts Roses, I hope you don't mind.

Not at all, that's what they are there for
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #442 on: November 24, 2017, 11:38:28 pm »

DFHack 0.43.05-r3 was released yesterday. Unfortunately, all of the packages still contained scripts from r2, so I fixed and repackaged them today and renamed them as "r3.1". DFHack will still report its version as "r3" to make things easier for projects like TWBT, DF-AI, etc., so apologies for any confusion there. Other than that change, the builds are identical.

If you downloaded r3 yesterday, you can just download "new-scripts.zip" or "new-scripts.tar.bz2" from GitHub, extract the "scripts" folder from it, and replace your "hack/scripts" folder with the new scripts folder (that's what I did to make the "r3.1" packages).

Download: https://github.com/DFHack/dfhack/releases/tag/0.43.05-r3
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.

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #443 on: November 26, 2017, 04:10:51 pm »

Is there a way to check the current architecture from a lua script? I need that for a fix in devel/export-dt-ini. There is dfhack.getOSType() for the OS, but I need to know if it is win32 or win64.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #444 on: November 26, 2017, 05:51:50 pm »

dfhack.internal.getArchitecture()
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.

Fatace

  • Bay Watcher
  • Cease hostilities? Never!
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #445 on: November 26, 2017, 06:48:42 pm »

Any rough estimates on time when DFhack will be available for .44.02+ release soon?
Logged
I once had a 30 dwarf glacier fortress once.. was going great till the dwarf merchants brought along a WereKoala and killed everyone...

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #446 on: November 26, 2017, 07:22:40 pm »

Probably multiple weeks. I don't actually have a good estimate yet.
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.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #447 on: November 27, 2017, 04:55:07 am »

Consider a first DFHack release for a new arc in less than a month to be a quick one, so I'd hope for Christmas.
Logged

Amostubal

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #448 on: November 27, 2017, 07:38:45 am »

Probably multiple weeks. I don't actually have a good estimate yet.

Where do you need hands at?  I'm not the greatest at things (more brute force than anything), but I don't mind trying.  I also have a couple of programmer friends on call.  I guess what I'm asking is what needs to be done to get a test DFHack version up and going?
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r3.1
« Reply #449 on: November 27, 2017, 12:51:54 pm »

I'd be looking at it myself but naturally can't, but what is the new stuff in the xml export exactly?
Logged
Pages: 1 ... 28 29 [30] 31 32 ... 243