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

Add ability to import/export workflows #42

Closed
Alorel opened this issue Nov 27, 2022 · 3 comments · Fixed by #105
Closed

Add ability to import/export workflows #42

Alorel opened this issue Nov 27, 2022 · 3 comments · Fixed by #105

Comments

@Alorel
Copy link
Owner

Alorel commented Nov 27, 2022

And probably add a note on the weird format, how it's meant to compress the data for Melvor's 8 kB limit etc.

Should just be a Swal modal with a <textarea>

@kellewic
Copy link

kellewic commented Dec 9, 2022

Already hitting the 8kb limit with a single workflow so having export/import would be great.

I actually can't finish the workflow due to the limit, which is just a mine essence to X amount then create X amount of runes with jump back to beginning. I do make use of And/Or triggers to check rune amount OR out of essence - I assume that trigger takes up more space.

Some sort of templatized step might help with the limit since essentially every step in this sort of workflow is the same.

@Alorel
Copy link
Owner Author

Alorel commented Dec 9, 2022

I was gonna say that's one hell of a workflow, but then I only have 3 relatively tiny ones that that's already 2147 bytes when in storage

JSON
[{"name":"Fire God Dungeon","rm":false,"steps":[["actions","trigger"],[[[["opts","id","action"],[[{"set":1},null,"ActionWorkflows:equipSet"],[{},null,"ActionWorkflows:activatePrayers"]]],{"opts":{"mob":"melvorF:FireGuard"},"id":"ActionWorkflows:mobID","action":null}],[[["opts","id","action"],[[{"set":2},null,"ActionWorkflows:equipSet"]]],{"opts":{"mob":"melvorF:FireGolem"},"id":"ActionWorkflows:mobID","action":null}],[[["opts","id","action"],[[{"prayers":["melvorF:Rigour"]},null,"ActionWorkflows:activatePrayers"]]],{"opts":{"mob":"melvorF:Pyra"},"id":"ActionWorkflows:mobID","action":null}],[[["opts","id","action"],[[{"set":1},null,"ActionWorkflows:equipSet"],[{"prayers":["melvorF:Augury"]},null,"ActionWorkflows:activatePrayers"]]],{"opts":{"mob":"melvorF:Ignis"},"id":"ActionWorkflows:mobID","action":null}],[[["opts","id","action"],[[{"set":2},null,"ActionWorkflows:equipSet"],[{"prayers":["melvorF:Rigour","melvorF:Sharp_Vision"]},null,"ActionWorkflows:activatePrayers"]]],{"opts":{"mob":"melvorF:Ragnar"},"id":"ActionWorkflows:mobID","action":null}]]]},{"name":"Rokken","rm":false,"steps":[["actions","trigger"],[[[["opts","id","action"],[[{"prayers":["melvorF:Protect_from_Ranged","melvorF:Piety"]},null,"ActionWorkflows:activatePrayers"]]],{"opts":{"match":"=","atk":"melvorF:ShockwaveEnemy"},"id":"ActionWorkflows:enemyAtk","action":null}],[[["opts","id","action"],[[{"prayers":["melvorF:Piety"]},null,"ActionWorkflows:activatePrayers"],[{"idx":0},null,"ActionWorkflows:setStepIdx"]]],{"opts":{"match":"!=","atk":"melvorF:ShockwaveEnemy"},"id":"ActionWorkflows:enemyAtk","action":null}]]]},{"name":"Umbora","rm":false,"steps":[["actions","trigger"],[[[["opts","id","action"],[[{"prayers":["melvorF:Augury","melvorF:Protect_from_Melee"]},null,"ActionWorkflows:activatePrayers"]]],{"opts":{"match":"=","atk":"melvorF:RapidOnslaught"},"id":"ActionWorkflows:enemyAtk","action":null}],[[["opts","id","action"],[[{"prayers":["melvorF:Augury"]},null,"ActionWorkflows:activatePrayers"],[{"idx":0},null,"ActionWorkflows:setStepIdx"]]],{"opts":{"match":"!=","atk":"melvorF:RapidOnslaught"},"id":"ActionWorkflows:enemyAtk","action":null}]]]}]
Screenshots

image
image
image

I'll have a look at this on Sunday - gonna be travelling over the weekend so won't have time in the next couple of days. I think this bumps #43 up the priority list as well - if this is how easy it is to hit Melvor's limit then I think having mods define entire workflows might end up being the way to go - the fire god dungeon workflow, for example, then wouldn't take up nearly as much space and would only need a few inputs like which equipment sets to use. If we're still consistently hitting size limits afterwards then I might need to think about storing workflows somewhere outside mod.io.

Using mod namespaces for action/trigger IDs felt nice and convenient too (allows me to reuse a bunch of the game's code for mod logic), but ends up with quite a bit of space wastage too..

@kellewic
Copy link

kellewic commented Dec 9, 2022

For reference, here's a screenshot of the workflow. I can't add the "and/or" to the first set of runes due to size. The and/or is "if rune qty >= 1000000 OR essence qty <= 0" - that way it doesn't get stuck if I run out of essences and the last step jumps back to mining essences. All steps past the first three would essentially be the same, just different parameters.

wkflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants