subtledoctor Posted February 16, 2022 Share Posted February 16, 2022 I mean, it works in BG2 so there’s precedent for it. (Ust Natha) But it would have to be a similarly scripted encounter. I don’t think you can just give the effect to this or that armor, like Fallout NV. Quote Link to comment
jmerry Posted February 16, 2022 Share Posted February 16, 2022 Yeah, if you want disguises to affect how NPCs react to the players, you need to put that into scripts. For every NPC/area you want it to matter for. I looked up an example in the base game - the stuff with the Noser uniforms in Black Pits 2. How does that work? Well, the item itself doesn't do anything special. Instead, several floor traps and dialogues check for whether the talker/triggerer has the item equipped. Quote Link to comment
Awachi Posted February 16, 2022 Author Share Posted February 16, 2022 I don't even know where it would be useful. Weren't there huge stutter issues with changing player avatars? Quote Link to comment
Jarno Mikkola Posted February 16, 2022 Share Posted February 16, 2022 25 minutes ago, Awachi said: I don't even know where it would be useful. Weren't there huge stutter issues with changing player avatars? There might have been in the ancient times when you hadn't biffed the media files and we didn't have RAM. (technically we did, but 32Mb's not doing so well, compared to 32 GB's with the files when you have to load it 15 times a second, and with the old read times.) Quote Link to comment
Awachi Posted February 21, 2022 Author Share Posted February 21, 2022 I've decided to mod each game separately. Quote Link to comment
Awachi Posted February 28, 2022 Author Share Posted February 28, 2022 I really don't like when a stealth game forces you into combat through no fault of my own. Quote Link to comment
Awachi Posted March 11, 2022 Author Share Posted March 11, 2022 (edited) Yay. Learned how to "erase" all extant automaps by setting the x,y to 0,0 and making the text a blank space. Ideally I would remove them altogether, but this was a good first step. I should probably see what it looks like in-game. COPY_EXISTING_REGEXP "^.*\.are$" override READ_LONG 0x00c4 mapoff // automap offset READ_LONG 0x00c8 mapnum // automap quantity PATCH_IF mapoff > 0x00 BEGIN FOR (index = 0 ; index < mapnum ; ++index) BEGIN // go through each mapnote WRITE_SHORT (mapoff + (0x34 * index)) 0 // x WRITE_SHORT (mapoff + 0x02 + (0x34 * index)) 0 // y SAY (mapoff + 0x04 + (0x34 * index)) ~ ~ // text END END BUT_ONLY edit: Looks fine. The markers don't even show up on the worldmap. May not need to bother with removal after all. Edited March 11, 2022 by Awachi Quote Link to comment
jmerry Posted March 13, 2022 Share Posted March 13, 2022 (edited) If you want to remove a map note outright, you can do it as a script action in a DLG or BCS. (RemoveMapNote(Position,StringRef)). Note that this action always refers to the current area, so it's best placed in the area script. That's what I did for my mod (Component: Map notes for BGEE quests) and existing notes like the thieves' guild entrances I wanted to delay. You have to know where the note is and what the associated string number is, but you can detect that in WeiDU and then patch it into the area script. A sample of my code: BEGIN @31000 DESIGNATED 310 GROUP @5 REQUIRE_PREDICATE GAME_IS ~bgee eet~ ~This component is only for games with BGEE content~ ACTION_IF GAME_IS ~bgee~ THEN BEGIN OUTER_SPRINT baldurCE AR0800 END ELSE BEGIN OUTER_SPRINT baldurCE BG0800 END // Area codes for EET compatibility OUTER_SET ThiefGuildNote = 0 COPY_EXISTING ~%baldurCE%.ARE~ ~override~ READ_LONG 0xC4 ofsNotes READ_LONG 0xC8 numNotes FOR (n=0; n<numNotes; ++n) BEGIN SET ofsX = ofsNotes + (n*52) SET ofsY = ofsNotes + (n*52) + 2 SET ofsText = ofsNotes + (n*0x34) + 4 READ_SHORT ofsX xpos READ_SHORT ofsY ypos PATCH_IF ((xpos=1150) AND (ypos=1254)) BEGIN READ_LONG ofsText noteRef SET ThiefGuildNote = %noteRef% END END // Get existing string reference for "Thieves' Guild Entrance" note BUT_ONLY ACTION_IF (ThiefGuildNote = 0) BEGIN OUTER_SET ThiefGuildNote = RESOLVE_STR_REF (~Thieves' Guild Entrance~) END EXTEND_BOTTOM ~%baldurCE%.BCS~ ~jtweaks/resource/map-notes/BaldurCEPatch.baf~ EVALUATE_BUFFER COMPILE ~jtweaks/resource/map-notes/MapNotePatch.d~ // Add dialogue actions (Partially de-traified, lines relating to other notes deleted.) And here's the BAF part: IF Global("J8#ThiefGuildNotes","GLOBAL",0) THEN RESPONSE #100 SetGlobal("J8#ThiefGuildNotes","GLOBAL",1) RemoveMapNote([1150.1254],%ThiefGuildNote%) RemoveMapNote([1693.1267],%ThiefGuildNote%) RemoveMapNote([2165.1285],%ThiefGuildNote%) END IF Global("J8#ThiefGuildNotes","GLOBAL",1) OR(3) Global("DukeThanks","GLOBAL",1) Global("J8#TalkedToNiklos","GLOBAL",1) GlobalGT("HelpAlatos","GLOBAL",0) THEN RESPONSE #100 SetGlobal("J8#ThiefGuildNotes","GLOBAL",2) AddMapNote([1150.1254],%ThiefGuildNote%) AddMapNote([1693.1267],%ThiefGuildNote%) AddMapNote([2165.1285],%ThiefGuildNote%) AddMapNote([1440.1300],%ThiefGuildNote%) END And the D bit: ADD_TRANS_ACTION NIKLOS BEGIN 8 END BEGIN END ~SetGlobal("J8#TalkedToNiklos","GLOBAL",1)~ It is weird that there's an ADD_MAP_NOTE action in WeiDU, but no DELETE or ALTER. I definitely would have deleted those notes in the area file if I could do so easily. Edited March 13, 2022 by jmerry Quote Link to comment
Awachi Posted March 13, 2022 Author Share Posted March 13, 2022 I agree. I grew up on Ultima IV and the Wizardry series, so discovering through break-ins exploration that Firebead had a house in Beregost was a neat moment. With the ability to add your own notes, I find 99% of them to be unnecessary at best, spoiler-y clutter at worst. Quote Link to comment
jmerry Posted March 14, 2022 Share Posted March 14, 2022 FWIW, the note for Firebead's house was one I left alone. Presumably, he told you about it back in Candlekeep when he heard you were heading out. I tried to remove the spoiler-y elements in my tweak, but not the clutter. Every note I removed comes back once your character unlocks the quest involved, and I added a bunch of notes as well. Quote Link to comment
Awachi Posted March 14, 2022 Author Share Posted March 14, 2022 True, he mentions he's from Beregost, but I never presumed that what was displayed on a map was the entireity of the area. Baldur's Gate certainly isn't. Either way, the map note wasn't part of the original BG experience, and adding it adds nothing besides pointless hand-holding. Quote Link to comment
Awachi Posted March 14, 2022 Author Share Posted March 14, 2022 One of the worst parts of modding is having to test on a vanilla install. It's not quite Bethesda levels, but unmodded seems most unnatural, and I want no part of it. Quote Link to comment
jmerry Posted March 15, 2022 Share Posted March 15, 2022 Ah, the original BG experience. Something I'll never know, because I came to these games with the EEs. And I have no desire to go back; I agree with the mindset behind the changes, and consider them improvements in general. As for testing on an unmodded install ... I'm currently playing a full run with only my personal tweaks, to be reported on the Beamdog forums. I don't really mind it. And if I spot something that bugs me, that's just tweak fodder. Sure, I'll go back to playing with SCS after this run is done - some of the things that bug me are enemy AI, after all - but I find the base game quite playable. Even if I can do utterly ridiculous things like killing Sarevok with a wand-wielding ferret on day 13. It's all opinions, of course. We all see things differently. You clearly don't want to do the same things that I did with your map note tweaks; I just provided my code sample to illustrate an alternate way of getting things done. Oh, and another little coding note. If you want a reference to an empty string, that's already in the game as string number 0. -1 (outside the range of valid string references) is also widely used for nameless stuff. Quote Link to comment
Awachi Posted March 15, 2022 Author Share Posted March 15, 2022 I was reading the whole "no potion stacking" drama. One person's SOP is another's exploit. Bug/feature. Hobby/job. Etc. How do I reference an existing string number? I only know how to introduce my own. Quote Link to comment
jmerry Posted March 15, 2022 Share Posted March 15, 2022 The field you're reading/writing to, where the string references are kept, is a LONG - a 32-bit integer. Read it to see what's there, write an integer to it to change things. For example, in my code, I read the string reference of that existing note and save it to my ThiefGuildNote variable. Or, if I didn't find that existing note, I use a RESOLVE_STR_REF call to set that variable (That action finds an existing string, or writes a new one if it can't). Then, in my script edits, I remove/create map notes using that variable as the string reference. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.