Jump to content


Photo

Hellho.itm


  • Please log in to reply
7 replies to this topic

#1 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 26 February 2006 - 01:23 PM

I was trying to fix BP's code for hellho.itm, to patch the file, when I noticed that BGT/Base/ITM is dumping this on the override folder. It does not patch the projectile, so this is at the mercy of any subsequent mods. The value is set at 280, which in my install is a Refinements projectile.

I'll work out the proper hex-patching for this file from the one in BPv173 (before I delete it), and post the code for your convenience. Unless you are doing something entirely different from what was in bp-bgt, you'll also need my hellho.pro file from bp-weidu. I'm currently fixing this .pro file, so I'll have to post it for you as well.

Or, remove the hellho.itm from bgt/base/itm if you're not really using it.

#2 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 26 February 2006 - 04:19 PM

Well, here is the code I worked out for hellho:

ACTION_IF NOT FILE_EXISTS_IN_GAME ~HELLHO.PRO~ THEN BEGIN
  ADD_PROJECTILE ~BPv173/SFX/HELLHO.PRO~
END
ELSE BEGIN
  COPY_EXISTING ~PROJECTL.IDS~ ~override~
	COUNT_2DA_ROWS 2 rows
	FOR (x=2;x<=rows;x=x+1) BEGIN
	  READ_2DA_ENTRY x 1 2 "pro"
	  PATCH_IF (("%pro%" STRING_COMPARE_CASE "HELLHO") = 0) BEGIN
		READ_2DA_ENTRY x 0 2 HELLHO
		SET HELLHO = %HELLHO% + 1
	  END
	END
END

COPY_EXISTING  ~hellho.itm~		~override~
  WRITE_SHORT 0x1c ~25~
  WRITE_LONG  0x60 ~5~
  
  READ_LONG 0x64 abil_off
  READ_SHORT 0x68 num_abil
  READ_LONG 0x6a eff_off
  READ_SHORT %abil_off% + 30 num_eff

  PATCH_IF (%num_abil% = 1) BEGIN
	WRITE_BYTE abil_off ~2~
	WRITE_ASCII abil_off+4 ~IFIRSEED~
	WRITE_SHORT abil_off+12 ~45~
	WRITE_SHORT abil_off+18 ~1~
	WRITE_SHORT abil_off+20 ~10~
	WRITE_LONG  abil_off+22 ~2~ 
	WRITE_SHORT abil_off+28 ~4~
	WRITE_SHORT abil_off+34 ~3~ //changed to 3
	WRITE_BYTE  abil_off+36 ~3~ //per day
	WRITE_BYTE  abil_off+38 ~0~
	WRITE_SHORT abil_off+39 ~8~ //recharged on resting
	WRITE_SHORT abil_off+42 HELLHO
  END
  ELSE BEGIN
	INSERT_BYTES %abil_off% + (0x30*%num_abil%) 0x30
	WRITE_BYTE abil_off ~2~
	WRITE_ASCII abil_off+4 ~IFIRSEED~
	WRITE_SHORT abil_off+8 ~45~
	WRITE_SHORT abil_off+18 ~1~
	WRITE_SHORT abil_off+20 ~10~
	WRITE_LONG  abil_off+22 ~2~ 
	WRITE_SHORT abil_off+28 ~4~
	READ_SHORT  abil_off+32 index
	WRITE_SHORT abil_off+32 (%index%+%num_eff%)
	WRITE_SHORT abil_off+34 ~3~
	WRITE_BYTE  abil_off+36 ~3~
	WRITE_BYTE  abil_off+38 ~0~
	WRITE_SHORT abil_off+39 ~8~
	WRITE_SHORT abil_off+42 HELLHO
	SET eff_off = %eff_off%+0x30
	WRITE_LONG 0x6a %eff_off%
  END
  
  SET 3D_eff = 0
  FOR (x=0;x<%num_eff%;x=x+1) BEGIN
	READ_SHORT %eff_off%+(0x30*x) eff_type
	PATCH_IF (%eff_type% = 215) BEGIN
	  READ_ASCII %eff_off%+(0x30*x)+20 "vvc"
	  PATCH_IF (("%vvc%" STRING_COMPARE_CASE "ICFIRSDI") = 0) BEGIN
		SET 3D_eff = 1
	  END
	END
  END
  
  PATCH_IF (%3D_eff% = 0) BEGIN
	SET new_off = %eff_off%+(%num_eff%*0x30)
	INSERT_BYTES %new_off% 0x30
	WRITE_SHORT  %new_off% ~215~
	WRITE_BYTE   %new_off%+2 ~2~
	WRITE_LONG   %new_off%+8 ~0~
	WRITE_BYTE   %new_off%+12 ~1~
	WRITE_BYTE   %new_off%+13 ~1~
	WRITE_BYTE   %new_off%+18 ~100~
	WRITE_ASCII  %new_off%+20 ~ICFIRSDI~
	SET num_eff = %num_eff%+1
  END

  SET dam1 = 0
  FOR (x=0;x<%num_eff%;x=x+1) BEGIN
	SET set_off = %eff_off%+(x*0x30)
	READ_SHORT %set_off% eff_type
	PATCH_IF (%eff_type% = 12) BEGIN
	  READ_LONG %set_off%+36 dam_save
	  PATCH_IF (%dam_save% = 0) BEGIN
		SET dam1 = 1
	  END
	END
  END

  PATCH_IF (%dam1% = 0) BEGIN 
	SET new_off = %eff_off%+(%num_eff%*0x30)
	INSERT_BYTES  %new_off% 0x30
	WRITE_SHORT   %new_off%	~12~
	WRITE_BYTE	%new_off%+2  ~2~
	WRITE_BYTE	%new_off%+3  ~6~
	WRITE_LONG	%new_off%+4  ~2~
	WRITE_SHORT   %new_off%+10  ~8~
	WRITE_BYTE	%new_off%+12 ~1~
	WRITE_BYTE	%new_off%+13 ~1~
	WRITE_BYTE	%new_off%+18 ~100~
	WRITE_LONG	%new_off%+28 ~1~
	WRITE_LONG	%new_off%+32 ~6~
	SET num_eff = %num_eff%+1
  END

  SET dam2 = 0
  FOR (x=0;x<%num_eff%;x=x+1) BEGIN
	SET set_off = %eff_off%+(x*0x30)
	READ_SHORT %set_off% eff_type
	PATCH_IF (%eff_type% = 12) BEGIN
	  READ_LONG %set_off%+36 dam_save
	  PATCH_IF (%dam_save% = 2) BEGIN
		READ_LONG %set_off%+40 "die_mod"
		PATCH_IF (("%die_mod%" STRING_COMPARE_CASE "-2")=0) OR (("%die_mod%" STRING_COMPARE_CASE "0")=0) BEGIN
		  SET dam2 = 1
		END
	  END
	  PATCH_IF (%dam_save% = 1) BEGIN
		WRITE_LONG %set_off%+36 ~2~
		READ_LONG %set_off%+40 "die_mod"
		PATCH_IF (("%die_mod%" STRING_COMPARE_CASE "-2")=0) OR (("%die_mod%" STRING_COMPARE_CASE "0")=0) BEGIN
		  SET dam2 = 1
		END
	  END
	END
  END

  PATCH_IF (%dam2%=0) BEGIN  
	SET new_off = %eff_off%+(%num_eff%*0x30)
	INSERT_BYTES %new_off% 0x30
	WRITE_SHORT  %new_off%	~12~
	WRITE_BYTE   %new_off%+2  ~2~
	WRITE_BYTE   %new_off%+3  ~6~
	WRITE_LONG   %new_off%+4  ~2~
	WRITE_SHORT  %new_off%+10  ~8~
	WRITE_BYTE   %new_off%+12 ~1~
	WRITE_BYTE   %new_off%+13 ~1~
	WRITE_BYTE   %new_off%+18 ~100~
	WRITE_LONG   %new_off%+28 ~1~
	WRITE_LONG   %new_off%+32 ~6~
	WRITE_LONG   %new_off%+36 ~2~
	WRITE_LONG   %new_off%+40 ~-2~
	SET num_eff = %num_eff%+1
  END
WRITE_SHORT %abil_off%+30 num_eff


There is likely a more efficient way to do this--but this way does work, and accounts for just about anything that anybody could have done to the file beforehand. I tested both on ToB-patched, and on top of both BP-weidu and BGT-weidu.

LATE EDIT: I see now that BGT uses FIRESEED.pro. You are welcome to use the BP HELLHO.pro (it's a custom cone of fire, like the pnp definition) if you like. If not, I guess that will be another of the special treats of BP-weidu. I at least have worked out the code so that it installs properly with or without BGT-weidu installed. That also means it would work equally as well for BGT-weidu as it does for BP-weidu. ;)

Edited by horred the plague, 26 February 2006 - 07:54 PM.


#3 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 26 February 2006 - 05:00 PM

@Anybody with 2E monster compendium: What does the book say for hellhound breath-- damage dice? times/day? save type? save bonus/penalty? any other pertinent info?

If we're going to standardize the hell hound breath, for at least 2 (if not more) mods that use it--we may as well set it "by the book"

#4 EithelRuin

EithelRuin
  • Member
  • 15 posts

Posted 26 February 2006 - 07:39 PM

From the AD&D 2E Monstrous Manual (hope that helps):

Hell Hound

Intelligence: Low (5-7)
Treasure: C
Alignment: Lawful evil
No. Appearing: 2-8
Armor Class: 4
Movement: 12
Hit Dice: 4-7
THAC0: 4 HD: 17
5-6 HD: 15
7 HD: 13
No. of Attacks: 1
Damage/Attack: 1-10
Special Attacks: Breathe fire
Special Defenses: See below
Magic Resistance: Standard
Size: M

Combat: Hell hounds are clever hunters that operate in packs. They do not bay like normal dogs while
hunting. They move with great stealth, imposing a -5 penalty to opponents' surprise rolls. One or two of
the pack sneak up on a quarry while the others form a ring around it. The first hell hound then springs
from ambush, attacks the nearest victim, and attempts to drive the others toward the rest of the pack. If
the prey does not run away, the rest of the pack closes in within 1d4+2 rounds. If hell hounds are
pursuing fleeing prey, they might bay.
Hell hounds attack first by breathing fire at an opponent up to 10 yards away. The fire causes 1 point of
damage for each of the hell hound's Hit Dice. A successful saving throw vs. breath weapon cuts the
damage in half. The hell hound then attacks with its teeth. The hell hound can continue to exhale flame
while biting. If the hell hound rolls a natural 20 on its attack roll, it grabs a victim in its jaws and breathes
fire on the victim.
Hell hounds have a variety of defenses. They are immune to fire. Their keen hearing means they are
surprised only on a 1 or 2 on 1d10. They can also see hidden or invisible creatures 50% of the tim

#5 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 26 February 2006 - 08:25 PM

Thanks for the stats, EithelRuin. Some of this can be coded easily; other details they left sketchy. Breathe fire at an opponent up to 10 yards away--is it a cone, a jet stream (like aganazzar's scorcher), or a fireseed-type ball? I'm picturing a cone, but narrower than what I have in BP right now (32' I believe--maybe half of that would work.)

Coding it to breathe fire in the bite only on a natural 20 will be difficult. Maybe we change this to a percentage instead? Currently I had 1-8 piercing damage, plus 2-6 fire (1-3 if a save vs breath at -2 is made).

So will coding it to vary in damage according to hit dice, unless it is put into spell form. Spell form negates any sort of "to-hit" roll. Perhaps this is better?

A cone of fire rarely misses.

I currently have the attack set at +4 to hit--maybe something more like +10 to hit, like I did for the winter wolf. (Unless we decide to make this a spell format.)

Whatever changes are decided on, we should make this more universal, with whatever mods we plan to interact with. Bp and bgt have been a working set since the very early days. Anybody else messing with hell hounds?

#6 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 27 February 2006 - 02:38 AM

Well, here's what I came up with:

I adjusted the damages so that it causes 6 pts (3 if save vs breath). A happy medium number, that divides well by 2. The HELLHO.pro file has been entirely reworked. I made a HELLHO.vvc and a HELLHO.bam (a resizing of sprdrabu.bam). It comes out like a jet of fire, slightly wider than ag's scorch but much thinner than a cold cone. He can squeeze off one of these jets every 4 seconds or so. These are subject to a To-hit roll, at +10 to hit--but fire jets that miss still hit something. The speed is set to 50--maybe a hasted monk (if you can swing that) could outrun the flames?

He also can have 2 or 3 "can't miss" spell versions of the flame jet--depending on difficulty slider, level, and size of party.

The bite does 1-10 damage, and has a 20% chance of causing 6/3 fire damage. Though this is more than a 'natural 20', the description also says he can continue to breathe fire while biting. Besides, 20% is much more interesting than 5%--especially when we're talking about 6/3 pts of damage.

I also gave them "invisible detection by script" constant effect. I cannot set it to 50%, because it doesn't work that way.

All in all, this looks much better than the old "cone of fire" I used to sling. NTM--the cone of fire projectile is buggy--it parses damage twice, for starters.

#7 Ascension64

Ascension64
  • Modder
  • 5983 posts

Posted 28 February 2006 - 05:00 AM

I was trying to fix BP's code for hellho.itm, to patch the file, when I noticed that BGT/Base/ITM is dumping this on the override folder. It does not patch the projectile, so this is at the mercy of any subsequent mods. The value is set at 280, which in my install is a Refinements projectile.

I'll work out the proper hex-patching for this file from the one in BPv173 (before I delete it), and post the code for your convenience. Unless you are doing something entirely different from what was in bp-bgt, you'll also need my hellho.pro file from bp-weidu. I'm currently fixing this .pro file, so I'll have to post it for you as well.

Or, remove the hellho.itm from bgt/base/itm if you're not really using it.

I have recorded "Corrected BG1 resource (ranged attack; fire damage)". Is this correct?

--------------
Retired Modder
Note: I do not respond to profile comments/personal messages in regards to troubleshooting my modifications. Please post on the public forums instead.

Baldur's Gate Trilogy-WeiDU and Mods
Throne of Bhaal Extender (TobEx)

Contributions: (NWN2) A Deathstalker (voice acting) - (IWD2) IWD2 NPC Project (soundset editing) - (Misc) SHS PC Soundsets (voice acting)
Legacy: (BG/Tutu/BGT) Beregost Crash Fixer 1.9 (18 Jul 10) - (BG2) Enable conversations with charmed/dominated creatures (18 Jul 10) - (BG2) Experience Corrections (18 Jul 10) - (Misc) Platform Conversion Utility RC2 (13 Feb 10)


#8 horred the plague

horred the plague

    Scourge of the Seven Seas

  • Modder
  • 1899 posts

Posted 28 February 2006 - 06:50 AM

I have recorded "Corrected BG1 resource (ranged attack; fire damage)". Is this correct?


Well, yes--the real issue was the overwriting of the in-game resource, and the fact that we both alter it in different ways. I was attempting to bring us to a unity, with a superior package than we both have right now--and have succsessfully made it. Not just the code, but a new PRO with a custom animation. Fixed bite attack as well--it uses fireseed animation (and 6 fire damage, 3 if save vs breath) on 20% of bite attacks. Damage adjusted for closer adherence to the PnP description--same with the breath weapon. A slightly revised version of HELHOU01.bcs as well. Not sure if you ever grabbed this script from BP/BP-BGT--or if you just used my files as a referrence point. It defintely is more functional than this one:

IF
  See(NearestEnemyOf(Myself))
  Delay(10)
THEN
  RESPONSE #100
	ReallyForceSpell(NearestEnemyOf(Myself),HELL_HOUND_FLAME)
END

IF
  See(NearestEnemyOf(Myself))
THEN
  RESPONSE #100
	AttackReevaluate(NearestEnemyOf(Myself),5)
END

From vanilla game. You must use something different already, because this wouldn't work with the altered CRE items HELLHO (and HELLHOUN? Did you change this one too?)

I'm offering you my hellhound code & files for the v100 release, if you wish to use them as well. If not, yours will be overwritten if the user has BP-weidu installed. Not that big of a deal, since I only remember seeing one group of hell hounds in BG1.

P.S: BP-weidu is going to be installed long after BGT-weidu, so you can remove the BP-RULE.bif support. I'm not even sure I'm going to biff BP--likely not. I have included support in BP-weidu for your startscreen message ('with the additional mods...xxx, etc')--as well as the most-recent-posted GUI switcher code. I'll address any other found issues as well, from my end. ;)

Edited by horred the plague, 28 February 2006 - 08:05 AM.