Jump to content

marchitek

Members
  • Posts

    152
  • Joined

  • Last visited

Everything posted by marchitek

  1. Is there a way to pass (associative) array to function as parameter? I can see in documentation INT_VAR and STR_VAR, but missing ARRAY_VAR.
  2. Two more ideas, this time regarding reputation: Getting drunk in Inn decrease reputation. Purpose is ofc the same as "Bardic Reputation Adjustment", to have less drastic way to make evil NPCs happy. After I got this idea I'm really surprised that it doesn't work that way in unmodded game. Does it? Low reputation cause discount in shops that are fences. Also fences store with higher price to parties with high reputation. I guess this could be sub component for "Change Effect of Reputation on Store Prices".
  3. This is very wide topic, I guess every one of us could talk about different thing here and we will still be "on topic". But I can try to tackle it. First of all term "old" is very unstrict. If I understand correctly, you count Baldurs's Gate and Diablo as "old" games. I think one can argue (not without right) that those are "modern" games. At the same time, one can argue (not without right) that all games currently are "old" games, since we still pick dialog options, instead of talking to microphone. Games handle to provide immersion in many different ways, but I wouldn't say we can divide those ways to "old" and "new", it is much more complicated subject. If we define "old" as "cool when I was young" then it cannot be other else reason then nostalgia. I would also count as nostalgia those cases when child watch as parent/grandparent play some games and then come back to it in the future. I believe some of players are interested in video game history and play a lot of "old" games, at some point this person can event think that "old" games are better then "current" games. But this is cognitive error. Bad titles from the past was more likely forgotten. This person plays in fact "good old games" not just "old games". Obviously, statement that "good old games" are good is tautological and there are many terrible "old" games. I must say I have completely different perspective then you, I would never connect "role play" of the game with being "old". I think current cRPGs can offer even more immersion and role play then old titles. My teenage years was placed in 00s and I have never really been into games before "my era", so probably I don't know what I'm talking about, I'm just too young. Whatsoever, I always have respect to old people, even when they talk silly things, I hope for the same kind of favor from their side.
  4. Ok, good to know. I guess in my mod I will add it, just in case. Thank you for the answer!
  5. Probably simple question but I cannot figure it out based on IESPD. What is difference between actions LeaveAreaLUA and LeaveAreaLUAPanic. In game code it is common to see them side by side like in this example: IF True() THEN RESPONSE #100 CutSceneId(Player1) LeaveAreaLUAPanic("AR0700","",[2753.868],4) LeaveAreaLUA("AR0700","",[2753.868],4) (cut short for brevity) Is there any benefit from this additional action call? And one bonus question: what is this "Parchment" attribute? It is usually blank, but sometimes it is set, in BG1 e.g. for Brage or Tazok cutscenes, however I cannot figure out what is purpose of this.
  6. So for mod areas: death prevention would work same way, because I know how change flag and extend scripts of all areas in game without need of explicit specification. Respawn place resolving is a bit more tricky topic. Let me first quote myself about what I plan: And let me discuss it backwards: For "some fallback based on game chapter etc." it will be compatible with other mods unless they add new chapter. Ofc total conversion mods also cannot be supported at this point. For "based on last visited outdoor area" could be problem to affect mod areas in sensible manner. However I can know at installation time all master areas in the game, but I cannot know where they should point (to which respawn point). So still it will resolve place of last visited master area from original game, because I need to configure it explicitly beforehand. If player will travel to mod area from near original game area, this should produce sensible results after all. For "plot critical rules" this is most tricky part. Let's say some mod adds adventure on distance island, that turns out to be occupied by werewolves and stuff. If player dies here it would be hard to produce sensible result. I guess for such cases player will need to switch to "reload" approach to the game. (BTW I need to add Isle of Balduran to my list of "plot critical" places). In general my idea is to make this mod as much configurable without diving much into code. Let's see how it will go. I must say mod areas handling is not top priority to me, because I don't play with mods that add them (at leas at current time), but its obviously something that I keep in mind.
  7. Recently I pushed version with "hybrid" approach: "Player1 can die" flag is set which should prevent "game over" on personification (and I guess also on charm). But I didn't tested it closely. For solo runs petrification would be end of the road anyway for now, because there is no one that can unpetrify you. There is obviously a lot of TODOs here. Also, at the begging of game Protagonist receives ring that protects form "normal" death. When 1 HP is reached, party is teleported to Nashkel temple and resurrected/healed. Coping ground piles (to get back loot from eventual dead companions) works only on "master" areas thou. I think fix would be to move this script block to area script (currently in baldur.bcs) So, I guess if you will keep close to Nashkel you can have some testing close to real game conditions. I'm curious how this idea will work in BG for you. I slowly prepare to attack the next topic, which is obviously detect sensible respawn points. I want to start with plot critical rules and scenario that I previously marked as "fallback", so detecting this place based on chapter and some other game progress related variables. I guess it could be something like: Prologue: Temple in Candlekeep Chapter 1: Temple in Friendly Arm Inn Chapter 2: Temple in Nashkel Chapter 3: Temple in Beregost Chapter 4: Temple in Friendly Arm Inn Chapter 5: Lady's Hall in BG (here of course there is biggest choice of temples) Chapter 6: before entering Candlekeep: Friendly Arm Inn after entering but before accusation: Temple in Candlekeep after accusation: Candlekeep prison cell and game continuous form now on with prison cutscene after cutscene: begging of dungeon Chapter 7: before Sarevok disclosure: Friendly Arm Inn after that: Lady's Hall in BG Any comments welcome.
  8. I was annoyed a bit that during character creation all custom portraits appears always for both genders. I haven't found solution for that, so I decided to prepare one myself as part of my WeiDU taming process. Download: GitHub Maybe some of you would find it useful too. Note that it hides original portraits. If it is a problem, you can always export them e.g. with NI and embed it using this tool together with some other new portraits. Happy gaming!
  9. I think also antidote for cow in Candlekeep prologue is separate ITM so it can be customized. Maybe also change of appearance of plot critical message scrolls like invitation to palace and documents that make Sarevok guilty could be good idea.
  10. Yeah, I took quick look on Imoen's belt and it doesn't look simple at all. Meanwhile I have hard time using this "Player1 can die" flag. It seems that when all party members all dead game change location to last visited master area and it seems I cannot do anything to prevent it. Some discussion around it can be found here. I work with following script snippet: IF StateCheck(Player1, STATE_REALLY_DEAD) THEN RESPONSE #100 ClearAllActions() StartCutSceneMode() SmallWait(15) FadeToColor([20.0],0) SmallWait(30) ApplySpell(Player1,CLERIC_RAISE_DEAD) // SPPR504.SPL (Raise Dead) CopyGroundPilesTo("AR4802",[353.334]) // Temple of Helm (Nalin) DestroyGroundPiles() ActionOverride(Player1,LeaveAreaLUA("AR4802","",[473.395],NE)) // Temple of Helm (Nalin) ApplySpell(Player1,CLERIC_HEAL) // SPPR607.SPL (Heal) SmallWait(15) FadeFromColor([20.0],0) SmallWait(30) EndCutSceneMode() END There are two problems: When switch to master area occurs before CopyGroundPilesTo() the ground piles are copied form master area, not actual death area When switch to master area occurs before resurrection, then character is not resurrected (game crash or just nothing happens, depending on where script is running: baldur.bcs or area script) I tried different things: moving script from baldur.bcs to area script and vice versa, wrapping it with cut scene, invoking SetMasterArea() action at very begging. But those problems still occurs randomly in every setup. If someone want to play with it a bit, I pushed code here.
  11. Hm, I cannot say more besides that it works for me. I play modded game (using windows mod version) and it just works. Ofc I'm installing mods using wine cmd.
  12. Thanks! I found here some more info from CamDawg: So it seems protagonist death cause change of active area to master area and if this happens, CopyGroundPilesTo() acts only on piles there. This seems to be asynchronous from normal script processing. I've done one more test, I moved script block, that I pasted above, into "AR3901.bcs". Then sometimes it works as expected (piles are copied form interior area), but sometimes camera just jump to master area and resurrection don't happen. If I try to resurrect then from console: game crash occurs. I will try to redo this as cutscene, maybe it will somehow help. I guess bottom line could be that after all CopyGroundPilesTo() works as expected.
  13. I was thinking about it as a "final" workaround, if everything else fails. But engine at least in theory allows protagonist dead, so I will explore a bit this concept, maybe there is a way to make it work.
  14. True. I noticed this issue testing on actual script. Then I turn into testing with console to isolate problem. After tests on clean installation with console problem seems to not exist. So this is something wrong with how I use it. I'm running this action from `baldur.bcs`. Here is the code: IF StateCheck(Player1,STATE_REALLY_DEAD) THEN RESPONSE #100 ClearAllActions() StartCutSceneMode() SmallWait(15) ApplySpell(Player1,CLERIC_RAISE_DEAD) // SPPR504.SPL (Raise Dead) SmallWait(5) CopyGroundPilesTo("AR4802",[353.334]) // Temple of Helm (Nalin) DestroyGroundPiles() SmallWait(5) ActionOverride(Player1,LeaveAreaLUA("AR4802","",[473.395],NE)) // Temple of Helm (Nalin) SmallWait(5) ApplySpell(Player1,CLERIC_HEAL) // SPPR607.SPL (Heal) SmallWait(15) EndCutSceneMode() END I have "Player1 can die" flag set on all locations. Test case: start new game drop quarterstaff C:Eval('ActionOverride(Player1, LeaveAreaLUA("AR3901","",[455.272], N))') kill protagonist with Ctrl+Y Expected: protagonist will be at AR4802 [473.395] with full health all ground piles from AR3901 are copied to AR4802 [353.334] (AR3901 is Ulcaster dungeon, there are some ground piles there by default) Result: protagonist is at AR4802 [473.395] with full health but at [353.334] there is quarterstaff sometimes: camera shows Candlekeep and then game crash occurs Wow, this in fact change something. Now camera goes back to AR3900, not Candlekeep. What is this mechanic? How engine detects those "master" areas? I think this could be root cause of my problem. I tested a bit and it seems that when character is dead on "interior" area, ground piles are copied from last visited "master" area. My guess on character dead game somehow switch context to last visited "master" area. I guess this is also the reason for this sporadic game crash (when context is switched before resurrection occurs, games crashes because there is no character on "master" area to resurrect).
  15. Yes, yes. I mentioned this other case because I don't trust this LeaveLocationLUA, it produces strange results. Anyway, sorry for confusion. I'm testing it using console Eval function, like in example in first post. I'm traveling between locations using LeaveLocationLUA as I showed in previous post. Let me test some more and get back to you with proper steps to reproduce.
  16. Yes, target was walkable and I was able to copy to this exact point piles form different location. I tried once again few test cases and this problem seems to be not 100% predictable. I need to run few more tests on clean installation. It could be that it is not problem with "CopyGroundPilesTo()" itself, but with the way how I test (beginner here). E.g. when is set "Player1 can die" flag on area AR3901, then start new game, travel to AR3901 with: C:Eval('ActionOverride(Player1, LeaveAreaLUA("AR3901","",[455.272], N))') and kill my character with CTRL+Y, then camera goes back to Candlekeep and I still get game over screen. Can it be that "LeaveAreaLUA" leaves something behind? Maybe new area is not properly loaded in such case?
  17. Does action CopyGroundPilesTo() has any limitations regarding on what areas it can work? I try it in Ulcaster Dungeon and it doesn't work when I try to copy ground piles to Nashkel Temple e.g. C:Eval('CopyGroundPilesTo("AR4802",[353.334])') However it does work when try to copy it within same area: C:Eval('CopyGroundPilesTo("AR3901",[455.272])') Also, coping ground piles into this are doesn't work. Do you know about any issues regarding reliability of this action?
  18. Uh, that's bad, because now I realized that without copying ground piles this mod wouldn't allow to resign on coming back to fight that cause character death what could be one of cool usage of it. Anyway, maybe "CopyGroundPilesTo()" wouldn't be that bad, I cannot think of an example from the game when it could allow player to access some item too early etc. If anyone has something like this in mind, please shout. Thank you for clarification of this topic!
  19. That's true. I think that maybe it wouldn't be a problem if I implement some ability/item that allows to quick travel to place of death. But for now I'm not sure how to implement that. I tested "StorePartyLocations()" and "RestorePartyLocations()" actions and it works flawless, but it allows to store only one location at the time, what could cause compatibility issues with other usage of this actions. I think it is mostly used for dream cut scenes etc. to restore party location after dream ends. Regarding copying of piles alternative to "CopyGroundPilesTo()" could be copying them one by one, but not sure if I can identify correct ones. If I understand correctly ground piles are container of some type, so they have some id generated by engine. But I'm not sure how it works. True, I will move whole party I guess. This is what I have for now: IF StateCheck(Player1, STATE_REALLY_DEAD) THEN RESPONSE #100 StartCutSceneMode() SmallWait(15) FadeToColor([20.0],0) SmallWait(30) ClearAllActions() ActionOverride(Player1, LeaveAreaLUA("AR4802","",[473.395], NE)) ApplySpell(Player1, "CLERIC_RESURRECTION") ActionOverride(Player2, LeaveAreaLUA("AR4802","",[528.421], NE)) ApplySpell(Player2, "CLERIC_RESURRECTION") ActionOverride(Player3, LeaveAreaLUA("AR4802","",[442.428], NE)) ApplySpell(Player3, "CLERIC_RESURRECTION") ActionOverride(Player4, LeaveAreaLUA("AR4802","",[498.454], NE)) ApplySpell(Player4, "CLERIC_RESURRECTION") ActionOverride(Player5, LeaveAreaLUA("AR4802","",[407.464], NE)) ApplySpell(Player5, "CLERIC_RESURRECTION") ActionOverride(Player6, LeaveAreaLUA("AR4802","",[461.490], NE)) ApplySpell(Player6, "CLERIC_RESURRECTION") SmallWait(15) FadeFromColor([20.0],0) SmallWait(30) EndCutSceneMode() END It seems that if applying of resurrection is right after LeaveAreaLUA, the camera is moved to target location correctly. If I would put same wait in between, it will not work. I believe that due to some race condition it will not work once in a while, but it's not game breaking problem, double click on character portrait move camera to correct area and everything is fine. So I would say this behavior is "good enough".
  20. I recently tested AddExperienceParty() action and in turns about it accepts negative values. This is not mentioned in IESDP (like for example for ReputationInc() action). The limitation is that if character experience drops below 0 it will cause integer underflow and character would have in result maximum XP value. Game version: BG1 EE v2.6.6.0.
  21. I'm thinking about two tweaks regarding identification: All items requires identification to use (I think there was some tweak like this somewhere, but I cannot recall) All unidentified items has icons of "normal" objects (this would work cool with Item Randomiser, when you don't know which item is where) Also, I think Tweaks Anthology could include some tweak regarding Free Action. EDIT Maybe "All unidentified items has icons of normal objects" should be in fact Item Randomiser feature, since it already knows items that are randomized (I guess it would be hard to write generic script that would assign proper icons to all items in game).
  22. @In_A_Graveyard Sure, any help is welcome. I will setup github repository for easy code sharing. I would also for sure need help with detecting all corner cases that can lead into bugs. I investigated a bit this topic regarding what could be technical implementation: 1. Preventing "game over" on protagonist death Besides mentioned before "Protagonist can die" I also checked "Death Cam" module of "Tweaks Anthology". It seems that "game over" on protagonist death need to be disabled on each area separately. This WeiDU code is doing this (from "Tweaks Anthology"): COPY_EXISTING_REGEXP GLOB ~^.+\.are$~ ~override~ WRITE_LONG 0x14 (THIS | BIT4) // add player1-can-die bit BUT_ONLY This affects all ARE files, so its is also compatible with other mods, if installed after them. This only work for EE versions of game. Also, there seems to be also three script files involved: "baldur.bcs", "baldur25.bcs", "bdbaldur.bcs". According to SimDing0 scripting guide "baldur.bcs" is global script that runs all the time during game and "baldur25.bcs" is its equivalent for ToB. "Protagonist can die" remove all GameOver actions from those scripts: COPY_EXISTING ~baldur.bcs~ ~override~ DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~GameOver(19377)~ ~NoAction()~ END COPY_EXISTING ~baldur25.bcs~ ~override~ DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~GameOver(19377)~ ~NoAction()~ END COPY_EXISTING ~bdbaldur.bcs~ ~override~ DECOMPILE_AND_PATCH BEGIN REPLACE_TEXTUALLY ~GameOver(19377)~ ~NoAction()~ END In my version BG1EE I have "baldur.bcs" and "baldur25.bcs", there is no "bdbaldur.bcs". In "baldur.bcs" there is GameOver trigger: IF !InParty(Player1) Global("bdtgaze","GLOBAL",1) THEN RESPONSE #100 GameOver(19377) // The main character has been killed. You must restart the game. END But I couldn't find place where "bdtgaze" variable is set. "Death Cam" do not replace GameOver() with NoAction() so i"m not sure if it is required. 2. Respawn in temple I was able to move my dead protagonist to temple with following commands: C:Eval('ActionOverride(Player1, LeaveAreaLUA("AR4802","",[505.408], NE))') C:Eval('ApplySpell(Player1, CLERIC_RESURRECTION)') However, camera do not changes to new area. It seems that LeaveAreaLUA action normally moves camera, but since character is dead, it is not happening. There is action MoveViewObject that can move viewport, but it seems to works only inside same area. Maybe LeaveAreaLUA is not proper action to use in this case? Or maybe there is some action that could move viewport to other area? I'm seeking advice. I didn't touch equipment movement topic yet. There is action "CopyGroundPilesTo()" that allows to move ground piles between locations, but it affect all ground piles, what I believe can cause strange output in some cases. Unless equipment dropped by PC has some own identifier it could be rather hard to move this. However, maybe just allowing quick travel to place of death would be anyway better option. With "quick loot" window it would be rather easy to get gear back. TBD 3. Detecting respawn point I'm thinking about resolving in three groups of steps: plot critical rules (e.g. for Candlekeep catacombs, Irenicus dungeons, Spellhold dungeons etc.) based on last visited outdoor area some fallback based on game chapter etc. 4. Respawn penalty IESDP don't says that, but I tested, and it seems you can pass negative value to "AddExperienceParty()" action. There is even nice console message "party lost experience". It doesn't reduce character level, what I think is best option for respawn penalty case.The only problem is, that reducing experience below 0 cause integer underflow and character is on maximal experience then. But I guess with right triggers that check experience value of PCs it can be prevented easily. I guess there is no way to apply percentage penalty, it seems there is no way to read character XP points in script action block. Maybe it could be accomplished with Effect, I need to investigate more. Fallback would be to have penalties based on some thresholds.
  23. Thank you for your answer, this "Protagonist can die" mod can be good starting point for me. What I described was only idea how it could work in BG, not exact specification. I guess if it is possible to stop "game over" on protagonist death it would be possible to trigger some action on protagonist death, imprisonment etc. The rest is just find the most suitable actions that engine allows on. Quickly looking on "Protagonist can die" I'm a bit surprise that this "game over" is handled from so many places, but anyway, if I'm not mistaken the most challenging part is already done. I will try to prepare some proof of concept. I recently realized that very similar mechanics was also in Neverwinter Nights. There were also there item called "stone of recall" that allow player for teleport to "safe place". I found two BG mods that try to do similar thing: "Stone of Recall" component of "Cursed Items Revision": http://forums.blackwyrmlair.net/lofiversion/index.php/t4321.html "STONE OF TELEPORTATION" component of "More Style for Mages": https://forums.beamdog.com/discussion/18108/mod-more-style-for-mages-v1-56#teleport It seems like I need to combine "Protagonist can die" with one of them and voila, seems like piece of cake.
×
×
  • Create New...