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!

XmlSiege system for damageable structures - beta [RunUO 2.0]

Actually, there could be a some kind of capture option for players who don't own it, but it should be something like the Pack timer, and any thing the owner does Load Fire, move, pack, or etc, would cancel out the capture timer. and the owner, shouldn't be with in Oh say 8 tiles of it or so when they use the capture option. and maybe a Locked Down option that would prevent it from being captured, or used, so if they wanted to leave it on their roof for decoration or something. Like Lock, and Unlock context.
 

ArteGordon

Wanderer
MetallicSomber said:
Actually, there could be a some kind of capture option for players who don't own it, but it should be something like the Pack timer, and any thing the owner does Load Fire, move, pack, or etc, would cancel out the capture timer. and the owner, shouldn't be with in Oh say 8 tiles of it or so when they use the capture option.
the pack time restriction works like that. Other players can take siege weapons by trying to pack it themselves, but there cannot be anyone within 2 tiles (that's the default which of course you can adjust) when the pack time requirement is up or it is cancelled.
So if someone tries to take the weapon, you just need to drive them off. Same thing if you try to run away with your weapon, others can prevent it by getting in your face.

The drag option will also be something like that.

Weapons dont have a fixed owner because I didnt like the idea of them being protected in any special way. I like the idea of risk of loss when using them unless you can actually protect them with force.

(edit)

they can be locked down by just setting the IsDraggable and IsPackable flags to false. They can also be made to have a fixed facing by setting the FixedFacing property to true. Those are designed to be used for fixed GM placed weapons that players cant reposition or take.

I think the idea of restricting packing/dragging to house owners when they are placed in a house is a good idea.
 
I may have a small problem. may just be an installed problem or way I did it, but I used that method to make all base houses attackable (and base boats) It works. But, when I do a restart, all the old houses that where attackable aren't anymore. Any ideas?
 

ArteGordon

Wanderer
MetallicSomber said:
I may have a small problem. may just be an installed problem or way I did it, but I used that method to make all base houses attackable (and base boats) It works. But, when I do a restart, all the old houses that where attackable aren't anymore. Any ideas?

Did you do a save between the time that you added the attachments and the restart?
You can check to make sure the xmlsiege attachments are still there using [xmlfind.
Just check the 'attachment type' box and enter xmlsiege in the text field under it and do a search.
 
Ya I did a save and restart, but I didn't add the atachment manually in game, I added it into the basehouse script using:

// automatically add an xmlsiege attachment to this object
XmlAttach.AttachTo(this, new XmlSiege());

Is there some seralization, that needs to be added for them to always be attackable?

*EDIT* catapults, and the ram also don't seem to want to work after a restart.
 

ArteGordon

Wanderer
MetallicSomber said:
Ya I did a save and restart, but I didn't add the atachment manually in game, I added it into the basehouse script using:

// automatically add an xmlsiege attachment to this object
XmlAttach.AttachTo(this, new XmlSiege());

Is there some seralization, that needs to be added for them to always be attackable?

*EDIT* catapults, and the ram also don't seem to want to work after a restart.

no serialization changes are required for any object.

Do you have the latest version of xmlspawner2 for 2.0 installed?

Did you check for the attachments using [xmlfind? Sounds like they arent being restored.
Attachments have their own serialization independent of items/mobiles done after item/mobile serialization. If you shut down the server by killing the server process before the save is complete instead of going through the admin gump it is possible to corrupt the attachment save.

You could also check to see if there is an error log for attachment deser in your RunUO directory.
 
I reinstalled the XMLSpawner just before adding the siege system to be sure. There was part of the XMLSpawner I could not get to install right, was throwing me errors, all the parts dealing with: originaldamage in BaseWeapon. Install instructuions about that had it listed in three places, in base weapon, and I tripple checked it and still couldn't get it to compile so I removed them. Everything else all the other features, even the ones I thought I may not use, I installed anyways.

As far as restarting, I used the [Restart command, There any diffrence between that and the one on the admin gump?

*EDIT* if its just me having this problem, would you want me to move this to a Support Tread somewhere?
 

ArteGordon

Wanderer
MetallicSomber said:
I reinstalled the XMLSpawner just before adding the siege system to be sure. There was part of the XMLSpawner I could not get to install right, was throwing me errors, all the parts dealing with: originaldamage in BaseWeapon. Install instructuions about that had it listed in three places, in base weapon, and I tripple checked it and still couldn't get it to compile so I removed them. Everything else all the other features, even the ones I thought I may not use, I installed anyways.

As far as restarting, I used the [Restart command, There any diffrence between that and the one on the admin gump?

*EDIT* if its just me having this problem, would you want me to move this to a Support Tread somewhere?

xmlsiege doesnt actually require any of the optional mods to work, but they are good to put in anyway since they will allow all of the optional spawner features and addons to work and they dont really cost anything.

using [restart is perfectly fine.

did you try using [xmlfind before and after restarting to see if the attachments are still there?

Did you look to see if there is any attachment error log in the main RunUO directory?
 
Probably a really stupid question but what would the error log be called if there was one and where would it be?

When I do [xmlfind and search for xmlsiege it dont show anything, and when I do
[xmlfind basemulti 20
it only shows the houses I placed after the last restart.

sorry I forgot to include that in last post. I really do think alot about the help you do by the way :) ya get like this and you get nervious sometimes, and forget things.
 

ArteGordon

Wanderer
If there was an attachment deserialization error, it would add a log file that was named something like 'Attachment Error 3-6-2006-19-39-20.log'. If you had emailing of crash logs enabled, then that file would also be emailed to the same staff that got crash notices.

the next thing that I would check is to see if the attachments are being saved by looking in your RunUO Saves folder and looking in the folder named Attachments to see if you have the attachments.ima, attachments.fpi, and attachments.bin files and that they are not zero length.
 
I gota be missing something somewhere then, cause only thing I got any any of those three files is this:
Code:
         $Server.Engines.XmlSpawner2.XmlDialog       ¹                    €µ!\(ˆÇ      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ                                   Dracondar's lute
      ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ                                     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ  £á    @ Õ<,ˆÇ    samantha              999         0Have you heard about the king's bard Winthrop?. rumor 33         ®I can scarcely believe it myself.  The rumor is that he stole a magical lute from the dragon Dracondar, and Dracondar is offering a handsome reward to anyone that returns it.  1         4Now who in their right mind would help out a dragon?  2         !You might consider helping him?. help,mind,would 3         ’Well, in that case, I happened to overhear someone who claimed to have seen Winthrop in Lord British's castle. That's where I would start looking.aye,yes 4         ]But let me give you a tip.  If you dont remain hidden, I doubt you will be able to catch him. kGIVE/<questnote/name/Dracondar's lute/notestring/Return Dracondar's magical lute/objective1/Find Winthrop.>5   
   
   GI don't blame you. You dont look like the adventuring sort. 'Bit pasty.no 4   !   !   !Could the rumor possibly be true?  -1   "   !   He was so trustworthy.  -1   #   !   A fine day!  -1   $   !   Hmmm, what's that smell?  -1   %   !   It looks like rain.  -1   &   !   .I wish I hadn't drunk so much last night. hic!  -1
And if Im not mistaken thats from one of your XML quests, I had a problem with it though and it crashed the shard, I didn't ever put much effort into figureing out why it crashes, cant even recall what the crash report said now, its been months and months ago.
 

ArteGordon

Wanderer
MetallicSomber said:
I gota be missing something somewhere then, cause only thing I got any any of those three files is this:
Code:
         $Server.Engines.XmlSpawner2.XmlDialog       ¹                    €µ!\(ˆÇ      ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ                                   Dracondar's lute
      ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ                                     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ     ÿÿÿÿ  £á    @ Õ<,ˆÇ    samantha              999         0Have you heard about the king's bard Winthrop?. rumor 33         ®I can scarcely believe it myself.  The rumor is that he stole a magical lute from the dragon Dracondar, and Dracondar is offering a handsome reward to anyone that returns it.  1         4Now who in their right mind would help out a dragon?  2         !You might consider helping him?. help,mind,would 3         ’Well, in that case, I happened to overhear someone who claimed to have seen Winthrop in Lord British's castle. That's where I would start looking.aye,yes 4         ]But let me give you a tip.  If you dont remain hidden, I doubt you will be able to catch him. kGIVE/<questnote/name/Dracondar's lute/notestring/Return Dracondar's magical lute/objective1/Find Winthrop.>5   
   
   GI don't blame you. You dont look like the adventuring sort. 'Bit pasty.no 4   !   !   !Could the rumor possibly be true?  -1   "   !   He was so trustworthy.  -1   #   !   A fine day!  -1   $   !   Hmmm, what's that smell?  -1   %   !   It looks like rain.  -1   &   !   .I wish I hadn't drunk so much last night. hic!  -1
And if Im not mistaken thats from one of your XML quests, I had a problem with it though and it crashed the shard, I didn't ever put much effort into figureing out why it crashes, cant even recall what the crash report said now, its been months and months ago.


That looks like the dialog for the Dracondar's lute quest. Do you have that loaded on your system now?

Generally crashes related to the xmldialogs are due to other custom scripts that have speech handlers that assume that all speech is coming from players and make improper casts. The xmldialogs allow npcs to generate speech that those scripts will also catch.
They are pretty easy to fix by just making the correct checks for playermobiles before casting in those custom scripts.

(edit)

try adding in this debugging code to the Serialize method in XmlSiege.cs

Code:
		public override void Serialize(GenericWriter writer)
		{
			[color=red]Console.WriteLine("Serializing {0} on {1}", this, this.AttachedTo);[/color]
			base.Serialize(writer);

Are you running on a multiprocessor machine by any chance?

This might have something to do with the 2.0 changes in saving.
 
Not sure what that did, but it works :) wheew, good part is I only got to replace one house that beloged to a player lol. a few of the test siege equipment also quit working, but thats just stuff I was using. Anything else I should do you think?

*EDIT* no actually I just got a regular single proccessor.
 

ArteGordon

Wanderer
MetallicSomber said:
Not sure what that did, but it works :) wheew, good part is I only got to replace one house that beloged to a player lol. a few of the test siege equipment also quit working, but thats just stuff I was using. Anything else I should do you think?

*EDIT* no actually I just got a regular single proccessor.

what was it that you did?
 
ArteGordon said:
what was it that you did?
I dono all I did was add that code you gave in the serilazation, on the XmlSiege.cs,

It is doing this between saves now, Before when I posted (I had restarted sevral times) after the auto save it does this:

Code:
World: Saving...Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4001F5E1 "TownHouse"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x40001004 "SiegeCannon"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4000090E "SiegeRam"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x400008CE "SiegeCatapult"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x400006C6 "SmallOldHouse"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4002DA52 "TownHouseDoor"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4002DA51 "TownHouseDoor"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4002DA4F "TownHouse"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x40007697 "PirateCamp"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4000525F "SmallOldHouse"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4001F5E7 "TownHouseDoor"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x40000695 "SiegeCatapult"
Serializing Server.Engines.XmlSpawner2.XmlSiege on 0x4001F5E5 "TownHouseDoor"

I had thought that maybe the house wasn't there long enough for the auto save to kick in, before I did a [restart, but one of the houses that became unattackable again, was a player house that we placed, and it was there for atleast 8 hours before the restart. Infact, we demolished his pre Siege install house because it wasn't attackable. The catapult and ram where also there about that long too before they wen't unattackable.
 

ArteGordon

Wanderer
so is the current situation that you have some objects (houses and weapons) that still are not having their xmlsiege attachments saved?

If so, do you know if they are being listed during saves by the debug code that was added?

Note that you can also manually add the attachment to a house without having to demolish and rebuild it.

To add an attachment to a multi use a command like

[area addatt xmlsiege where basemulti

and target around the multi.
Cannons can attack multis by simply targeting any part of the multi that is within the line of sight of the cannon.
To access attachments on multis, use xmlfind with the Range restriction to search for nearby basemultis and then access the siege attachment by selecting the blue button shown on the individual search result listings.

[xmlfind basemulti 20

will set up a search for all basemultis within 20 tiles.
 
They wern't saveing before, but now they are, and I don't know what has changed, except that code for the seralization you had me add in. *shrugs* I know you said that was just for debug purposes, but does that force it to save the stuff? I'm not complaining either way, but I was wondering if I should just leave that alone now that it seems to be working, or should I remove it so it don't list all the houses in the server window after each save? (wouldnt save times still be the same regardless?)
 

ArteGordon

Wanderer
MetallicSomber said:
They wern't saveing before, but now they are, and I don't know what has changed, except that code for the seralization you had me add in. *shrugs* I know you said that was just for debug purposes, but does that force it to save the stuff? I'm not complaining either way, but I was wondering if I should just leave that alone now that it seems to be working, or should I remove it so it don't list all the houses in the server window after each save? (wouldnt save times still be the same regardless?)

It's a puzzle. I have never seen that before and there is no reason that adding in that debugging statement should have had any effect on serialization.
I would go ahead and take it out.

I will try to reproduce it as well.
 
Just a final thought, but it may have happened when I added in the update, to make custom houses attackable too. *shrugs* if thats the case I guess all this was for nothing, hehe Thanks for your help though. and I'll be looking forward to any updates.

P.S. Does the bilista have a fireing animation, and all positions? if its only got two positions, it could be mounted on a castle wall where it would be most effective *shrugs*
 

ArteGordon

Wanderer
MetallicSomber said:
Just a final thought, but it may have happened when I added in the update, to make custom houses attackable too. *shrugs* if thats the case I guess all this was for nothing, hehe Thanks for your help though. and I'll be looking forward to any updates.

P.S. Does the bilista have a fireing animation, and all positions? if its only got two positions, it could be mounted on a castle wall where it would be most effective *shrugs*

dont have the ballista in yet but the catapult is missing animation for the north facing (client just doesnt have the artwork).
 
Top