|
Post by TinyTerror on Aug 19, 2005 15:49:16 GMT -5
Today I put some work into the new LUA core for lunar. This is what has been done so far: *Scripts loaded and executed in a single thread test environment. *Threaded script core almost done. *Windower SDK obtained. My goal is to get a basic LUA script to run within FFXI by the end of next week. Once I get basic IO features tested and cleared of obvious bugs, I will begin extending LUA to include FFXI commands. For more information on LUA and its syntax, please visit: www.lua.orgPlease do not ask me when anything will be released, because I don't know
|
|
|
Post by TinyTerror on Aug 21, 2005 20:48:06 GMT -5
Today I had fun with threading bugs. It took me 4 hours and a long conversation with cliff before I was able to figure out what the hell was going wrong with my threaded lua core. There was this really wierd bug with SDL_Killthread on a lua instance running an infinite loop script. I was trying to terminate scripts in mid execution so a user would be able to manually stop a runaway script without unloading lunar. I was able to kill the threads for the lua cores, but the main thread would hang and crap the whole thing up. It turned out that I was using debug run mode insted of normal run mode for running the build from msdev. When I ran it in normal mode it still crashed, but in a different way that was easier to deal with. I finally figured out that if I pushed an error onto the lua stack for the script, lua would long jump into an error state and allow the execution to be halted without crashing. For those of you who are still reading after all of that, this is what I got done today: *Multithreaded scripting environment is working. *Mid-execution stopping of scripts is working. I wanted to get alot more done this weekend, but bugs are not kind to schedules. I also had to help my shell rape the hell out of kirin on saturday. We got awsome drops, and one of my friends managed to HQ an aristocrat's tunic right after, so it was a good night. Anyway, I am just about ready to wedge my scripting code into the plugin code starhawk was kind enough to hook me up with. Hopefully I can get some of that done this week and spend next weekend tweaking a working plugin
|
|
dirp2
New Member
Posts: 26
|
Post by dirp2 on Aug 21, 2005 22:55:41 GMT -5
Today I had fun with threading bugs. It took me 4 hours and a long conversation with cliff before I was able to figure out what the hell was going wrong with my threaded lua core. There was this really wierd bug with SDL_Killthread on a lua instance running an infinite loop script. I was trying to terminate scripts in mid execution so a user would be able to manually stop a runaway script without unloading lunar. I was able to kill the threads for the lua cores, but the main thread would hang and crap the whole thing up. It turned out that I was using debug run mode insted of normal run mode for running the build from msdev. When I ran it in normal mode it still crashed, but in a different way that was easier to deal with. I finally figured out that if I pushed an error onto the lua stack for the script, lua would long jump into an error state and allow the execution to be halted without crashing. You couldn't find the "Any" key, right? Woot!Even I know what that means! They never are <Congratulations>
|
|
|
Post by TinyTerror on Aug 28, 2005 15:13:22 GMT -5
Just a quick update here.
*Lunar is now loading within the windower and executing scripts.
I have a busy week at work ahead of me, so don't expect any updates this week. The next step is to add all the required windower related code to load and stop scripts as well as to list running scripts and so on. Right now scripts are run manually at startup. Hopefully I will find the time to write some more code over the next few days.
EDIT
I coded the command line stuff for the windower. So far everything appears to be working, but script unloading is a little unstable. I'll tweak it some more to see what can be done.
|
|
|
Post by TinyTerror on Sept 1, 2005 12:04:21 GMT -5
I've got a bunch of new code to test out this weekend. Hopefully I can get everything stable enough to start adding windower specific functionality to lua. This is what I'm waiting to test right now:
*Improved loading/unloading code. *More robust helper code for the console. *Some very basic error handling stuff.
If I can get this stuff working all the way, I should be ready to move onto the next stage of development.
Also, if you are an experienced C++ or LUA developer and would be interested in helping on this project, please PM me. I only need people with alot of working programming experience. If you have just taken a few programming classes or written a few scripts, you might be able to help me with testing at a later date. But for now, I only need skilled coders. Let me know if you are interested.
|
|
|
Post by TinyTerror on Sept 4, 2005 16:54:56 GMT -5
Things are still going fairly well. Today I ripped out the old lua script loader code and replaced it with new stuff that is much more robust. Now it can catch syntax errors and all sorts of other potential problems. The only problem is that when it does find an error, it writes the error message to stderr, causing FFXI to freak out and threadlock within 10 seconds. Let me tell you, I saw some pretty exotic errors today as all of FFXI's moving parts ground to a halt one by one. This shouldn't be to hard to fix, as I think lua provides hooking mechanisms to intercept errors or to overwrite the build in error handler. Here is what happened today:
*Loading/unloading code APPEARS to be stable. *Argument passing mechanism for scripts is almost in. *Error checking stuff is in, but kills FFXI when it finds an error.
In other news, a good friend of mine has decided to help me out by writing up some gui widgets. This will vastly cut down on the time required for a gui toolkit to be developed. I also have some LUA books comming in on tuesday that should make it easier to get everything working smoothly.
|
|
|
Post by TinyTerror on Sept 10, 2005 23:35:19 GMT -5
Ok, alot happened on thursday. While at work, I rigged up the first library for lunar. Libraries are what extend the functionality of lua to include FFXI stuff. The library I wrote covers some very basic console IO stuff, allowing debug messages to be written to the console. I gave the code out to starhawk, who will be writing some custom game data extraction code based on the general form that I came up with. This custom game data lib will be like FFACT or FFXIread.dll, but specifically designed to run within the FFXI process. Doing this will provide the fastest possible retrieval of data from FFXI. My other friend who is building me some gui widgets is well into the planning phase and should be writing some code soon. Tomorrow I will work some more on the core. Hopefully I can get it stable enought to start attatching library code to it.
|
|
|
Post by platinumtiger101 on Sept 13, 2005 1:16:19 GMT -5
i gotta say i love reading this stuff. its really quite interesting. im a pre med student, sophmore, and i know little about scripting. i play FFXI whenever i can, actually just started in july. im on hades server "quertious" hit me up if your on sometime. keep up all the good work. ^^
|
|
|
Post by platinumtiger101 on Sept 13, 2005 1:18:59 GMT -5
oh one more thing, lol. ive been checkin every link, forum, ... every single page on this site, and i cant seem to find scripts for after the feb update. so if you could help me out it would be much appreciated thanks again
|
|
|
Post by TinyTerror on Sept 13, 2005 8:36:30 GMT -5
The feb update messed scripting up pretty bad. You aren't really going to find too much in the way of 3rd party program scripts around to do stuff for recent versions of the game. New tools are comming to do this stuff
|
|
|
Post by TinyTerror on Sept 15, 2005 15:49:33 GMT -5
Today I did the following:
*Added some script state code to the lua vm. *Finished adding the argument passing code. *Added script attribute methods to the windower library.
I fixed some pretty wierd problems today. The first item listed above was a major fix for a problem thats been bugging me for a while. The problem is a result of allowing the user to run more than one script at the same time. While lua can do this with a bit of threading work, its mechanism for mapping C++ functions makes differentiating between calling scripts within a function a little sticky. Im using pseudo singleton objects for libraries, so there is only one instance of each library object running at a time. Lua requires this for a good reason that I don't really want to explain here. In my code, I have an object called scriptrunner that encapsulates each lua state and its corrisponding thread. When a new script is launched by the user, a new scriptrunner is created and a pointer to each static lib is given to the new lua state to load. So I am dealing with one library used by multiple scripts at the same time. Since the libs are static objects that are in direct contact with lua, getting any state info from the script into the library is hard. I figured out how to get state info into the libraries this afternoon while poking through the lua_State structure. All I had to do was add my own data structure to the lua_State. Easy as pie. Why I didn't think of this before, I will never know. I sorta wanted to avoid directly modding the lua core code in order to make updates to future lua versions easier, but I decided to go along with this anyway. The changes are small, and shouldn't cause that much of a problem for future upgrades. Tonight I slog away at the scriptrunner some more. If I can get it completely stable, it will be a major accomplishment.
|
|
|
Post by TinyTerror on Sept 15, 2005 20:44:00 GMT -5
The scriptrunner is now stable.
|
|
|
Post by TinyTerror on Sept 20, 2005 15:16:42 GMT -5
I made some good progress today:
*Wrote a library for controlling ffxi. *Added error checking for the windower library. *Integrated both libraries into the scriptrunner. *Fixed a really obnoxious compiler bug.
Tonight I will be testing out these new libraries. If things go well, I will be on track for a early beta release of Lunar. I have to say, its looking really good so far. My goal is to release Lunar with pretty much the same level of functionality as autoterror had. With the beta, people should be able to put together some simple scripts to test lunar out and help me perfect it.
|
|
|
Post by TinyTerror on Sept 20, 2005 18:55:54 GMT -5
Testing of libraries is complete. Everything works! This means that lunar is now functional and usable to run scripts within FFXI. Major milestone here! Before this point, the only evidence that I had to show that scripts actually were running was indirect. Now I am actually seeing output in the windower console as my scripts run. I made a whole hell of a lot of progress today. Time for some exp'ing on the old black mage.
|
|
galka
New Member
Posts: 2
|
Post by galka on Sept 21, 2005 13:49:17 GMT -5
lol HI Tiny , This is my First Post here and RPGExperts but i have been a great fan of your work and devotion to the FFXI world of Scripting for the Last 1.5 year . I would like to Say congradulations to you on your accomplishments and all peps helping out. Im happy to see that you have been able to make an other hole in the rabbit Hat ^^ and crack the FFXI scripting. Well cant wait to try out some of the new scripting files and hacks .
From *EDITED* Server Galka the great
|
|