Opened 4 years ago
Closed 18 months ago
#11699 closed defect (fixed)
XEEN: Element Affix distribution
Reported by: | dreammaster | Owned by: | dreammaster |
---|---|---|---|
Priority: | normal | Component: | Engine: MM: Xeen |
Version: | Keywords: | ||
Cc: | Game: | Might and Magic: World of Xeen |
Description
Elemental Affix distribution: I only get items (loot or vendor) with the strongest elemental affixes available. According to the xeen wiki at xeen.fandom.com/wiki/Item_Enchantments
there are elemental affixes of various strength, but I only get scorching, cryo, noxious, kinetic, dyna etc..
Change History (5)
comment:1 by , 4 years ago
comment:2 by , 4 years ago
I also noticed that recently, but I thought this to be a feature, not a bug :-D
But you're right, it should probably be checked against the original source code and the probabilities fixed
comment:3 by , 19 months ago
I played mm4 and also find that item generation is differs from original.
I trying to annotate and fix item generation code. I wanted to split renaming/annontation and actual fix in 2 commits. But failed :)
I belive this will fix distribution for random enchantments, but I have not checked it yet:
Elemental damage:
https://github.com/scummvm/scummvm/compare/master...yarolig:scummvm:hacking-xeen#diff-342a894526042fca0e6bec4feffdc530085fa3783bd2e764e8e596aff6587a32L1137-R1140
Attribute bonuses:
https://github.com/scummvm/scummvm/compare/master...yarolig:scummvm:hacking-xeen#diff-342a894526042fca0e6bec4feffdc530085fa3783bd2e764e8e596aff6587a32L1165-R1176
comment:4 by , 18 months ago
New patch!
It has 2 commits. First one is cosmetic, the second will change logic.
https://github.com/scummvm/scummvm/pull/5030
I hope it works and is closer to original game.
There is a good description of item generetion there https://gamefaqs.gamespot.com/pc/932529-might-and-magic-world-of-xeen/faqs/63641 in SECTION 5A - EQUIPMENT GENERATION AND PROPERTIES.
I used my common sense, game cluebook and that FAQ to change code that generate items.
The code I used to print random leveled item descriptions at start:
diff --git a/engines/mm/xeen/party.cpp b/engines/mm/xeen/party.cpp index f9f2aac9a7c..c73b8b1c00d 100644 --- a/engines/mm/xeen/party.cpp +++ b/engines/mm/xeen/party.cpp @@ -118,6 +118,30 @@ void BlacksmithWares::regenerate() { // Clear existing blacksmith wares clear(); + + // test makeItem + debug("== test makeItem =="); + + for (int level=1;level<8;level++) { + debug("== LEVEL %d ==", level); + for (int i=0;i<100;i++) { + Character ch; + ItemCategory itemCat = ch.makeItem(level, 0, 0); + XeenItem &item = ch._items[itemCat][0]; + + Common::String s; + Common::String details = ch._items[itemCat].getIdentifiedDetails(0); + Common::String desc = ch._items[itemCat].getFullDescription(0); + Common::String str = Common::String::format(Res.IDENTIFY_ITEM_MSG, + desc.c_str(), details.c_str()); + + debug("L%d-cat=%d-id=%d-mat=%d-------------------------------\n%s\n", level, itemCat, item._id, item._material, str.c_str()); + } + } + + + + // Wares setup for Clouds of Xeen for (int slotNum = 0; slotNum < 4; ++slotNum) { Common::fill(&catCount[0], &catCount[4], 0);
comment:5 by , 18 months ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Thanks for the PR. Merged in.
Affix distribution of accessories is also strange: I get tons of "accelarator", "kinetic", "ego", "cryo", but nearly nothing else