Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to update a weapon stat #483

Open
MatiasBordoy opened this issue Dec 15, 2024 · 0 comments
Open

How to update a weapon stat #483

MatiasBordoy opened this issue Dec 15, 2024 · 0 comments

Comments

@MatiasBordoy
Copy link

MatiasBordoy commented Dec 15, 2024

I have attempted solutions to common problems

Yes

I have checked that my game version is supported

Yes

OS

Windows 11

Platform

Steam

Description

I have been trying to update weapon stats in the script extender. I have tried geting the entity and then the Data, and then using Sync.

But it's not working. It's not giving any error, the code runs, but it's not updated. I Tried also a lot of different ways... i want to make the weapon's enchantment, spell, skills change when my script runs. (and those changed are forever in the weapon).

How can i do this:?
Here is an example of one of the codes i tried

local baseItemEntity = Ext.Entity.Get(baseItem)
local baseWeaponComponent = baseItemEntity:GetComponent("Weapon")
baseWeaponComponent.DamageDice = newDamageDice
baseWeaponComponent.DamageRange = newDamageRange
baseWeaponComponent:Sync()

Indications

No response

Diagnostic Files

No response

Steps to Reproduce

No response

Expected Behavior

No response

Actual Behavior

No response

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

No branches or pull requests

1 participant