[WIPz] Automatic Random Enchantment System (ARES)

Post » Wed Sep 01, 2010 3:34 pm

Automatic Random Enchantment System

ARES is a script-based mod which anolyzes your gameplay environment, and spawns random magical weapons, armor, and clothing to fit within that world. These items are balanced by any overhauls you have running, basing all of their values on the items and characters around you, as well as various global settings that overhauls set to balance enchantments.

ARES uses a system of "affixes", similar to those used in many games, perhaps most notable the Diablo series by Blizzard Entertainment. ARES currently boasts 420 prefixes and 409 suffixes, for a staggering 172,609 uniquely named enchantments. Each of these combinations have considerable variation within themselves, and every combination can be applied to every unenchanted item in your game.

Here's the really cool thing - it uses items already existing in your game. Every single item that can be found on an NPC or in a chest, can possibly get enchantments from ARES. So if you can fight someone with that item, you could get lucky and find that it has been improved with extra stats. Of course, every item you can use, your enemies can also use.

There are no compatibility patches, there is no huge number of meshes and textures to download, nothing. My scripts will use what you already have. And when you add more, that only adds more possible items to find!

Progress so far
So far, I have written scripts, which work, which do the following:
  • Affect all NPCs and chests you will ever meet, without incompatibilities
  • Randomly select weapons from the NPC's inventory (will not select already enchanted weapons, quest weapons, or scripted weapons, for the sake of balance and compatibility)
  • A functioning "Magic Find" stat which affects how often weapons are selected
  • 420 prefixes and 409 suffixes, covering 130 separate effects
  • Balance enchantment magnitude (and duration for weapons) automatically based on relevant soul values found in game
  • In order to prevent incompatibility, a special spell has been developed which will allow you to retrieve the original weapon, in case a quest or script needs it
Requirements
  • OBSE v0019
  • OBME
Technical Information (for modders)
  • There will be a list of effects. It will include all of the default effects, plus any others that people want to add. The custom effects will require the following bits of information:
    • name
    • [opposite effect] (for use with Negative enchantments)
    • school
    • base cost (affects spell cost calculation; see here)
    • barter factor (affects the cost to buy a given enchantment)
    • constant effect enchantment factor (affects constant effect enchantment prices)
    • the "effect flags", i.e. all of those checkboxes in the MGEF menu
    • visual style - what the visual style will be set as.

  • Then you will have "affix lines", which are just groups of "affixes", with a few general shared attributes. Affixes are tied to a soul gem level (negative, sub-petty, petty, lesser, common, greater, grand, and ultra-grand), and have a name associated with them which will be applied to weapons with that affix attached. The required data for an Affix Line is the following:
    • which magic effect it uses
    • whether or not it is a suffix
    • whether or not it is private
    • whether or not it can be used in a spell
    • whether or not it can be used in an enchantment
    • the minimum number of uses a weapon with this effect should have
    • the maximum number of uses a weapon with this effect should have
    • "No Duration Chance" (see below)
    • the minimum percentage of the enchantment's power that goes toward magnitude
    • the minimum percentage of the enchantment's power that goes toward duration
    • [associated scripts] (script to be run when the affix is added to an item, script attached to the item itself, script to be run on the projectile of a spell, and obviously the script that is attached to the effect itself)
    • a modifier to the level at which a given level of affix is available
    • a modifier to how frequently these affixes should spawn
    • the affixes themselves

  • Affixes require far less information:
    • the name of the affix itself
    • the level of soul the affix is associated with

  • Some clarifications:
    • Privacy: you can set an affix line to be "private". For ARES, this means I won't use the effect to create random loot. I'm not actually going to enforce anything about these effects, I'm simply going to ask other modders who use the database to check the privacy of effects and determine whether or not it is appropriate to use it (i.e. probably not unless it's yours).
    • Affix Line level Spell and Enchantment booleans: these are for whether or not these things should be used with randomly generated enchantments and/or spells (I'm not committing to creating an ARES-alike for spells, but I'm making this system flexible enough for such a thing to be made). This is different from the MGEF-level "Can Be Used For Spellmaking/Enchanting" - those apply to whether or not these effects appear in the spellmaking or enchanting altars. Whether or not they will at all depends a lot on Kyoma's work with X-Skills and whether or not I can figure out how to make them work for the altars.
    • Minimum and maximum uses: ARES balances things by randomly generating a target number of uses for the enchantment, and then dividing the total enchantment value (determined by soul level) by that amount to get the appropriate charge-cost, and then determining the appropriate Magnitude and Duration to get that amount of cost.
    • "No Duration Chance" - the chance that a given effect will be instantaneous. This will obviously mean that 100% of the charge-cost is going towards the Magnitude, and the Duration will be 1.
    • minimum percentage of magnitude and duration - assuming that the effect does have a duration, what percentage of the charge-cost should be devoted at a minimum to each. Chooses a random number in between the two for the exact breakdown. Does not support Areas (currently, might later, maybe)
    • associated scripts - The spell script is obviously a Magic Effect script. The other three should be User-Functions a la v0018 of OBSE - assuming that v0018 comes out before ARES (promised to be a small-ish, quicker release - if this turns out not to be the case, these three can be re-written using Activators).
    • level modifier - affixes appear, in general, at the level in which that level of soul gem becomes available as random loot. By giving a non-zero modifier here, a given affix line can appear "early" or "late" for each soul level.
Acknowledgements
  • Bethesda Softworks - I am modding their game
  • Blizzard Entertainment - for inspiration
  • Oblivion Script Extender Team, ianpatt, behippo, and Scruggsywuggsy the Ferret - only their hard work makes this possible. Without the massive improvement of the scripting system by the OBSE team, I would have quit modding Oblivion a long time ago
  • Wrye - Wrye Bash programming has made this so much easier. He has also been incredibly patient, helping me out with Python and Bash
  • SkyRanger-1 - helped me determine the exact formula for spell cost, which is related to balancing the enchantments
  • The Elder Scrolls Construction Set Wiki Editorial Team, Qazaaq and Haama - massive help over the past year in maintaining and improving the Wiki, which is very important to me, and also credited with drawing me back into modding after a long hiatus.
  • tej?n - Great feedback and lots of encouragement on this project.
  • Jaga Telesin - though this project is unrelated to Split Infinity, I salute the monumental amount of time and effort Jaga invested pursuing the same dream as I
  • Everyone who has followed this thread - my humblest apologies for the extreme delay and sincerest gratitude for your continued patience.

User avatar
Jeffrey Lawson
 
Posts: 3485
Joined: Tue Oct 16, 2007 5:36 pm

Post » Wed Sep 01, 2010 4:00 pm

whats the percent of this being done Brosef?
User avatar
Kim Kay
 
Posts: 3427
Joined: Fri Oct 13, 2006 10:45 am

Post » Wed Sep 01, 2010 1:24 pm

So...I missed something...when did it start requiring OBSE v0018?
User avatar
Emerald Dreams
 
Posts: 3376
Joined: Sun Jan 07, 2007 2:52 pm

Post » Wed Sep 01, 2010 5:40 pm

I can't wait for this. I'm tired of getting the same enchanted loot.
User avatar
Alex Blacke
 
Posts: 3460
Joined: Sun Feb 18, 2007 10:46 pm

Post » Wed Sep 01, 2010 1:42 pm

So...I missed something...when did it start requiring OBSE v0018?

Sometime between http://www.gamesas.com/bgsforums/index.php?s=&showtopic=941360&view=findpost&p=13782066 being made and now...

Vac
User avatar
Carlitos Avila
 
Posts: 3438
Joined: Fri Sep 21, 2007 3:05 pm

Post » Wed Sep 01, 2010 11:24 am

whats the percent of this being done Brosef?

Wellll... affix names, stats, and the like, are all done. The OBSE plug-in is about half done. The .ESM file is... probably about a third done.

I can't wait for this. I'm tired of getting the same enchanted loot.

Glad you're excited!

So...I missed something...when did it start requiring OBSE v0018?
Sometime between http://www.gamesas.com/bgsforums/index.php?s=&showtopic=941360&view=findpost&p=13782066 being made and now...

Vac

Since Scruggsy posted just what was going in v0018, A, and B, when he announced that v0018 was going to be out soon. It's going to require v0018 because v0018 is going to be out anyway and I can use some of it.

If something happens to v0018 development, slowing it down enough that this is finished first, then it can easily be rewritten to use only v0017; the v0018 stuff is just kind of cool.

Hope that clears up any confusion!
User avatar
Chantelle Walker
 
Posts: 3385
Joined: Mon Oct 16, 2006 5:56 am

Post » Wed Sep 01, 2010 12:19 pm

Sp, ARES is about 80-85 % done?
User avatar
Sakura Haruno
 
Posts: 3446
Joined: Sat Aug 26, 2006 7:23 pm

Post » Thu Sep 02, 2010 2:21 am

Really hard to quantify; the different sections do not take equally long. And there's still testing after. Considering how long I spent on the affixes and their stats and things, that number might be about right, I suppose.
User avatar
Doniesha World
 
Posts: 3437
Joined: Sun Jan 07, 2007 5:12 pm

Post » Wed Sep 01, 2010 9:44 pm

I can live with that. :3

Whee enchantments :D
User avatar
Causon-Chambers
 
Posts: 3503
Joined: Sun Oct 15, 2006 11:47 pm

Post » Thu Sep 02, 2010 1:02 am

Glad you're excited!
I think there's lots of people excited about this one.
Since Scruggsy posted just what was going in v0018, A, and B, when he announced that v0018 was going to be out soon. It's going to require v0018 because v0018 is going to be out anyway and I can use some of it.

If something happens to v0018 development, slowing it down enough that this is finished first, then it can easily be rewritten to use only v0017; the v0018 stuff is just kind of cool.
Well, it's not like I play the game that much anymore, but progress is progress. I'm looking forward to the release!

Vac
User avatar
Donatus Uwasomba
 
Posts: 3361
Joined: Sun May 27, 2007 7:22 pm

Post » Wed Sep 01, 2010 9:08 pm

DragoonWraith is clearly very busy with other things.

Maybe a bump will make him see the error of his ways. :D
User avatar
Red Bevinz
 
Posts: 3318
Joined: Thu Sep 20, 2007 7:25 am

Post » Wed Sep 01, 2010 7:56 pm

I can Alpha and Beta test if you'd like. This will be awesome!

I am so glad I'm not the only one who remembers Split Infinity. What ever happened to Jaga? I hope he didn't die. :(

I'm also glad to have been a tester for Split Infinity. So this succesor will be very fun to play.
User avatar
Danny Blight
 
Posts: 3400
Joined: Wed Jun 27, 2007 11:30 am

Post » Wed Sep 01, 2010 11:00 pm

:cookie:
User avatar
Anna S
 
Posts: 3408
Joined: Thu Apr 19, 2007 2:13 am

Post » Wed Sep 01, 2010 11:33 pm

Heh, your timing is good. I finally got off my butt and kicked this into gear yesterday. Sooo... pretty much all projections for how long this would take, that I said like a month ago? Push them about a month forward.

That said, progress, now that it's happening, has been good. I've finally rewritten the serialization code to account for the effect/affix line/affix scheme that I detailed a while back (the tedium I'd been avoiding), so now I just need to make the affix list class and write up functions for... everything. Shouldn't be too bad, really; most of them will just involve writing a function to call the OBSE function if its a default effect, and otherwise return a value that I already have stored. *shrug*

Then, testing! Which could potentially start this week.
User avatar
Schel[Anne]FTL
 
Posts: 3384
Joined: Thu Nov 16, 2006 6:53 pm

Post » Wed Sep 01, 2010 11:10 pm

Then, testing! Which could potentially start this week.


Awesome! :celebration:
User avatar
Micah Judaeah
 
Posts: 3443
Joined: Tue Oct 24, 2006 6:22 pm

Post » Wed Sep 01, 2010 3:04 pm

That said, progress, now that it's happening, has been good.

Woo-hoo!
Great stuff!
Then, testing! Which could potentially start this week.

Gah! You really did have to pick a time when I was far too busy making my own stuff to get around to reaching testing with ARES, didn't you?

I'd love to help with testing this (I already volunteered a long time back), but if it's in the next few weeks I'm probably going to have to forego the honour, damnit. By no means should you consider this a reason to delay further though! :toughninja:

Good luck!

Vac
User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

Post » Wed Sep 01, 2010 5:29 pm

Hooray! Our dream of having a more Diablo/WoW-esque Oblivion gets closer by the day!

All silliness aside though, congratulations on making it this far DW; this is definably a mod I'm looking very forward to. Best of luck with the completion of this thing, and great job on the work so far! You've earned every word of praise you receive (and then some!). :D
User avatar
James Rhead
 
Posts: 3474
Joined: Sat Jul 14, 2007 7:32 am

Post » Wed Sep 01, 2010 11:39 pm

Glad to see you making progress DragoonWraith. Be sure to let us know if there is anything else you really need. We might be able to sneak something easy into OBSE if it would prove useful. Looking forward to seeing this.
User avatar
SamanthaLove
 
Posts: 3565
Joined: Mon Dec 11, 2006 3:54 am

Post » Wed Sep 01, 2010 6:27 pm

User Functions just about make all my dreams come true, to be perfectly honest. I'll make use of the item reference functions when you write them, but that's hardly easy to sneak in, heh! That can be in an update, since that's really just minor (would make the self-repairing mods work better).
User avatar
Jamie Moysey
 
Posts: 3452
Joined: Sun May 13, 2007 6:31 am

Post » Wed Sep 01, 2010 11:47 am

User Functions just about make all my dreams come true, to be perfectly honest. I'll make use of the item reference functions when you write them, but that's hardly easy to sneak in, heh! That can be in an update, since that's really just minor (would make the self-repairing mods work better).

Yeah - the item reference functions aren't going to be slipped into v0018. Glad to know you are all set. Ping me when you've got something available. Good luck!
User avatar
roxanna matoorah
 
Posts: 3368
Joined: Fri Oct 13, 2006 6:01 am

Post » Wed Sep 01, 2010 9:52 pm

Actually... my save callback does not appear to be getting called by saves... Think you can help with this? The relevant code:
static void SaveCallback(void * reserved){	_MESSAGE("Save game call back");	[...]}[...]bool OBSEPlugin_Load(const OBSEInterface * obse){	[...]	obse->SetOpcodeBase(0x2530); // to 0x254F (inclusive)	[...]	if(!obse->isEditor)		[...]		g_serialization->SetSaveCallback(g_pluginHandle, SaveCallback);		[...]}
Any idea?


Nevermind.
User avatar
Dan Endacott
 
Posts: 3419
Joined: Fri Jul 06, 2007 9:12 am

Post » Thu Sep 02, 2010 1:18 am

OK, progress: Saving and loading effects now works, at least for default effects. Need to write functions to actually add new effects before I can test them...
User avatar
Andy durkan
 
Posts: 3459
Joined: Fri Aug 03, 2007 3:05 pm

Post » Wed Sep 01, 2010 11:37 pm

This mod rocks, keep it up!
User avatar
Nicholas C
 
Posts: 3489
Joined: Tue Aug 07, 2007 8:20 am

Post » Thu Sep 02, 2010 2:43 am

OK, progress: Saving and loading effects now works, at least for default effects. Need to write functions to actually add new effects before I can test them...
Progress ... what a lovely word !
User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am

Post » Wed Sep 01, 2010 7:29 pm

More progress!

Saving and loading now actually works, as opposed to last time I said it did, when I was wrong.

Further, functions for adding, finding, and deleting magic effects to/from the list, and of getting and setting all of their properties (with the exception of the checkboxes, which are a pain and I'll have to make a decision about, see below), are done. Functions to add and delete affix lines from magic effects, are done. Working on functions to get and set various affix line parameters, then it's on to affixes. The "affix lists", however, still exist only as a declaration in a header file; functions for those will have to be written, just as soon as I decide what they're going to be...

SO, questions for you guys:
  • There are a lot of checkboxes. This is a pain to code. How would people feel if I provided a function like "aresGetMagicEffectFlag int:flag", where you have to pass in a code to tell it which checkbox you want ("For Spellmaking", for example, would be aresGetMagicEffectFlag 2048)? This is massively easier, mostly because that is how that information is actually stored.
  • There are two parameters that I'm having difficulty describing succinctly in a function name. One is whether or not an effect forces weapons with that effect to be "On Self", that is, affect the wielder rather than whoever you whack with it. The other is the opposite, that adds the effect to your attack even when it's on apparel. Interally, I'm calling them "WepEffOnSelf" and "AppEffOnTarget", but those are not exactly... intuitive. Suggestions?
  • Since I've decided to allow all levels of affixes from a given affix line to apply to any item type in which that affix line is applicable, I don't plan on coding in the ability to not do this. Is this OK with everyone? Does anyone plan on using that ability? Note that I am replacing it with the ability to modify the rarity and relative level of a given affix line instead.

Any input is welcome!
User avatar
Marine Arrègle
 
Posts: 3423
Joined: Sat Mar 24, 2007 5:19 am

Next

Return to IV - Oblivion