|
||
|
|||||||
| General Discussion General discussion for the RunUO community, all off-topic posts will be deleted. This forum is NOT FOR SUPPORT! |
| View Poll Results: Do you support this idea? | |||
| I Would use it, I have nothing to contribute at the moment. |
|
4 | 40.00% |
| I would use it, I have a few sugestions too. |
|
3 | 30.00% |
| I wouldn't use it, I have explained why. |
|
1 | 10.00% |
| I wouldn't use it, I don't know why. |
|
1 | 10.00% |
| I may use it, I just have sugestions at the moment. |
|
0 | 0% |
| I may use it, but it seems a bit lazy. |
|
0 | 0% |
| IT CAN GENERATE HOW MANY?! |
|
1 | 10.00% |
| Multiple Choice Poll. Voters: 10. You may not vote on this poll | |||
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Forum Expert
|
Who would be interested in a script capable of generating thousands of armor / weapon scripts with balanced attributes and stats?
I have tried and tested a special method for generating the maximum amount of combinations of unique armor and weapons and thus, with given arguments, have been able to generate over 10,000 Armor and 6,000 Weapon scripts for my shard. Unfortunately, my shard uses a completely different "simplified" method of setting properties, so the output is absolutely incompatible with and standard version of RunUO. My proposal is, if enough people are interested in using this idea, I will be happy to manufacture it towards supporting RunUO standard installations. The main aim of the generation is to generate as many combinations of unique armor and weapon scripts, where each item has it's own class name and unique properties written with clean, error free and semi-annotated code. The core key in being able to create such a unique armor or weapon script lies in the "Lore" of the item, the current list is as follows: Code:
public enum ItemLore
{
NotSet,
FixLore,
Gladiator,
Bandit,
Invoker,
Caster,
Wizard,
Wraith,
Conjurer,
Doctor,
Healer,
Angel,
Devil,
Darkness,
Shadows,
Earth,
Arcanist,
Warrior,
Stealther,
Moon,
Sun,
Blizzard,
Night,
Day,
Knight,
Mage,
Storm,
Hurricane,
Farplane,
Conqueror,
Void,
Bear,
Whale,
Eagle,
Owl,
Wolf,
Tiger,
Beast,
Demon,
Ghost,
Sundering,
Spirit,
Earthblood,
Ludicrous,
Serpentine,
Snake,
Ocean,
Waters,
Lifeblood,
Depths,
Nether,
}
The Item Name is decided by using a random enumeration of either all Weapon or Armor ItemID's, the enumeration keys are named according to the relative ItemID name in TileData.mul, these are the base Item Names that the generator will use. The Armor Generator is capable of distinguishing between Body Armor and Shields. the Weapon Generator is capable of distinguishing between Bows, One-Handed and Two-Handed Weapons. This includins the fact that a Weapon may be a Melee Two-Handed or a Ranged Two-Handed Weapon. Attributes are categorized into 3 groups:
Items can be generated into a total of 5 categories by using a combination of the above list, those final categories are:
Depending on the selected category for the generated item, only attribute that pertain to that category will be selected as viable attributes to apply in the output script. The generation process is as follows:
After each script is generated, the Class Name is added to a cache file (Generator.cache) prefixed with the total list count. This is to prevent the generator from producing duplicate scripts. The cache file is Saved and Loaded each time the generator runs, meaning that it will remember what has previously been generated, killing any chance to produce duplicate entris. The generator will attempt to generate scripts in blocks of 1000. The main entry method for the generator is contained in a while statement and for each block of 1000 scripts, a baked-in 30-second timeout is applied to break from the loop. The generator will also count how many scripts have been generated in each block of 1000, it may fall short easily, if it has tried to create a duplicate entry. So, there is now an "infinite" loop, or so it seems... To achieve the absolute, unknown MAXIMUM amount of combinations, the loop will not be broken unless one of two conditions are met:
Samples: Each ¦ represents one block of 1000. Code:
Generating Armor Scripts... ¦¦¦¦¦¦¦¦¦¦¦¦Generator Timed Out. Done: Generated 11786 Armor Scripts. - Generating Weapon Scripts... ¦¦¦¦¦¦Generator Timed Out. Done: Generated 6158 Weapon Scripts. Note that this item would actually be considdered a very hard and "imbalanced" item according to most shard owner's standards. Code:
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class BoneArmsOfTheLudicrous : BaseArmor
{
[Constructable]
public BoneArmsOfTheLudicrous( )
: base( 0x1453 ) //5203
{
Hue = 2415;
Name = "Bone Arms";
Weight = 2.0;
Layer = Layer.Arms;
Attributes.RegenHealth = 90;
Attributes.RegenMana = 81;
Attributes.Intelligence = 90;
Attributes.SpellRecovery = 108;
Attributes.ReducedManaCost = 108;
SetStrengthLevel( StrengthLevel.Ultimate );
ItemLore = ItemLore.Ludicrous;
ItemBind = ItemBind.OnPickup;
ItemRank = ItemRank.Legendary;
}
public BoneArmsOfTheLudicrous( Serial serial )
: base( serial )
{ }
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int)0 ); //Version #
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt( ); //Version #
}
}
}
So the input I want to see is sujestions about improving the generation process, maybe you know a better way to reach a total number of possible unknown combinations? Maybe you have a few "Lores" to add to the list? Please comment, rate and share. Regards, Vorspire
__________________
Criticism should not be the cause of anger. -Dominik Seifert
|
|
|
|
|
|
#2 (permalink) |
|
Forum Novice
Join Date: Apr 2008
Location: Messina, Sicily, Italy
Age: 26
Posts: 547
|
O_O
3 letters for you... WTF?!?! just joking :P it seems an amazing tool for creating huge masses of weaps and armors, yet just creating them seems pointless, when you have after to find a way to put them in the game (unless of a totally random snippet of code that drops any kind of basearmor or baseweapon)... and putting them to any use could take an eternity, so there seems to be no gain in using it... however, seems to me that if the Lore is chosen wisely, it becames easier to put together some massive weap/armor packs for the shard, leaving the coding of each single item as a far memory :P i don't think i would ever use it for my purpouses, seems way too much randomness involved, even if it is a fashinating concept that might came useful for someone ![]() suggestion: take a look at ML releases, since those adds more specifics to weaps and armors, if you are ever going to release this, and add a #define block of code for people to choose, if SVN or ML (might end up soon with no difference, though) suggestion #2: for the lore, try opening an english dictionary (or, some myths books), you might find some surprisingly fitting terms to add ![]() |
|
|
|
|
|
#3 (permalink) |
|
Forum Expert
|
Great input, thanks Thiglon
![]() However, I have yet to impliment a way to get these items into the game, but for my shard, it's quite easy, as the loot system is based by-region, no by-mob - The StrengthLevel property plays a massive role in that too. I would possibly have the generator also co-ordinate certain items and generate Loot Packs containing them, or have it modify the LootPack.cs script (patching it) with certail loot in the right places, either way is viable. I also realise there are such things to compensate for, like Slayers, which is not a problem. The prospect of being able to generate a few thousand scripts at random doesn't mean you HAVE to use them all, you can take a select few. The Generation output directory is not contained within the Scripts directory, and is never compiled unless you explicitly copy the generated files to a location within the Scripts directory. As for the dictionary, yeah I guess so, but it's easier to type one word into a synonym archive and have it display every word assosiated with it :P http://thesaurus.reference.com/browse/fire for example.
__________________
Criticism should not be the cause of anger. -Dominik Seifert
Last edited by Vorspire; 07-02-2009 at 08:13 PM. |
|
|
|
|
|
#4 (permalink) |
|
Forum Novice
Join Date: Nov 2008
Age: 23
Posts: 149
|
The script is a good idea I believe for those who are newer to the concept of scripting. It gives their Shards a custom feel from that of OSI. But you should incorporate something that will allow for easy editing because what you consider balanced may be different than I. Basically like an amp up effect from the basics because lots of shards use items with maxed out everything. Just an idea though.
|
|
|
|
|
|
#6 (permalink) | |
|
Forum Novice
Join Date: Apr 2008
Location: Messina, Sicily, Italy
Age: 26
Posts: 547
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Tags |
| armor, generation, generator, script, weapon |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|