ScriptUO

Scripting Resources & Utilities => Stealth Client => Stealth archive => Topic started by: TrailMyx on October 23, 2014, 11:34:55 AM

Title: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 23, 2014, 11:34:55 AM
So I've been slowing working through the .NET Stealth wrapper and I had a bit of an idea that I though would be interesting.

Probably one of the biggest advantages of EasyUO is the simplicity of the language and how easy it is to implement quick scripts using the limited syntax.  So as I write the wrapper, I'm actually going to write 2 separate wrappers.  One for the full implementation of the Stealth API, and another one that has been simplified to allow for a general 1:1 syntax translation that will feel very comfortable to EasyUO users.  I've already written converters that translate EasyUO to Lua for the UI stuff, so it should be pretty easy to convert the existing menus being converted to .NET forms.

A step next might be for me to dust off the code I originally wrote for ScriptUO that emulates the UI look/feel from Delphi/EasyUO.  I kinda want to stay with generic .NET forms to make my life easier.

My intentions are not to write a 1:1 emulator, but to make the programming transition from EasyUO to .NET as easy as possible.

Anyhow, thoughts?
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Crome969 on October 23, 2014, 11:51:15 AM
So I've been slowing working through the .NET Stealth wrapper and I had a bit of an idea that I though would be interesting.

Probably one of the biggest advantages of EasyUO is the simplicity of the language and how easy it is to implement quick scripts using the limited syntax.  So as I write the wrapper, I'm actually going to write 2 separate wrappers.  One for the full implementation of the Stealth API, and another one that has been simplified to allow for a general 1:1 syntax translation that will feel very comfortable to EasyUO users.  I've already written converters that translate EasyUO to Lua for the UI stuff, so it should be pretty easy to convert the existing menus being converted to .NET forms.

A step next might be for me to dust off the code I originally wrote for ScriptUO that emulates the UI look/feel from Delphi/EasyUO.  I kinda want to stay with generic .NET forms to make my life easier.

My intentions are not to write a 1:1 emulator, but to make the programming transition from EasyUO to .NET as easy as possible.

Anyhow, thoughts?
The idea sounds great! I would go that far saying, write the c# wrapper and implement it as Core Module for your ScriptUO Editor. So you dont need to write 2 Wrappers, just 1 Wrapper wich works for c# and Add the Power of Scripting with the Editor by using the Wrapper.
A General translation would be impossible. Easyuo has some Strong Points wich incorporate with Stealth and Stealth has also strong Points wich never can be done by easyuo.
I personally suggest going more the way of writing an by Easyuo inspired Languange with the power of UI wich corporates with your wrapper.

Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 23, 2014, 12:04:11 PM
I had thought several times about stubbing Stealth into ScriptUO to help enable the interpreter for the client interface.  I just never took the time to play with the API, so that's kinda why I'm working through the wrapper now.  I'm getting the feel for what's doable and what's not.  So we'll see how that goes.  In the mean time, I'm just jazzed that I have the beginnings of the wrapper going and I'm actually causing things to happen on my Lexia character.  :)

I'm rusty, dusty and dazed in my UO and C# recollection.  lol
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Orich on October 23, 2014, 02:17:23 PM

Where were you a year ago TMX? :)

Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 23, 2014, 02:49:13 PM

Where were you a year ago TMX? :)



No kidding.  Just slumbering on my pile of gold in the bowels of Mt. Dhoom.  If only I had your C# skills.  Anyhow, who knows how long this fresh set of AA batteries will last!
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Cstalker on October 23, 2014, 03:31:21 PM
I feel a Afk check cumming on mahahhahahahahah
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 23, 2014, 03:52:15 PM
I feel a Afk check cumming on mahahhahahahahah


And you think I haven't already worked around that?  Silly rabbit.  ;)

I'm just standing around Gelatinous Cubes place north of Malas.  Mostly just staring at a wall.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Orich on October 23, 2014, 09:25:09 PM

Where were you a year ago TMX? :)



No kidding.  Just slumbering on my pile of gold in the bowels of Mt. Dhoom.  If only I had your C# skills.  Anyhow, who knows how long this fresh set of AA batteries will last!

My C# skills aren't that special ... C# is just ezmode as far as languages go

I have just about no time lately ... but if you want a fork of the latest (old as hell) original DLL source let me know.. 


If I do have time, I wouldnt mind helping out a bit too ... It's been a year since I touched C#, so I need some freshening up.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 23, 2014, 09:40:29 PM
My C# skills aren't that special ... C# is just ezmode as far as languages go

I have just about no time lately ... but if you want a fork of the latest (old as hell) original DLL source let me know.. 


If I do have time, I wouldnt mind helping out a bit too ... It's been a year since I touched C#, so I need some freshening up.

This goes along way to describe my C# skills.  There's a reason I never released the source to ScriptUO.  IT'S FUGLY!  Frankly, it's a bit embarrassing.

I'm just trying to learn the API by wallowing around in the wrapping of the statics.  I've fought through a whole bunch, but there's a whole bunch more.  I've been putting aside the things where I need to pack a structure with field accessed variables as well as the listarray stuff.  There's some conversions from Delphi to C# conversion that aren't clear to me.  Since I'm trying to do this without peaking be behind the curtain, it's going to be interesting.  Everytime I do something like this, I realize how much there is still left to learn about C#.

I really like the organization you were doing for the C# data objects.  It would be nice to collaborate with you regarding how you originally did it.  Honestly, your videos more than explain your intentions.

Anyhow, glad to see you around again.  Don't be a stranger - you'll have fun watching me trying to juggle flaming cats while learning the unicycle.  heh
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 24, 2014, 03:27:22 PM
Slowly plodding.  Wrapper currently sits at:

42.6% written & tested
26.6% written & untested
10.3% written and failed test
19.1% unwritten or undocumented
1.4% dunno why this doesn't add up to 100%

Progress will slow greatly now since there are some hard things to figure out.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: gimlet on October 24, 2014, 03:57:39 PM
New Math

30+30+30=100

At least that is how the federal government adds things up!
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 24, 2014, 04:47:37 PM
At least that is how the federal government adds things up!

Ain't that the truth!

Extra annoying because the function count in the wrapper is suppose to be 424 functions, but I only account for 423.  Bleah.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: dxrom on October 24, 2014, 11:40:58 PM
EasyUO... stealth?!

(http://img2.wikia.nocookie.net/__cb20131216034154/gta-myths/images/5/5c/No.jpg)
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 25, 2014, 07:26:16 AM
EasyUO... stealth?!


Heh, think of it as Stealth-lite.  It makes sense because most people just aren't programmers that are casual scripters.  Since both APIs will be available, then they can use the EasyUO-friendly API to start with, but then crack into the full Stealth presentation when they finally take their training wheels off.

Purists... Sheesh.  :p
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 26, 2014, 05:36:14 PM
3 hopelessly failed commands
18.9% unwritten
30.2% written/untested
49.7% written/tested

I've been spending my time today organizing all the functions and also comparing my existing dll translation/comparison to the online documents to some new information that Crome gave me today.  So some progress today.  Don't get to disheartened by the lack of motion of the written/tested number.  I should start testing the untested section now that they have been reconciled with the most up-to-date information.

Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Crome969 on October 26, 2014, 11:42:03 PM
Interesting for me :

1) How is the time delay management, as sample you fire "AddToSystemJournal", the last time we tried to manage via stdcalls it was in the 2-3s delay.
2) For your EasyUO friendly api, do you consider allowing structs? Some data in Stealth (Such as Gumps, Properties and such) with massive data maybe a little bit strange to be emulated easyuolike.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 27, 2014, 08:07:02 AM
Interesting for me :

1) How is the time delay management, as sample you fire "AddToSystemJournal", the last time we tried to manage via stdcalls it was in the 2-3s delay.
2) For your EasyUO friendly api, do you consider allowing structs? Some data in Stealth (Such as Gumps, Properties and such) with massive data maybe a little bit strange to be emulated easyuolike.

1) Unsure at this point.  That's one of the things I'm trying to untangle right now.
2) Yes, everything that the API presents will be available.  I'm just going to be adding wrapper methods that are familiar to the general EasyUO user.  From there, people can expand their usage to allow for everything the wrapper has to offer.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 29, 2014, 09:15:05 AM
52.6% written/tested. 

It takes quite a while to get things setup to test individual commands, especially since I haven't really played UO for a while so I'm kinda remembering how to play the game.  Lol.  And there are 163 untested commands left to test. This is another reason to implement a useful subset to the API.  There are 424 commands exposed in the wrapper, so that right there prevents 99% of the noobz out there due to the daunting nature.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: gimlet on October 29, 2014, 11:41:46 AM
52.6% written/tested. 

It takes quite a while to get things setup to test individual commands, especially since I haven't really played UO for a while so I'm kinda remembering how to play the game.  Lol.  And there are 163 untested commands left to test. This is another reason to implement a useful subset to the API.  There are 424 commands exposed in the wrapper, so that right there prevents 99% of the noobz out there due to the daunting nature.

nice!
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Neo on October 29, 2014, 11:50:30 AM
I think this is a great idea actually. I had thought about doing something similar in one of my impulses, back in the day, but never got around to it. Another thought I had was to write a lua scripting interface for Stealth which would enable OEUO users to migrate easily as well... It could be done in C++ or C#, but again, I never got around to it heh...

Looking forward to seeing your work man ! Thank you for taking the time to do this for everyone!

Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 29, 2014, 12:34:43 PM
I have to say NO to Lua unfortunately.  I'm 95% a fan of it, but there are some fundamental issues that prevent me from really liking it.  If Lua adds the goto/label ability as well as loop short circuiting, then I might reconsider.  Heck, with a wrapper, there's no reason why they can't interface to it themselves.  :)

What I'll probably do is stick with C# and wrap the execution into something like ScriptUO as a programming interface.  So you can load C# scripts and execute directly from the ScriptUO.  Much like how UOMachine did things, but hopefully with a more stable client interface.  I want to keep it open to tools like SharpDevelop so that you can do really nice forms if you chose to do so. 

I'm trying to think of ways to cater to the EasyUO crowd and not really the OEUO people.  OEUO people can pick up either python, Delphi, C#, VB much easier then the vast majority of people who use just EasyUO.   It's that short bus that I'm interested in bringing into the fold and perhaps introduce them to a much better language at the same time.

Anyhow, that's alot of dreaming.  Who knows how much stomach I have for anything so far.  Only time will tell.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Tidus on October 29, 2014, 04:45:01 PM
I love that you are taking this on!
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: adaleg on October 30, 2014, 06:27:53 PM
What are you using as a parser? You mentioned you wrote a parser from EasyUO to Lua, are you doing it thought regex?
I normally use this guy https://irony.codeplex.com/ as a DSL creator, I think it can do grammar to grammar parser too!

Cheers 
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 30, 2014, 06:33:20 PM
For this project, I'm only writing the wrapper to bridge the managed to unmanaged world.  My EasyUO parser I wrote some time ago is a combination of regex and brute-force C#.

I'll look into your suggestion though.  I'm always looking for cool ways to make my life better!
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Crisis on October 30, 2014, 07:58:06 PM
I am looking forward to trying this out when it is done. I am guessing that it allows you to use euo scripting commands in stealth? I am new to this lol.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on October 30, 2014, 10:13:27 PM
I am looking forward to trying this out when it is done. I am guessing that it allows you to use euo scripting commands in stealth? I am new to this lol.

I'll try to make the wrapper object and associated usable data have near EasyUO function.  I'll also publish a group of my helper functions (runebook travel, railing, gump manipution, item evaluation, etc.)  Hopefully with enough basic examples,  it will help people get started.  You'll still be programming in c# though.  But if you are comfortable with EasyUO functionality, then this presentation will be familiar.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on November 07, 2014, 06:01:12 PM
My home office is coming back online as I get things moved back in after painting, dumpster runs and new furniture building.  It's a very cozy area, so I'll be doing some more testing on the wrapper.  Huzzah!
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Tidus on November 10, 2014, 06:58:41 PM
My home office is coming back online as I get things moved back in after painting, dumpster runs and new furniture building.  It's a very cozy area, so I'll be doing some more testing on the wrapper.  Huzzah!

Did you do that just so that you could do the testing and wrapper?  I had to add an extra monitor to my computer when I got into my programming class.  Doing Java right now.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on November 10, 2014, 07:06:01 PM
Lol, the house stuff is a diversion and excuse to screw around and not work on the wrapper.  heh
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Orich on November 13, 2014, 06:57:37 PM
Lol, the house stuff is a diversion and excuse to screw around and not work on the wrapper.  heh

Beware.  I'm pretty sure this is how Rome fell.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on November 14, 2014, 08:08:50 AM
Beware.  I'm pretty sure this is how Rome fell.

No kidding.  I've already found another diversion.  Re-ripping ones CD collection seems to be the latest.  lol
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Orich on November 14, 2014, 04:53:07 PM
Beware.  I'm pretty sure this is how Rome fell.

No kidding.  I've already found another diversion.  Re-ripping ones CD collection seems to be the latest.  lol

Rome has fallen.  It was a nice dream ... oh well, let's move on.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on November 14, 2014, 06:57:05 PM
Rome has fallen.  It was a nice dream ... oh well, let's move on.

Na, not so fast.  My 8-core CPU is carving through these disks too quickly.  I'll have no other excuse by Sunday.  ;)
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TaskForce on November 18, 2014, 05:43:21 AM
Interesting read this all, even if I only understand the half of it.
Lucky me, I am not a programmer, only administrator. So only PowerShell scripts and searching errors in users VBA constructs are my touch to programming.
Too bad that there is no built in PowerShell support in UO client ;)
Greetings
TaskForce
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: Orich on November 20, 2014, 06:14:51 PM
Interesting read this all, even if I only understand the half of it.
Lucky me, I am not a programmer, only administrator. So only PowerShell scripts and searching errors in users VBA constructs are my touch to programming.
Too bad that there is no built in PowerShell support in UO client ;)
Greetings
TaskForce

Honestly, if you can write Powershell scripts with any sort of competence / fluency, then I assure you learning C# isn't some unreasonable tantamount effort.

Some of the reflection syntax can seem a bit exotic, but you can accomplish wonders without ever touching it / learning about it.
Title: Re: New idea for a EasyUO-friendly Stealth API
Post by: TrailMyx on November 20, 2014, 06:19:32 PM
And right there Orich summed up my C# programming experience.  :)

I had never written a C# program before aside from a couple test programs, but I managed to write ScriptUO.  All it takes is just starting small and working your way up.  You can be assured that anything I'm involved with will be simple -for my own sake.  heh

I guess that's what inspired me to form a basic wrapper with the EasyUO "programmer" in mind.  Now to just finish it.