Jump to content

Taking away Party XP


erebusant

Recommended Posts

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

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
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
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,,,, :suspect:

Link to comment

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

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. :suspect:

Link to comment
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,,, :suspect:

Link to comment

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...