erebusant Posted March 22, 2008 Share Posted March 22, 2008 Is there a proper way to code this, or will the IE engine just continually reject it and give the party some astronomical sum of XP? (ie;NTotSC Ghotal's Sword quest) Link to comment
erebusant Posted March 24, 2008 Author Share Posted March 24, 2008 Is there a proper way to code this, or will the IE engine just continually reject it and give the party some astronomical sum of XP? (ie;NTotSC Ghotal's Sword quest) Would using something from Action.IDS like 327 AddXP2DA(S:Column*) work? Link to comment
igi Posted March 24, 2008 Share Posted March 24, 2008 You should be able to take away XP via scripting or effects. You'll just have to try though, and see if it works Link to comment
SimDing0 Posted March 24, 2008 Share Posted March 24, 2008 Tentatively, I think that doing it by script works, but by effect doesn't. Can't really remember. Link to comment
berelinde Posted March 24, 2008 Share Posted March 24, 2008 Couldn't you do AddexperienceParty(-###) From the IESDP: 164 AddexperienceParty(I:XP*)Adds the amount of XP specified to the party. The example is from AR1300.bcs. IF OpenState("Bridge01",TRUE) Global("BridgeOpen","GLOBAL",0) !Dead("Torgal") THEN RESPONSE #100 SetGlobal("BridgeOpen","GLOBAL",1) DisplayString(Myself,'The drawbridge has been lowered.') CreateCreature("KPCAPT03",[2400.1592],6) CreateCreature("KPSOLD03",[2425.1676],6) CreateCreature("KPSOLD04",[2371.1754],6) CreateCreature("KPSOLD05",[2315.1805],6) CreateCreature("TROLGI01",[2391.1592],0) CreateCreature("TROLGI02",[2282.1742],0) CreateCreature("KPYUAN01",[2251.1731],0) AddexperienceParty(29750) (Cut short for brevity) Link to comment
erebusant Posted March 24, 2008 Author Share Posted March 24, 2008 The following is from the transition action in STATE 0 of NTGHOTA.dlg: TakePartyItem("NTSWD05") // Two-Handed Sword of General Ghotal AddexperienceParty(-20000) Enemy() When this runs, the party gets approximately 40,000,000 XP. Does it make a difference if it is scripted via dialog instead of an area script, or something, or does the engine not recognize the - and you need to use a set of () like in an excel spreadsheet to designate a negative number? Link to comment
devSin Posted March 24, 2008 Share Posted March 24, 2008 Tentatively, I think that doing it by script works, but by effect doesn't. Can't really remember.Other way around. You can use AddXPObject() to subtract experience, but the feedback will still say "gains -n quest experience," which is dumb. See SPIN765 (HELL_LOSE_XP) for using the effect with a negative value. Note that XP will wrap around if you try to go below 0, so check the player's current XP before trying to subtract too much. You can use a custom display string if you want (there won't be any normal feedback). does the engine not recognize the - and you need to use a set of () like in an excel spreadsheet to designate a negative number?The engine won't do anything but laugh at you if you try to start sticking in spurious parenthesis and similar. Link to comment
erebusant Posted March 25, 2008 Author Share Posted March 25, 2008 Tentatively, I think that doing it by script works, but by effect doesn't. Can't really remember.Other way around. You can use AddXPObject() to subtract experience, but the feedback will still say "gains -n quest experience," which is dumb. See SPIN765 (HELL_LOSE_XP) for using the effect with a negative value. Note that XP will wrap around if you try to go below 0, so check the player's current XP before trying to subtract too much. You can use a custom display string if you want (there won't be any normal feedback). does the engine not recognize the - and you need to use a set of () like in an excel spreadsheet to designate a negative number?The engine won't do anything but laugh at you if you try to start sticking in spurious parenthesis and similar. So theoretically, I could take SPIN765 and save it as a completely new .SPL, then take the effect within the spell ability: Type: XP bonus (104) Targettype: TargetPresetTarget (2) Power: 0 Value: -75000 Modifier type: Inc/Dec (0) Duration: Instant/Permanent (1) Dispel/Resistance: No dispel/Bypass resistance (0) Time: 0 Probability 1: 100 Probability 2: 0 Unknown: 00 00 00 00 30 15 40 00 h # dice / Max level: 0 Dice size / Min level: 0 Savetype: ( No save ) Save bonus: 0 Unknown: 00 00 00 00 h and change the value to -1/6th of the original desired XP loss of 20000 XP and then instead of trying AddExperienceParty(-20000) do something to the effect of ApplyNewSPIN(Player1-6) to have the same effect? Did that make sense? Oh Yes - WeiDU generally laughs at me anyway,,,, Link to comment
devSin Posted March 25, 2008 Share Posted March 25, 2008 Yes. You could also change the effect target to "Party" (3) and just set to -3300 or whatever and cast it once, but ApplySpellRES("MySpell",Player1-6) should work fine. SPIN765 probably has a sound effect; you might want to get rid of it too. Link to comment
erebusant Posted March 25, 2008 Author Share Posted March 25, 2008 So my final transition actions in NTGGHOTA.dlg looks like so: TakePartyItem("NTSWD05") // Two-Handed Sword of General Ghotal ApplySpellRES("SPIN765A",Player1) // No such index DisplayStringHead("Player1",164934) // You have just given General Ghotal the ability to escape from his tomb, and wreak havoc on the surrounding countryside. Hopefully you have the strength, courage and fighting ability to stop him! ApplySpellRES("SPIN765A",Player2) // No such index ApplySpellRES("SPIN765A",Player3) // No such index ApplySpellRES("SPIN765A",Player4) // No such index ApplySpellRES("SPIN765A",Player5) // No such index ApplySpellRES("SPIN765A",Player6) // No such index Enemy() Now to find someone at that point in their game to see if it works. Link to comment
devSin Posted March 25, 2008 Share Posted March 25, 2008 No "Player1" quotes -> DisplayStringHead(Player1,@123) Otherwise, that should work. You might want a better filename than SPIN765A (if you don't have a prefix, GHOTALXP.SPL or NTSWD5XP.SPL seem a good choice). Link to comment
erebusant Posted March 25, 2008 Author Share Posted March 25, 2008 No "Player1" quotes -> DisplayStringHead(Player1,@123) Otherwise, that should work. You might want a better filename than SPIN765A (if you don't have a prefix, GHOTALXP.SPL or NTSWD5XP.SPL seem a good choice). Holy Cow!! I just did a text search of my BCS files in game and got 866 hits for DisplayStringHead(" Looks like a lot of edits and fixing source files in my future,,, Link to comment
devSin Posted March 25, 2008 Share Posted March 25, 2008 A script name will need the quotes (e.g., DisplayStringHead("ALORA",~Leapin' lizards!~)). Player1 is an object ID, however (the quotes would have the engine look for an object with the script name "Player1," which isn't what you want). Link to comment
devSin Posted March 25, 2008 Share Posted March 25, 2008 For the curious, if you pass a negative number to DestroyGold(), you can actually create gold in a creatures GOLD stat (DestroyGold(-1) would add 1 gold piece to the existing value of the target's GOLD stat). Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.