Wrong Regex Value - Bobstah's Equipment Socketing

● ARCHIVED · READ-ONLY
Started by Biestmann 6 posts View original ↗
  1. Hey, everyone!


    I've recently started using Bobstah's Equipment Socketing & Upgrade System. The plugin allows for the creation of sockets for both weapons and armor. You can assign unique socket properties to each weapon and armor type via the <SocketInfo OType: X> notetag. However, I realized that any weapon or armor ID past 9 are not being accepted by the plugin, meaning I cannot assign those unique properties. Effectively, that means the plugin only works for weapon and armor IDs in the range from 1 to 9. I'd love for that to be fixed, allowing for IDs up to 99 or higher.


    I recently posted in the OT for the plugin, only to receive zero feedback. Thus I hope to receive help from this section instead. It'd be immensely appreciated.
  2. i didn't check the code. But if the issue is exactly as you describe. search on the plugin's regex for somewhere with the code \d that is not followed by a + or a * just after it..


    for example /<something: (\d)>/i


    if you find it, try adding a + after the \d, making it \d+


    the \d matches a singe numeric value, the + makes it to continue capturing value while it matches, so \d+ will match a numeric value with any number of digits
  3. I haven't checked the code either, but another possible cause can be if you're using leading zeroes in your notetags - are you writing the IDs as 009 or as 9 ?


    Because in some cases (sorry, don't know if that might be the case here), eval interprets leading zeroes as a command to switch to octal numbers. And in octal, 010 is the same as decimal 8 and the "letters" 8 and 9 does not exist as part of the number sequences. So it would use the IDs up to 7, then skip to 10 but the item used with 10 would have the decimal ID 8.
  4. Andar regex woun't match 009 and not 019, for example, unless the regex itself is set to that, when used to capture aribtrary numbers, it wil match based on the numbers of digits only.


    For example, \d+ wil match any number of digits higher than 0, for example, 9, 99, 99999,  0000009... as long a number is followed by another it will match it.


    The issue seems to be that the regex is set to match a single digit only. so anything beyond that is not a match.
  5. Thank you so much, Victor Sant!


    There was indeed one \d that was lacking a +. After I added that, the plugin started working as intended. Amazing!
  6. I am trying to use this plugin and I really like the concept however this is the first plugin I have used where after reading the help section I am still confused on how things work. I dont know what im supposed to notetag to get this to work its confusing to me.

    I have a character that has a sword and i notetaged it and the 3 slots show but then what? What do I notetag the items in order for them to show as things that can be attatched to the sword.