RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

XmlSpawner - Support for literal terminator in setproperties

fwiffo

Sorceror
Most of us, at least the ones that try to use the xmlspawner with most of it's functionality, have faced the truth when they found that there isn't any way to set a long string with slashes and special chars without getting into trouble, not counting that maybe you need to continue to set other properties (spawning a lever that does many actions, a custom text, a spawner that spawns a spawner that spawns a spawner...well the last is kinda absurd...but anyway...).

The XmlSpawner included is against original XmlSpawner found in those forums, is updated to support runuo 2.2 and has a fix against Xmlfind (a null reference exception, that could happen if the xmlfind is used incorrectly)

The Literal terminator is defined in BaseXmlSpawner.cs via a static char, and is the char '§', you can change it to whatever you want.

Example of literal termination:

in spawner book:
simplelever/target1property/@this/is/a/long/string/with/slashes§target2property/simplestring

remember not to put a / right after the §, there is no need for that!
 

Attachments

  • XmlSpawner.7z
    357.7 KB · Views: 85

fwiffo

Sorceror
What features would you like out of XmlSpawner (something that isn't already done, of course)?

I am willing to modify it to update it to the recent needs and to use most recent .net (it's done mostly in .net 1 style, that is mostly surpassed)

I am seeking for ideas, that I lack.
 

merlyn2000

Sorceror
so ... if i understand correctly, this is a RUO 2.2 compatible updated XMLSpawner ? Thats woonderful!

as far as what would be nice to have added to the XMLSpawner system?

  • updated, relevant, understandable help gump/system. too many people never use XMLS to its potential, i believe because it's not well understood. i have used it to create custom champ spawn, quests, and much more. its powerful as it is, but hard to understand.
  • uh ... i can't think of anything that i would want to do with XMLSpawner that i can't do already, except to be able to spawn a spawner ... really, i once wanted to do a quest that would require a spawner to be spawned ...
 

fwiffo

Sorceror
with literal delimiter § you should be able to do so, even if to tell you the truth, I haven't tried, I'll try it.

Anyway, would you mind to share at least some quests, not tough one, to the community, I have found many quests and help outsite those forums, and I for one have done a lot of things, but the things I have done are too tight to a system that to my advice needs to be replaced.
Champ, special spawns, quests, are all things that are hard to do and to understand, but that can be done if there is enough input from who used the xmlspawner in an advanced way, as I've already said, I've done quite a thing in advanced way, but my ways require heavily modified xmlspawner, even beyond modifies I've pubblished (you would require even my shard scripts...).
 

merlyn2000

Sorceror
i dont have any of my old work anymore, i del'd my archive about a year ago ... but ... my intention is to do more XMLS work, especially if 2.2 is compatible with XMLS. in such a case, i would be honored to know that people are using my XMLS work.

that quest i wanted to do requiring a spawned spawner, would be an NPC invasion. the spawner was to spawn 2 clones of itself, then delete itself, thereby causing a growing invasion force; as long as it's main character was still on the shard. the storyline would have the player make his way to the 'boss', and once the boss was dead the invasion force subsided. i eventually wrote it as a true c# script, and before i turned it live, my server admin shut us down.
 

fwiffo

Sorceror
It should be possible, in the past you would be limited by the literal, now you can do infinite literals as long as you put an end to a literal @ with the delimiter §

Spawning a spawner and modifing it should be feasible, if you encounter difficulties let me know, I'll be willing to mod the xmlspawner to let it be possible if it's not.
 

merlyn2000

Sorceror
It should be possible, in the past you would be limited by the literal, now you can do infinite literals as long as you put an end to a literal @ with the delimiter §

Spawning a spawner and modifing it should be feasible, if you encounter difficulties let me know, I'll be willing to mod the xmlspawner to let it be possible if it's not.


i am in the middle of trying to upgrade my current server to 2.2 ... after i get that done ill write the invasion force system again using XMLS and you can have it to include in your quests ...
 

merlyn2000

Sorceror
i havent had aa chance to look through a solution but i get these errors when i run your XMLS package against RUO 2.2 ...

Code:
RunUO - [www.runuo.com] Version 2.1, Build 4272.35047
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ Customs/XmlSpawner/XmlSpawner Core/XmlSpawner2.cs:
    CS0535: Line 38: 'Server.Mobiles.XmlSpawner' does not implement interface me
mber 'Server.ISpawner.Remove(Server.ISpawnable)'
    CS0535: Line 38: 'Server.Mobiles.XmlSpawner' does not implement interface me
mber 'Server.ISpawner.HomeLocation'
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
 

merlyn2000

Sorceror
ok. dropped right in for SVN:

Code:
RunUO - [www.runuo.com] Version 2.2, Build 4701.21653
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...done (2862 items, 600 mobiles) (1.20 seconds)
Regions: Loading...done
World: Loading...done (0 items, 0 mobiles) (0.03 seconds)
Restricting client version to 6.0.1.10. Action to be taken: LenientKick
This server has no accounts.
Do you want to create the owner account now? (y/n)


and the 'release version:

Code:
RunUO - [www.runuo.com] Version 2.1, Build 4272.35047
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 64-bit processors
Scripts: Compiling C# scripts...done (0 errors, 0 warnings)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...done (2630 items, 560 mobiles) (1.12 seconds)
Regions: Loading...done
World: Loading...done (104468 items, 2417 mobiles) (3.29 seconds)
Restricting client version to 6.0.1.10. Action to be taken: LenientKick
This server has no accounts.
Do you want to create the owner account now? (y/n)


good job!
 

fwiffo

Sorceror
Hello. When i Choose to spawn FactionGuard its spawns me simple BaseGuard not FactionGuard.???
uhm, I don't think this is a spawner fault, maybe the factionguard requires some parameters to be spawned, since, I have to think, it is a derived type of baseguard, anyway, I repeat, this has nothing to do with the spawner modifications pubblished here.
 
Top