Jump to content

Sacred 2 Downloads - DIMITRIUS'S CM PATCH ADDENDUM - 2023


Recommended Posts

On 9/10/2018 at 5:08 PM, dimitrius154 said:

The devs got mired in their own calculations. I'm attaching two reference text files outlining the mechanics and the future fixes.

notes30.txt

notes31.txt

Looks good.  Maybe once it's complete we can make a master list that's more user friendly?  Would be good material for the Wiki.

Link to comment
1 minute ago, Flix said:

Looks good. 

The situation's worse, than I thought. The entire bonus -> name table is mangled, a small thing. What's bad is that most boni, that have "spez" don't get their "spez" transmitted, instead some garbage values are collected.

Link to comment
6 hours ago, dimitrius154 said:

Good, one more file is needed, then - the iteminfo.txt. 

Attached.

iteminfo.txt

I'm not sure where you're going with this, but my plan for D2F was to disable material and rarity affixes from items, so that only bonus-related affixes appeared.  The idea being that it would be more like D2.  Of course in D2, the name of the item itself (Club, Cudgel, Truncheon) would inform the player of the rarity, unlike the randomized naming used in Sacred 2.

Link to comment
4 hours ago, Flix said:

my plan for D2F was to disable material and rarity affixes from items, so that only bonus-related affixes appeared.

That won't work. There's a reason why there're so many magic and rare items with just item names: the naming function chooses a random(or two random) parameter(s) upon which it bases a prefix or a suffix(or both) of the item. Should the result be "blank", it does not choose others, but leaves an item without a prefix, a suffix, or both. Also, items with the "0_default" material assigned seem to be unable to receive either a suffix, or a prefix.

Edited by dimitrius154
Link to comment
25 minutes ago, Flix said:

This seems to work by my tests so far.

Now that's interesting: the "must sum up to 100" part seems to be false. It's actually 3 probabilities calculated separately. If we take the default 34,33,33 then there's 0.67 * 0.67 * 0.66 =  29,6% chance, that the item's name will have neither prefix, nor suffix. Good to know.

The problem with boni connected to BONUS_WEAPONDAMAGERANGE, BONUS_ARMOR and BONUS_SKILL is as follows: the name variation defining parameter retrieval is fundamentally botched. BONUS_WEAPONDAMAGERANGE and BONUS_ARMOR get overridden by BONUS_SLOT, hence erroneous ice related descriptions. If no BONUS_SLOT is present they only return 0 - physical. BONUS_SKILL always returns -1, thus no BONUS_SKILL naming variation is possible.

Link to comment

OK, so the current state of affairs for the item name generator is as follows:

 

Most boni naming can be made to work in an expected pattern save for those, that have "DMG_...", or "SKILL_" as "spez". Those do not get retrieved before, or during item name generation, only after.

"DMG_..." either returns 0(that's why there are many rares with "Bulwark" and "Armadillo" names), or if slots are present, the slot type ID(3 - Bronze, 4 - Silver, 5 - Gold) is returned. That results in poison, or ice related naming.

"SKILL_..." always returns 0. Therefore, no prefix or suffix can result from boni with that spez.

 

I can concoct no proper resolution for that problem, but I have an idea, as to how to circumvent it. 

[EDIT] Hmpf, actually not a single "spez" value except, somehow, the one from the slot bonus is retrieved. Isn't it great.

 

Edited by dimitrius154
Link to comment
3 hours ago, Flix said:

So there's nothing that can be done for the item names?

In fact, I'm almost done repairing that schnapps-borne contraption. Need to add some extra names for the class-specific modifiers and port the fixes to all four supported s2logic.dll versions. 

Link to comment

Each time the two of you go back and forth with the game's code I get the feeling that there's more broken stuff in it than what's actually working. :D I wonder how the game got such a cult following with that much being broken, and no it's not a jab as much as it's a genuine thought.

Link to comment
51 minutes ago, Androdion said:

I wonder how the game got such a cult following with that much being broken, and no it's not a jab as much as it's a genuine thought.

Pretty much the same way, as Daggerfall and Morrowind did. An appealing setting and a good storyline. Sacred 2 would be, perhaps, as popular as Morrowind, if the devs had released a world and a script editor back in the day.

51 minutes ago, Androdion said:

more broken stuff in it than what's actually working.

It's not that the programmers were bad, it's that the project management went awry. Quite a few indications of a lack of communication among those assigned to various parts of the game mechanics code.

Edited by dimitrius154
Link to comment
3 hours ago, dimitrius154 said:

Ben, the name generator fix package for d2f is available at https://drive.google.com/open?id=1LqOuHBsv-8bMT60M6Z8-EliBA3kJ5WvH  The fix involved tampering with rare,material,bonus ratio, thus the default values are used in the supplied NameGenConfig.txt.

I think that might be the wrong link?  I'm getting the code listings again.

So... if ratios were set to 100% rarity in namegenconfig.txt, what kind of consequences do you expect?

Link to comment
6 hours ago, Flix said:

I think that might be the wrong link?  I'm getting the code listings again.

It is, sorry. Late night. https://drive.google.com/open?id=1OyHi4bbRRs2vhaWfMBymMxtmpfW7Kten

6 hours ago, Flix said:

what kind of consequences do you expect?

Either the ratio in question might not work in the expected way(that is names, generated from lists with ratio set to 0, would still occur), or items with blank prefix and suffix would sometimes be generated(which is the primary vanilla random name generation bug).

 

I'd say, the naming process looks optimal now. Although, I'd advice changing all "normal" item rarity to 1, "magic" item rarity to 5, and "rare" item rarity to 9.  

Edited by dimitrius154
  • Thanks! 1
Link to comment

It's been bugging me for some time - "why there's no NPC dialog interaction in Nor-Plat, Hissil'ta, or Dyr Lain?". Well, now I know: in a moment of ingenuity typical of Sacred 2 script writing many of the "statist" NPCs have not been assigned speakertype_id's.  

Link to comment
2 hours ago, dimitrius154 said:

It's been bugging me for some time - "why there's no NPC dialog interaction in Nor-Plat, Hissil'ta, or Dyr Lain?". Well, now I know: in a moment of ingenuity typical of Sacred 2 script writing many of the "statist" NPCs have not been assigned speakertype_id's.  

Doesn't it just pull voices from soundprofile.txt based on the itemtype?  I talk to Orcs, Lizardmen, and Dryads all the time.  The main thing to check is that the creature's itemtype is added to soundprofile.txt.

Link to comment
2 hours ago, Flix said:

Doesn't it just pull voices from soundprofile.txt based on the itemtype? 

Thing is, there's a specific check for "speaker_id" value during the "cNPCChatAI" applicability determination. For Orcs, valid values seem to be 7(shamen) and 2(the rest).

[EDIT] I now partially understand how the Eliza voiceover system works(ahem, should work). That might allow to restore various cheers, taunts and rumors.

Edited by dimitrius154
Link to comment
On 9/29/2018 at 1:10 AM, dimitrius154 said:

It is, sorry. Late night. https://drive.google.com/open?id=1OyHi4bbRRs2vhaWfMBymMxtmpfW7Kten

Either the ratio in question might not work in the expected way(that is names, generated from lists with ratio set to 0, would still occur), or items with blank prefix and suffix would sometimes be generated(which is the primary vanilla random name generation bug).

 

I'd say, the naming process looks optimal now. Although, I'd advice changing all "normal" item rarity to 1, "magic" item rarity to 5, and "rare" item rarity to 9.  

Thank you.  I'm working on integrating the changes into D2F now, will test soon.

Quick question, in your CSV files " hasGender=false; " does not have the semicolon. Does that matter at all?

Link to comment

Well it all seems to be working ok.  I tried to have the modifiers be 100% bonus in namegenconfig.txt at first, but the game crashed when I moused over gemstones (relics).  Not every time but quite often.  Also, it was as you said: about half of all items had no affixes at all, just names like "Axe".

I've now split the item naming 50/50 between material and bonus, leaving rarity out of the mix.  So far I've visited several merchants and not had any crashes, or missing or erroneous modifiers.  I'll continue testing. 

My one lingering issue is that gemstones are now subject to randomized naming.  Before this I had well-defined names in global.res: Chipped Sapphire/Flawed Sapphire/Sapphire/Flawless Sapphire/Perfect Sapphire.  Now the first three tiers have names like "Chilling Gemstone of the Cavalry."  Is there any way to undo that?

Link to comment
2 hours ago, Flix said:

Is there any way to undo that?

Yes, I've updated the package. 

2 hours ago, Flix said:

but the game crashed when I moused over gemstones (relics)

Now that was not supposed to happen anyway. May I see the log entry?

Edited by dimitrius154
Link to comment
  • The title was changed to DIMITRIUS'S CM PATCH ADDENDUM - 2023
  • This topic was featured and unfeatured
  • The topic was featured

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...
Please Sign In or Sign Up