Oh damn im blind :d Thanks for that!
Posts by Preach
The next update will be available on Wednesday, December 18, in the early evening (GMT+1).
This update will not yet replace the Java version, instead it is the actual content update. We'll provide more information about the transition together with the update.
-
-
Hey Red,
I have an issue with my UI right now. I'm trying to create an in-game editor to execute Lua scripts. I'm struggling to properly implement row counters using the UILabel. The problem arises when the code reaches the editor's height; the row counter doesn't update properly because I can't determine which line the cursor is on. The API doesn't provide a method to retrieve the cursor position from the input or anything similar.
Is there a workaround to implement the counter correctly, or could you add a method to get the current cursor position?
The editor currently looks like this:
As you can see in the screenshot, the first line (where the number one is displayed) isn't aligned with the corresponding code line.
I know the code isn't implemented properly, but I'm really looking for a row counter since it helps with reading the code more easily.
The code for the counter looks like this:
CodeBtw. Is there a way to add rich text?
It would be useful to colorize individual strings so I can implement a syntax highlighter in the future.
Thanks in advance.
-
Preach ich wollte eine Karte von meiner Insel mit Wegen, Straßen, Seen, Inseln und Gebäuden erstellen da es bisher keine Karte gab. Daher die verschieden Wegpunkttypen. Das seit dem neuesten Update nun endlich eine Karte verfügbar ist, wo auch Punkte gespeichert werden können hat sich das quasi erledigt.
Die Karte ist aus tausenden Wegpunkten mit Deinem SimpleHome-Script erstellt worden.
Preach I wanted to create a map of my island with paths, streets, lakes, islands and buildings because there wasn't one before. Hence the different waypoint types. Since the latest update there is finally a map available where points can also be saved, that's basically taken care of.
The map was created from thousands of waypoints using your SimpleHome script.
generierte Karte / generated map
Mainmenu mit DB-Upload / main-menu with DB upload
Wegpunktliste zum Hinspringen / waypoint list to jump to
Okay, I see.
Glad it's solved then.
Btw. nice map you've there
-
Hallo @Oreach,
liese sich noch eins erstellen oder perfekter Weise dies gar erweitern? Eine Erweiterung wäre perfekt, denn dann muß ich nur eine Datenbank auslesen.
Hintergrund: Ich bin derzeit dabei mit den Wegpunkten zu Versuchen eine Karte zu erstellen - eine Webanwendung welche eine simple Grafik erstellt. Nun hätte ich nicht nur gerne Punkte sondern auch Linien.
Meine gewünschten Erweiterung:
-> Linien-Namen fangen mit "L_" an und werden nicht beim Auflisten angezeigt
-> keine einzelne Namenseingabe sondern fortlaufende Nummer/Timestamp (lediglich mit Prefix um Linien differenzieren zu können)
-Aufbau Wegpunktname: _<Prefix>_Timestamp
-> speichern des Wegpunktes beim Drücken einer Taste wie "x"
Nutzung im Chat
/sh startline <prefix>
/sh stopline
Das eingebbare Prefix soll zur Differenzierung der Linen dienen, wie Wege und Ufer und muss dann meinerseits definiert und ausgewertet werden.
----
Hello @Oreach,
Would it be possible to create another one or even expand it? An extension would be perfect because then I only have to read out one database.
Background: I'm currently trying to create a map with the waypoints - a web application that creates a simple graphic. Now I would like not only dots but also lines.
My desired extension:
-> Line names start with "L_" and are not displayed when listing
-> no individual name entry but consecutive number/timestamp (only with prefix to be able to differentiate lines)
-Structure waypoint name: _<Prefix>_Timestamp
-> save the waypoint when pressing a key like "x"
Use in chat
/sh startline <prefix>
/sh stopline
The prefix that can be entered should serve to differentiate the lines, such as paths and banks, and must then be defined and evaluated by me.
Hey room6675
sorry for responding a year later, but I was really busy over the past few months.
I'm not sure what your exact goal is, but if you want a line between your home checkpoints, you can easily subtract the positions.
By normalizing the vector difference, you'll get a direction vector (ranging from -1 to 1), which you can then use to scale your lines individually.
I hope this helps. I know it's a late response but ye..
-
Hey Red
first of all thanks for the awesome update. Im glad this game is still getting maintenanced.
I've a question regarding to the map: Is it possible to add custom points/marks on the map via the API?
I'd like to update my simplehome plugin and indicate the home positions on the map if possible
-
The title says all. Is there a possiblity to render the ui in worldspace? I'm not sure if Unity's UI toolkit offers a function for that but I know it's possible using the Unity's canvas. I also tried to use an asset with a canvas component but it didn't really work..
-
Mir ist beim zweiten update ein Typo unterlaufen *facepalm*. Die Property Bezeichnung aus der Config stimmte nicht mit einer Funktion überein. In der Funktion wurd nach ein "regularTeleportCooldown"-Value abgefragt (was natürlich in der Config nicht so vorhanden ist). Die Bezeichnung ist nun angepasst und das Plugin sollte (hoffentlich) auch in Multiplayer funktionieren.
Btw. danke für die Logs! Ohne die hätte ich die Ursache nicht so leicht finden können.
Why do the chat commands "sh home" and "sh sethome" have the designation "sh"? Is it possible to remove it?
I always use a prefix for my commands to differentiate it from other plugins. In case some plugins use the same commands e.g. (/list or /help), I want to avoid potential errors or any overlaping. For example, I also use the help command in my other plugin with a prefix as well and if I'd omit the prefixes it'd unnecessary confuse the player and probably cause an error.
Perhaps I could add a property to the config which could make the prefix changeable but Im not sure about this as I mentioned above.
Plugin updated to version 0.0.5
Check changelogs to see the changes
-
Preach Vielen Dank, dass du doch noch die Zeit gefunden hast.
Ja gerne. Ich hoffe, es entspricht deiner Erwartung :D. Die Befehle sind zwar nicht identisch, aber ich denke mal dass es halb so wild ist.
-
Plugin updated to version 0.0.2
Check changelog to see the changes
-
thank you very much for this very useful plugin.
is this really a rar file? tried to unzip it...windows says it's not an archive or it's corrupt? or is it already the jar file
That's weird, it is a rar file indeed. I will upload it in a different format
-
SimpleHome
Current Version: 0.0.5
Updated: 05/16/2023
Overview:
SimpleHome is a "SetHome" alike plugin that gives players the ability to set checkpoints (known as "sethome") and teleport to one (also known as "home"). The amount of checkpoints can be adjusted in the config. To distinguish the checkpoints, a name is required for each command (more info below). The plugin is configurable and offers a number of commands and of course also works in multiplayer.
Features:
- Customizable Checkpoints
- Configurable
- Teleport cooldown
- Simple Database
Commands:
Command Description
Usage
Example
/sh help Displays a list of commands /sh help /sh help /sh sethome Set a home to your current position /sh sethome <name> /sh sethome home1 /sh removehome Remove a specific home /sh removehome <name> /sh removehome home1 /sh home Teleport to a home /sh home <name> /sh home home1 /sh homes Displays a list of your homes /sh homes /sh homes Config:
After the initialization a config.json file will be generated inside the plugins folder. To apply any changes you've to edit the "value" property inside the given properties. A comment and a default value are also given for clarification. If you still have questions you can of course ask here.
Dependencies:
- pUtilities-0.0.1 (Already included in the download)
- Gson (Already included in the download)
Credits:
SimpleHome and pUtilities are made by Preach
- Changed: "/sh list" changed to "/sh homes"
- Fixed: regular user teleport issue
- Fixed: small bugs
- Added: Multiple worlds support
- Added: New config property for admins teleport cooldown
- Added: validation for config values
PS:
It was not my intention to make this plugin, but because it was suggested in the forum, I took the time and programmed it. As the name of the plugin already suggests, the intention was to keep it simple without a GUI or some kind of effects.Have fun!
-
Das wäre toll. Sollte für Multiplayer sein. Die Welten sind groß und wenn sich Spieler untereinander besuchen wollen, . Können sie zwar zum anderen Spieler teleportieren, aber nicht mehr zu ihrer Base zurück.
Bin zur Zeit etwas beschäftigt, werde dir den aber bis spätestens übernächste Woche liefern. Hab gerade etwas um die Ohren
// Edit:
Deirdre hab die Zeit doch noch gefunden :D. Der Plugin ist im Forum verfügbar. -
Hey ArcticuKitsu.
I like your idea, it sounds promising. I'm currently working on a plugin that also provides a GUI to the players. The concept partially overlaps with yours, without fictional NPCs and random rewards tho.
The concept of my plugin is as follows: a player is rewarded for their logins. The more often he logs in, the better will be his rewards (it depends on the admin to configure which rewards should be available for which login streak). In order to get better rewards, the player's login streak must reach a minimum value. However, the player has a certain period of time in which he has to claim to extend his login streak. If he missed a claim, the login series starts from zero again. Obviously there's also a cooldown for each claim to keep a balance and avoid abuse (default is 24h).
The gui looks like this at the moment (WIP)
Now back to your idea, it shouldn't be a problem to build a similar GUI to the examples above since it partly overlaps with mine (obviously not that pretty), but it will surely take a lot of time since only simple UI elements are available at the moment. The backend itself shouldn't take too long since its based on random timers which are easy to implement. I've a suggestion tho: Instead of specifying a preset of timers it would be cooler to have some sort of events that occur randomly in the GUI. Each event would have some sort of attributes that specifiy the kind of rewards you get and how long the timer would take. For instance you would have the choice of 3-4 events that offer different rewards and change every few hours.
Anyways, I have a lot to do at the moment. I also have another plugin in the todo list that I promised to make in the forums.
If I ever find the time and desire, I'll let you know. Unfortunately, it will probably take a while until then
-
It sounds like the main issue is that you call validateText when pressing the button, but since you have to wait for the callback results of multiple text fields, you can't just continue there? There is unfortuantely no way to get the text content of a text field directly (because the server first has to query if from the client)... but you could try the PlayerUIInputTextEvent - it's called once the player either presses enter (after typing a text) or when the text field lost focus. You could move the validation there and store the result for that text field, so when the player presses "Submit", you could just rely on the stored validation result
Thank you, thats what I was looking for lol. Idk how I overlooked something like that.. I probably should sleep more
-
-
Hello everyone,
is it possible to have an on-value-changed event or something for the text field? I am currently struggling to synchronize the input with my validator. I've a status value for each input which decides if an input is valid or not. Each time the submit button gets clicked the inputs are validating. Only if all inputs are validated the submit button will continue with the process. The only issue I've now since the way to fetch text data is a callback the status value isn't synchronized with the current status value, it's always one step behind. To avoid this problem you have to click twice on the button which is really annoying. It'd be a huge help if anyone knows a solution.
Here's a small demonstration to visualize the problem:
As you can see above the inputs are invalid.
So far so good
By clicking on the submit button the inputs got validated again and this time it passes the validation since the format is correct (as you can see no errors are shown), but a feedback to the player is missing which u can see in the screenshot below, because the validation status isn't synchronized.
Clicking the button again the validation process happens again but since it uses the previous validation status, which is true, it doesn't matter now if any errors occurs again or not, as long the previous status is true.
I hope you could follow along
Here's the code snippet of my method:
-
Es gab damals in der Java Version ein sehr kleines Skript, mit dem man sich einen einen "sethome" setzen konnte und mit "home" wieder dorthin springen konnte. Sehr praktisch, um andere Leute zu besuchen oder auch sich ieinem Platz in einer Höhle zu setzen, um nicht immer nach unten buddeln zu müssen.
Wenn du wirklich Interesse an so einem Plugin hast, kann ich dir schnell einen programmieren. Hatte damals für nen Kollegen so ein Plugin gemacht, wobei der Spieler nur eine gewisse Anzahl an Homes setzen konnte.
-
Unfortunately I'm not sure if it will make it into the next update, but a ScrollView element is definitely on our to-do list
PS: Your UI looks very promising!
Thanks but I had to rewrite a lot:$
I had to rewrite the whole UI system cuz the positions were set manually (with setposition but relative to parent) and the child elements didn't fit well when scaling the frame.
I will wait for the next update I guess. Adding paginator doesn't look that good in my opinion.
I will later add screenshots of the current UI version
-
Thats unfortunate I guess I've to make a paginator then
-
Hey,
Im currently working on a plugin which supposed to have an easy UI for newbies. Is there a way to have an scrollable element with a scrollbar etc.? Im thinking to make a paginator but I'd prefer the scroll method.
The ui looks like this so far: