[Scummvm-tracker] [ScummVM :: Bugs] #11699: XEEN: Element Affix distribution

ScummVM :: Bugs trac at scummvm.org
Sun May 21 10:05:18 UTC 2023


#11699: XEEN: Element Affix distribution
------------------------+---------------------------------------------
Reporter:  dreammaster  |       Owner:  (none)
    Type:  defect       |      Status:  new
Priority:  normal       |   Component:  Engine: Xeen
 Version:               |  Resolution:
Keywords:               |        Game:  Might and Magic: World of Xeen
------------------------+---------------------------------------------
Comment (by yarolig):

 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);
 }}}
-- 
Ticket URL: <https://bugs.scummvm.org/ticket/11699#comment:4>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM


More information about the Scummvm-tracker mailing list