mifki / df-twbt

Text Will Be Text
186 stars 30 forks source link

Adventure mode rendering bugs #13

Open Lucatir opened 10 years ago

Lucatir commented 10 years ago

When trying to jump with j or shoot a bow with f, the screen is covered in black when using TWBT as print mode, but does not occur when using TWBT_LEGACY.

MIC132 commented 10 years ago

Confirming, have the same bug.

How can I change the mode to legacy? The mode button in LNP does nothing..

Lucatir commented 10 years ago

@MIC132 at /data/init/init.txt change PRINT_MODE from TWBT to TWBT_LEGACY (assuming LNP has 5.1x).

MIC132 commented 10 years ago

@ErdeFB Should have mentioned that text looks terrible in legacy mode. Will have to wait for fix.

pronvit commented 10 years ago

Thanks, I'll take a look.

pronvit commented 10 years ago

5.20 should fix (j)ump and (f)ire, but I'll leave this issue open for other adventure mode bugs you'll encounter

MIC132 commented 10 years ago

You fixed specifically jump and fire? It was also happening with (g)rab, and I think with (t)alk, but not sure on the last one.

pronvit commented 10 years ago

Well yes I'm not playing adventure mode myself, I even don't know all the different screens in this mode. Ok, I'll check these two.

pronvit commented 10 years ago

In 5.21 I fixed one more screen (not sure what it was, I tried to spit in game), and talk seems to be fine.

MIC132 commented 10 years ago

Did some more checking. (m)ove preferences screen, tal(k) screen (only after you choose who to talk to), (A)imed attack screen, and (S)neak and speed screen are all affected by this. At this point I wonder if there isn't some general way to fix this, and not fixing each by hand.

Also, after you do the fixes (like the previous ones) how would I go about updating my local version? I usually just download new LNP, so I don't play with this normally.

Lucatir commented 10 years ago

@MIC132 You can get the unstable versions from the buildbot from here: http://do1.mifki.com:8810/dashboard;jsessionid=2ted4ks0v5qjbnmmalgqss21

Just replace the relevant files in your /hack/plugins folder.

MIC132 commented 10 years ago

Now that I look at your commits, can't you just make exception for everything under "df::ui_advmode_menu::" ?

I don't think there are any menus in adventure mode where you need tiles, apart from the travel map, but that already doesn't render in tiles (as mentioned in another issue).

pronvit commented 10 years ago

Well no, there are screens like inventory, announcements, eat and others where map shouldn't be rendered and screens like talk, throw aim and so on (and the default mode of course) where the map must be visible. That's why this condition.

MIC132 commented 10 years ago

Ah, it works like that. I was thinking there would be no problems with other screens as the map doesn't render there normally, but I get it now. Ok, I'll report if I find any other problematic screens.

pronvit commented 10 years ago

Btw, these screens - (m), (S), even (A) and (k) - aren't they better when they're text-only, and not text on top of the map? Why do you need to see the map on these screens?

MIC132 commented 10 years ago

With (m) and (S) I was referring to how they are normally, without twbt. On (A) it's sometimes useful to confirm enemy positions. With (k) it doesn't really matter that much, just how I was used to.

It's up to you if you want full parity with normal game in this regard.

Lucatir commented 10 years ago

When using A it is essential to see the map when in combat with multiple targets in targeting range as then you can see the letters on the enemies tiles corresponding the target choices in the menu (a, b, c, etc). While they go in alphabetical order based on the time the target came to your range, this can get confusing to keep track of when dodging, charging, etc.

pronvit commented 10 years ago

Ok, more fixes in 5.22.

MIC132 commented 10 years ago

I thought about this a bit, and I'm wondering, can't you somehow extract from the default renderer info about which screens should/shouldn't get the map rendered?

pronvit commented 10 years ago

Default renderer doesn't care because it renders everything with a single tileset. But there are not so many different screens so I don't see a big problem here. The only difficulty is that definitions for adv. mode screens are all wrong in dfhack for 0.40.

MIC132 commented 10 years ago

I think you missed (g)rab screen, or I downloaded wrong version of plugin.

pronvit commented 10 years ago

ok, 5.23)

Lucatir commented 10 years ago

In 5.25 you cannot zoom the map when fast traveling, but you could in earlier versions. Neither mouse wheel scrolling nor the command twbt tilesize bigger/smaller work, but the tilesize does get changed according to the command twbt tilesize and you can see the change when exiting fast travel.

MIC132 commented 10 years ago

@ErdeFB You were able to change tilesize in fast travel map, even though the fast travel map is font, and not tiles?

pronvit commented 10 years ago

@ErdeFB Yes. Basically, new version replaces map rendering routine with custom one to be able to use different tile size for map and text. But world map (like on embark screen) and fast travel map are not rendered with this routine, so they're rendered with text font and are not affected by twbt tile size. Probably I can make mouse wheel scrolling to work.

MIC132 commented 10 years ago

@pronvit Can't you make them be rendered with tiles? I honestly get lost on fast travel now, as I got used to the tiles version. Same with world map on embark screen.

pronvit commented 10 years ago

It's quite difficult so I wasn't planning to do this at least in the near future, sorry.

MIC132 commented 10 years ago

One more thing I just found. The "alt+direction" "move carefully" screen also blacks out the view and usually you would like to know where are you moving to..

MIC132 commented 10 years ago

There is more, it seems. Like when precise attacking with shift+a, the first screen shows the map, but all the subsequent ones (including dodge screen, where you want to know where you are dodging to) don't render the map. I also suspect the same may happen with climbing.

pronvit commented 10 years ago

Thanks. Latest version should output "am:" in the console when map visibility changes in adventure mode. This is current screen mode. Just post these numbers as you notice screens on which map should be visible but it doesn't, and I will add them.

MIC132 commented 10 years ago

Ok, those are the ones where I think there is no reason not to render the map (for example it's small menu like the (g)rab one, that was intended to be rendered with it), or the map is actually important:

am:19 (companions list) am:29 (sleep/wait) am:23 (move carefully/climbing) am:33 (falling/grab screen? At least I invoked it by walking off a cliff) am:43 (dodge direction choice) am:39 (target for striking choice) am:18 (combat preferences)

That's all I have for now.

pronvit commented 10 years ago

Thanks, try 5.28

Shadefang commented 10 years ago

don't know if this is directly related to this bug, but when i upgraded dwarf fortress from 40.15 to 40.16 i started getting a graphical glitch. Using TWBT 5.34, when I make a selection on the conversation (k) menu vertical stripes of the menu linger on the screen (http://i.imgur.com/IAjLVSq.png). I've also seen it on: -the companion (c) menu -the climb menus -the combat (C) and movement (S) preference screens

Goes away when it does a full redraw (opening a full screen menu like the inventory, or having the window lose and regain focus)

pronvit commented 9 years ago

Yes, it seems to be related. Not sure whether I'll fix it for the current .16 version because I hope dfhack will be updated soon for .18 or .19.

pronvit commented 9 years ago

@Shadefang fixed in 5.35

moonheart08 commented 7 years ago

I've been having a issue where both text and the [T]ravel screen have bad tearing until a redraw in adventure mode. If it helps (possibly will) im using the Openbox window manager on Linux

brndd commented 7 years ago

New adventurer mode site building menu works poorly with TWBT. Hidden tiles do not refresh properly when moving the view around, instead they "ghost"/duplicate visible tiles making it quite difficult to see what's actually going on.

Also, the gui/advfort script included in DFHack does not work with TWBT. Everything appears blank when using it.

flrl commented 5 years ago

When there's multiple creatures around you, Shift-A's "Which creature will you attack" menu covers the whole screen. Is this a regression? TWBT 6.55

Looks like the choice of how to handle the attack menus is made here: https://github.com/mifki/df-twbt/blob/fb9abf69f7dfdbc56836eda1353736e4a4091bd4/twbt.cpp#L428-L432

Checking the enumeration source, there's a few values around this numerical range that aren't being handled by advmode_needs_map():

        <enum-item name='Unk36'/>
        <enum-item name='AttackConfirm'/>
        <enum-item name='AttackType'/>
        <enum-item name='AttackBodypart'/>
        40
        <enum-item name='AttackStrike'/>
        <enum-item name='Unk41'/>
        <enum-item name='Unk42'/>
        <enum-item name='DodgeDirection'/>

I assume AttackStrike is the menu for choosing which type of strike to use, which doesn't need the map. So, I wonder if the "which creature" menu is one of 36, 41, or 42?

Latest version should output "am:" in the console when map visibility changes in adventure mode. This is current screen mode. Just post these numbers as you notice screens on which map should be visible but it doesn't, and I will add them.

Not sure where/how to see this?

lethosor commented 5 years ago

Not sure where/how to see this?

It's in the DFHack console window. The one that opens alongside DF, with the [DFHack]# prompt in it.

pronvit commented 5 years ago

Thanks I'll check it.

Noomene commented 3 years ago

Sorry for necromancing this thread. But I'm facing this issue in DF adventure mode, and I'm not sure if it's TWBT or something else.

I'm using DF 47.05 on win7 x64, with the latest DFhack and TWBT 6.xx. And this is what I see when I "l" around. That random big yellow keeps appearing. Sorry of this was asked before.