Jump to content


Photo

What happens if a number in PROJECTL is already taken?


  • Please log in to reply
6 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 07 March 2018 - 09:30 AM

Let's try not to elaborate special compatibility solutions, unless they are necessary... This sort of thing is not a problem with spell states, they just go by number. But projectiles have associated files. So, if I add a line to PRJECTL.IDS under some number, confugure my spells to use that projectile, then someone else installs my mod on a machine with another line and another projectile at that number. Are they both going to work, neither or how?



#2 GeN1e

GeN1e

    A very GAR character

  • Modder
  • 1604 posts

Posted 07 March 2018 - 11:57 AM

The latter value overwrites the former, if both share the index.


Retired from modding.


#3 Creepin

Creepin
  • Administrator
  • 1676 posts

Posted 07 March 2018 - 02:25 PM

So one had to read last value in the projectl.ids and add last+1? Is there a WeiDU macro for that?


The Old Gold - v0.2 WIP (mod for BGT/BWP/BWS)


#4 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Modder
  • 1505 posts

Posted 07 March 2018 - 02:37 PM

So one had to read last value in the projectl.ids and add last+1? Is there a WeiDU macro for that?

ADD_PROJECTILE is a mainline WeiDU command that copies your projectile to the override and returns the new value as a variable.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.
____
The Gibberlings Three - Home of IE Mods

The BG2 Fixpack - All the fixes of Baldurdash, plus a few hundred more. Now available, with more fixes being added in every release.


#5 temnix

temnix
  • Member
  • 983 posts

Posted 07 March 2018 - 02:50 PM

How would that work from a) inside your spells, where you have to pick the projectile, and b) in your Clear Air 2DA files? I suspect b) is no-now.

 

Also about overwriting. I use simple commands like this:

 

APPEND projectl.ids %749 PORTC_#%
UNLESS %749 PORTC_#%
APPEND missile.ids %750 Portcullis_Circle_80_#%
UNLESS %750 Portcullis_Circle_80_#%

 

Now, here it says write a line unless the line is already there. Why would this command overwrite others' lines?



#6 jastey

jastey
  • Administrator
  • 3218 posts

Posted 07 March 2018 - 11:07 PM

Now, here it says write a line unless the line is already there. Why would this command overwrite others' lines?
My assumption: because the UNLESS specification doesn't match another mod's line?

I use ADD_PROJECTILE like this:

ADD_PROJECTILE ~RRS_Grabmal/PRO/RRSTRAP1.PRO~
COPY ~RRS_Grabmal/SPL/RRSTR01.SPL~ ~override/RRSTR01.SPL~
WRITE_SHORT 0x98 ~%RRSTRAP1%~

Thus, for every mod installation, it is assigned accordingly.

#7 temnix

temnix
  • Member
  • 983 posts

Posted 08 March 2018 - 06:53 AM

Yes, but if the line doesn't match, that's why there should be no overwriting. What I should do is put two lines under the same numbers but with different files in my IDS and see how that works.

Edit: okay, I tried it and with duplicates the selection of projectile catches the latest (lowest) addition to PROJECTL.IDS, along with its entry in MISSILE.IDS. With Weidu it would not be overwriting as much as overriding - the engine would just not be able to detect the earlier line, and there is no choosing it by hand in the spell, because the MISSILE entry is the interface.

Edited by temnix, 08 March 2018 - 08:51 AM.