Author Topic: 1.047 issue with item requirements (possibly only for legacy saves)  (Read 3308 times)

Offline Zetor

  • Stone Golem
  • *
  • Posts: 29
    • View Profile
Heya,

I ran into a weird issue with the changes to the handling of item requirements introduced in 1.047. Basically, nobody can equip anything except for items with zero restrictions (like the chopper or torches)! Items that are already equipped work fine, but after Emma's sword broke, I found I could not equip anything. I'm not sure if completely new items work OK, I suspect they do.

The core of the problem seems to be confusing class requirements for race requirements:
Code: [Select]
887 | running isItemEquipped(); whichItem 1
888 |      allReqs[0] (race) = c:Swordsman:FenceHero:Champion
889 |      allReqs[1] (class) =
890 |      allReqs[2] (level) =
891 | checking against raceRequirements[0], c:Swordsman:FenceHero:Champion
892 | wrong race to use this item!

It *may* be a problem specific to games getting corrupted during the short period between 1.04 and 1.041 (if you remember the discussion on rpgcodex); I had to fix and keep using that save, my LP readers would've eaten me alive if I started anew :p If there's anything I can do to fix things up for this patch, let me know -- thanks!

Offline moskewcz

  • Mechanic
  • *
  • Posts: 17
    • View Profile
Re: 1.047 issue with item requirements (possibly only for legacy saves)
« Reply #1 on: September 20, 2015, 09:31:14 AM »
oops, yep, i can confirm i have the same problem. when i said the item reqs bug seemed fixed in 1.047 for my save (in my 'main' bug thread), that was only based on looking at the requirements of a few items, not trying to equip them. i tried giving an axe to axe-lady, and i couldn't equip it, despite the listed requirements seeming correct.

i started a new game, and at least in the tutorial i could equip-unequip-equip the practice sword. as a bonus, i can verify that the cut-scenes do seem to render properly now. i'll update my most recent reply in my main bug thread.

for now i'll hope that the logs/saves in this thread are sufficient for this bug, but i'll make some of my own if requested and/or if my bug persists after any attempted fix/updates.

mwm

Offline CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Posts: 3818
    • View Profile
    • Sinister Design
Re: 1.047 issue with item requirements (possibly only for legacy saves)
« Reply #2 on: September 21, 2015, 08:30:13 AM »
Yeah--to make old saves work, you'll need to change the single-colon delimiting of individual classes and races to double-colons. So this

Iron Bow,Weapon Hand,c:Bowman:Bowmaster

becomes this:

Iron Bow,Weapon Hand,c:Bowman::Bowmaster

Offline Zetor

  • Stone Golem
  • *
  • Posts: 29
    • View Profile
Re: 1.047 issue with item requirements (possibly only for legacy saves)
« Reply #3 on: September 21, 2015, 10:58:26 AM »
Okay, thanks! Seems to work now...

For reference and/or others who may be interested, I used these (very ugly and/or brittle) regexes:

class reqs
Code: [Select]
match
(c:[^,]+?)([a-zA-Z]+?):([a-zA-Z]+?,)
replace with
$1$2::$3

race reqs
Code: [Select]
match
(,r:[^,/]+?)([a-zA-Z]+?):([a-zA-Z]+?[/,])
replace with
$1$2::$3

I assume stuff in the common inventory is delimited in a different way and should be left as it is.

Offline CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Posts: 3818
    • View Profile
    • Sinister Design
Re: 1.047 issue with item requirements (possibly only for legacy saves)
« Reply #4 on: September 21, 2015, 11:01:19 AM »
Yup! And level requirements should start with l: (note that the only item in the game with a level requirement is Fangiss Ka).

Offline Banjax

  • Bandit
  • *
  • Posts: 5
    • View Profile
Re: 1.047 issue with item requirements (possibly only for legacy saves)
« Reply #5 on: September 22, 2015, 01:44:32 PM »
Hi,

I have this issue as well. Will you be providing a patch to fix old save games? If not, what application can I use to edit and save the save game without screwing it up?

Thanks.

Offline bugfartboy

  • White Cape
  • ***
  • Posts: 1729
    • View Profile
Re: 1.047 issue with item requirements (possibly only for legacy saves)
« Reply #6 on: September 22, 2015, 04:36:46 PM »
I use Notepad++, but I hear Vim comes highly recommended one you get used to it.