Greasy Fork is available in English.

Hordes UI Mod

Various UI mods for Hordes.io.

< 脚本Hordes UI Mod的反馈

评价:好评 - 脚本一切正常

§
发表于:2020-07-20
编辑于:2020-07-20

Hi I love the UI mod you guys made I currently use it and love the merchant feature!
I am a computer science student and I feel like it would be a good expierence if I could try to make a ui mod myself but I know i'm deeply out of my comfort zone here.

Partly because I don't know what elements I should be targeting to get my desired results.
My idea was to make a button in the btnbar that when clicked only shows the coins so you can pick them up really fast.
But when I started making the script I soon realized there is much more I don't fully understand

The first thing I tried to do was make a button appear in the btnbar near the elixer button that when clicked alerts the browser saying "hello" just as a test, but I couldn't because I couldn't find what I should be targeting.
After taking some time investigating this mods code to get an idea of what is happening I noticed that you are using require.js I assume to pull specific ui files and such from the source code thats needed to make the mods.

But of course the source code (hordes code) is private for obvious reasons, so I'd like to ask are my assumptions correct? Should I be looking elsewhere? And if you do have access to the source code, how?
Ultimately I think this mod is very beneficial so even if I can't make it I hope you guy's can consider it.
I'd really like a mod thats automatically picks all the coins up near the user with a touch of a button. But I realize thats definately a lot more work, and might not be allowed ;)

I hope to hear from you soon!

Edit:
I realize after looking at your source code (the mods) you are requiring your other files that have functions, so I'm just confused but I think I'm getting somewhere.

TimeBomb作者
§
发表于:2020-07-20

Hey there, thanks for your interest. The source code for this mod is available at https://github.com/timebomb0/hordesuimod with some contribution guidelines and information listed in the README. Pull Requests on GitHub are welcome, though this mod is currently not too actively maintained by me. I am still happy to try answering questions and review pull requests.

First thing I'd encourage you to keep in mind is that only certain things are officially considered "okay" or allowed by the game devs. All the features in this mod were created with consideration and with approval from the devs, or specifically from dek, the creator, main dev, and only programmer on Hordes.io. Check out the Hordes discord if you haven't already, I've asked for approval from certain ideas in the #coding channel - https://discord.gg/CgQSZP. Anything that gives mod users big advantages, any advantages over other players, or too much automation may not be okay with the official devs, so always good to ask.

I made this mod primarily by manipulating the hordes.io UI DOM elements (Fun Fact - The Hordes.io UI is built using the Svelte JS library). Lots of experimenting, lots of mutation observers to keep track of DOM changes, lots of optimization to make sure the mod has readable, maintainable code, and is performant enough.

Important to note in regards to your specific mod idea here, while the game's UI is exposed to us given it's Svelte, some parts of what may be considered the UI are actually not exposed to the DOM, and are instead inside of the WebGL Canvas that Hordes runs on (it's a made-from-scratch WebGL game engine). Loot, e.g. coins, are included in this. This means the Hordes UI Mod unfortunately can't mod it.

LMK if you have any other questions, cheers.

§
发表于:2020-07-20
编辑于:2020-07-20

Thank you for your response!
When I first saw Hordes I was amazed how an io game could be so sophesticated, so i'm glad to know more about it.
What you've said makes sense, I guess having the coins/loot controlled by the webgl is for the better anyways.
I can imagine there would be a lot of problems if they were accesscible from the outside.
There are probably some work arounds but I'll make sure to seek for permission if I choose to further investigate :)

I am still interested in the world of mods so I'll be sure to keep this in mind!

发表回复

登录以发表回复。