Jump to content

pete_smith1229

Members
  • Posts

    135
  • Joined

  • Last visited

Everything posted by pete_smith1229

  1. @jmerry@mickabouille Ahh, so that was the definition of GT and LT...I feel dumb! It all makes sense now, this is very helpful. Thank you both!
  2. I guess I could use something like: IF OR(11) CheckStatGT(Myself,5,LEVEL) CheckStatGT(Myself,6,LEVEL) CheckStatGT(Myself,7,LEVEL) CheckStatGT(Myself,8,LEVEL) CheckStatGT(Myself,9,LEVEL) CheckStatGT(Myself,10,LEVEL) CheckStatGT(Myself,11,LEVEL) CheckStatGT(Myself,12,LEVEL) CheckStatGT(Myself,13,LEVEL) CheckStatGT(Myself,14,LEVEL) CheckStatGT(Myself,15,LEVEL) THEN RESPONSE #100 //Do something END But it's pretty damn ugly...
  3. There's the following function to check the level of the character: CheckStatGT(Myself,10,LEVEL) Is there something similar or a way to check if a PC's level is greater or less than a specific number (e.g. >=5 or <=15)? Or better yet, check if it's in a range: 5 <= LEVEL <= 15
  4. I agree with you, I am sticking with the script method. My idea of using the proficiency method is to use it to count the number of equipped armor. So each armor would use "Modify proficiencies (233)" and increment a new proficiency by 1, then the script will apply the relevant spell resource depending on the proficiency value (e.g. a proficiency of 3 would apply a 3-set bonus effect). If this works as intended, it can help avoid writing out all possible combinations of armor pieces for X amount of sets (although this may not be an issue if writing such a script is automated...).
  5. That makes sense, thanks for the tip. You mentioned the use of proficiency before so I'll test set bonuses using this method. Thanks! Thanks for the info concerning variables, I did notice they can be overriden but not that they were constant. Although I would like to make an efficient method, I'm glad we at least have a couple of working methods to achieve set bonuses
  6. So I'm toying with "Modify local variable (309)", Value=1, Modifier=1, timing mode = 2. This effect is added to each armor piece and when equipping the armor, the set bonus occurs once a certain value is reached. However, when un-equipping an armor piece, the variable value doesn't seem to decrease. The bonus remains.... Is it possible for the variable to only take effect when the armor is equipped using opcode 309?
  7. Thanks, that looks more like what I was trying to achieve late last night! I'll test this when I have time and let you know if it works!
  8. Don't know about the cap. I can get the buff to activate when equipping the armor but it doesn't get removed when unequipping. Thought this way would make life easier for everyone but will need to work on it to see if it's doable. Will test more tomorrow.
  9. Just thinking out loud to avoid writing out all the possible armor combinations...could you add opcodes "Modify global variable (265)" or "Modify local variable (309)" to each of your armor pieces and have it increment the variable value. Then in the script, check for the variable value and apply the relevant number of spell resources. Something like: // 2-set IF Global("MO_BalduranSet","LOCALS",2) THEN RESPONSE #100 ApplySpellRES("MOSET1A",Myself) // Add Balduran 2 Piece Set Bonus END // 3-set IF Global("MO_BalduranSet","LOCALS",3) THEN RESPONSE #100 ApplySpellRES("MOSET1A",Myself) // Add Balduran 2 Piece Set Bonus ApplySpellRES("MOSET1E",Myself) // Add Balduran 3 Piece Set Bonus END // etc
  10. Thanks to @morpheus562, this issue is resolved when using "ApplySpellRES()" in the BCS script.
  11. Absolutely zero concern! I'm an advocate for open solutions and knowledge sharing. This community has certainly helped me numerous times. I would love to see the various methods used to create set bonuses!
  12. I'm sure your suggestion is a more robust solution. My original intention for the set armor was designed for PCs and not NPCs so I assumed putting the BCS script in the SPECIFICS slot would be fine. But still early days! Very interested to see how you tackled this and the script you are using! Certainly would be interesting to see additional bonuses being applied depending on how many pieces of armor is equipped. Thanks, I've used the SPECIFICS slot for the script. You're right about reloading the save. The bonus effects disappear and requires any armor piece to be unequipped, resume the game, then re-equip the armor for the bonus to be applied. Hmm........
  13. I found an issue where if an armor has the same equipped effect as a set bonus effect, removing the bonus effect also removes the equipped effect from the armor. For example, if the set bonus effect is an AC Bonus and an armor piece also has this effect seperately, SPL2 which uses "Remove effects by resource (321)" would remove both effects. So the armor would need to be re-equipped for it to gain back its AC Bonus. So for now at least, the set bonus effect should be different from any armor effect.
  14. Each armor piece uses "Set AI script (82)" which runs the same .BCS script. I've noticed that scripts tied to armor is only triggered when that armor is interacted with (i.e. equipped/unequipped). This is why all armor pieces uses the same script for checking for all armor pieces as it doesn't matter which armor triggers the script.
  15. I'd certainly appreciate confirmation if this works for someone else! This sounds similar to what I've done previously with .EFF files except with spell states. The major issue was how to remove the bonus when one set item is removed. I got it to work but it required 2 EFF and 2 SPL files. And this was for a 2-set armor, adding more armor would require more EFF files for each item. I'm sure your way works better than what I did without scripting.
  16. Interesting, thanks all for your comments. I'm getting more involved in scripting now so will tend to go down this route.
  17. I believe I've achieved what I wanted in the most efficient way (for me at least) which only involves: 2 .SPL files 1 new global variable 1 .BCS file SPL1 file contains the bonus effects you want applied when all set armor pieces are equipped via various opcodes such as "AC bonus (0)", "Blur (65)" etc.; SPL2 file contains "Remove effects by resource (321)" to remove the bonus effects from SPL1. Because the script will be calling these spells, you will need to add these to "SPELL.IDS" using the ADD_SPELL_EX function by K4thos and define it with a name as this will be used to call the spell (e.g. SPL1 = "SET_ARMOR_BONUS_ON" and SPL2 = "SET_ARMOR_BONUS_OFF"). A new global variable (e.g. "SET_ARMOR_BONUS") needs to be added to the "Baldur.GAM" file. This is used as a boolean check to ensure script blocks in the .BCS file doesn't get executed continuously. Finally, the .BCS file contains the logic to check if all set armor pieces are equipped and if so, apply the first .SPL file. If any armor is removed, apply the second .SPL file. The .BCS file is added to each armor using "Set AI script (82)". The following is the script used for a 2-set armor piece but can be easily customized to include additional armor pieces. // Generic .BCS script for 2-set armor piece // Add "HasItemEquipedReal()" for additional armor pieces // Apply bonus if all armor is equipped and global variable SET_ARMOR_BONUS=0 IF HasItemEquipedReal("RB_ARM01",Myself) // Custom armor HasItemEquipedReal("RB_HLM01",Myself) // Custom helmet Global("SET_ARMOR_BONUS","GLOBAL",0) THEN RESPONSE #100 ReallyForceSpell(Myself,SET_ARMOR_BONUS_ON) // Custom bonus spell SetGlobal("SET_ARMOR_BONUS","GLOBAL",1) // Set global variable SET_ARMOR_BONUS=1 to ensure this code block is executed once END // Remove bonus if any armor is unequipped and global variable SET_ARMOR_BONUS=1 // Set global variable SET_ARMOR_BONUS=0 to ensure these code blocks are executed once // Each armor needs to have their own removal code block // Add more code blocks for additional armor pieces IF !HasItemEquipedReal("RB_ARM01",Myself) // Custom armor Global("SET_ARMOR_BONUS","GLOBAL",1) THEN RESPONSE #100 SetGlobal("SET_ARMOR_BONUS","GLOBAL",0) ReallyForceSpell(Myself,SET_ARMOR_BONUS_OFF) // Custom bonus removal spell END IF !HasItemEquipedReal("RB_HLM01",Myself) // Custom helmet Global("SET_ARMOR_BONUS","GLOBAL",1) THEN RESPONSE #100 SetGlobal("SET_ARMOR_BONUS","GLOBAL",0) ReallyForceSpell(Myself,SET_ARMOR_BONUS_OFF) // Custom bonus removal spell END I'm sure there is a much cleaner method but this works perfectly for me. Thanks to all for your comments!
  18. I've tested the "Drop item (264)" effect by adding it to a helmet and everytime I equip it, it would drop an equipped item in the following order: Amulet Armor Belt Boots Cloak Bracers Ring1 Ring2 Shield Is there a way to use this opcode (or another) to drop a specific equipped item? Is there also a resource similar to this where it shows the ordering as I am not sure if what I found is accurate.
  19. Thanks, unfortunately the .EFF file fires the STRREF_GUI_FEEDBACK_CONTINGENCY_TRIGGER held in the ENGINEST.2DA file. Changing the value of this to 0 or leaving blank still results in the PC name still written to the text window. The "Disable display string (267)" effect doesn't seem to affect this. But it's fine, just a minor thing. Thanks, I tested this and it works when equipping the armor pieces. Unfortunately, taking a piece off doesn't remove the set bonus. I think it's because the "Cast spell on condition (232)" effect only fires once even if you set the condition "CheckSpellState(Myself,'Special') / per round (21)". However, I did simplify it slightly and reduced 3 .EFFs files to 2! This also works better as before, there would always be text triggered by the EFF every round. Now the text only appears once when the set bonus takes effect. Will continue to test.
  20. Also, does anyone know how to suppress the "It is done." message which the PC says when an EFF condition is met? Using 3 EFF files means this message appears 3 times in the textbox.
  21. Right, I seem to have a working example now for a 2-set armor piece where when both items are equipped, a bonus is added; when either item is removed, the bonus is lost. The bonus also no longers stack when an armor is re-equipped. At the moment, it uses 3 EFF files and 3 SPL files with combinations of opcodes mentioned in earlier posts. I'll work on it some more to see if I can simplify the logic tree otherwise it's going to be a nightmare for a 3-set piece and more...
  22. Amazing! The original BG1 soundsets and music always sounded more authentic and "real" for a fantasy world. Thanks for the mod, really looking forward to it!
  23. Thanks! By proficiency, do you mean attribute (e.g. STR, DEX etc)? And how could "Apply effects list (326)" be used to check an increase in value as I thought you would need to set a base value first? Your first example is the simplest and now that I think about it, I think a 2-set piece is probably as far as I would go. Thanks, I think the item you're referring to (BLUN38, Night Club +1) uses an .EFF file with Type = "Cast spell on condition (232)"; Condition = "TimeOfDay('Special') / per round (13)". I've used the same file with another round-based condition and it works for 2-set armor. Removing the bonus when unequipping an armor is now the main issue. Interesting, I'll have to take a look at this. Thanks for sharing the links!
  24. Minor progress: if both items are equipped and you remove the cloak, the additional buff is removed. This requires using another .EFF file with similar settings and another .SPL file to remove the effects of the cloak. Both these files are tied to the helmet. Unfortunately, the additional buff stacks each time either armor is re-equipped. There's a lot of circular logic going round (hah!) but will see if there's a way to completely reset the buff.
  25. Thanks, will take a lot of experimenting so will see how much of this can be achieved! Yeah I was hoping for a one-solution-fits-all but that probably won't be the case for this setup. I'm starting to think maybe a combination of a global script and opcodes may be ideal: have the armor pieces give a status effect then have the script check if the PC has these equipped and if so, provide a buff... HA! I like to generalize posts to try and make solutions easier to be adaptable to other scenarios. One example of what I want to do is create an armor set which consists of the "Helm of Balduran" and the "Cloak of Balduran" (I brought these to Icewind). Each of these gives the user -1 AC bonus. So wearing both normally would give an overall -2 AC bonus. What I want to do is when someone equips both of these, he/she would receive an additional benefit. So for argument's sake, let's say the additional benefit is another -1 AC bonus. So now equipping these two armor pieces would give an overall -3 AC bonus instead of the original -2 AC bonus. What I have done so far to enable the additional benefit (without taking the ordering into consideration) is to: 1. Create a new state id using Weidu and @subtledoctor's script (https://www.gibberlings3.net/forums/topic/36079-how-to-create-new-spell-states/) 2. Add an Effect to the "Helm of Balduran" .ITM file using "Set spell state (328)" = new state; Timing mode = "Instant/While equipped - 2". 3. Create a new .SPL file with a Spell Ability to give the Caster an AC bonus (this is the additional benefit). 4. Add an Effect to the "Cloak of Balduran" .ITM file using either "Apply effects list (326)" or "Use EFF file (177)". The former works immediately; the latter requires creating a new .EFF file which uses Type = "Cast spell on condition (232)"; Condition = "CheckSpellState(Myself,'Special') / per round (21)"; Resource = the new .SPL file; Special = new state. So once both armors are equipped, the additional benefit will kick in after 6 seconds. So gaining the additional benefit works. At the moment, my issue is what happens taking one of the armors off because right now, the additional benefit remains active. I'm having to play around with various opcodes as mentioned by others earlier: "Use EFF file (177)", "Protection from spell (206)", and "Remove effects by resource (321)". I have added opcode 321 to the helmet so if you unequip the cloak and re-equip the helmet, the additional benefit is removed. Not ideal. I need to find the right combination of opcodes and timings. Once this is solved for 2-set armor piece, I would like to extend to a 3-set and potentially more if it's feasible. I'll continue playing around in my free time and see how far this can go using opcodes or if global scripts should also be used. Thanks for attending my TEDTalk
×
×
  • Create New...