Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 13 14 [15] 16 17 ... 31

Author Topic: Adventurer Fort: still useful i guess  (Read 147629 times)

ptb_ptb

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #210 on: December 21, 2014, 03:54:55 pm »

you're missing the Building.lua file. oh god you might be missing huge chunks of the original advfort.
like Advfort isn't just the advfort lua file. it's Advfort, the Widget folder for Building, workshop, on top of loads of other stuff that runs behinds the scenes.
this is what I feared, you might have a gutted(super different) Dfhack.  then again your computer seems to go from Currency as a folder divider to / so... I can't relate to that.

I was using 'dfhack-0.40.19-r1-Windows' which is the latest dfhack download from the main thread. dfhack DOES complain about something missing with 'buildplan', which sounds related. I just redownloaded and I can confirm that building.lua is not there.

Yeah and the \ = yen thing results from stupid decisions made in the dawn of time. It doesn't actually affect the working of my computer at all.

[EDIT] Wait, did you mean 'buildings.lua'? Because I'm not missing that file.

The buildplan error message was:

buildingplan.plug.dll has no name, version or self pointer
« Last Edit: December 21, 2014, 04:13:18 pm by ptb_ptb »
Logged
()==[:::::::::::::>

lethosor

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #211 on: December 21, 2014, 05:30:07 pm »

you're missing the Building.lua file. oh god you might be missing huge chunks of the original advfort.
I see nothing in the traceback that implies that (in fact, some lines refer to lines in buildings.lua).

Quote from: Rumrusher
then again your computer seems to go from Currency as a folder divider to / so... I can't relate to that.
It's probably a problem with the console not displaying backslashes correctly. Lua generally treats both forward slashes and backslashes as path separators on Windows.

The buildplan error message was:

buildingplan.plug.dll has no name, version or self pointer
Your buildingplan.plug.dll file is corrupted. What's the size of that file (in hack/plugins)? Some antivirus software has been known to single out buildingplan, for some reason. Buildingplan doesn't appear to be involved with Lua at all, though, so it's unlikely that this problem is related to the advfort problem.
« Last Edit: December 21, 2014, 05:33:39 pm by lethosor »
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.

ptb_ptb

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #212 on: December 22, 2014, 08:00:49 am »

Your buildingplan.plug.dll file is corrupted. What's the size of that file (in hack/plugins)? Some antivirus software has been known to single out buildingplan, for some reason. Buildingplan doesn't appear to be involved with Lua at all, though, so it's unlikely that this problem is related to the advfort problem.
You're right on all counts. It had been (silently) deleted by an anti-malware program and replacing it (and marking it as safe) did not make any difference to my advfort problems.

I'm having a similar problem with magma forge as I do with wood furnaces.



As close as I can track it down,
  buildings.constructBuilding(args) and args.building
are both returning nil, and the code cannot handle that case.
« Last Edit: December 22, 2014, 09:35:39 am by ptb_ptb »
Logged
()==[:::::::::::::>

ptb_ptb

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #213 on: December 23, 2014, 04:15:06 pm »

Oh hey! I've got it working. I'm not sure this is how it's supposed to work but if you do a 'build' to make a wood furnace you get the half finished one. Then if you do 'build last' on the partially complete wood furnace it will continue, then complete, the job.

[EDIT] One more thing. If there is an item obstructing the place the building is going your adventurer freezes and you have to shut down dwarf fortress.

[EDITx2] Ouch. Dwarf Fortress crashed when I tried to make pig iron bars.


Point of interest: Unlike other reactions I couldn't start making pig iron until I had picked up some of the items needed. It wouldn't start with all the items on the ground.

[EDITx3] I can't use looms to weave pig tail thread into cloth. I get a bunch of red text in the dfhack console.
« Last Edit: December 24, 2014, 03:41:31 pm by ptb_ptb »
Logged
()==[:::::::::::::>

ptb_ptb

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #214 on: December 28, 2014, 11:18:15 am »

Huh. Every time I extract adamantine strands it takes longer.
Logged
()==[:::::::::::::>

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: Adventurer fort reborn!
« Reply #215 on: January 10, 2015, 02:39:50 pm »

So messing around with advfort and recently figure out a frozen waterskin works well as resource for slabs, and you can engrave Secrets to them(using Gm-editor) giving you access to necromancy(and other modded secrets) at the start(in case you want to avoid modding the game to give you necromancy).

Now to figure out how to teach Reading to an adventurer(and have it stick since slapping the skill on doesn't seem to work) so that they don't get lock out on slabs....

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

SyrusLD

  • Bay Watcher
  • [NOCTURNAL]
    • View Profile
Re: Adventurer fort reborn!
« Reply #216 on: January 11, 2015, 12:10:35 pm »

I love this! I wish this was already available in the standard adventure mode, it gives so many possibilities, just a bit sad that everything turns back to how it was after you sleep/travel.

I noticed a few problems though, it's mostly minor stuff like having to figure out how to exactly use something, but two things were more severe.
First thing, when trying to create strands of adamantine the game crashes after finishing the job if you tried processing raw adamantine from your bag instead of dropping it on the ground in the workshop first.
And Jeweler's workshop's jobs don't work, they cause the following fallback to be written to the console:

Looks like a problem with locating the workshop? Can I fix it somehow?
I mean, it's a minor thing, I just wanted to encrust my stuff with shiny, sparkly things I sto-...completly legally acquired from places.
EDIT: The loom has the same problem.
Also, the "Fallback" pops up in the console as soon as you open the job menu.
I tried looking through the stuff, but ... I have no idea of .lua programming. (For me, as a Java/C/C++ guy it just looks like a bit of a mess...)



PS: How do I gather plants? I stand on them, hit 5, it says "working (-1)" ... nothing happens. How does it work? :/




Another Edit and POSSIBLE FIX for the "workshop jobs not working" issue:
I found the issue that prevented me from using certain workshops.
After reading into the code a bit, "tracing" the problem via print and via changing stuff carefully, I found that the "onWorkShopJobChosen">"dfhack.buildings.findAtTile(args.pos)" was NOT the actual bug, it was just getting wrong data, causing it to fail.
The ACTUAL problem came from the "usetool:openShopWindow(building)" function, which is called when the job-list can't be gotten uh...in that other way.
Specifically, there appears to be a bug in line 1126:

function usetool:openShopWindow(building)
    local adv=df.global.world.units.active[0]
   
    local filter_pile=workshopJobs.getJobs(building:getType(),building:getSubtype(),building:getCustomType())
    if filter_pile then
        local state={unit=adv,from_pos={x=adv.pos.x,y=adv.pos.y, z=adv.pos.z,building=building}
        ,screen=self,bld=building,common=filter_pile.common}
        choices={}
        for k,v in pairs(filter_pile) do
            table.insert(choices,{job_id=0,text=v.name:lower(),filter=v})
        end
        dialog.showListPrompt("Workshop job choice", "Choose what to make*",COLOR_WHITE,choices,dfhack.curry(onWorkShopJobChosen,state)
            ,nil, nil,true)
    else
        qerror("No jobs for this workshop")
    end
end

This caused a table with "x, y, z, building" to be given to the "findAtTile(args.pos)"-function, which only seems to accept "x,y,z" as a table though and couldn't handle the "building" in there.
No idea if there are any other side-effects to removing the ",building=building" from inside the braces {}, but for me it made the loom work (again)!
« Last Edit: January 12, 2015, 06:21:10 pm by SyrusLD »
Logged
In Remembrance of Bengel Hairybasement,
Strangler of a Sasquatch, Troglodytes and a Cyclops,
Slayer of a Giantess, whom he burned alive.
Died in a Heroic Fight with a Grizzly Bear.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Adventurer fort reborn!
« Reply #217 on: January 13, 2015, 03:24:35 am »

<...> lots o text <...>
I think you just won an award! Not sure which one but you are awesome.

I have been looking over that code a few times already and missed it every time. It's one of those stupid mistakes. I'll commit the patch ASAP.

Edit: actually there is already bld=building... Bah bad code everywhere. Well anyway one less bug. It should be updated already but it might be a while until github updates the "raw" server that link is using. Anyway check if the version is 0.012 or manually remove/move ",building=building" outside of braces.

Edit: gather plants is still broken (dunno how it works... seems like i'm doing same thing that df does in fort mode so dunno :s )
« Last Edit: January 13, 2015, 04:01:54 am by Warmist »
Logged

zlob

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #218 on: January 14, 2015, 02:49:14 pm »

Hello!

I've read some comments in here and one of them stated that in order to make my constructions persistent, I should use dfusion and create a player fort. However, the only types of sites Dfusion's tool lets me create are: ruins, lairs, hamlets, human fortresses, camps and tombs, no dwarven settlements available. How do I create a player fort?
Sorry if this was already answered somewhere here, but my search showed nothing of use.

Thanks in advance!
« Last Edit: January 14, 2015, 04:18:55 pm by zlob »
Logged
error: 'long long long' is too long

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Adventurer fort reborn!
« Reply #219 on: January 14, 2015, 03:45:22 pm »

Ruins and lairs are okay. Human fortresses might be buggy (crashy) camps and tombs might work too. Actually in code the "ruins" are dwarven settlements, but because i don't know enough about how to create them they get created as destroyed fortress (probably needs some population/civ entity or sth) but that does not change how it works.

That is if i remember correctly. Been away from that code for quite a while.

zlob

  • Bay Watcher
    • View Profile
Re: Adventurer fort reborn!
« Reply #220 on: January 14, 2015, 04:45:13 pm »

Thank you, it worked indeed!
Finally a house that doesn't collapse with me inside, smashing my guts "beyond recognition"! :P
Logged
error: 'long long long' is too long

SyrusLD

  • Bay Watcher
  • [NOCTURNAL]
    • View Profile
Re: Adventurer fort reborn!
« Reply #221 on: January 15, 2015, 03:18:54 pm »

<...> lots o text <...>
I think you just won an award! Not sure which one but you are awesome.

I have been looking over that code a few times already and missed it every time. It's one of those stupid mistakes. I'll commit the patch ASAP.

Edit: actually there is already bld=building... Bah bad code everywhere. Well anyway one less bug. It should be updated already but it might be a while until github updates the "raw" server that link is using. Anyway check if the version is 0.012 or manually remove/move ",building=building" outside of braces.

Edit: gather plants is still broken (dunno how it works... seems like i'm doing same thing that df does in fort mode so dunno :s )
I hope once I got some time on my hands (more than "4 hours while being tired from work") I can make a list of which workshop or which workshop's job works ("properly") and which doesn't. I noticed for example that "encrusting finished goods with cut gems" doesn't produce anything, it just takes the stuff and makes it disappear - unless I did something wrong (yes, I used a "finished good"). I also had more red text thrown somewhere, sadly I noticed it later and have no idea where or when it happened. (Should've just checked the given lines/functions in the text, but bleh, I was tired.)

Still need to figure out where stuff is ... like the "Gather Plant", currently I don't even know where the code for that is located.



EDIT:
Still don't know where to find the GatherPlants task or how to even approach looking at it to think about whether I can or cannot fix it. To put it shortly. 8|

Anyway, on the other hand, I did make the ballista (and catapult) fire (and almost kill my dwarf) though! Took a bit of changing some code.
Don't really get why I can fire whatever I want with it, but at least it works for the ballista('s arrows) as well as the catapult.

function siegeWeaponActionChosen(args,actionid)
    --local args
    if actionid==1 then
        args.building.facing=(args.building.facing+1)%4
        args=nil -- "dirty"ish workaround to not make a job
    elseif actionid==2 then
        local action=df.job_type.LoadBallista
        if args.building:getSubtype()==df.siegeengine_type.Catapult then
            action=df.job_type.LoadCatapult
        end
        --args={}
        args.job_type=action
        args.unit=df.global.world.units.active[0]
        local from_pos={x=args.unit.pos.x,y=args.unit.pos.y, z=args.unit.pos.z}
        args.from_pos=from_pos
        args.pos=from_pos
        args.pre_actions={dfhack.curry(setFiltersUp,{items={{quantity=1,item_type=df.SIEGEAMMO}}})} -- "item_type=df.SIEGEAMMO" ???
        args.post_actions={AssignBuildingRef,AssignJobItems}
    elseif actionid==3 then
        local action=df.job_type.FireBallista
        if args.building:getSubtype()==df.siegeengine_type.Catapult then
            action=df.job_type.FireCatapult
        end
        --args={}
        args.job_type=action
        args.unit=df.global.world.units.active[0]
        local from_pos={x=args.unit.pos.x,y=args.unit.pos.y, z=args.unit.pos.z}
        args.from_pos=from_pos
        args.pos=from_pos
        args.post_actions={AssignBuildingRef}
    end
    if args~=nil then
        --args.post_actions={AssignBuildingRef}
        makeJob(args)
    end
end

[...]

function usetool:openSiegeWindow(building)
   local args={building=building,screen=self}
    dialog.showListPrompt("Engine job choice", "Choose what to do:",COLOR_WHITE,{"Turn","Load","Fire"},
        dfhack.curry(siegeWeaponActionChosen,args))
end

Actually still not 100% sure about the last part with the "args.screen" ... but it threw red text before, so I made it like this. Changes red, comments lime green. Hopefully I didn't forget to mark any changes I made...
For some reason it (sometimes?) says "working (-1)" when loading the ballista, but just hitting "wait" twice still loads the ballista properly.



Oh, and also, my game crashed upon completion of the job when trying to "Make coke from bituminous coal"!
The job works fine with the magma smelter, luckily.
« Last Edit: January 21, 2015, 02:06:10 pm by SyrusLD »
Logged
In Remembrance of Bengel Hairybasement,
Strangler of a Sasquatch, Troglodytes and a Cyclops,
Slayer of a Giantess, whom he burned alive.
Died in a Heroic Fight with a Grizzly Bear.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Adventurer fort reborn!
« Reply #222 on: January 21, 2015, 05:37:39 pm »

yeah i need to start tracking bugs and just lack of features somewhere...
There was a big-ish change on how everything works and it is a bit better (it now uses scripts that is fancy coroutines- finally understood how it works!).

And i'm also bit fighting to find time for this (and other projects, last thing i did was nearly finished group-work-workshop example).

As for gather plants (or other simple jobs) it's a list of,name, job-type + other stuff(preconditions, post-effects,etc...) and gather plants is at line: 898. As you can see there is nothing really special about it. It tries to do it just like e.g. engrave or other same-tile job.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Adventurer fort reborn!
« Reply #223 on: January 21, 2015, 11:32:20 pm »

...did Syrus just say they managed to fire a ballista/catapult in adventure mode?

I'm feeling kinda woozy after reading that, not sure if I'm hallucinating or not, but I don't see others freaking out about it so I'm confused.

Almost killed yourself...

Please, in the name of Armok tell me you almost did this:
« Last Edit: January 21, 2015, 11:34:31 pm by Max™ »
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Adventurer fort reborn!
« Reply #224 on: January 22, 2015, 05:46:19 am »

...did Syrus just say they managed to fire a ballista/catapult in adventure mode?

I'm feeling kinda woozy after reading that, not sure if I'm hallucinating or not, but I don't see others freaking out about it so I'm confused.

Almost killed yourself...

Please, in the name of Armok tell me you almost did this:

Oh yeah both catapult and balista used to work... And catapult used to accept almost anything (like in fort mode when you are using siege-weapons dfhack thingy). Now it's probably subtly broken...
Pages: 1 ... 13 14 [15] 16 17 ... 31