You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

41

Monday, January 14th 2013, 1:17am

Yes it is affected by it, though so far I haven't run into a problem with other add-ons. I had tried Ikarus which uses AA_PatchWork and it seemed to load up. But further testing is in order.

Using just alphanumerics should be relatively safe though Wine seems to check the entire file name + extension, not just the file name part. This has the effect of loading "aa.toc" before "a.toc" instead of the other way around as would happen under native Windows. So you should still be safe. Though also consider renaming the one to load later to "zzInfoBar_Plugins" since Linux has case sensitive file names and Wine will pick up on that. Since Windows doesn't have case sensitive file names, as far was Windows is concerned those are identical names, but not in Linux. Windows users tend to forget that lowercase letters come after the uppercase ones and so tend to sort later.

For some library add-ons such as my old Simple Media Lib, this bug might cause issues since I used exclamation marks at the start of the name ("!!!-SimpleMediaLib" for the main library, "!!-SimpleMedia-FontPack" and "!!-SimpleMedia-RoM" for the data packs). Under Windows this works great, but I'll need to retest under Wine. Current tests that revealed this bug had exclamation marks (at least as the single character file "!.toc" load in very odd orderings).

Edit:
Well it's worse than I originally thought. Just did a quick test and got the order shown in the pic below. It's a mess!
Peryl has attached the following image:
  • Bad Wine Sort Order.jpg
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

42

Monday, January 14th 2013, 2:59am

Possible Workaround for the Wine Bug

I'm still testing a few things, but there seems to be a workaround to the Wine file order bug. I'll start another thread for that since it is only an aside to FuzzyDIYCE really.

Stay tuned...

Edit:
Workaround is [post=584435]here[/post].
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

43

Wednesday, January 16th 2013, 10:34pm

FuzzyDIYCE Core Alpha v1.0

Well, I just released the Alpha of the core. Lots of new stuff and some re-working of some of the internals. Plug-in system is in place as well (see the test thread for details on the scripts and download link).

I'll be preparing a post on the workings of the core and how it all hangs together (I've neglected doing that so far). In the meantime, peruse the code. Lots of things I'm excited about. Especially what I'm now calling FuzzyScript.
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

44

Thursday, January 17th 2013, 1:05am

[highlight]FuzzyDIYCE Core Loading[/highlight]

As promised, here's a run down of how the core works and how it all hangs together. As this is an explanation based on the current state of the core (currently at the alpha stage), future versions may be a little different, but I don't envision any drastic changes. It may be beneficial to download and examine the code while reading this tour of FuzzyDIYCE.

FuzzyDIYCE Core uses so many advanced features not normally seen in your typical add-on, that an explanation is in order. Some of these features I've not seen anywhere else, though it isn't like I've examined many add-ons to find out.


The FuzzyDIYCE Add-on Loading Scheme
Probably the best place to start our tour is in the way FuzzyDIYCE actually loads up in the game. It is by no means standard but as we'll see, it gives us a lot of flexibility that FuzzyDIYCE takes advantage of.

When RoM loads an add-on, it actually scans inside the add-on's folder and all sub-folders for any .toc file it can find and will load and use them as it finds them. Since scanning a folder will make the game find the files in lexicographic order, we can use these facts to load the .toc files, when we want them loaded. We just need to name them correctly and we are good to go.

For this reason, the main add-on folder has a .toc file with a name that starts with a exclamation mark (!) which will be the first thing the game will encouter while scanning for .toc files. This "!FuzzyDIYCE.toc" file contains most of the files the core is composed of. This ensures that all that is required to be loaded prior to any custom user code and/or plug-ins is in fact loaded by the game.

There is another .toc file in the main add-on folder called "~FD_FinalizeLoad.toc". Note that this one has a tilde (~) as its first character making it the last thing the game will find here. This .toc file is responsible for ensuring that all the plug-ins are initialized and the scripts registered with the core.

Now comes the sneaky part. Since the game will also scan any and all sub-folders for .toc files, FuzzyDIYCE uses this as the means by which the plug-ins can be loaded up. The advantage here is that the game itself finds and loads the plug-in .toc files. Since by the time it encounters the plug-in .toc files the core is already loaded due to our sneaky naming scheme, the plug-ins will be able to register themselves with the core.

For plug-ins, FuzzyDIYCE implements a priority scheme. That is, a plug-in can set a load priority so that it can be loaded before other plug-ins. There is no guaranteed loading order for plug-ins of the same priority value. The registration of the plug-ins with FuzzyDIYCE must be done in a slightly special way, but this is an effect of the priority scheme. Apart from this, creating a FuzzyDIYCE plug-in is very similar to how add-ons are made.


The FuzzyDIYCE Core Files
Now that we've seen an overview of how the game loads FuzzyDIYCE, lets look at the files it actually loads, starting with the files in !FuzzyDIYCE.toc.

The first file to be loaded is FD_Plugins_Manager.lua. This file is responsible for maintaining a list of plug-ins that have registered themselves with the core, and is also responsible for actually initializing each plug-in. The code here was originally going to be an independent module add-on, hence why the code is not actually part of the main API. Now that this is no longer required, this file will likely be refactored into the main API.

Next is FD_Apartment.lua. This defines the main namespace that the rest of FuzzyDIYCE uses. All other files refer back to this object, so it must be loaded very early. It also defines the main environment space that all scripts will execute in. Most of the entries in the table defined here will be filled in later parts of the code, but those modules assume that the table defined here already exists.

FD_Locale is a simple module that adds a few helper API functions to allow adding strings to the localized string tables. These functions are mainly so that plug-ins can add their own strings to FuzzyDIYCE.

The next two files to be loaded by the game are the default and localized language message strings. Though currently there aren't any files for the localized strings, the game will simply ignore this fact and continue loading the add-on anyway. Having a default locale that is always loaded is useful to have because then not all strings actually need to be translated. Any missing strings will merely be taken from the default strings. Though not yet present, help and tooltip files will also be loaded at this time.

FD_Timers is responsible for defining the API functions for handling the FuzzyDIYCE timers. The code here is almost identical to that which I wrote for DIYCE 2. It also create a frame in order to handle the OnUpdate events required to update the timers.

FD_CachedVars.lua is next to be loaded and it is responsible for the internal workings of the cached variables, as well as a few helper API functions. The workings of the cached data variables has been discussed previously, though this file also implements the cached template variables which are a new beast and will be discussed in another post.

The next file to be loaded is FD_Commands.lua and despite its rather small size (it only defines one table and one API function) it is quite important. The function allows registering a command for use with FuzzyScript, while the table is used in order to allow a registered command to be skipped when a skill has been triggered. This table then is the key to how the try and perform commands can do their magic. The functioning of this table has already been discussed in previous posts.

The game will now load FD_Scripts.lua which defines an API for adding/compiling FuzzyScript scripts. It also defines the default code script apartment and defines some API functions for creating new script apartments. These code apartments are the key to allowing FuzzyScript to be used as an extension to Lua itself and the magic behind this is worthy of its own post. Some refactoring still needs to be done to this file however since it has undergone quite a few changes.

Finally we get to the last file in !FuzzyDIYCE.toc. FD_SlashCmd.lua defines the slash command handler for FuzzyDIYCE allowing convenient use in macros. This is what kick starts a script when the user runs the macro with this slash command.


Plug-in Loading
Once all of the core is loaded up, the game will continue scanning the add-on folder for .toc files and as mentioned already, will find some in the plugins folder. The process of loading a plug-in is pretty much the same for all plug-ins so I'll just describe the Base Commands plug-in.

For FuzzyDIYCE plug-ins, the .toc file for the plug-in only has one file in it. For Base Commands, this file is RegisterPlugin.lua. This file defines an initialization function to manually load all the files of the plug-in and then registers this function, along with a plug-in name and loading priority, with the FuzzyDIYCE plug-in manager.

The plug-in loading priority system requires this method so that the plug-ins get initialized in the correct order. If we didn't have the requirement, we could simply list the files directly in the .toc and we'd be done.

The plug-in initilization function will, when it gets run, load the remainder (in fact all) of the plug-in itself. For the Base Commands plug-in, this involves loading Commands.lua which registers the base FuzzyScript commands and Vars.lua which registers the FuzzyDIYCE cached data variables.


The Last TOC
After loading the core and registering the plug-ins, the game finally gets around to loading ~FD_FinalizeLoad.toc which, as the name implies, finalizes the loading of the Core.

The first file this .toc loads is FD_Plugins.lua which has only one task. Tell the plug-in manager to initialize all the registered plug-ins. The plug-in manager in turn is what actually calls all the plug-in initialization functions which as we've seen is what actually loads the plug-in files. Since these initialization calls are sorted based on the priority values the plug-ins registered with, they will always load in the correct order.

The next file in this .toc is FD_ScriptApt.lua which registers all scripts defined in the default FuzzyScript code apartment with the core. Note that this is only done for the default code apartment. Custom code apartments must be registered manually, though this can be done where the apartment is defined.

Lastly, the game loads FD_Ready.lua which only has one small task. To tell the user that FuzzyDIYCE is loaded and ready.
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

45

Tuesday, January 22nd 2013, 3:59pm

Just a status update

I've started some work on the GUI portion of FuzzyDIYCE and still have a bit of re-factoring to do to the core as there are a few things in there I'm still not quite happy with but as it's still Alpha, I don't feel guilty about the re-working.

So though it may seem like things are stalled a bit, they really aren't. Some of the re-working I want to do to the core is because of how I've decided to implement the GUI part but I think it'll be worth the wait.

Some exciting stuff is in the works, but I want to keep it as a bit of a surprise (I'm just evil that way... MmmWAHhahahaaa!).
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

46

Thursday, January 31st 2013, 12:28am

Another Status Update

Well, after a lot of mucking around, I'm forced to make an executive decision (don't worry, it isn't bad :p).

Some of the stuff that I've been working on of late (mostly on the GUI side of things) has given me some very cool ideas. However, I have to face reality and put these things off for another add-on otherwise FuzzyDIYCE will end up never seeing the light of day due to feature creep (now that would be bad).

Soooo... some of the work I've done lately will need to be pulled out of the project and put on hold for some later add-on. It does mean some of the cooler things I hinted at in the last status update will not make it into FuzzyDIYCE, but it really is for the better.
2013... The year from hell....

47

Sunday, February 3rd 2013, 4:47pm

sounds good

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

48

Saturday, February 9th 2013, 3:32am

Yet another update

Still going... Just got a lot of time consumed by other things at the moment. So progress is a little slow.
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

49

Wednesday, February 13th 2013, 4:44pm

And once again, just a status update (sigh)

Yes I know, still nothing to show/post yet. I've got a good part of the base UI handling stuff done as well as the beginnings of the GUI editor, the editor to FuzzyScript code converter, and the configuration manager.

I also got the FuzzyDIYCE extensions stuff done (well that part wasn't really hard anyway) and enhanced the plug-in manager to allow plug-ins to indicate dependencies on named extensions. I've also got some "on-demand" plug-in loading stuff in place (still might need some work there though).

Anyway, given all the above stuff being worked on, you can start to see why it is taking so long to get the next alpha version posted (not to mention all the other demands on my time of late...) but given that when I do you'll be able to see an actual working GUI editor and more, I think it'll be worth the wait.
2013... The year from hell....

50

Wednesday, February 13th 2013, 5:58pm

oh yeah, it'll. i totally understand the waiting, and it'll probably worth it ^^, too much for only one person to handle. Thanks for all that work being done.

51

Thursday, February 14th 2013, 12:23am

very exciting...nice work Peryl
Jacobmo 97Scout/97Warden/95Warrior/97Rogue/88D/85M
Allenmo 78S/77R/56P/1W/1K/1M - retired
Bteam all the way

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

52

Friday, March 1st 2013, 2:31am

Again with the status updates...

Been rather busy with other stuff and haven't really had much time to dedicate to FuzzyDIYCE, sorry.

The project isn't dead or even really stalled, I just have a lot on my plate and can't always get much time to work on things. But yes, it is still going. Just really, really slowly.
2013... The year from hell....

53

Friday, March 22nd 2013, 2:57am

Hope you're doing well Peryl, never talked to you directly much but your forum posts have been immensely helpful in the past. Looking forward to this project, and I know good things take time. =D
Deraan
77/77/71 M/W/R
Govinda - Bteam

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

54

Friday, March 22nd 2013, 5:47am

Quoted from "Fishtale;594567"

Hope you're doing well Peryl, never talked to you directly much but your forum posts have been immensely helpful in the past. Looking forward to this project, and I know good things take time. =D

Thanks, always nice to know folk find that type of thing useful.

As to it taking time, well lots of things happening these days taking up my time. So haven't had much to dedicate to this at the moment, but it isn't dead.
2013... The year from hell....

Peryl

Intermediate

  • "Peryl" started this thread

Posts: 313

Location: Elsewhere

  • Send private message

55

Saturday, April 13th 2013, 4:09am

Hiya folks!

Sorry for all the delays, but things should be settling down soon so I'll have time to get back to coding up this thing.

I also have a few other projects that also need work but this will take priority.
2013... The year from hell....

Davinator61

Beginner

Posts: 35

Location: Wherever I may wander

  • Send private message

56

Sunday, April 14th 2013, 2:45pm

Hey Peryl, no Hurries, no Worries. Just let us know when the addon's final release is ready for the masses, and I, at least, will call it good.;)

57

Sunday, April 14th 2013, 7:15pm

I have a question, has anyone looked at kitty combo from curse? I looked at it but it is japanese so i could not understand it. It did however look similar to uberflex.
Zymologist wl/ch/m/p
Matronmalice p/s/m
Ceviche wl/ch

RoMunited

Professional

Posts: 889

Location: Reni

  • Send private message

58

Sunday, April 14th 2013, 7:24pm

Quoted from "timthum;597564"

I have a question, has anyone looked at kitty combo from curse? I looked at it but it is japanese so i could not understand it. It did however look similar to uberflex.

Has some other features that can help that you can read about in the addon's description. A little more advanced than the standard diyce functions that come with Sky's sample diyce on curse

Uberflex ran a script in the background that would execute combos after a mob is specified. I'm going to have to look at it a little more than I have, but I think it doesn't automate combat to the degree of UF

ghostwolf82

Professional

Posts: 859

Location: Kalvans Trunk

Occupation: It's dark in here

  • Send private message

59

Monday, April 15th 2013, 3:39am

It's not hard to get something like UF (or more advanced) set up and going if you know how. That's as far as I'm willing to elaborate.

60

Monday, April 15th 2013, 5:11am

i am just looking at the interface that both of those addons use.i have faith that Peryl will do an excellent job of fuzzydiyce.
Zymologist wl/ch/m/p
Matronmalice p/s/m
Ceviche wl/ch