Jump to content

What are these lines for?


Creepin

Recommended Posts

I've studied how original romances was coded and stumbled upon following example (exception from baldur.bcs)

IF

Global("ViconiaMatch","GLOBAL",0)

Global("CheckViconiaMatch","GLOBAL",0)

Gender(Player1,MALE)

OR(4)

  Race(Player1,HUMAN)

  Race(Player1,HALF_ELF)

  Race(Player1,HALFLING)

  Race(Player1,0)

THEN

RESPONSE #100

  SetGlobal("CheckViconiaMatch","GLOBAL",1)

  SetGlobal("ViconiaMatch","GLOBAL",1)

END

Theoretically, if we'll remove highlighted lines the result will be the same, but why then are these lines there? The only thing that could possibly justify this additional GV is that parsing

Global("CheckViconiaMatch","GLOBAL",0)

would be much faster that parsing

	Gender(Player1,MALE)
OR(4)
 Race(Player1,HUMAN)
 Race(Player1,HALF_ELF)
 Race(Player1,HALFLING)
 Race(Player1,0)

Is that really so?

//BTW, what is race 0?

 

Also, is there any reason to keep match check in baldur.bcs instead of NPC's bcs?

Link to comment

First, the one that's actually a bug: Race 0 was them mis-coding a half orc check. Baldurdash et al fix this.

 

As for the other stuff...

 

- Although it doesn't actually matter the way the romances ended up being written, they may have decided to do the check in baldur.bcs so that the game would know how many romances a PC would qualify for. (again, they didn't DO anything with that knowledge, but they might have. Had they waited until Viconia was on the scene to write her script, it would have taken that much longer to find out.)

 

- The "Check" variable is a flag to say "run this check once and only once" while the actual "ViconiaMatch" variable is the one they intend to use later on. There are lots of those one-shot flags scattered throughout the game.

Link to comment

Archived

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

×
×
  • Create New...