Posts by angriff

A new update is now available, introducing seasons and more!
Latest hotfix: 0.8.0.2 (2024-12-30)

    What you dont understand was explained as several plugins I am developing are around a common theme they all contribute to an overall single purpose all provide information on player interactions. To have one item stored in one database that can contribute to a decision in another plugin is counterproductive but if I can read that interaction then I can use it. To make a huge plugin that does everything is counter productive to easy maintenance and change of the plugins.


    There are a few common things plugins track no matter who wrote them. They have a a key and usually single function in gameplay. Area Protection being one stores who can do things and who cannot and how much you can do that too. I have an idea I am running with that requires me to interface with that database to accomplish the flow of rights and enhance game mechanics for any player. Having to push these through a Lua script routine that I know nothing about is not as easy as pulling or pushing the information at the database outside of Area Protection routine. Area Protection does not seem to care who closed the database or who put the information there as long as it is in order and keyed correctly. I have had to manually edit it several times to correct issues as I did with another plugin database issue before I removed it from my server and went another direction.


    Area Protection is a necessary plugin because I cant/dont want to write that type of routine right now but I have a routine that will build stats on how much land they have protected. Waiting for a third party plugin writer to alter the routine they have no use would be problematic. I want to create a safe area there a shoppers can get access without an Admin or Owner based on certain interaction but not a public free access. These are all game play mechanics. (No it is not about player self claims either as I know there is a prewritten routine that helps with that)


    I have several routines I have written that accomplish completely unrelated mechanics but would benefit from common database to create a common game mechanic theme on my server. However they are in different plugin subdirectories to function. Hence the main question about database being stored in different spot than a single plugin subdirectory.

    This is true and would be really nice as a consept, but you need to be careful, as most plugins use SQLite databases that means that only one thread can edit them at any one time, in a scenario as described by you above if two players enter the area at the same time and your plugin tries to write to the database for both that would crash the database and sever the plugin's connection to it. Thus a server restart or a reinitialisation of the database in the plugin would be needed to access it again.

    in your java class that extends plugin you need to use the getPath() method to get the path to your plugin's directory automatically thus no hard coding of paths is necessary. The you just extend the path with + "database.db".
    The shift in slashes is probably caused because the initial partition is using windows while the server partition is using linux.

    Well they told me that they are windows servers.. but who knows.


    Yes RED warned in another thread about double threading to a DB. Right now well there is not allot of traffic on my server so not allot of risk but maybe by then I will have come up with a better solution. I dont like the thousands of DBs concept for the same function .. storing one thing here and one thing there is not very good for performance and interconnectability/useability in functions for a server.

    No, that infor will work for now. It is that I have several different plugins and the information is needed for a couple of common requirements I am developing to some degree like the server and world information which there are routines to access. I have not graduated to the all encompassing single plugin that does it all which might be more efficient but none-the-less I wanted to start to consolidate the information amongst them. The intent is not to use a plugin's routine to read or write to the DB but to directly read/write to the DB. My routines are not currently storing the information they are just in future upgrade concept development and in testing for the execution of the game interface mechanics.


    One idea, I have on the sketching block would require this method involved your Lulascript Area protection routine database was providing an ingame way to add Shoppers to a common area without the need for an Admin or Owner. This can be triggered by either a group permission or a physical action by the player in game. <patent pending :rolleyes: >. A simple read and update to the database directly is all that is needed similar to a manual update to the DB by the server admins when a correction is needed. There is no need to tie into or use the plugin routines which seems very complicated to me.


    The SQL databases are simple tables with key parameters that are not very hard to read from and write too using the game plugin SQL command features if you know the db structure but as you point out the routine has to know where they are or it would create a blank one. I was putting an un-tested hard code routine in netbeans when it threw up a bunch of illegal escape errors from using a reverse slash\ in the address. I did not know what this meant but they were red so I am sure it would not compile.


    I was hoping the SQL routines in Rising World could handle wild cards like a tilde~/plugin/datab.db or something like to find the DB by unique name instead of the full path like, C:\Pingperfect\Users\RJ233\190000/plugins/routine/database.db needed on this commercial server, I am using. (Notice the shift in slashes needed which I don't understand - btw.). I do have an issue with Pingperfect liking to name all the DBs similarly which this, I believe, is a because I opted in for the advertisement of their service for a discount. Even if I could change it I am not going to now unless it is a problem.


    I will try what you suggest. Red already warned that SQL does not like multithreading but I am not that advanced. I could get a conflict if two people do the same action creating a write or read like he said he had trouble in the game dev with in the World DB and had to somehow line up the routines. I have no idea how to do that so knock-on-wood I dont have the activity for that though it might be nice.


    Thanks for the suggestions and direction. I will keep plug-in(g) away.. ... :D

    I have a routine that stores items in a database that I want another plug in to read for display. What is the best method to tell the plugin where that database is. I don't want to duplicate the information I just want one or two big server databases with the information stored that I need so they may not be in the plugin directory that is looking. If you understand this request I appreciate in advance the help :S .

    if you initialise your timer like this, (240F,0F,0,()-> { then the getTick method should return all values between 0 and 240


    Edit: 239.999999 (many nines :D) in fact as at 240 the Runnable is executed and your timer stop as the repetitions are set to 0 (i.e. execute only once).

    Ya I am not having trouble with the runnable executing.. It is I cannot seem to get the timer to tell me that it has 240 left. So I suppose I need to do an algebraic to get that. But is always seems to say 0. ?(

    if your Timer is set to execute every 1 second then yes you will only get 0 from the .getTick method as when it reaches 1 the Runnable is executed.


    The Tick is a value from 0 to "float interval" set in the Timer.

    no new Timer (240F,0F,0,()-> {. I start it and the want to report the current state of the timer.. maybe use it in future for notifications of impending events.

    Funny I was thinkng of random crop blights myself.. but it would have been far beyond me abilities to write a routine so now I dont have to worry about it .. :thumbsup: The game currently has infinite food and infinite resources so it is hard to establish a reason for players to trade. everyone on my server just digs and digs until they are bored then the leave.

    Thanks .. just read about the attach in an SQL tutorial and could not find anything directly about that but was going to try to see if that was needed I need a third party UID from the database while using another database to keep track with an event.


    this kind of support makes it fun.. thanks

    Does Attach work for datbases in plugin routines. Can I attach a second database? Can I have a database open and still query the World Datbase is the requirement.

    What exactly are you trying to do, from what you just said it sounds to me like you don't need a timer at all and could do it with just a count variable increasing in value as it goes :/ But without exact infomation I can't know tbh

    Yeah, basically it is just a countdown that is stop and started. Seeing the pause feature seemed it would have been ideal if the timer itself could be stopped restarted at the same tick mark and then execute the code. But I see the word pause is actually a stop/finished.


    So that brings up another thought. If I pause a timer it should not execute the code unless if completes the entire count correct? I have some funny timing things going on in my routine right now that I am trying to sort out.


    going to have to buy Java for dummies :/:S

    Thanks for the replies and testing. Since the timer restarts after a pause (pause is a stop with a restart not a vernacular pause) I cannot do what I wanted to do with the timer I will have to count the ticks and keep track of them to make the decision to execute the code then.


    Total time with the timer running in game time is important to the decision but the duration of real time is not. I will need to pause the counting then restart counting at the last known count. Again thanks for being a sounding board.

    ok from the API doc stuff


    Pause pauses this timer. This has no effect if the timer is currently not active. You can always resume by calling start()


    Now i just want to know if I can kill a timer and not have to reload the plugin? If I have it running and dont need it for the next few hours until another event should I kill it then let the event re-initialize it with the same name or do I need a new name?



    so let me simplify is there any way to reset the timer to 0 for another start in the future without killing it? Or do you just have to let it expire.. which is a problem if you have executed code by the timer that you may or may not want to execute.

    Plugins I assume will eventually be introduced through the steam workshop and you will be able to download them through steam which means they will be copied a lot, but that is nothing unusual when it comes to mods, just check how many times each skyrim or fallout mod has been reuploaded it is insane how many people just downloaded and reuploaded the same files someone else made :D
    Also mods are generally free, Bethesda tried to introduce paid mods with the "Creation Club" but it was an utter disaster that they had to shut it down after less than a month or so XD

    Well an author has recourse on this webpage via the rules stated in the JIW terms or use legal area. The author can complain that a plugin violates their plugin and JIW will likely take it down.

    so what I want to clarify is those two points


    pause a timer and restart does the new start act as a resume? Maybe there is a .resumetimer function that I missed?


    If I kill the timer and it does not just end can I reinitialize it or do I just need to let it finish and stay there or does the plugin need to be reloaded for it to ever start again?

    Unfortunately, this is very true (and quite well known). The legislation about distribution and copy right did grow organically into a rather involved mess and the 'simple' understanding of the layman is often wrong: a lawyer (actually a specialised lawyer) is often necessary before committing to significant work or investment.
    The saddest thing is that this has very little to do with protecting authors (as a software author for decades, both as an employee and free lance, I think I know what I am speaking about): mostly it is done to protect corporation investments.


    These aspects are largely irrelevant: reverse engineering is prohibited in itself, regardless the result is re-distributed or not, is sold or given away for free, or even not re-used in any way and kept secret in a vault (which would make it hard to discover, but a crime nevertheless).


    ____________________

    Decompiling is not illegal in the US. Any case for distribution for commercial use is in the civil side not criminal side of the law in the US.


    The EU rules clearly protect the end use to correct errors or interoperability of supporting code. As far as plugins for this game well maybe they should be distributed through steam as DLC and you can charge for them and Steam can audit your files for variations.

    It depends: re-creating a new timer when you need it (after having killed a previous timer) may be fine too. May even be better if you need an initial delay.

    You gave the answer yourself already: "you cannot restart it if I kill it" (aside: I do not understand what you mean by "I have an action to restart the event method").

    ok so I start the timer.. I pause the timer.. if I start the timer again does it start all over or begin with the last tick? Do I have to keep track of the ticks to get a single timed event that can pause in the middle?


    if I kill the timer to clean things up after some event .. can I reinitialize the timer with a event method or is it dead forever.

    If I start a timer then kill it. I know from another thread that you cannot restart it if I kill it. Therefore, it is best to pause it.


    The question is if I kill it and I have an action to restart the event method can I use the timer all over again? I would think you could but knowing may save me hours of testing. Thanks

    So we need the interpretation of a Qualified person here I see. As your interpretation differs from My interpretation of the Directive as it clearly does not remove the rights of the end user to make copies and can decompile to insure functionality, correct errors or interaction of other software for the end users use. What you are implying are restricted act violations which require the action of "and the reproduction ofthe results thereof"


    So the technical question is does an altered plugin load onto other users computers where it could be considered a distribution? Can a person decompile a plugin from information left on his/her's computer when they play the game?