Jump to content

Banter accelerator question


ScuD

Recommended Posts

The lines in bantergoose.baf like

GGT("Chapter",1)

G("FWRanABanter",0)

etc.

Is this some innovative and/or alternative way of writing GlobalGT and Global checks?

It returns errors/warnings in baldur.bcs.

The SSH Banter Pack has the same bantergoose.baf as BG1NPC.

Link to comment

This is Jason Compton's code, gratefully accepted by the original BG1NPC'ers - and yep, it uses the

 

0x40C6 G(S:ResRef*,I:Num*)

NT

 

0x40C7 GGT(S:ResRef*,I:Num*)

NT

 

0x40C8 GLT(S:ResRef*,I:Num*)

NT

 

opcodes, all listed as untested -

 

there is some old material on its use in PPG threads. I think at one point the thought was that they set only as "LOCALS" or as specifics (better ask the real scripting gurus).

 

I know that we have had troubles with some of the older mods that use those, again information tucked away in old PPG threads, including one Siren's Call that failed to install on a Tutu game, choking on that particular call. So modern modders generally do the full long-form, specifying:

 

0x400F Global(S:Name*,S:Area*,I:Value*)

Returns true only if the variable with name 1st parameter of type 2nd parameter has value 3rd parameter.

 

0x4034 GlobalGT(S:Name*,S:Area*,I:Value*)

See Global(S:Name*,S:Area*,I:Value*) except the variable must be greater than the value specified to be true.

 

0x4035 GlobalLT(S:Name*,S:Area*,I:Value*)

As above except for less than.

 

 

(note to self, there has got to be some way cool way of using these, too:

 

0x4098 GlobalsEqual(S:Name1*,S:Name2*)

Returns true only if the 2 global variables specified have equal values.

 

0x4099 GlobalsGT(S:Name1*,S:Name2*)

Returns true only if the 1st global variable has a value greater than the 2nd one.

 

0x409A GlobalsLT(S:Name1*,S:Name2*)

Returns true only if the 1st global variable has a value less than the 2nd one.

 

0x409B LocalsEqual(S:Name1*,S:Name2*)

Returns true only if the 2 local variables specified have equal values.

 

0x409C LocalsGT(S:Name1*,S:Name2*)

Returns true only if the 1st local variable has a value less than the 2nd one.

 

0x409D LocalsLT(S:Name1*,S:Name2*)

Returns true only if the 1st local variable has a value less than the 2nd one.

 

 

If it is returning errors, it might be something the bigg and JCompton could look into. We have anecdotal evidence that the banter accellerators work, but it may be that some distributions have troubles with this particular thing. And the bigg has a newer version that works differently, I think.

Link to comment
(note to self, there has got to be some way cool way of using these, too:

 

0x4098 GlobalsEqual(S:Name1*,S:Name2*)

Returns true only if the 2 global variables specified have equal values.

 

0x4099 GlobalsGT(S:Name1*,S:Name2*)

Returns true only if the 1st global variable has a value greater than the 2nd one.

 

0x409A GlobalsLT(S:Name1*,S:Name2*)

Returns true only if the 1st global variable has a value less than the 2nd one.

 

0x409B LocalsEqual(S:Name1*,S:Name2*)

Returns true only if the 2 local variables specified have equal values.

 

0x409C LocalsGT(S:Name1*,S:Name2*)

Returns true only if the 1st local variable has a value less than the 2nd one.

 

0x409D LocalsLT(S:Name1*,S:Name2*)

Returns true only if the 1st local variable has a value less than the 2nd one

A note to self's note... :)

Could be usable in a friendship/romance triangle...

Globals are set for talks between pc and npc1 and talks between pc and npc2

Once the globals reach a certain level and are equal npc1 and npc2 can then have a shared chat with pc.

 

but that could be done by just checking for both individual globals to be the same value...

Link to comment

way cool. Now that is a great idea. It creates a "range" in which certain talks fire - like, if I wanted Aran to say something that was only relevant between several lovetalks now I just have to figure out how to get a locals value to be read as if it were a global, without spamming a bunch of extra blocks onto someone's script, so that I can see it from Aran's .bcs... hmmm. I think I have seen this before somewhere.

 

 

Edit: yep. Weimer.

 

Search "GlobalsGT" (8 hits in 3 files)

E:\ie_modding\BG2_NPC\Weimer-SolaufeinMod-v103\solarom\sola.d (2 hits)

Line 582: IF ~!GlobalsGT("SolaRemorse","SolaPragma")~ THEN GOTO 83

Line 583: IF ~GlobalsGT("SolaRemorse","SolaPragma")~ THEN GOTO 86

E:\ie_modding\BG2_NPC\Weimer-SolaufeinMod-v103\solarom\solasoa.d (2 hits)

Line 21: GlobalsGT("SolaRemorse","SolaPragma")~ THEN

Line 27: !GlobalsGT("SolaRemorse","SolaPragma")~ THEN

E:\ie_modding\BG2_NPC\Weimer-SolaufeinMod-v103\solarom\solatob.d (4 hits)

Line 13: == "SOLA" IF ~InParty("Sola") !GlobalsGT("SolaRemorse","SolaPragma")~

Line 15: == "SOLA" IF ~InParty("Sola") GlobalsGT("SolaRemorse","SolaPragma")~

Line 56: == "SARVOLO" IF ~!GlobalsGT("SolaRemorse","SolaPragma")~ THEN @72

Line 57: == "SARVOLO" IF ~GlobalsGT("SolaRemorse","SolaPragma")~ THEN @73

Link to comment

Are you reinstalling or uninstalling a mod? I had a whole bunch of those while reinstalling a mod, and had to reinstall the game. The odd thing was that they went in fine on the initial installation, but choked on the reinstallation. WeiDU was throwing out all kinds of errors, like values being out of range, etc.

 

These days, I'm treating all installations as one-way. If I need to change something, I start from scratch.

 

Regarding the application of GlobalsGT(), GlobalsLT(), and GlobalsEqual(), the most useful application I could see would be for romances. Suppose you've got two variables, one for attraction, the other for offense. Both variables can rise during the course of the romance. Now you get to a dialogue where the NPC has to make a choice... say Tree of Life. Nobody ever abandons the PC here, but what if this NPC was different. This is a an event that happens at a fixed point in the game, but there's no telling how high each of those variables is going to get. If the attraction is greater than the offense, the NPC stays. If the offese is greater than the attraction, the NPC splits. You don't need to know the actual value, just that one is higher than the other. Pretty cool. Wonder if it works.

Link to comment

Archived

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

×
×
  • Create New...