Jump to content

adding a projectile... and then *using* it


subtledoctor

Recommended Posts

So I'm trying to use a new projectile for a spell I'm making. The .tp2 looks like this:

ADD_PROJECTILE ~SoB/wizard/D5_MISRED.PRO~
COPY ~SoB/wizard/D5_WIIN.spl~ ~override~
	SAY NAME1 @4019
	SAY UNIDENTIFIED_DESC @4019
	WRITE_SHORT 0x098 ~%d5_misred%~

Weidu throws an error, saying it cannot convert %d5_misred% to an integer.

 

I know the game's projectiles are numbered, and Weidu wants me to find the number of the newly-added projectile, set it in a variable, and then I can use that variable in the WRITE_SHORT command. But I'm not sure how to find that variable. I based my code on another mod which looks almost precisely the same, except with an item instead of a spell (in fact it's the mod that donated this new projectile to me), so I thought this would be sufficient. What am I missing?

Link to comment

There is no projectile.ids in bg2 as it was hardcoded, but you have a list in dltcep and gemrb. Perhaps the other mod overwrote an existing projectile?

Does that mean you can't add projectiles in the pre-EE game? Or, can add them but not use them?

 

The other mod (More Style for Mages, it's very good, I recommend it to all) uses the ADD_PROJECTILE function, it doesn't overwrite an existing one. I just can't figure out how it finds the new projectile number. Maybe just count the existing projectiles (how?) and use x+1?

 

Like I say: what am I missing?

Link to comment

 

There is no projectile.ids in bg2 as it was hardcoded, but you have a list in dltcep and gemrb. Perhaps the other mod overwrote an existing projectile?

Does that mean you can't add projectiles in the pre-EE game? Or, can add them but not use them?

 

The other mod (More Style for Mages, it's very good, I recommend it to all) uses the ADD_PROJECTILE function, it doesn't overwrite an existing one. I just can't figure out how it finds the new projectile number. Maybe just count the existing projectiles (how?) and use x+1?

 

Like I say: what am I missing?

 

You can't add AoE projectiles. There are other limitations but I'm not aware of them. I think BG1 had *all* of it's projectiles hardcoded...
Link to comment

BG1/IWD/PST had all hardcoded projectiles.

You can add AoE projectiles in BG2, but the projectile graphics/behavior are severely limited.

EE on the other hand lets you use almost any kind of projectile without hardcoding. This includes pillar like projectiles, custom AoE graphics, rectangular AoE, scorcher types, etc.

Link to comment

Archived

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

×
×
  • Create New...