Jump to content

Various ToB hacks


Recommended Posts

Yep, they use the same base class and the same list. (Same holds for Disease, Poison and a couple of other effects.)

 

Since they all share the same list, they also share the problem. So the one with the shortest period will block all other effects with repeating behavior.

 

What happens at a lower level is that the engine recreates the entire stats (called DerivedStats) on some changes to the creature. The application of an effect to the creature is one such change.

Since the repeating effects are stored in a list inside those stats, they are being recreated every ai update, if there has been an effect application.

 

The repeating effect itself internally uses a counter to store how often it has been called. And when this counter equals the period it fires of the effect.

When the list is being recreated all those counters are lost.

 

I'm not saying "can't be fixed", but it will be very difficult, because you have to mess with integral components of the engine. The chance to break other things is very high.

Link to comment
Guest Guest "@vGur"

From @vGur

 

Hello, I have one question -

When item ability use ranged flag, engine looks what animation type should be played on atack (overhead or backslash or piercing), BUT

In BG2 only bg1's animations (Monk, skeleton, any bg1 character animation) has check for animation type, and all bg2 char & weapon animations hasn't. They always use overhead animation when "ranged" set for ability.

 

Many interesting things can be coded, if this can be fixed.

(Example: light weapons - dagger, rapier, short sword or even my custom animation "long spear" with very long reach, can logically use dexterity for thac0, as with 3ed feat)

I can fix this for 2handed weapon with my ugly code, but with 1handed one issue occur, some weapons need overhead, other piercing, and only one can be set for all ???

Thanks for all Your work.

Link to comment

Well, I didn't find the question so this is a patch request, or did I miss something? ???

 

If I understand you correctly, the problem is that most BG2 animations ignore the percentages at item ability+0x2c when using a ranged ability?

However, there are some that do correctly evaluate these and you want me to add the check to the other animations.

By the way, try to give concrete examples of animations, so that I might look them up.

 

I currently have way too much on my list to promise you anything. (If it's feasible at all.)

Animation code is relatively complex (multiple classes, rendering, DirectX stuff, ...) -- I'm not sure I really want to look at this. :p

Link to comment
Yep, they use the same base class and the same list. (Same holds for Disease, Poison and a couple of other effects.)

 

Since they all share the same list, they also share the problem. So the one with the shortest period will block all other effects with repeating behavior.

Indeed, this damn issue is probably the worst I ever encountered while working on IR, and it unfortunately prevents me from doing quite a lot of cool things as discussed here. :blush:
Link to comment

Thanks for reply

"can it be fixed", was My question

All bg2 characters [with prefix C, not NPCs with prefix N] do not check for anim type [npcs has own g24 animation for ranged weapon], maeby other character dedicated animations [shields, helms etc] need patching too, but I think that character animation couse this issue. So, I can leave without this patch, just thanks again.

p.s. I have a try to code my previous request (overweight speed percentage), but failed many times. So if you decide to code it, i'll be VERY thankfull.

 

Thanks again :blush:

Link to comment

Request to tweak 146 (cast spell at creature).

 

Atm param2 can be either 0 (cast normally, at the level specified by param1) or 1 (cast instantly at character's level). What my problem is, I've sorted all instances of 12 into several 'library' spells, so the original source instead 146s the library at the specified level.

 

Here is the problem - if I use param2=0 then items display casting gestures, even if the lib.spl itself has speed set to zero, and it stops te attacking sequence, so the char makes a shot then stands idly. Both problems can be solved by using param2=1, but then I can't store multiple headers in a single file. It's not that vital though, since there're not that many items that need to be tweaked.

 

Still, if it's not too complicated, I want to ask to let 146 recognize param2=2, which would cast instantly and take param1 into account as well.

Link to comment

At this point I'm saying no further requests. It's no use if this makes me not enjoying reversing anymore.

Maybe keep a list somewhere (you know I like lists :blush:) where I can check what needs fixing and work on it when I feel like doing something.

 

And my priority is clearly with fixing bugs.

Link to comment
p.s. I have a try to code my previous request (overweight speed percentage), but failed many times. So if you decide to code it, i'll be VERY thankfull.

What exactly fails?

You only need to change one short at the offset I gave you.

 

Yep, they use the same base class and the same list. (Same holds for Disease, Poison and a couple of other effects.)

 

Since they all share the same list, they also share the problem. So the one with the shortest period will block all other effects with repeating behavior.

Indeed, this damn issue is probably the worst I ever encountered while working on IR

I'm currently trying to (partly) fix this and I think I came up with something -- still need to implement it though. And it's definitely a very ugly hack.

But don't get your hopes up early.

Link to comment

Can you say Taimon, can the crushing damage be separated so the scripting doesn't take every type of damage as crushing:

0x0020 HitBy(O:Object*,I:DameType*Damages)

Returns true only if the active CRE was hit by the specifed object by the specified damage type in the last script round. If the damage type is CRUSHING or 0 then this will return true for ANY damage type.

!HitBy returns true when the script is first activated (e.g. initial area load) and when hit by any damage type.

Link to comment

No.

All triggers without the 0x4000 flag are handled by one generic function.

It basically just compares two triggers and returns true if they match and false otherwise.

The matching routine starts with comparing the trigger id. If those match it compares int1 and if they also match or one is 0 it matches the objects. (Object matching is complicated and implemented in a different function.)

 

Of course it would be possible to do a dirty hack and insert a check for the HitBy trigger somewhere.

But I only do those things if something is really broken.

Link to comment

Um, sorry if this is not the sort of thing that you do, or if it is truly undoable (I have no idea) but is there any way to change the maximum number of party members from 6 to more than that?

 

As i say, I'm clueless about the extent to which you can hack the game so just asking.

 

Thanks.

Link to comment

Archived

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

×
×
  • Create New...