Jump to content

Photo

.spl file name length limitations?


8 replies to this topic

#1 Creepin

Creepin
  • Members
  • 169 posts
  • Gender:Male
  • Location:Moscow

Posted 20 August 2018 - 02:11 PM

I have some vague recollection that there are some specific cases when .spl file name of 8 symbols won't work, only file name of 7 symbols will do. Is it me imagining weird things or there are indeed some cases where 8 symbols long .spl file name will screw something?



#2 ALIENQuake

ALIENQuake
  • Modders
  • 609 posts
  • Gender:Male
  • Location:Poland

Posted 20 August 2018 - 02:14 PM

It's true only for Classic BG2, I don't remember spell name but IESDP contains this info.



#3 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6781 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 20 August 2018 - 02:37 PM

These's a scripting "limitation" with more-than-7 chars files, like shown here. But there's ways to go around that ...


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#4 argent77

argent77
  • Modders
  • 823 posts
  • Gender:Male

Posted 20 August 2018 - 02:41 PM

I think opcode 172 (Remove spell) and possibly opcode 171 (Give ability) are also affected.



#5 Creepin

Creepin
  • Members
  • 169 posts
  • Gender:Male
  • Location:Moscow

Posted 20 August 2018 - 02:51 PM

Thank you folks, I haven't hoped for that much knowledge on that short notice! :beer:

I've also found that opcode 257 (Sequencer Creation) only work with 7 symbols long spells, that's probably what Alien did referred to. So, it's opcode 172 (171 is not confirmed by IESDP actually but they might be wrong?), opcode 257 and scripting actions 160. I wonder if this scope is big enough to keep all my spells named with 7 symbols limiting my options in regard of spell naming or should I generally not care but keep an eye for the spells that might fall to one of these conditions. What would you advise, which is the best practice?


Edited by Creepin, 20 August 2018 - 02:53 PM.


#6 subtledoctor

subtledoctor
  • Modders
  • 2739 posts
  • Gender:Male

Posted 20 August 2018 - 02:52 PM

My rule of thumb, just use 7-letter filenames for spells, full stop. Certain script actions and opcode 172 can fail on 8-letter files. It's easier to use 7 letters everywhere, than to try to remember which circumstances need which length.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#7 K4thos

K4thos
  • Modders
  • 1195 posts
  • Gender:Male

Posted 20 August 2018 - 04:19 PM

My rule of thumb, just use 7-letter filenames for spells, full stop. Certain script actions and opcode 172 can fail on 8-letter files. It's easier to use 7 letters everywhere, than to try to remember which circumstances need which length.

according to Beamdog not needed in EE patch 2.5: http://blog.beamdog....ity-engine.html

 

Removing 8 letter spells should not fail (vanilla bug)

 

this info should be added to IESDP



#8 kjeron

kjeron
  • Members
  • 129 posts

Posted 20 August 2018 - 05:18 PM

It's still best to stick to 7-character filenames for most spells, reserving 8-character names for those generated by hard-coded suffixes, both so they can exist, and so they do not overlap.
Opcode 257 still requires a 7-character filename in order to grant it's activation abilities, suffixed -D and -P.

#9 Avenger

Avenger
  • Modders
  • 3803 posts
  • Gender:Male
  • Location:Hungary

Posted 25 August 2018 - 01:07 AM

Yeah, the limitation is due to a programmer's error in original bg, comparing zero terminated strings vs resref type.  This was in multiple places, but gradually got fixed in EE's.





Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users