Kita submitted a new resource:

UO OpenAI Project - Bringing the world of AI to Ultima Online

The incorporation of artificial intelligence (AI) into game development has opened up a whole new world of possibilities. By using advanced machine learning algorithms, game developers can create more immersive and dynamic gaming experiences that were previously unimaginable.

One company at the forefront of this movement is OpenAI, a leading research organization that has made significant strides in the field of AI. Their cutting-edge technologies have been used to create some of the most...

Read more about this resource...
 
.Net2.0 RunUO svn1071
=====================

Error:

+ Customs/1/TomMacDonald.cs:

CS1519: Line 9: Invalid token '=' in class, struct or interface member declaration

CS1519: Line 12: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 15: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 15: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 16: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 16: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 17: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 17: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 18: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 18: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 19: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 19: Invalid tag '(' in class, structure or interface member declaration

CS1525: Line 118: Invalid expression item ">"

CS1002: Line 118: required;

+ Customs/1/UOOpenAI.cs:

CS1056: Line 337: Unexpected character "$"

CS1056: Line 349: Unexpected character '$'

CS1056: Line 351: Unexpected character "$"

CS1056: Line 381: Unexpected character '$'

CS1056: Line 385: Unexpected character '$'

CS1056: Line 389: Unexpected character '$'

CS1056: Line 392: Unexpected character "$"

CS1056: Line 394: Unexpected character "$"

CS1519: Line 198: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 225: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 231: Invalid tag '=' in class, struct or interface member declaration

CS1519: Line 231: Invalid tag '(' in class, struct or interface member declaration

CS1519: Line 240: Invalid token '=' in class, structure or interface member declaration

CS1519: Line 240: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 250: Invalid token '=' in class, structure or interface member declaration

CS1519: Line 250: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 256: Invalid tag '=' in class, structure or interface member declaration

CS1519: Line 256: Invalid tag '(' in class, structure or interface member declaration

CS1519: Line 264: Invalid token '=' in class, struct or interface member declaration

CS1519: Line 264: Invalid tag '(' in class, struct or interface member declaration

CS1002: Line 463: should be entered;

Scripts: One or more scripts could not be compiled or no script files were found

-Click Close to exit, or press R to recompile
 
Your using an older version of ServUO, which in turn is using an older version of c#, this error is due to how I concat the strings in this project!

I'll provide a alternate for people using the older ServUO, I should have it up in a few hours!
 
Was about to ask what the difference between this and your other post were but noticed you took that one down haha, is this just a more polished version of it?
 
Was about to ask what the difference between this and your other post were but noticed you took that one down haha, is this just a more polished version of it?
I wanted to make sure the project had a proper home and able to update frequently while I work on it! The version I just pushed to the website is polished, I had worked out the last little bug and added more features to make it efficient and expandable for future features!
 
Very nice! Love the website it looks good, your links you have here are dead though. The others below it work fine.
1672628744330.png

In your old thread you had posted the code to add to BaseCreature to enable this for all mobs, do you happen to have that code snippet still?
 
I've rewrote it to not need the basecreature.cs, I just uploaded the newest version that should work on all servers as well! With this new system, just drop UOOpenAI.cs in your scripts and use the TomMacDonald.cs as a example of what to add to a mob for the AI to be incorporated!
 
I was wanting to add this to all NPC's was the goal haha, but then again I suppose that could get a little crazy I suppose one by one will have to do.
 
Ya I would just add this to a few special ones atm, The cost for tokens can become a issue, this is why I designed the system to store answers to questions, reducing the need to call the ai, overtime it should have a repo of QA a player base is commonly asking! It wouldn't take much to add it to the basecreature though, the code in the example mob can be placed into the Base OnSpeech().

*Jan 1/23 11pm mtn time
As of this post, I just uploaded the latest version, streamlined the API, only calling Davinci now, Curie was too dumb, lol!

I reworked the style of the response, should now get replies that sound more fantasy, old English!

Added admin commands, RESETAI, will reset the stored answers & debug on/off will toggle a message with the raw reply from ai to see if there is garbage replies coming back or what not!
 
Last edited by a moderator:
As of Latest Release, Added the command to manually add QA!

In game, talking to any AI NPC as an Admin+, use the command
Code:
~Add:Profession(Title ie: Cook, don't use "the" or have spaces):Question:Answer

This will allow you to add predefined QA into the system.
 
Update :
  • Expanded the Storage, overall storage is more robust and organized
  • Moved Storage to its own file, now there is an additional file to download
  • Added more admin commands to control storage, see website for details on usage
  • Refactored some code and removed some design comments to clean up scripts
 
.Net2.0 RunUO svn1071
=====================
Error:

+ Customs/1/TomMacDonald.cs:

CS1525: Line 108: Invalid expression item ">"

CS1002: Line 108: should be input;

+ Customs/1/UOOpenAI.cs:

CS1002: Line 298: It should be entered;

Scripts: One or more scripts could not be compiled or no script files were found

-Click Close to exit, or press R to recompile
 
.Net2.0 RunUO svn1071
=====================
Error:

+ Customs/1/TomMacDonald.cs:

CS1525: Line 108: Invalid expression item ">"

CS1002: Line 108: should be input;

+ Customs/1/UOOpenAI.cs:

CS1002: Line 298: It should be entered;

Scripts: One or more scripts could not be compiled or no script files were found

-Click Close to exit, or press R to recompile
As for the TomMacDonald.cs error, it doesn't like
Code:
        public override bool ClickTitle => false;
just remove it, I will update this edit in the next update, as for the error you received from UOOpenAI.cs, not sure what the error is, not clear from message and line 298 is just a return false within a bool method! After you edit Tom, run and see what error comes up, then post it here if you get one and I'll look into it!
 
Update :
  • Updated Storage System
  • Added SaveAI and LoadAI to/from text file (Stored in Data Folder UOOpenAI.txt)
  • Edit file of those crazy replies the AI gave if you prefer, follow format [P: (Profession) Q: (Question) A: (Answer)]
  • Bug Fix added to Example Mob
  • Fixed commands being stored as questions
 
So when I ask a question I get the standard random reply in game, I turned on debug mode and I can see the AI response in the console but I am not seeing the NPC speak it in game. Sometimes if you repeat the question he will answer you with the first response but the console also shows a secondary AI response.

1672897620159.png
 
This is by design, I'll do my best to explain what is going on!
The system is designed to take a question from a player and send it to the AI API,
Due to the lag I didn't want to freeze up the game so the reply is being awaited separately via async
If it was the very first time the question was sent to the npc/ai, there are random canned messages saying they need to ponder the question
but this changes for question they already been asked and the reason will come clear once I explain the reply that is awaiting
the reply once received goes into the dictionary and stored by Profession, Question and default max 10 answers per question
now we know they are in dictionary, this brings us back to what player gets back as a reply
it is a random reply picked from the stored replies for that question

Now if you would like to have more answers per question, that is adjusted in the ProfQAStore Class
I also added some new commands to save and load a text file which exposes the dictionary of stored Q&A
It can be edited to better suit what a shard wants, the ai can be a little whacky at times

Well I hope that clears the process up!


Update :
Updated Storage File Save/Load - Now Saves a file for each prof in Data/UOOpenAI folder
Updated Console Messages on start up : added version number
 
Last edited by a moderator:
Update :
  • Refactored entire system ( One of many to come)
  • Fixed issue with some in game commands not working
  • added save/load to Tom so you might need to delete Him if you are using him, I don't use the versioning when building out scripts, sorry!
 
As for the TomMacDonald.cs error, it doesn't like
Code:
        public override bool ClickTitle => false;
just remove it, I will update this edit in the next update, as for the error you received from UOOpenAI.cs, not sure what the error is, not clear from message and line 298 is just a return false within a bool method! After you edit Tom, run and see what error comes up, then post it here if you get one and I'll look into it!

Core: running in. NET Framework Version 2.0.50727

Core: The server is using 4 64-bit CPUs for optimization

Script: Loading C # script Load failed (4 errors, 0 warnings)

Error:

+ Customs/UOOpenAI/API/UOOpenAI.cs:

CS1519: Line 15: Invalid tag '=' in class, struct or interface member declaration

CS1519: Line 17: Invalid tag '=' in class, struct or interface member declaration

CS1002: Line 157: should be entered;

+ Customs/UOOpenAI/Commands/AIActivation.cs:

CS1056: Line 21: Unexpected character "$"

+ Customs/UOOpenAI/Commands/DebugAI.cs:

CS1056: Line 21: Unexpected character "$"

+ Mobiles/AI/Creature/BaseCreature.cs:

CS1519: Line 3750: Invalid tag '=' in class, struct or interface member declaration

Script: One or more scripts could not be compiled or the script file could not be found

-Click Close to exit, or press R to recompile

=========================================
It should be the old. net version syntax problem. I hope God can help, thank you!
 
As I am continually advancing my skills and knowledge, I have made the decision to no longer support older versions of C#. I understand that some individuals may still be using outdated software, and as a result, they may miss out on the benefits of my recent developments. While I thoroughly enjoy programming, I also must consider the effort required to retroactively adapt my code for those who have not made the effort to upgrade or resolve minor code issues on their own. I deeply apologize for any inconvenience this may cause, but I believe it is important to keep up with the latest advancements in technology in order to maintain professional standards and continue delivering exceptional work.
 
As I am continually advancing my skills and knowledge, I have made the decision to no longer support older versions of C#. I understand that some individuals may still be using outdated software, and as a result, they may miss out on the benefits of my recent developments. While I thoroughly enjoy programming, I also must consider the effort required to retroactively adapt my code for those who have not made the effort to upgrade or resolve minor code issues on their own. I deeply apologize for any inconvenience this may cause, but I believe it is important to keep up with the latest advancements in technology in order to maintain professional standards and continue delivering exceptional work.
That's really a pity. Not all Server are updated with the latest version. We are one of them. Thank you very much for your reply.
We will continue to provide an expanded version with our own characteristics, a balanced world of human beings and elves, and welcome your guidance at any time.
 
That's really a pity. Not all Server are updated with the latest version. We are one of them. Thank you very much for your reply.
We will continue to provide an expanded version with our own characteristics, a balanced world of human beings and elves, and welcome your guidance at any time.

There nothing stopping anyone from converting these scripts to work with older versions of Net. I am just pulling my hat from that ring!
 
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'CompletionRequest' could not be found (are you missing a using directive or an assembly reference?) Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAI.cs 157 Active
Error CS0246 The type or namespace name 'Engine' could not be found (are you missing a using directive or an assembly reference?) Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAIAPI.cs 15 Active
Error CS0246 The type or namespace name 'Engine' could not be found (are you missing a using directive or an assembly reference?) Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAIAPI.cs 27 Active
Error CS0246 The type or namespace name 'CompletionRequest' could not be found (are you missing a using directive or an assembly reference?) Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAI.cs 93 Active
Error CS0246 The type or namespace name 'CompletionResult' could not be found (are you missing a using directive or an assembly reference?) Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAI.cs 161 Active
Error CS0246 The type or namespace name 'CompletionRequest' could not be found (are you missing a using directive or an assembly reference?) Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAI.cs 165 Active
Error CS1729 'OpenAIAPI' does not contain a constructor that takes 2 arguments Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAIAPI.cs 18 Active
Error CS0103 The name 'Engine' does not exist in the current context Scripts C:\Users\Guillaume\Source\Repos\ServUO2\Scripts\API\UOOpenAIAPI.cs 29 Active

Hello good sir,

Iam having trouble compilling with Visual Studio.
I've follow the tutorial, everything is installed.
I am using a fresh build with everything up to date from git.

Do you know what I did wrong?
Thanks!
 
Looks like you didn't add the Lib correctly, use Manage Nuget and grab the latest and install it that way!1675914985408.png
 
I was using OpenAI version 1.4.0, it didn't work.
I tried 1.3.0 and they were another set of errors.

And at last, version 1.2.0 seems to have compiled.
Thanks for the screenshot, I'll try it tomorrow :)
 
I was using OpenAI version 1.4.0, it didn't work.
I tried 1.3.0 and they were another set of errors.

And at last, version 1.2.0 seems to have compiled.
Thanks for the screenshot, I'll try it tomorrow :)
I figured it was the issue I ran into when first building this, out of all the c# libs out there, I could only get this one to work, due to the author not knowing how the Nuget worked, His project is all over the place! Other projects from other authors out there are either incomplete or don't work with the ServUO Sever, once we get the next api for chatgpt, I'll make a better attempt at making my own lib to specifically target the AI for ServUO with a lib designed around ServUO usage!
 
Your using an older version of ServUO, which in turn is using an older version of c#, this error is due to how I concat the strings in this project!

I'll provide a alternate for people using the older ServUO, I should have it up in a few hours!
so there will never be an Runuo version right?, some of us still use Runuo hehe, great implementation!
 
I'll consider it when I finish the newer version, I understand people use older versions but you also have to understand that it is impossible to write for everyone with a server, they must take the responsibility of there decisions, when you use older product, then expect to be shut out of newer addons! Plus some things can only be achieved using the newest features of c# so I might not even be able to accommodate those that for what ever reason use older servers!
 
The biggest reason for staying on older servers is usually because of the amount of time and work that went into customizing the server, I for one am still on Pub 57ish because of the extreme amount of customization I've done. Having to redo all of that is more work than an upgrade is worth. I have however and will continue to do so as time permits slowly integrate more updated code from the repo thanks to GitHub and their commit history. But yes a LOT of servers are still using older versions of RunUO or ServUO, most of what is done on here is usually focused towards Pub 57 with some also including Pub 58 as it's soon to be released.
 
The biggest reason for staying on older servers is usually because of the amount of time and work that went into customizing the server, I for one am still on Pub 57ish because of the extreme amount of customization I've done. Having to redo all of that is more work than an upgrade is worth. I have however and will continue to do so as time permits slowly integrate more updated code from the repo thanks to GitHub and their commit history. But yes a LOT of servers are still using older versions of RunUO or ServUO, most of what is done on here is usually focused towards Pub 57 with some also including Pub 58 as it's soon to be released.
And the point is? if you can't take the effort to convert the system to work on your shard, then why should I? Give me a reason to turn my hobby into a hassle? I don't even see anyone taking the effort to give ratings to the system, so why should I do anything more than I want to?
 
I figured it was the issue I ran into when first building this, out of all the c# libs out there, I could only get this one to work, due to the author not knowing how the Nuget worked, His project is all over the place! Other projects from other authors out there are either incomplete or don't work with the ServUO Sever, once we get the next api for chatgpt, I'll make a better attempt at making my own lib to specifically target the AI for ServUO with a lib designed around ServUO usage!

If you update the project with a new library, will the updates retain compatibility with what has been done with the current version? (Just asking to determine whether its better for me to implement this now, or if I should wait for a future version).

Thanks, and great work with this, and thanks for sharing it! This is one of the most innovative custom scripts released here for quite some time!

HR
 
Update : Currently working with a Local AI : You can too via GPT4ALL

Future plans are to train a local model as a Dynamic Game Engine, more details will be posted as the tech continues to advance in the coming weeks!
 
Error messages what can it be.

Just to mention I think the idea is really great!!!

Open_API = 1.2.2 (OpenAI_Updated)

.dll is registered at Assemblies.cfg

UOOpenAISettings.cs = is the key in it

the netstandard version can i update it?

Or I got it wrong somewhere.

CamBild135689.png
 
Last edited:
Back