collapse

Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Unofficial Patch 10.7 released!  (Read 8657 times)

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6827
  • Reputation: +894/-28
  • Unofficial Patcher
Re: Unofficial Patch 10.7 released!
« Reply #60 on: October 21, 2020, 09:28:32 am »
I think now I get it. Can you provide me with some sample files to test this out? Maybe my programer can simulate something like this easier than adding complete mouse support. I have already send him an email about your idea!
« Last Edit: October 21, 2020, 09:34:27 am by Wesp5 »

Offline Barabbah

  • Antediluvian
  • *****
  • Posts: 1781
  • Reputation: +29/-4
Re: Unofficial Patch 10.7 released!
« Reply #61 on: October 21, 2020, 01:29:00 pm »
Tawni Apt.
Sneaking inside the bedroom.
The bodyguard enter the room and answers the phone, except that's a gun he's talking to.
It reminded me of this scene
"Some quotations," said Zellaby, "are greatly improved by lack of context."
― John Wyndham, The Midwich Cuckoos
"fuck the hole in the face"
― me

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #62 on: October 21, 2020, 03:51:07 pm »
I suggest not giving up on hacking the executable if you can because a hack like that can be made much cleaner and more usable if you can swing it.
Simply because such a hack doesn't touch the keybindings and can use the mouse cursor as a pointing device/get better feedback that 'say' statement.
The keybindings are a real problem, and i already kind of gave up on 'overloading' a existing keybinding to do the things i need and the things it already does. I think it's possible with a variation of what dheu shows in the mod guide but it's way too fragile because you need to edit at runtime both kb_act.lst and config.cfg (this second is to keep showing the shortcut as 'mapped' in the options so the user doesn't reflexively 'remap' and then ruin the double binding).

Instead i'm just adding 3 new shortcuts unmapped by default in kb_act.lst (pick dialog, next line, previous line).
This has the disadvantage of not being use without unbidinding a already mapped key but the advantage of not needing to programatically mess with config.cfg, or kb_def.lst and kb_act.lst.


In short, it's more usable if you have a 'gamer mouse' with extra keys. I'd prefer to be able to override key mapping 'just for dialog' but the game doesn't make that possible without internal access - though it actually does it in dialogs, for instance in a dialog, 'MOUSE1' becomes 'toggle the dialog subtitles' instead of '+attack'.
« Last Edit: October 21, 2020, 03:56:46 pm by SCO »

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #63 on: October 21, 2020, 04:12:57 pm »
I found a new problem too.
Whichever method you attempt, if you try to bind a key that the game dialog system already overrides (for instance, MOUSE1 toggles subtitles), it will not work in the dialog.

The game is turning off the 'normal' keybindings while in dialog and hardcoding 'now this key only does this and everything else does nothing'. What the 'ideal' hack should do is add some hardcoded keys to that list plus good feedback (like a icon instead of a 'say') OR not a key but a mouse cursor that can select lines.

I'm going to keep working on what i have though, but i suggest keep exploring a executable hack. It wouldn't need invasive keybindings or dlg files edits that will add a lot of noise.
« Last Edit: October 21, 2020, 04:19:02 pm by SCO »

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #64 on: October 21, 2020, 06:58:52 pm »
A more serious problem: how do you check the '!dialogpartner' entity that dheu says in the mod guide that is only active when in dialogs?
I can't seem to get a valid pointer out of it with __main__.FindEntityByName("!dialogpartner") or __main__.FindEntitiesByName("!dialogpartner").
In dialog or not. Did this ever work? Can you check Wesp? Just go talk to any npc, open the console and write __main__.FindEntityByName("!dialogpartner").

It would be completely stupid if this could only be accessed on a python function called from inside a dialog file, not when 'a dialog is open' as the mod guide implies.
And if so, i have no clue how to check i'm inside a dialog for the keys callbacks - that are not called from the dialog engine. Any ideas? This is just to prevent the pc from 'Player says: response 1.' when not talking to a npc if the user presses the key.
« Last Edit: October 21, 2020, 07:32:33 pm by SCO »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6827
  • Reputation: +894/-28
  • Unofficial Patcher
Re: Unofficial Patch 10.7 released!
« Reply #65 on: October 21, 2020, 08:45:31 pm »
He does not find anything on my system too and I honestly never even heard about that name or used it. Try contacting Dheu himself!

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #66 on: October 21, 2020, 08:58:16 pm »
It's in the mod guide alongside !player (which works).

It's also inside vampire.dll if you grep inside it.

This section:

Code: [Select]
  B) Reserved Entity Names



      "!player" <- refers to the (potentially unnamed) player.



      "!playerController" <- refers to the (potentially unnamed) player
                             controller if one exists. (There are used by cut
                             scenes)



      "!dialogpartner" <- When you begin a conversation with someone, this
                          refers to the person you are talking to. It only
                          remains valid while the conversation is active.

« Last Edit: October 21, 2020, 09:22:46 pm by SCO »

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #67 on: October 29, 2020, 09:16:45 pm »
Wesp, i got veeery far on this, and in fact made a program to do it, before realizing that the 'say command' does not in fact show during the dialog camera.

The infobar_message command *does* show in the dialog camera but you can add a new one, so i'd have to cannibalize one of the lockpicking messages (that can take a string/int).
Now i may in fact do this for my personal use (though it would be useless for the mod because the message is used on lockpicking automatically), but does your 'programmer' have a better solution? I'd expect, from the people that enabled the mod system, that a way to display any kind of information / extend the infobar_message system so i doesn't need hardcoding would be a priority.

I tried infobar_message 42 (which is supposed to be a number of hits) but it's not active. If this message that takes a string was active, mods could just have


"Name42"    ""    // How much damage the player inflicted on a target

in the strings.txt and build the string in python 'infobar_message 42 "Lockpick of difficulty {}".format(number)'
The only problem would be the style.



The program also finds and corrects some problems in dialog files (because it needs to parse and edit them). Though i didn't find anything significant on your mod (there is a stray ^ in the gary.dlg file but it has no effect.
« Last Edit: October 29, 2020, 09:46:53 pm by SCO »

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6827
  • Reputation: +894/-28
  • Unofficial Patcher
Re: Unofficial Patch 10.7 released!
« Reply #68 on: October 29, 2020, 09:40:43 pm »
Now i may in fact do this for my personal use (though it would be useless for the mod because the message is used on lockpicking automatically), but does your 'programmer' have a better solution?
I think he is following this thread, but he is not yet firm with Bloodlines modding so you need to explain better, what you would want him to do. I already said to him that I will not accept a solution in which all maps and dialogue files have to be changed and he thinks this could be circumverted with some new Python stuff.
« Last Edit: October 29, 2020, 09:43:08 pm by Wesp5 »

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #69 on: October 29, 2020, 09:56:31 pm »
My program is changing all the dialog files (and strings.txt) because i have no access to a useful output for the 'selected line' (strings.txt, now that 'say' is known not to work) and a way to count the number of lines active and when the dialog is active (the dialog parser/transformer).

I think i ok method of attack for the output as 'real hacking' would be to either new strings to infobar_messages or activate a disabled one and use it for a 'generic string'. For instance, infobar 42 is supposed to take a string like the lockpick messages but doesn't display -> is not active / hooked up. Then after hooking it up infobar_message 42 'My short single line text' in python would appear at the top as a 'generic' info. I can already do this by editing the lockpick lines but...

I'd prefer something prettier, like making the dialog line selected fade in and out (you can see this effect when the engine encounters a npc dialog line without audio and with a auto-end after, it turns on subtitles and forces the user to input '1' to be able to read the text), but that sounds a bit harder (or maybe not, if he can hack the engine dlls). But the first method would be useful for other mods too, a generic info_bar message that you can pass any string sounds useful, and even more if it was extended to play any sound/use any icon.
For the keybindings i'm doing the major hack of reading the config, and overriding selected actions during the dialog only. Since the user can't save during the dialog and can only reload, the keybindings should be renabled on new game/game load by the copy on the the file because i don't write to it.
Well unless i'm wrong things and reload doesn't reload the cfg. Got to test that too.


« Last Edit: October 29, 2020, 10:09:02 pm by SCO »

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #70 on: October 29, 2020, 10:37:51 pm »
Well, i was wrong, this weird engine does make a 'bind' command on the console write to the config.cfg file. What the hell.

I have to test this to see if its a side effect of the bind or of the console.cfg not being deleted after use.

edit: it's when quitting the game or loading a save. Annoying.
« Last Edit: October 30, 2020, 03:36:46 am by SCO »

Offline Entenschreck

  • Methuselah
  • ****
  • Posts: 299
  • Reputation: +226/-0
Re: Unofficial Patch 10.7 released!
« Reply #71 on: October 30, 2020, 10:01:21 am »
Quote
I'd prefer something prettier, like making the dialog line selected fade in and out (you can see this effect when the engine encounters a npc dialog line without audio and with a auto-end after, it turns on subtitles and forces the user to input '1' to be able to read the text), but that sounds a bit harder (or maybe not, if he can hack the engine dlls). But the first method would be useful for other mods too, a generic info_bar message that you can pass any string sounds useful, and even more if it was extended to play any sound/use any icon.
For the keybindings i'm doing the major hack of reading the config, and overriding selected actions during the dialog only. Since the user can't save during the dialog and can only reload, the keybindings should be renabled on new game/game load by the copy on the the file because i don't write to it.
Well unless i'm wrong things and reload doesn't reload the cfg. Got to test that too.

An infobar_message like that would be great, please tell me if you manage to pull this off!
Alternatively, you could also mess around with the game_sign entity. It can be created dynamically with python and it has an input called "ChangeFile()". You can use it to display pretty much everything on screen. Might be worth giving it a try.

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #72 on: October 30, 2020, 10:11:51 am »
Aren't game_sign entities pretty much always paused unless embedded into maps and with a property set off? That's what Dheu indicates.

Anyway, now i have something more or less working i'm finding the limitations of the approach for rebinding the dialog picks.

1. dialogpick # is not exactly as polished as pressing 1. 2. 3. 4. For one, it has a ugly effect of only showing '1.' instead of the line you selected when used (i have no idea why this happens, a clue is maybe it doesn't happen in the last choice before a exit - ie maybe the incoming options/text is nuking the selection fadeout).

2. dialogpick # can't interrupt a currently speaking npc line like pressing 1. 2. 3. 4.! This is major.

3. Even replacing the lockpick infobar_message it's not quite good enough. Namely it takes too long to fadeout to be confortable scrolling through the line options.


Seems like this will require someone hacking the dll to look and function well. Ideally 4 hacks are done:

1. A generic infobar_message that can be positioned, fadeout selected or not, time displayed, maybe icon. OR a way to make a line of pc dialog flash (like it can flash if the line is inserted by the engine after a npc line before a autoend when there is no audio (ie: the npc was saying something and the engine had to wait to make sure the player read it).

2. find out what the functions pressing '1. 2. 3. 4.' are doing and replicate that on dialogpick or make the functions available for modders. I think those functions are in vampire.dll because if i use a hex editor and search i find 'dlg_pick_1, dlg_pick_2, dlg_pick_3, dlg_pick_4' on the strings there, seems blatant. Also next to those names (among others available in the normal console) is 'dlg_interrupt' (maybe the skip ahead function?). I tried calling them directly, but it didn't work.

3. make a hook to find out the number of dialog lines currently available and if you're in a dialog (though i kind of 'solved' this with a python dlg file pre-processor / parser). This is for not needing to change dlg files.

4. find out how the engine is overriding the binds during dialog and hook into that, maybe even nuking completely the bindings for the 'mouse1 activate history, mouse scroll up go up history, mouse scroll down go down history'. Or even better something generic that could be remapped even on gamepads, but never interfered with the other bindings and could be mapped in the keybinder without unmapping other settings using that bind.
« Last Edit: October 30, 2020, 01:06:14 pm by SCO »

Offline SCO

  • Ancillus
  • ***
  • Posts: 209
  • Reputation: +8/-4
Re: Unofficial Patch 10.7 released!
« Reply #73 on: November 02, 2020, 07:21:52 pm »
Why did you disable the subtly insane malkavian history in the unofficial patch Wesp?

Offline Wesp5

  • Administratrix
  • Antediluvian
  • *****
  • Posts: 6827
  • Reputation: +894/-28
  • Unofficial Patcher
Re: Unofficial Patch 10.7 released!
« Reply #74 on: November 02, 2020, 08:14:39 pm »
Why did you disable the subtly insane malkavian history in the unofficial patch Wesp?
I don't know what you are talking about, of course this history is still in there!

 

SimplePortal 2.3.7 © 2008-2020, SimplePortal