-
Notifications
You must be signed in to change notification settings - Fork 0
/
Installation SVN or 2.4.txt
455 lines (297 loc) · 17.1 KB
/
Installation SVN or 2.4.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
INSTALLATION:
for RunUO 2.4 or above from official SVN (servuo see also the other included file!)
BASIC INSTALLATION
------------------
If you just wish to the standard spawning features of xmlspawner, and are not interested in support of quests, advanced spawn triggering, or additional addon systems, then this single basic installation step is enough.
STEP 1:
With a fresh 2.1 install, simply copy the folder "XMLSpawner Core" and paste into your custom scripts directory.
Note, XmlSpawner2 is fully compatible with all existing xml spawn file descriptions and can also co-exist with the standard distribution spawners and other spawners.
You can use xmlspawners and other spawners at the same time if you like.
ADVANCED INSTALLATION
---------------------
If you plan to use the xmlspawner quest system or other advanced features, then there are additional installation steps that provide additional functionality to the XmlSpawner2 system. None of the additional steps are absolutely required for basic spawner functioning, but they do add additional features that will enhance the use of the system.
Feel free to go through the steps and select the ones that seem like they would be of use to you, or select none if you decide you would rather not make additional modifications.
The "XMLSpawner Support" folder is a recommended part of the installation.
The "XMLSpawner Extras" is completely optional containing .xml file examples of some of the spawner capabilities as well as other spawn files. Make a folder called Spawns in the main RunUO installation directory (where your server.exe is) and place the .xml files in there. Then make a folder named XmlQuestNPC in the main RunUO installation directory and place the .npc files there.
Test them out by using the [xmlload command on the example .xml files. Most of these will load up in Green Acres. You can also use the [xmlloadhere command to force them to load at your current location.
If you plan on spawning rares or any items with long spawn cycles I would strongly recommend that you follow installation step 4. You can find the reason for this described at the end of xmlspawner2.txt in the section "FIX FOR STOLEN/TAKEN ITEM SPAWNS THAT REMAIN UNDER SPAWNER CONTROL"
Additional Recommended Steps:
STEP 2: (recommended but not required)
--------------------------------------
To take advantage of the XmlQuest killtask keywords KILL and KILLNAMED, one line must be added to the OnDeath method in BaseCreature.cs as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont do anything)
around line 4946 of basecreature.cs change
Titles.AwardKarma( titles[ i ], karma[ i ], true );
to
Titles.AwardKarma( titles[ i ], karma[ i ], true );
// modification to support XmlQuest Killtasks
XmlQuest.RegisterKill( this, titles[ i ]);
STEP 3: (NOT recommended but allowed)
-------------------------------------
In order to provide the book extended text entry interface, xmlspawner replaces the default packet handler for basebooks. While this does not affect the behavior of standard books in any way, if you DONT want this mod, comment out the following line at line 26 in PacketHandlerOverrides.cs
If you comment out this line then you will NOT be able to edit spawner entries using the book interface.
// Timer.DelayCall( TimeSpan.Zero, new TimerCallback( ContentChangeOverride ) );
STEP 4: (recommended but not required)
--------------------------------------
To take advantage of the stealable rares/artifacts system and the support for eliminating issues of maintained spawner control over items, either replace the default distribution files container.cs (Scripts/Items/Containers/Container.cs) and stealing.cs (Scripts/Skills/Stealing.cs) with the versions found in xmlspawner support directory.
STEP 5: (recommended but not required)
--------------------------------------
To take advantage of spawner triggering on skill use you must change 4 lines in Scripts/Misc/SkillCheck.cs (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the SkillTriggering features simply wont do anything). Near the beginning of the file at line 73 change these lines.
public static void Initialize()
{
Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler( Mobile_SkillCheckLocation );
Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler( Mobile_SkillCheckDirectLocation );
Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler( Mobile_SkillCheckTarget );
Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler( Mobile_SkillCheckDirectTarget );
}
to this
public static void Initialize()
{
// Begin mod to enable XmlSpawner skill triggering
Mobile.SkillCheckLocationHandler = new SkillCheckLocationHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckLocation );
Mobile.SkillCheckDirectLocationHandler = new SkillCheckDirectLocationHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckDirectLocation );
Mobile.SkillCheckTargetHandler = new SkillCheckTargetHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckTarget );
Mobile.SkillCheckDirectTargetHandler = new SkillCheckDirectTargetHandler( XmlSpawnerSkillCheck.Mobile_SkillCheckDirectTarget );
// End mod to enable XmlSpawner skill triggering
}
STEP 6: (recommended but not required)
--------------------------------------
To allow the XmlQuest killtask keywords KILL and KILLNAMED to be applied to players providing a contract kill system, one line must be added to ReportMurderer.cs (Scripts/Gumps/ReportMurderer.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the KILL and KILLNAMED features simply wont work when specifying players as the targets).
This is also required to allow the attachment system to register kills (through the OnKill or OnKilled methods). Some addons such as XmlPoints require this.
around line 66 of ReportMurderer.cs change
Titles.AwardKarma( g, karmaAward, true );
to
Titles.AwardKarma( g, karmaAward, true );
// modification to support XmlQuest Killtasks of players
Server.Items.XmlQuest.RegisterKill( m, g);
STEP 7: (recommended but not required)
--------------------------------------
To allow attachments to be triggered on weapon hits, one line must be added to BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs) as described below (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, the attachment OnWeaponHit method simply wont be called so attachments such as XmlMinionStrike will not work)
around line 1756 of BaseWeapon.cs at the end of the OnHit method, change
if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
attacker.ApplyPoison( defender, Poison.Regular );
}
}
to
if ( AnimalForm.UnderTransformation( defender, typeof( BullFrog ) ) )
attacker.ApplyPoison( defender, Poison.Regular );
}
// hook for attachment OnWeaponHit method
Server.Engines.XmlSpawner2.XmlAttach.OnWeaponHit(this, attacker, defender, damageGiven);
}
STEP 8: (recommended but not required)
--------------------------------------
To allow the ItemIdentification skill to be used to reveal attachments on items/mobs, one line must be added to ItemIdentification.cs (Scripts/Skills/ItemIdentification.cs) as described below. (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, players just wont be able to see what attachments are on an item/mob using this skill).
around line 50 of ItemIdentification.cs change
else if ( o is Mobile )
{
((Mobile)o).OnSingleClick( from );
}
else
{
from.SendLocalizedMessage( 500353 ); // You are not certain...
}
to
else if ( o is Mobile )
{
((Mobile)o).OnSingleClick( from );
}
else
{
from.SendLocalizedMessage( 500353 ); // You are not certain...
}
//allows the identify skill to reveal attachments
Server.Engines.XmlSpawner2.XmlAttach.RevealAttachments(from,o);
STEP 9: (recommended but not required)
--------------------------------------
To allow attachments to make use of the OnEquip and OnRemoved methods, the following 8 changes must be made in three files, BaseArmor.cs, BaseWeapon.cs, and BaseJewel.cs. (note, you dont have to make this mod if you dont want to, the spawner and other items/attachments will work just fine without it, you just wont be able to use certain attachments that make use of this feature such as XmlFactionEquip).
around line 1226 of BaseArmor.cs (Scripts/Items/Armor/BaseArmor.cs) at the end of the CanEquip method change
return base.CanEquip( from );
to
// XmlAttachment check for CanEquip
if(!Server.Engines.XmlSpawner2.XmlAttach.CheckCanEquip(this, from))
{
return false;
} else
{
return base.CanEquip( from );
}
around line 1265 of BaseArmor.cs (Scripts/Items/Armor/BaseArmor.cs) at the end of the OnEquip method change
return base.OnEquip( from );
to
// XmlAttachment check for OnEquip
Server.Engines.XmlSpawner2.XmlAttach.CheckOnEquip(this, from);
return base.OnEquip( from );
around line 1286 of BaseArmor.cs (Scripts/Items/Armor/BaseArmor.cs) at the end of the OnRemoved method change
base.OnRemoved( parent );
to
// XmlAttachment check for OnRemoved
Server.Engines.XmlSpawner2.XmlAttach.CheckOnRemoved(this, parent);
base.OnRemoved( parent );
around line 605 of BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs) at the end of the CanEquip method change
else if ( !from.CanBeginAction( typeof( BaseWeapon ) ) )
{
return false;
}
else
{
return base.CanEquip( from );
}
to
else if ( !from.CanBeginAction( typeof( BaseWeapon ) ) )
{
return false;
}
else
// XmlAttachment check for CanEquip
if (!Server.Engines.XmlSpawner2.XmlAttach.CheckCanEquip(this, from))
{
return false;
}
else
{
return base.CanEquip(from);
}
around line 659 of BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs) at the end of the OnEquip method change
return true;
to
// XmlAttachment check for OnEquip
Server.Engines.XmlSpawner2.XmlAttach.CheckOnEquip(this, from);
return true;
around line 713 of BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs) at the end of the OnRemoved method change
m.Delta( MobileDelta.WeaponDamage );
}
}
to
m.Delta( MobileDelta.WeaponDamage );
}
// XmlAttachment check for OnRemoved
Server.Engines.XmlSpawner2.XmlAttach.CheckOnRemoved(this, parent);
}
around line 170 of BaseJewel.cs (Scripts/Items/Jewels/BaseJewel.cs) at the end of the OnAdded method change
from.CheckStatTimers();
}
}
to
from.CheckStatTimers();
}
// XmlAttachment check for OnEquip and CanEquip
if(parent is Mobile)
{
if(Server.Engines.XmlSpawner2.XmlAttach.CheckCanEquip(this, (Mobile)parent))
{
Server.Engines.XmlSpawner2.XmlAttach.CheckOnEquip(this, (Mobile)parent);
} else
{
((Mobile)parent).AddToBackpack(this);
}
}
}
around line 188 of BaseJewel.cs (Scripts/Items/Jewels/BaseJewel.cs) at the end of the OnRemoved method change
from.CheckStatTimers();
}
}
to
from.CheckStatTimers();
}
// XmlAttachment check for OnRemoved
Server.Engines.XmlSpawner2.XmlAttach.CheckOnRemoved(this, parent);
}
STEP 10: (recommended but not required)
---------------------------------------
To allow attachments to make use of the OnArmorHit methods, the following changes must be made in BaseWeapon.cs.(note, you dont have to make this mod if you dont want to, the spawner and other items/attachments will work just fine without it, you just wont be able to use features of certain attachments that require this such as XmlCustomAttacks).
at the beginning of the AbsorbDamageAOS method around line 1167 of BaseWeapon.cs change
public virtual int AbsorbDamageAOS( Mobile attacker, Mobile defender, int damage )
{
bool blocked = false;
to
public virtual int AbsorbDamageAOS( Mobile attacker, Mobile defender, int damage )
{
bool blocked = false;
int originaldamage = damage;
in the AbsorbDamageAOS method around line 1208 of BaseWeapon.cs change
if ( shield != null )
{
shield.OnHit( this, damage );
}
to
if ( shield != null )
{
shield.OnHit( this, damage );
// XmlAttachment check for OnArmorHit
Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, shield, this, originaldamage);
}
in the AbsorbDamageAOS method around line 1234 of BaseWeapon.cs change
if (armor != null)
armor.OnHit(this, damage); // call OnHit to lose durability
}
return damage;
}
to
if (armor != null)
{
armor.OnHit(this, damage); // call OnHit to lose durability
// XmlAttachment check for OnArmorHit
damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, armorItem, this, originaldamage);
}
}
return damage;
}
in the AbsorbDamage method around line 1272 of BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs) change
int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;
to
// XmlAttachment check for OnArmorHit
damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, armorItem, this, damage);
damage -= Server.Engines.XmlSpawner2.XmlAttach.OnArmorHit(attacker, defender, shield, this, damage);
int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;
STEP 11: (recommended but not required)
---------------------------------------
To allow attachment properties on weapons/armor to be automatically displayed in the properties list on mouseover/click, these changes must be made to BaseWeapon.cs (Scripts/Items/Weapons/BaseWeapon.cs), BaseArmor.cs (Scripts/Items/Armor/BaseArmor.cs) and BaseJewel.cs (Scripts/Items/Jewels/BaseJewel.cs) described below. (note, you dont have to make this mod if you dont want to, the spawner and other items will work just fine without it, players just wont automatically see attachment properties on items with attachments).
at the end of the GetProperties method around line 3373 of BaseWeapon.cs change
if ( m_Hits > 0 && m_MaxHits > 0 )
list.Add( 1060639, "{0}\t{1}", m_Hits, m_MaxHits ); // durability ~1_val~ / ~2_val~
to
if ( m_Hits > 0 && m_MaxHits > 0 )
list.Add( 1060639, "{0}\t{1}", m_Hits, m_MaxHits ); // durability ~1_val~ / ~2_val~
// mod to display attachment properties
Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);
at the end of the GetProperties method around line 1546 of BaseArmor.cs change
if ( m_HitPoints > 0 && m_MaxHitPoints > 0 )
list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~
to
if ( m_HitPoints > 0 && m_MaxHitPoints > 0 )
list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~
// mod to display attachment properties
Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);
at the end of the GetProperties method around line 281 of BaseJewel.cs change
if ( m_HitPoints >= 0 && m_MaxHitPoints > 0 )
list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~
to
if ( m_HitPoints >= 0 && m_MaxHitPoints > 0 )
list.Add( 1060639, "{0}\t{1}", m_HitPoints, m_MaxHitPoints ); // durability ~1_val~ / ~2_val~
// mod to display attachment properties
Server.Engines.XmlSpawner2.XmlAttach.AddAttachmentProperties(this, list);
STEP 12: (recommended but not required)
---------------------------------------
To prevent Paragons from being despawned due to smartspawning, add this property to BaseCreature.cs anywhere within the BaseCreature class. Paragons should be excluded because the OnBeforeSpawn and OnAfterSpawn methods are not called when smartspawning, so if they despawn, they will not come back as paragons.
public virtual bool HoldSmartSpawning
{
get{
// dont smartspawn paragons
if(IsParagon) return true;
return false;
}
}
STEP 13: (recommended but not required)
---------------------------------------
To fix a problem with lootpack generation under RunUO 2.0 using the LOOTPACK keyword, make this mod in Misc/LootPack.cs around line 570. If you dont make this mod, you will not be able to use the LOOTPACK keyword.
private static bool IsInTokuno(Mobile m)
{
// ARTEGORDONMOD
// allow lootpack construction without a mobile
if (m == null) return false;
if (m.Region.IsPartOf("Fan Dancer's Dojo"))
return true;
if (m.Region.IsPartOf("Yomotsu Mines"))
return true;
return (m.Map == Map.Tokuno);
}