Skip to content

[lua] Adjust mobskills/petskills to pass a table/in out of ALL of them#9366

Merged
Xaver-DaRed merged 2 commits into
LandSandBoat:basefrom
WinterSolstice8:mobskill_param_info_unjank
Feb 5, 2026
Merged

[lua] Adjust mobskills/petskills to pass a table/in out of ALL of them#9366
Xaver-DaRed merged 2 commits into
LandSandBoat:basefrom
WinterSolstice8:mobskill_param_info_unjank

Conversation

@WinterSolstice8
Copy link
Copy Markdown
Contributor

@WinterSolstice8 WinterSolstice8 commented Feb 4, 2026

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Basically, brute forces some technical debt to die. IF we need to pass parameters between 2 mobskill function calls we can now.
Run this script in git bash (or normal bash on linux) in scripts/actions

then manually edit the rest that LLS indicates to you that failed. Shockingly, the script catches all but a handful of edgecases.

Manually review changes in mobskills.lua, there aren't many, I added LLS definitions and some other minor changes

#/bin/bash

#execute in scripts/actions/

files=$(find . -name "*.lua")

for file in $files; do
    # mobPhysicalMove conversion:
    sed -i 's/info.damage/info/g' "$file"
    sed -i 's/info.dmg/info/g' "$file"

    # mobMagical/BreathMove conversion
    sed -i '/mobMagicalMove/s/local damage =/local info =/g' "$file"
    sed -i '/\s\s\s\sdamage =.*mobBreath/s/damage =/local info =/g' "$file"
    sed -i '/\s\s\s\sdamage =.*mobMagical/s/damage =/local info =/g' "$file"
    sed -i '/\s\s\s\slocal damage =.*mobMagical/s/local damage =/local info =/g' "$file"
    sed -i '/\s\s\s\slocal damage =.*mobBreath/s/local damage =/local info =/g' "$file"
    sed -i '/\s\s\s\sdmg =.*mobMagical/s/dmg =/local info =/g' "$file"
    sed -i '/\s\s\s\sdmg =.*mobBreath/s/dmg =/local info =/g' "$file"
    sed -i '/\s\s\s\slocal dmg =.*mobMagical/s/local dmg =/local info =/g' "$file"
    sed -i '/\s\s\s\slocal dmg =.*mobBreath/s/local dmg =/local info =/g' "$file"
    sed -i 's/mobFinalAdjustments(damage,/mobFinalAdjustments(info,/g' "$file"
    sed -i 's/avatarFinalAdjustments(damage,/avatarFinalAdjustments(info,/g' "$file"
    sed -i 's/damage = xi.mobskills.mobAddBonuses(pet, target, damage/info.damage = xi.mobskills.mobAddBonuses(pet, target, info.damage/g' $file

done

# final edits for edge cases
for file in $files; do
    if [ -f "$file" ]; then
        # file doesn't contain "local damage =" or "local dmg ="
        if ! grep -iqE "local (damage|dmg) =" "$file" ; then
            if grep -iqE "(mobmagical|mobbreath)" "$file" ; then # file does contain mobmagical or mobbreath
                sed -i "s/damage = xi.mobskills.mobFinalAdjustments/local damage = xi.mobskills.mobFinalAdjustments/g" $file
                sed -i "s/dmg = xi.mobskills.mobFinalAdjustments/local dmg = xi.mobskills.mobFinalAdjustments/g" $file
            fi
        fi
    fi
done

Steps to test these changes

use mobskills and petskills
image
image
image

Etc

Comment thread scripts/actions/mobskills/power_attack_weapon.lua Outdated
@WinterSolstice8 WinterSolstice8 force-pushed the mobskill_param_info_unjank branch 4 times, most recently from 4a7a263 to 784f7b6 Compare February 5, 2026 00:13
@WinterSolstice8 WinterSolstice8 marked this pull request as draft February 5, 2026 00:19
@WinterSolstice8 WinterSolstice8 force-pushed the mobskill_param_info_unjank branch 9 times, most recently from bf8c8fa to e50374b Compare February 5, 2026 00:56
@WinterSolstice8 WinterSolstice8 force-pushed the mobskill_param_info_unjank branch from e50374b to a4fed23 Compare February 5, 2026 01:04
@WinterSolstice8 WinterSolstice8 marked this pull request as ready for review February 5, 2026 01:13
@WinterSolstice8
Copy link
Copy Markdown
Contributor Author

This is probably as good as it's gonna get... so undrafted

Copy link
Copy Markdown
Contributor

@Xaver-DaRed Xaver-DaRed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YOLO...

@Xaver-DaRed Xaver-DaRed merged commit a566095 into LandSandBoat:base Feb 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants