NiGHTMARE Posted September 19, 2005 Share Posted September 19, 2005 I'd like to modify the gauntlets of Ogre Power, girdles of Giant Strength and Cromy Feyr so that instead of providing a set STR bonus, they provide a cumulative bonus to THAC0 and damage which depends on the character's strength. For example, the gauntlets of ogre power bonuses would be: CHA Strength THAC0 bonus Damage bonus 1 +8 +10 2 +6 +8 3 +6 +7 4-5 +5 +7 ... 18/51-75 +1 +3 18/76-90 +1 +2 18/91-99 +1 +1 18/00+ +0 +0 I'm sure this could be achieved via lengthy global scripts, but is there a way of achieving it without? I remember years ago there was a tutorial at TeamBG entitled "levelling up items without scripting", and perhaps similar principles could be used. Unfortunately, I can't find said tutorial anywhere. Link to comment
the bigg Posted September 19, 2005 Share Posted September 19, 2005 http://64.233.183.104/search?q=cache:bLSVa...ipting%22&hl=en If it doesn't work: http://www.google.com/search?q=%22levellin...%20scripting%22, then select the first cached result. Note: the file linked by igi isn't available, but there are instructions. I don't think, however, it's appliable without scripting Link to comment
NiGHTMARE Posted September 19, 2005 Author Share Posted September 19, 2005 Ah, I forgot about the level limit value. Looks like I may have to use the old invisible item trick. Link to comment
igi Posted September 19, 2005 Share Posted September 19, 2005 Of course, you could always use the current copy of the tutorial, with working download, as opposed to using Google cache to view a copy that's 2 years old... http://mcwrench.com/forum/index.php?showtopic=8 Link to comment
the bigg Posted September 19, 2005 Share Posted September 19, 2005 Uh, yeah However, the first thing I think of when it's about finding something about TBG is 'fire up Google and try the cache', not 'start browsing all mod forums I can think of' Link to comment
NiGHTMARE Posted September 19, 2005 Author Share Posted September 19, 2005 The reasonably efficient script I've come up with IF Global("HasOgrePower","LOCALS",0) OR(18) HasItemEquipped("brac06",LastSummonerOf(Myself)) HasItemEquipped("nmobr06a",LastSummonerOf(Myself)) HasItemEquipped("nmobr06b",LastSummonerOf(Myself)) HasItemEquipped("nmobr06c",LastSummonerOf(Myself)) HasItemEquipped("nmobr06d",LastSummonerOf(Myself)) HasItemEquipped("nmobr06e",LastSummonerOf(Myself)) HasItemEquipped("nmobr06f",LastSummonerOf(Myself)) HasItemEquipped("nmobr06g",LastSummonerOf(Myself)) HasItemEquipped("nmobr06h",LastSummonerOf(Myself)) HasItemEquipped("nmobr06i",LastSummonerOf(Myself)) HasItemEquipped("nmobr06j",LastSummonerOf(Myself)) HasItemEquipped("nmobr06k",LastSummonerOf(Myself)) HasItemEquipped("nmobr06l",LastSummonerOf(Myself)) HasItemEquipped("nmobr06m",LastSummonerOf(Myself)) HasItemEquipped("nmobr06n",LastSummonerOf(Myself)) HasItemEquipped("nmobr06o",LastSummonerOf(Myself)) HasItemEquipped("nmobr06p",LastSummonerOf(Myself)) HasItemEquipped("nmobr06q",LastSummonerOf(Myself)) THEN RESPONSE #100 GetItem("brac06",LastSummonerOf(Myself)) GetItem("nmobr06a",LastSummonerOf(Myself)) GetItem("nmobr06b",LastSummonerOf(Myself)) GetItem("nmobr06c",LastSummonerOf(Myself)) GetItem("nmobr06d",LastSummonerOf(Myself)) GetItem("nmobr06e",LastSummonerOf(Myself)) GetItem("nmobr06f",LastSummonerOf(Myself)) GetItem("nmobr06g",LastSummonerOf(Myself)) GetItem("nmobr06h",LastSummonerOf(Myself)) GetItem("nmobr06i",LastSummonerOf(Myself)) GetItem("nmobr06j",LastSummonerOf(Myself)) GetItem("nmobr06k",LastSummonerOf(Myself)) GetItem("nmobr06l",LastSummonerOf(Myself)) GetItem("nmobr06m",LastSummonerOf(Myself)) GetItem("nmobr06n",LastSummonerOf(Myself)) GetItem("nmobr06o",LastSummonerOf(Myself)) GetItem("nmobr06p",LastSummonerOf(Myself)) GetItem("nmobr06q",LastSummonerOf(Myself)) SetGlobal("HasOgrePower","LOCALS",1) END IF Global("HasOgrePower","LOCALS",1) Checkstat(LastSummonerOfMyself,1,STR) THEN RESPONSE #100 CreateItem("nmobr06a",LastSummonerOf(Myself),0,0,0) Equip("nmobr06a",LastSummonerOf(Myself)) SetGlobal("HasOgrePower","LOCALS",0) DestroySelf() END IF Global("HasOgrePower","LOCALS",1) Checkstat(LastSummonerOfMyself,2,STR) THEN RESPONSE #100 CreateItem("nmobr06b",LastSummonerOf(Myself),0,0,0) Equip("nmobr06b",LastSummonerOf(Myself)) SetGlobal("HasOgrePower","LOCALS",0) DestroySelf() END IF Global("HasOgrePower","LOCALS",1) Checkstat(LastSummonerOfMyself,3,STR) THEN RESPONSE #100 CreateItem("nmobr06c",LastSummonerOf(Myself),0,0,0) Equip("nmobr06c",LastSummonerOf(Myself)) SetGlobal("HasOgrePower","LOCALS",0) DestroySelf() END IF Global("HasOgrePower","LOCALS",1) OR(2) Checkstat(LastSummonerOfMyself,4,STR) Checkstat(LastSummonerOfMyself,5,STR) THEN RESPONSE #100 CreateItem("nmobr06a",LastSummonerOf(Myself),0,0,0) Equip("nmobr06d",LastSummonerOf(Myself)) SetGlobal("HasOgrePower","LOCALS",0) DestroySelf() END etc Of course the bracers won't automatically change if the character's strength increases by other means (e.g. a spell or some other item). However, this is actually desired behaviour, since the items aren't supposed to be cumulative with other unnatural strength bonuses. Link to comment
the bigg Posted September 19, 2005 Share Posted September 19, 2005 What about moving the item, changing your STR score, etc..? Seems a bit inefficient to me this way What I'd do is having the bracers create a creature every second or so, and the creature will apply the needed effects via a spell. (or, to avoid creating multiple creatures, have baldur.bcs run the necessary script). Hopefully the user won't try and cheese by moving the item around the gang every second Link to comment
NiGHTMARE Posted September 19, 2005 Author Share Posted September 19, 2005 Moving the items around shouldn't be problem since I've used HasItemEquipped - it'll run as soon as a character equips the item. Having the effects contained in the item also means they can't be applied to multiple characters at once. As I've written in the edited post, the item is actually supposed to ignore altered strength scores anyway - if I could, I'd make it ignore other sources of change when equipping it too . EDIT: oh, and don't forget that WeiDU can create multiple versions of an item automatically. Link to comment
NiGHTMARE Posted September 19, 2005 Author Share Posted September 19, 2005 I just realized that with a little more scripting, I should be able implement the pnp gauntlets of Ogre Power / girdle of Giant Strength / War Hammer rule. That is, the gauntlets and girdles' powers stack if the wearer is using a war hammer. Bioware had a very crude go at it with Crom Feyr, but if this works I can do away with the forging, have it affect all the other hammers, and have it work with more than just a single type of girdle. The player will still need to find the Crom Feyr scroll, as a Hammer of Thunder Bolts will only work at full potential if its wielder knows its true name. EDIT: Eh, I don't know what I was thinking - other sources of strength alteration should of course be taken into account. If it's already less than 18/00 and changes to something still less than 18/00, their THAC0 and damage bonuses are supposed to remain unchanged; if it changes to 18/00 or more, the girdle should stop providing a bonus at all. Looks like I will need to keep summoning the invisible .cre after all - thanks for the tip . Link to comment
the bigg Posted September 19, 2005 Share Posted September 19, 2005 EDIT: oh, and don't forget that WeiDU can create multiple versions of an item automatically. <{POST_SNAPBACK}> You don't know whom are you talking to. Link to comment
NiGHTMARE Posted September 19, 2005 Author Share Posted September 19, 2005 That's why I said "don't forget" - many other people don't even realize WeiDU is capable of such a thing . Link to comment
SimDing0 Posted September 19, 2005 Share Posted September 19, 2005 Dude, you totally want IAP-SFX. Link to comment
the bigg Posted September 19, 2005 Share Posted September 19, 2005 Dude, you totally want IAP-SFX. <{POST_SNAPBACK}> How about compacting the mod in a single executable (which is possible, if we were to create all files as inlined or define them via patching, and then 'compiling' the tp2 into an executable), and then distributing the mod as the source of a program in Brainfuck which would spit out the final executable file? Link to comment
NiGHTMARE Posted September 20, 2005 Author Share Posted September 20, 2005 The script seems to be pretty much complete now. Since it's so long, here's a summary of what each block does: 1) If HasOgrePower = 0 and player has gauntlets of Ogre Power, then take them and set HasOgrePower -> 1 2) If HasHillGiantStrength = 0 and player has girdle of Hill Giant Strength, then take it and set HasHillGiantStrength -> 1 3) If HasStoneGiantStrength = 0 and player has girdle of Stone Giant Strength, then take it and set HasStoneGiantStrength -> 1 4) If HasFrostGiantStrength = 0 and player has girdle of Frost Giant Strength, then take it and set HasFrostGiantStrength -> 1 5) If HasFireGiantStrength = 0 and player has girdle of Fire Giant Strength, then take it and set HasFireGiantStrength -> 1 6) If player has a war hammer, then set HasWarHammer -> 1 7) If HasOgrePower = 1 and all of the HasXGiantStrengths = 0, then set HasOgrePower ->2 8) If HasOgrePower = 1, HasWarHammer = 0, and any of the HasXGiantStrength = 1, then create + equip no bonus version of gantlets of Ogre Power, and set HasOgrePower -> 0 9) If HasOgrePower = 1, HasWarHammer = 1, and any of the HasXGiantStrength = 1, then set HasOgrePower -> 2 and HasWarHammer -> 0 10) (Several blocks) If HasOgrePower = 2, then create + equip the appropriate version of gauntlets of Ogre Power (based on player's strength), and set HasOgrePower ->3 11) (Several blocks) If HasHillGiantStrength = 1, then create + equip the appropriate version of girdle of Hill Giant Strength (based on player's strength), and set HasHillGiantStrength-> 2 12) (Several blocks) If HasStoneGiantStrength = 1, then create + equip the appropriate version of girdle of Stone Giant Strength (based on player's strength), and set HasStoneGiantStrength-> 2 13) (Several blocks) If HasFrostGiantStrength = 1, then create + equip the appropriate version of girdle of Frost Giant Strength (based on player's strength), and set HasFrostGiantStrength-> 2 14) (Several blocks) If HasFireGiantStrength = 1, then create + equip the appropriate version of girdle of Fire Giant Strength (based on player's strength), and set HasFireGiantStrength-> 2 15) If HasOgrePower = 3, and all of the HasXGiantStrengths = 0, then set HasOgrePower -> 0 and destroy self 16) If any of the HasXGiantStrengths = 2, then set them + HasOgrePower -> 0, and destroy self Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.