Author Topic: Reinforcements for the Flaming Fist mercernary on the road  (Read 7631 times)

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Reinforcements for the Flaming Fist mercernary on the road
« on: January 29, 2006, 03:06:24 PM »
This will take all of 5 seconds to do. Initially, I plan to just update the dialogue, clone the existing mercenary (unless you think the reinforcements should give exp penalty?) and remove the dialogue and initdlg script, and CreateCreature at 0.0 (maybe three or four; can be tweaked for balance later). This will create the backup around the merc (again, absolute positions can be tweaked later).

Does that sound more or less on track? I haven't yet read through the dialogue, so the situation may change if there seems to be something else going on, but I wasn't thinking of going all out for this one.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #1 on: January 29, 2006, 03:26:35 PM »
I haven't read the dialogue yet, either, but it sounds good enough to me. 
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #2 on: January 29, 2006, 03:50:32 PM »
Actually, the dialogue doesn't mention reinforcements. It's *always* plural. Meaning that there's going to have to be additional creatures spawned at the beginning (probably 2 other guards), and then the dialogue is going to have to Shout() for the others to Enemy() or EscapeArea()).

Punted to the back shelf for now.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #3 on: January 29, 2006, 05:05:41 PM »
A very preliminary idea of how I imagine this should be restored. The tough thing here is that the original FLAM5 runs RandomWalk(), but hopefully he wouldn't wander too far away from his men.
Code: [Select]
<<<<<<<< .../bg1ub/eb_ar1234.baf
IF
Global("UB_FLAM5_REINFORCE","GLOBAL",0)
Exists("FLAM5")
!Dead("FLAM5")
THEN
RESPONSE #100
CreateCreature("UB!FLAM5",[0.0],0)
CreateCreature("UB!FLAM5",[0.0],0)
SetGlobal("UB_FLAM5_REINFORCE","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR1234.BCS ~.../bg1ub/eb_ar1234.baf~

<<<<<<<< .../bg1ub/U!flam5.baf
IF
Heard("FLAM5",1) // Could use GLOBALs instead
Allegiance(Myself,128)
THEN
RESPONSE #100
Shout(1) // Could use GLOBALs instead
Enemy()
END

IF
Allegiance("FLAM5",255)
Allegiance(Myself,128)
THEN
RESPONSE #100
Shout(1) // Could use GLOBALs instead
Enemy()
END

IF
Heard("FLAM5",2) // Could use GLOBALs instead
Allegiance(Myself,128)
THEN
RESPONSE #100
Shout(2) // Could use GLOBALs instead
EscapeArea()
END

IF
AttackedBy([30],0)
Allegiance(Myself,128)
THEN
RESPONSE #100
Shout(1) // Could use GLOBALs instead
Enemy()
END
>>>>>>>>

// *Very* low-level guard (needs to be possible for weak party)
COPY_EXISTING ~~ ~OVERRIDE/UB!FLAM5.CRE~
  SAY 0x8 ~Flaming Fist Mercenary~
  SAY 0xc ~Flaming Fist Mercenary~
  // Low stats
  // SHOUT, UB!FLAM5, WTASIGHT (tough, since FLAM5 wanders)
  // DLG: None?

REPLACE FLAM5 // Could use GLOBALs instead of Shout()
IF ~NumTimesTalkedTo(0)~ 0
SAY #5032 /* ~You there!  You're under arrest for banditry, and highway robbery!  We know you're part of that bandit group who's been terrorizing the Coast Way.  Give yourselves up or there will be.......trouble.~ */
++ #5033 /* ~You've got the wrong guys, we're not part of any bandit gang.~ */ + 2
++ #5034 /* ~If you want a fight, we'll give you a fight.~ */ DO ~Shout(1)
Enemy()~ EXIT
++ #5035 + 1
END

IF ~~ 1
SAY #5042 /* ~Good!  Actually boys, I don't think we should take these bandits in.  They don't deserve the comforts of a cell, all they deserve is a quick execution.~ */
IF ~~ DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 3
SAY #5067 /* ~Sweet talking won't help you at all.~ */
++ #5068 /* ~Arrest us then.~ */ + 17
++ #5069 /* ~We're not going without a fight.~ */ DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 4
SAY #5065 /* ~Trying to bribe me huh?  Slime like you don't deserve the comforts of a jail cell.~ */
IF ~~ DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 5
SAY #5072 /* ~All right, maybe I was wrong about the bunch of you.  You're free to go.~ */
IF ~~ DO ~Shout(2)
EscapeArea()~ EXIT
END

IF ~~ 6
SAY #5073 /* ~So you're hunting the bandits.  Well, who hired you to take on the bandits, or are you doing it out of the goodness of your heart.~ */
++ #5075 /* ~No one hired us.  We're adventurers who are just trying to help out the people of the Sword Coast.~ */ + 5
++ #5077 /* ~We're working for Amn.~ */ + 8
++ #5081 /* ~A noble hired us to avenge the death of his brother.~ */ + 10
++ #5082 /* ~We work for the Black Talon mercenaries.~ */ + 9
END

IF ~~ 7
SAY #5084 /* ~Shut up!  Your smart remarks just got you in a heap of trouble~ */
IF ~~ DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 8
SAY #5085 /* ~You're rather far from home, aren't you?  Well why don't you turn 'round and head back home.~ */
IF ~~ DO ~Shout(2)
EscapeArea()~ EXIT
END

IF ~~ 9
SAY #5086 /* ~Black Talons, eh?  Well that's too bad.~ */
IF ~~ DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 11
SAY #5092 /* ~Liia Jannath doesn't have a brother, you moron!~ */
IF ~~ DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 12
SAY #5093 /* ~Tobyn isn't a very Amnish sounding name, but I'll let you go nonetheless.~ */
IF ~~ DO ~Shout(2)
EscapeArea()~ EXIT
END

IF ~~ 13
SAY #5094 /* ~Aldeth Sashenstar is from Baldur's Gate, you lying weasel!~ */
IF ~~ THEN DO ~Shout(1)
Enemy()~ EXIT
END

IF ~~ 14
SAY #5095 /* ~I don't know any of the lords in Nashkel, so I'll have to take your word for it.  You're free to go.~ */
IF ~~ DO ~Shout(2)
EscapeArea()~ EXIT
END

IF ~~ 17
SAY #14385 /* ~We're not taking you in alive, murdering swine!!~ */
IF ~~ DO ~Shout(1)
Enemy()~ EXIT
END

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #4 on: January 29, 2006, 07:28:50 PM »
Looks OK.  I agree that the encounter shouldn't be made too difficult, as most players by this point don't have much XP. 

Oh, and it takes place in AR3800.  I wasn't sure if the AR1234 reference was just a placeholder or not.  :)
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #5 on: January 29, 2006, 07:51:02 PM »
Everything is just a placeholder. I just wanted to get some actual code up to better outline what I envision the restoration would be like. This one is fairly low priority since it will take some minutes to code up, and then this one needs to be tested a bit to find out if the RandomWalk() screws anything up.

Unfortunately, BG doesn't run in Mac OS X, so I have to reboot into Mac OS 9 to find character positions and test anything.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #6 on: January 29, 2006, 07:53:43 PM »
Do you have Tutu installed?  It might be easier to get positions that way.
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #7 on: January 29, 2006, 08:09:23 PM »
I somehow became anti-Tutu before I ever even got a chance to look at it. Luckily, I don't have enough free HD space these days to install it. (It's easy enough to get actual positions by creating a 1:1 image of the area, but that takes a couple minutes for large areas.)

It won't be difficult, but I tend to queue up these things so I only have to boot into Mac OS 9 once a decade.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #8 on: January 29, 2006, 10:13:41 PM »
OK, I've got the majority of this coded up. I'm thinking this for the CRE
Code: [Select]
// *Very* low-level guard (needs to be possible for weak party)
COPY_EXISTING ~FLAM5.CRE~ ~OVERRIDE/UBFLAM5.CRE~
  SAY 0x8 ~Flaming Fist Mercenary~
  SAY 0xc ~Flaming Fist Mercenary~
  WRITE_ASCII 0x248 UBFLAM5 #8
  WRITE_ASCII 0x250 "" #8
  //WRITE_ASCII 0x268 WTASIGHT
  WRITE_ASCII 0x280 UBFLAM5 #18
  WRITE_ASCII 0x2cc UBFLAM5 #8
  WRITE_BYTE 0x2d 47 // slightly darker shade of red
  WRITE_BYTE 0x52 16 // -1 THAC0
  WRITE_SHORT 0x24 26 // current HP
  WRITE_SHORT 0x26 26 // current HP
This is basically a clone of FLAM5, with -7 HP and -1 THAC0, and a darker red. Instead of SHOUT, I'd just use a custom script
Code: [Select]
<<<<<<<< .../bg1ub/ubflam5.baf
IF
Global("UB_FLAM5_SHOUT","GLOBAL",1)
Allegiance(Myself,128)
THEN
RESPONSE #100
Enemy()
END

IF
Global("UB_FLAM5_SHOUT","GLOBAL",2)
Allegiance(Myself,128)
THEN
RESPONSE #100
EscapeArea()
END

IF
AttackedBy([30],0)
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1)
Enemy()
END
>>>>>>>>
COMPILE ~.../bg1ub/ubflam5.baf~
This makes sure they all turn hostile if you attack one, and has the two support guys turn hostile if the real FLAM5 does Enemy(). I think (I hope) the dialogue update will be as simple as
Code: [Select]
COPY_EXISTING FLAM5.DLG OVERRIDE
  DECOMPILE_DLG_TO_D
  REPLACE_TEXTUALLY ~Enemy()~ ~SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1) Enemy()~
  REPLACE_TEXTUALLY ~EscapeArea()~ ~SetGlobal("UB_FLAM5_SHOUT","GLOBAL",2) EscapeArea()~
  COMPILE_D_TO_DLG
BUT_ONLY_IF_IT_CHANGES

The only update I'm not 100% certain about is that I'd want to update FLAM5 with a new script name (it currently has none), and replace SHOUT.BCS with the new UBFLAM5. This doesn't worry me, since UBFLAM5 will make sure they turn hostile if attacked (and they'll all turn hostile), and there aren't any other neutral NPCs nearby for the SHOUT script to make any difference.
Code: [Select]
COPY_EXISTING FLAM5.CRE OVERRIDE
  WRITE_ASCII 0x248 UBFLAM5 #8 // I want them all to turn hostile if you attack one
  WRITE_ASCII 0x280 FLAM5 #18 // needed for Exists() check
BUT_ONLY_IF_IT_CHANGES
I'm going to go ahead and test this, find the correct coordinates for the two support cres, and see if it works OK having them all RandomWalk() (I hope so). Let me know what you think of the code so far.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #9 on: January 29, 2006, 11:41:00 PM »
Restored.

FLAM5.CRE needs to be updated to add the script name, and to remove the SEEENEMY script (to prevent them attacking each other).
Code: [Select]
COPY_EXISTING FLAM5.CRE OVERRIDE // Flaming Fist Mercenary
  PATCH_IF (SOURCE_SIZE > 0x2d4) BEGIN
    WRITE_ASCII 0x280 FLAM5 #18
    FOR (loc = 0x248; loc < 0x270; loc += 0x8) BEGIN
      READ_ASCII loc script
      PATCH_IF !("%script%" STRING_COMPARE_CASE "SEEENEMY") BEGIN
        // Remove SeeEnemy script, otherwise they just attack each other :D
        WRITE_ASCII loc "" #8
      END
    END
  END
BUT_ONLY_IF_IT_CHANGES

AR3800 needs to be extended with the spawn block.
Code: [Select]
<<<<<<<< .../bg1ub/eb_ar3800.baf
IF
Global("UB_FLAM5_REINFORCE","GLOBAL",0)
Exists("FLAM5")
!Dead("FLAM5")
THEN
RESPONSE #100
CreateCreature("UBFLAM5",[3753.2954],9) // Flaming Fist Mercenary
CreateCreature("UBFLAM5",[3869.2962],7) // Flaming Fist Mercenary
SetGlobal("UB_FLAM5_REINFORCE","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR3800.BCS ~.../bg1ub/eb_ar3800.baf~

A custom script for the reinforcement mercenaries. Since FLAM5 wanders, I had to use a Range() check and have them MoveToObject() (they simply spread too far apart from each other if any of them RandomWalk()). It isn't the best behavior I'd hoped for, but it's the only thing I can think of that would work (and it does work).
Code: [Select]
<<<<<<<< .../bg1ub/ubflam5.baf
IF
Global("UB_FLAM5_SHOUT","GLOBAL",1)
Allegiance(Myself,128)
THEN
RESPONSE #100
Enemy()
END

IF
Global("UB_FLAM5_SHOUT","GLOBAL",2)
Allegiance(Myself,128)
THEN
RESPONSE #100
EscapeArea()
END

IF
Allegiance("FLAM5",255)
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1)
Enemy()
END

IF
AttackedBy([30],0)
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1)
Enemy()
END

IF
!Exists("FLAM5")
!Dead("FLAM5")
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",2)
EscapeArea()
END

IF
!Range("FLAM5",12)
!Dead("FLAM5")
Global("UB_FLAM5_SHOUT","GLOBAL",0)
Allegiance(Myself,128)
THEN
RESPONSE #100
MoveToObject("FLAM5")
END
>>>>>>>>
COMPILE ~.../bg1ub/ubflam5.baf~

FLAM5.DLG simply does a search/replace for Enemy() and EscapeArea(). This should work even if the dialogue has been modified, and shouldn't break any changes (there's a possibility that the dialogue may have been rewritten by somebody else -- because I've left the SHOUT scripts intact, the characters should still act appropriately if any are attacked).
Code: [Select]
COPY_EXISTING FLAM5.DLG OVERRIDE
  DECOMPILE_DLG_TO_D
  REPLACE_TEXTUALLY ~Enemy()~ ~SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1) Enemy()~
  REPLACE_TEXTUALLY ~EscapeArea()~ ~SetGlobal("UB_FLAM5_SHOUT","GLOBAL",2) EscapeArea()~
  COMPILE_D_TO_DLG
BUT_ONLY_IF_IT_CHANGES

The new creature is pretty weak, but it still may be a little tough. Without more playtesting, however, I'm not sure how much weaker to make it. It can be easily tweaked, however, so it doesn't really bother me. You can download the finished CRE.

Let me know if the download works, and if there are any concerns about the patches. I'll let you add this to the wiki when you're satisfied.

Offline Andyr

  • Dance Commander
  • PPG
  • Planewalker
  • *****
  • Posts: 3178
  • Gender: Male
    • The Gibberlings Three IE mod community
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #10 on: January 30, 2006, 11:47:28 AM »
... just thought I'd jump in and say Icelus/devSin for teh win! :)
"We are the Gibberlings Three, as merry a band as you ever did see..." - Home of IE mods

<jcompton> Suggested plugs include "Click here so Compton doesn't ban me. http://www.pocketplane.net/ub"

I am unfortunately not often about these days so the best way to get hold of me is via email.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #11 on: January 30, 2006, 01:27:34 PM »
Heh, well, devSin deserves most of the credit.  He's been tackling the bigger restorations.  I've just been knocking out the (probably insubstantial) smaller bugs. 

Hooray for progress, though!
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #12 on: February 04, 2006, 03:00:22 PM »
This component also seems to work OK.  Two FFs spawned upon clearing the fog of war, and taunting MainFF enemified everyone.  I didn't get a rep hit, though.  When you get into a fight with the FF in other areas, don't you get a rep hit?

Here's the code, will wiki:
Code: [Select]
BEGIN ~Flaming Fist Mercenary Reinforcements~

COPY ~bg1ub/ff/UBFLAM5.CRE~ ~override~

COPY_EXISTING FLAM5.CRE OVERRIDE // Flaming Fist Mercenary
  PATCH_IF (SOURCE_SIZE > 0x2d4) BEGIN
    WRITE_ASCII 0x280 FLAM5 #18
    FOR (loc = 0x248; loc < 0x270; loc += 0x8) BEGIN
      READ_ASCII loc script
      PATCH_IF !("%script%" STRING_COMPARE_CASE "SEEENEMY") BEGIN
        // Remove SeeEnemy script, otherwise they just attack each other :D
        WRITE_ASCII loc "" #8
      END
    END
  END
BUT_ONLY_IF_IT_CHANGES

<<<<<<<< .../bg1ub/eb_ar3800.baf
IF
Global("UB_FLAM5_REINFORCE","GLOBAL",0)
Exists("FLAM5")
!Dead("FLAM5")
THEN
RESPONSE #100
CreateCreature("UBFLAM5",[3753.2954],9) // Flaming Fist Mercenary
CreateCreature("UBFLAM5",[3869.2962],7) // Flaming Fist Mercenary
SetGlobal("UB_FLAM5_REINFORCE","GLOBAL",1)
END
>>>>>>>>
EXTEND_BOTTOM AR3800.BCS ~.../bg1ub/eb_ar3800.baf~

<<<<<<<< .../bg1ub/ubflam5.baf
IF
Global("UB_FLAM5_SHOUT","GLOBAL",1)
Allegiance(Myself,128)
THEN
RESPONSE #100
Enemy()
END

IF
Global("UB_FLAM5_SHOUT","GLOBAL",2)
Allegiance(Myself,128)
THEN
RESPONSE #100
EscapeArea()
END

IF
Allegiance("FLAM5",255)
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1)
Enemy()
END

IF
AttackedBy([30],0)
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1)
Enemy()
END

IF
!Exists("FLAM5")
!Dead("FLAM5")
Allegiance(Myself,128)
THEN
RESPONSE #100
SetGlobal("UB_FLAM5_SHOUT","GLOBAL",2)
EscapeArea()
END

IF
!Range("FLAM5",12)
!Dead("FLAM5")
Global("UB_FLAM5_SHOUT","GLOBAL",0)
Allegiance(Myself,128)
THEN
RESPONSE #100
MoveToObject("FLAM5")
END
>>>>>>>>
COMPILE ~.../bg1ub/ubflam5.baf~

COPY_EXISTING FLAM5.DLG OVERRIDE
  DECOMPILE_DLG_TO_D
  REPLACE_TEXTUALLY ~Enemy()~ ~SetGlobal("UB_FLAM5_SHOUT","GLOBAL",1) Enemy()~
  REPLACE_TEXTUALLY ~EscapeArea()~ ~SetGlobal("UB_FLAM5_SHOUT","GLOBAL",2) EscapeArea()~
  COMPILE_D_TO_DLG
BUT_ONLY_IF_IT_CHANGES
<Moongaze> Luckily BWL has a very understanding and friendly admin.

Offline devSin

  • Moderator
  • Planewalker
  • *****
  • Posts: 1632
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #13 on: February 04, 2006, 03:32:41 PM »
It was a tough call to make. The original guy doesn't give you a hit (likely because he's a complete ass), so I didn't want to dump in some other thugs that you can't kill without becoming despised by the time you reach Nashkel. In the dialogue, there are a lot of responses that will get them to Enemy(), but most of them aren't inherently evil (you may lie or shrug the fool off, but there aren't any I'm going to make you eat your children replies or anything). I'm not opposed to making them INNOCENT or FLAMING_FIST, but I don't think the original intent was to have these fools Enemy() so easily and still give a reputation penalty.

Offline icelus

  • Global Moderator
  • Planewalker
  • *****
  • Posts: 3173
  • Gender: Male
Re: Reinforcements for the Flaming Fist mercernary on the road
« Reply #14 on: February 04, 2006, 03:59:32 PM »
Fair enough.  One could make the case that they're far enough out from a garrison that they've become a bit maverick.
<Moongaze> Luckily BWL has a very understanding and friendly admin.

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: