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

Negative numbers don't seem to work with ObjectDefinition fields #976

Open
jlfarris91 opened this issue Dec 5, 2020 · 5 comments
Open

Comments

@jlfarris91
Copy link

jlfarris91 commented Dec 5, 2020

When trying to create a slow aura ability by setting the move speed factor to a negative number or even modifying the existing Slow Aura (Tornado) ability, for instance, I noticed that the final ability does not have the negative values but instead seems to be clamped to 0. I verified this in-game and in the editor by importing 'wurstCreatedObjects.w3o' into a blank map.

image

The first thing I saw was that presetAttackSpeedFactor and presetMovementSpeedFactor (of AbilityDefinitionAuraSlow) used setLevelsDataUnreal behind the scenes which could explain the clamped value of 0 if the compiler actually clamps the value for unreal expressions. However, I can't seem to find anything in the wurst compiler to suggest that it does...

image

I tried changed them to use their *Real counterparts instead but still no luck. The values still end up being 0 in-game and when viewed in the editor.

image

However, the values in WurstExportedObjects_w3a.wurst are correctly negative and now it is using the correct seLvlDataReal functions.

image

Somewhere between the Wurst call to setLvlDataReal and the final created object the values become 0.

@jlfarris91
Copy link
Author

All that for nothing. I checked the final map output by wurst and the values are negative as expected. Not sure why the imported w3o object data showed them as 0s.

@jlfarris91
Copy link
Author

For anyone else coming across this issue specifically with reducing movement speed: I needed to set the Game Constant Movement - Unit Speed - Minimum to 0 or at least to a value where the difference in movement speeds would actually be noticeable.

@jlfarris91 jlfarris91 reopened this Dec 6, 2020
@jlfarris91
Copy link
Author

It was not sufficient for me to adjust the Unit Speed - Minimum constant. I was mislead by the original Slow Aura (Tornado) ability working as expected but I have discovered that my custom ability based on it is still not working. The related fields are still zeros in my maps.

@Frotty
Copy link
Member

Frotty commented Dec 6, 2020

Perhaps the index or something wurst sets isn't correct. They were generated from game files but might have some error. Should create the tornado abil in the map and see what wurst exports it as.
e: there seems top be a general problem of wurst not exporting non-wurst objects (?)

@Frotty
Copy link
Member

Frotty commented Feb 11, 2021

any update on this?

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

2 participants