Okay, I was thinking about this, and I realize that the Insecticide code is borked, because what the 'special' flag really indicates is 'does this item have any abilities that can only be added with Create Artifact' (cost 250+). Anyway, item fixer results:
All 'misc' items with stat bonuses are priced wrong and don't charge double for stat bonuses on a misc.
All 'chain' and 'plate' items are priced wrong and don't give the defense bonus for chain/plate.
Many items have the wrong book requirements, usually it's just in the wrong order (e.g. cloak of the aerie is chaos 3 life 2 and should be sorcery 3 death 2).
I created a fixed version of itemdata.lbx in this thread.
(October 26th, 2013, 07:12)I like Serena Wrote: Investigated some more and there is more.
Here's the table how the function that selects a prefab item is called.
Code:
Source Type Spellbooks Value
Event gift of the gods 2 Receiver 0
Merchant 0 12-12-12-12-12 0
Lair v1.31 registered-item-value Receiver 0
Lair v1.40n 0 Receiver registered-item-value
Lair failed special 0 Receiver 1200
AI casts enchant item 1 Receiver 1000
AI casts create artifact 2 Receiver 30000
Quote:When generating an item with random powers, we get:
Code:
generate an item with random powers(type, value):
if (value = 0) treat as random value 700 - 1700
if (type = 1) generate 2 powers with max cost 200
if (type = 0) generate 3 powers with max cost 20000
if (type = 2) generate 4 powers with max cost 20000
So value 0 for gods given and merchant means the item value is between 700 - 1700, correct?
But if AI fails to finds a precreated item will generate one 3 powers with max cost 20000 for merchant and 4 powers with max cost 20000 for gods given, I'm right?
Where can we mod this values?
Expecially those:
Quote: if (value = 0) treat as random value 700 - 1700
if (type = 1) generate 2 powers with max cost 200
Quote:The algorithm (v1.31) is:
Code:
find_item(type, spellbooks, value):
try 50 times or until found
select randomly from the 250 prefab items
if (item in game) try again
if (not enough spellbooks) try again
if (type = 1 AND special item*) try again
if (type = 2 AND NOT special item) try again
if (value != 0 AND (item cost < value / 2 OR item cost > value)) try again
if (no item found)
generate an item with random powers
*The Unk37 column indicates if the item is a "special item".
The algorithm (v1.40n) is:
Code:
find_item(type, spellbooks, value):
try 50 times or until found
select randomly from the 250 prefab items
if (item in game) try again
if (type >= 1 AND not enough spellbooks) try again
if (type = 0 AND special item) try again
if (value != 0 AND (item cost < value / 2 OR item cost > value)) try again
if (no item found)
generate an item with random powers
As you can see there are some subtle differences in Insecticide.
Sure: special items can't be found in lairs.
How can I mod the 50 times to make them, let's say, 250 times?
(October 29th, 2013, 18:56)I like Serena Wrote:
(October 26th, 2013, 08:38)I like Serena Wrote: In Insecticide 1.40n we can make a "fix".
Currently wizards.exe:8da06 contains 7Ch.
Change it into EBh and you'll drop the requirement that an item in a lair or from the merchant must be non-special.
(This won't work in v1.31.)
I'm going to try this now.
I have checked that my "fix" for Insecticide works.
You still won't find the most powerful items, since lairs never have items of value over 2500.
But any item up to a cost of 2500 can be found now.
That leaves 41 items cannot be found in a lair, but they can come from a merchant or from the gods.
Very good, maybe we can revert this in Insecticide O.
Exactly what is the new code with this "fix"?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it.
Hi guys,
in 1.40, I tried to fix the item giving ACCORDING to what the Official standard guide says in Appendix C, pp.418-420, about giving treasure. I am quite sure there was a definite bug in the 1.31 routine.
I believe I was correct to
a) separate the Divine gift routine from book requirements
b) correcting the book requirements reading (I hope I did it right, this was one of my first fixes in Insecticide) - I admit that the rewards have become more predictable, but that's how Insecticide works: it corrects according to the OSG.
What I totally missed, is the special flag removing some objects from the consideration. This is a gross mistake and it should be corrected as ILSE points out.
---
It was Lydon, who discovered the bug through thouroughful testing (see spoiler below with 1.31 test he undertook with Jafar (all Sorcery books), but Jafar only got artifacts with Nature book requirements. The bug is, that the data for book requirements (this is mentioned in the OSG that you should only find the items in the lairs that you have the book requirements for) are incorrectly written in the Itemdata.LBX. I think that the Item creator writes the data incorrectly into the LBX file. This resulted in a very limited poll of items (see Lydon's test!).
These are my email notes from a discussion with Lydon, who discovered the bug in 1.31:
1) the item_give routine is used also for the AI create_item casting. In that case, the program tests whether the wizard has the necessary books. But the same check is used for the case of divine_gift or a case where you get it from the lair. It does not give sense!
2) Moreover, I discovered in the process that the book data are wrongly written in the Itemdata.lbx. So you got a lot of Nature_books_required sort of items in your tests while having only blue Jafar. (I even thought this proceeding was a way to procure you with items that do NOT match your book settings, but this idea seems to be overstretched).
All in all, 1) and 2) together means that you have VERY little expensive items at your disposition. So, when the program tries to pick an expensive item, it has very few possibilities. Theodores Liberator (9100) - is noticeable as a repeated exception! - it has no book requirement despite being so expensive. (Alomst all items you mentioned including Disc of advancement (2500) have no book requirements).
When the program does not find one, it choses an emergency routine creating a random item.
The bugs have as an effect
a) big prices items almost never given
b) the majority of the items you will see in a game are from the 'no requirements' bracket, which makes the ITEMS area quite flat. I remember a poll from a forum when the best item pick was definitely Theodores Liberator, of them all. Now we know why.
Lydon's 1.31 test that lead to the discovery.
Hi Kyrub, I looked at this after you mentioned it, you already kind of expected the results but I'd like your observations on it too since it's still not THAT clear.
My own first impression on Artifact treasure; it's completely 100% random! And doesn't follow the OSG explanation. You can recieve ANY item from ANY Weak or Strong Lair, Tower or Node.
If you look below at "Arcanus Normal Lair #3:" The Monster Budget is at the extreme HIGH end and so then should the Treasure Budget, but it's not, (or doesn't seem to be any different) in fact these particular results are just plain LOW and similar to any other test! (ie. VERY random!)
Whatever "TYPE" of tresure you get is pre-determined on map creation. I don't mean the actual "Artifact", "Spell" or "Gold/Mana" but that if a certain Lair etc. is going to give you an Artifact, it will ALWAYS cough up SOME Artifact. (this seems contrary (as I understand it) to the "Chance" noted in the OSG pg. 417 (Table C1).
The OSG pg. 419 (Table C3) says "any item above 3000g can not be picked as treasure" But it also says that "cost can range anywhere from its actual gold value to half that amount" Now from testing, I not only recieved 3050 and 3200 items (which could have been halved?) but ALSO a 9100 item on 3 occasions, which certainly breaks the "Half" explanation. (no items between 3200-9100 where given in my testing, which is interesting, also recieving any items between 2000-3200 was not TOO common either)
------------------------------
FINAL IMPRESSION
------------------------------
MAYBE its NOT "completely 100% random", there MAY be a GENERAL(ie. doesn't use Budgets) Low-High scale used for ITEMS (ie. NOT strength of Lairs, Towers and Nodes), because items 2000-3200 where rare and 3200-9100 were very rare BUT on the other hand, these items are also a LOT fewer with 150-1950 making up MOST of the total 250 items available. My 100 tries at "Arcanus Normal Lair #1:" which was on the VERY High end of Monster Budgets but produced 1 (9100) item and 1 (3200) item as the MOST expensive items suggest that even Monster Budgets are not taken into consideration... so coresponding Treasure Budget must also be a fairy tale! (or bugged?, but I doubt there was ever code for this)
My Final FINAL impression; there MAY be a Low-High scale used for ITEMS, that reduces the appearance on High Cost ITEMS BUT this scale has absolutely NO relation to Monster Budgets! NONE! (you can get ANY item, anywhere! as long as you KEEP trying with High Cost Items just being more rare in general) Well, that's my long winded interpretation of all this!
----------THE TEST----------
For purpose of testing, only Lairs, Towers, Nodes etc. which gave ONE item ONLY as treasure were tested.
Artifacts in itemmake.exe range from Low-to-High = 150-9100 with the vast majority of items between 200-2000.
In the following "ND&NS" stands for Normal Difficulty & Normal Strength Node.
After the "=" sign the number is "current sites Monster Budget", number in brackets after that is "Monster Budget RANGE for this site" and the SQUARE brackets indicates "Treasure Budget for this site". If the Monster Budget is HIGH, the Treasure Budget should aslo be on the HIGH side according to the OSG.
Number in brackets after ITEM indicates GOLD Cost.
Tower of Wizardry (both Arcanus & Myrror)
--------------------------
Shield of Demos (200)
Dragon Slayer (500)
Idspispopd (600)
Staff of Magic Mastery (800)
The Archer (1050)
Shield of Quatis (1050)
Peppermace of Gates (1150)
Double Axe of Pain (1750)
Double Axe of Pain (1750)
Wand of the Beast (3050)
Sword of Mallana (200)
Mail of Arcanus (300)
Dragon Slayer (500)
Pummel Mace (550)
Ring of Power (550)
Living Bow (650)
Living Bow (650)
Plate of Eandor (700)
The Mighty Wand of Zod (1250)
Theodores Liberator (9100)
Tower of Wizardry #3:
5 Fire Giants (5x150) = 750 (575-900) [Treasure = 350-1500]
Sword of Cannae (200)
Mail of Arcanus (300)
Amulet of Battle (350)
Wand of Immunity (400)
Dragon Slayer (500)
Flaming Sword of Death (550)
Bane Blade (800)
Mauler (850)
Uhl Khakhaas (900)
Double Axe of Pain (1750)
Axe of Uncaring (300)
Shield of Evasion (400)
Orions Belt (550)
Chain Mail of Movement (600)
Axe of Vivisection (850)
Wand of Infinite Magic (900)
The Mighty Wand of Zod (1250)
The Inquisition (1700)
Shield of Brooke (1850)
Bracer of Mrad (1950)
*100 additional tries; most expensive = Wand of the Beast (3050)
Axe of Severe Pain (150)
Wand of Immunity (400)
Champions Platemail (500)
Orions Belt (550)
Axe of Stone (600)
Wand of Lesser Might (850)
Crossbow of Power (900)
Shield of Quatis (1050)
Power Axe (1200)
Hells Bolt (1400)
Zir Daun (150)
Sword of Mallana (200)
Wand of Immunity (400)
The Conjurers Friend (450)
The Conjurers Freind (450)
The Scarlet Bow (500)
Pin of Health (600)
Joshuas Sword (700)
Wand of the Mind (850)
Axe of the Caster (1700)
Zir Daun (150)
Amulet of Battle (350)
Platemail of Defense (400)
Chainmail of Resistance (400)
Shield of Eros (600)
Hacker (900)
The Regulator (900)
Crossbow of Power (900)
The Deathstrom (1400)
The Deathstrom (1400)
Mail of Arcanus (300)
Axe of Uncaring (300)
Champions Platemail (500)
Orions Belt (550)
Pin of Health (600)
Pin of Health (600)
Axe of Vivisection (850)
Skull Smasher (1100)
Golden Staff of Sharee (1750)
Disc of Advancement (2500)
Shield of Demos (200)
Amulet of Lesser Shielding (400)
Chainmail of Resistance (400)
Uhl Dover (650)
The Beheader (700)
Axe of Vivisection (850)
Hacker (900)
The Regulator (900)
Mithril Chainmail (900)
Shield of Brooke (1850)
Arcanus Lairs
--------------------
Arcanus Normal Lair #1:
2 Shadow Demons (2x325) + 5 Ghouls (5x80) = 1050 (75-1075) [Treasure = 50-1791]
Sword of Mallana (200)
Axe of Uncaring (300)
Dragon Slayer (500)
Ehr Rhee (700)
Power Axe (1200)
The Mighty Wand of Zod (1250)
Jans Hammer (1700)
Bracer of Mrad (1950)
Bow of the Dervish (2150)
Theodores Liberator (9100)
*100 additional tries; most expensive = Staff of Horus (3200)
Arcanus Normal Lair #2:
2 Nightstalker (2x250) + 7 Zombies (7x30*) = 710 (75-1075) [Treasure = 50-1791]
* from wizards.exe
Pin of Health (600)
Pin of Health (600)
Joshuas Sword (700)
Ehr Rhee (700)
Staff of Magic Mastery (800)
Mauler (850)
Wand of the Mage (1200)
Intimidator (1600)
Executioners Friend (1700)
Disc of Advancement (2500)
Arcanus Normal Lair #3:
3 Nightstalker (3x250) + 4 Ghouls (4x80) = 1070 (75-1075) [Treasure = 50-1791]
Sword of Cannae (200)
Orions Belt (550)
Axe of Stone (600)
Axe of Stone (600)
Plate of Eandor (700)
Axe of Vivisection (850)
Mithril Chainmail (900)
Knight Chopper (950)
Wand of the Mage (1200)
Flaming Staff (1650)
Myrror Lairs
-----------------
Myrror Normal Lair #1:
4 Shadow Demons (4x325) + 4 Zombies (4x30) = 1420 (150-1875) [Treasure = 150-4375]
Axe of Uncaring (300)
Amulet of Battle (350)
Wand of Immunity (400)
Dragon Slayer (500)
Shield of Eros (600)
Vans Shield (850)
Mithril Chainmail (900)
Hells Bolt (1400)
Shield of Brooke (1850)
Theodores Liberator (9100)
Myrror Normal Lair #2:
1 Colossus (800) = 800 (150-1875) [Treasure = 150-4375]
Mail of Arcanus (300)
Chain of Magical Health (300)
The Scarlet Bow (500)
Ring of Power (550)
Uhl Dover (650)
Living Bow (650)
Plate of Eandor (700)
Axe of Vivisection (850)
Mithril Chainmail (900)
Golden Staff of Sharee (1750)
Myrror Normal Lair #3:
8 Guardian Spirt (8x80) = 640 (150-1875) [Treasure = 150-4375]
Sword of Cannae (200)
The Branch of Magic (250)
Platemail of Defense (400)
Chain of Tyrolia (650)
Wand of the Mind (850)
The Archer (1050)
Peppermace of Gates (1150)
The Telecaster (1350)
The Inquisition (1700)
Double Axe of Pain (1750)
(March 23rd, 2015, 19:32)kyrub Wrote: Hi guys,
in 1.40, I tried to fix the item giving ACCORDING to what the Official standard guide says in Appendix C, pp.418-420, about giving treasure. I am quite sure there was a definite bug in the 1.31 routine.
I believe I was correct to
a) separate the Divine gift routine from book requirements
b) correcting the book requirements reading (I hope I did it right, this was one of my first fixes in Insecticide) - I admit that the rewards have become more predictable, but that's how Insecticide works: it corrects according to the OSG.
What I totally missed, is the special flag removing some objects from the consideration. This is a gross mistake and it should be corrected as ILSE points out.
Agree.
Except for the book requirements, I'll discuss it later, fixing the special item flag check (along with all the previous fix you've done) should let the game generate the right kind of magic object.
Since a premade object is more balanced than a random one, I would increase from 50 to 250 the number of time the games tries to find an acceptable object, before giving up and creating a random object.
As already noted (Anthony, few post before) the plate and the mail for already generated object do not get the +2 or +1 bonus. In effects I've replicated a plate found in a lair and, with the same enchantment, and the final value of the created plate defense is 2 point higher than the premade one. Can this be fixed?
Finally IMHO defeating a node that should be worth 1 book should give more than an object with a value of 1200, after various checking (to premade objects) I think 5000 is more likely. For a node worth 2 book, double it to 10000.
About book requirements.
Some objects have a book requirement so high they could not be found, maybe they are made this way so only from a Gift from the gods can handle it; maybe they was "temporary" set to be unavailable waiting to fix a bug (merge?). Maybe we can remove/substitute them?
Other book requirement are simply illogical (death+life) AFAIK, the requirement to "find" an object cannot be higher than the one to create it. It should be lower or equal at best. What do you think?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it.
The easiest fix for the book requirements is just changing itemdata.lbx, which I did here. Also fixed several too low defense ratings for chain and plate, too low cost for misc items.
(March 23rd, 2015, 21:18)Anthony Wrote: The easiest fix for the book requirements is just changing itemdata.lbx, which I did here.
Good! So using that itemdata.lbx let me (or another user) change the items with itemmake or tweaker and the object will have the correct value in the game, right?
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it.
Itemdata.lbx seems to be a mess. @Anthony presumably did all that was necessary. Did you (Anthony) test the book requirements, do they work as intended? Also, if the requirements are higher than the threshold needed to create them (as @FrancoK says), they should be leveled, no? Anthony, can you do it or did you already? I am ready and willing to incorporate your work into Insecticide, if you permit (with recognition of the author, obviously).
@FrancoK
I refuse to change the reward prices in Insecticide, it is a conservative patch. Mods are another story.
Last idea:
I struggle to understand the game logic behind book requirements for lair findings (I mean: you find what you find, even if you cannot create it). The only one I can imagine is technical: they tried to preserve the importance of creation of artifacts so they did not want the lairs to be a better source of items. It seems like poor design and items tend to be repetitive. I'd be better with lesser items with no book requirements or substantially cheaper creation. Maybe I could insert a Game option that bypasses book check for lairs.
(March 24th, 2015, 07:27)kyrub Wrote: Itemdata.lbx seems to be a mess. @Anthony presumably did all that was necessary. Did you (Anthony) test the book requirements, do they work as intended?
I never actually tested my mod, since I use a patch that removes book requirements for lairs, though the defense fix works. What I did was create a master list of what I thought each enchantment should require, and then overwrote the requirements for the item. I also put in a book requirement in the range 1-8 (1 for the first 5 commons, 2 for the next five, etc) for spell charges, since there's no way to support 'must know the spell being enchanted into the item').
As far as conservatism of mods goes, a conservative mod would allow finding items you can't craft in lairs, since in fact (because of bugged books) you could do so before. It would also allow finding powerful items, since again...
The only items that require impossible numbers of books are items with Merging, or items that have multiple traits that require large numbers of books (e.g. the Sword of Pendulum, which has Lightning (5 chaos), Vampiric (5 death), and Phantasmal (6 Sorcery). There's no really clear way of fixing that other than removing one or more traits from the item, though since it also costs 3700 it's unlikely to matter.
Quote:Itemdata.lbx seems to be a mess. @Anthony presumably did all that was necessary. Did you (Anthony) test the book requirements, do they work as intended? Also, if the requirements are higher than the threshold needed to create them (as @FrancoK says), they should be leveled, no? Anthony, can you do it or did you already? I am ready and willing to incorporate your work into Insecticide, if you permit (with recognition of the author, obviously).
What about the volcanoes fix and round count by Asfex?
Quote:@FrancoK
I refuse to change the reward prices in Insecticide, it is a conservative patch. Mods are another story.
Good. I've already inserted it in my mod and found it more balanced, but I appreciate your distinction between patch and mod.
Quote:Last idea:
I struggle to understand the game logic behind book requirements for lair findings (I mean: you find what you find, even if you cannot create it). The only one I can imagine is technical: they tried to preserve the importance of creation of artifacts so they did not want the lairs to be a better source of items. It seems like poor design and items tend to be repetitive. I'd be better with lesser items with no book requirements or substantially cheaper creation. Maybe I could insert a Game option that bypasses book check for lairs.
That would be VERY nice.
Only the people crazy enough to think they can change the world of Arcanus and Myrror can do it.