Jump to content
DarkMatters Celebrates
19 Years of Christmas in Ancaria

From the Sacred 2 Christmas Island Soundtrack
Click to Open Player!

dimitrius154

Dimitrius's CM Patch Addendum

Recommended Posts

So, then:

newBonus = {
--  name = "sb_off_chance_force_CC",
  rating = 35,
  basedonskill = "SKILL_INVALID",
  type = "BONUS_NOFLEE",
  spez = "",
  spez2 = "",
  usagebits = 65535,
  minconstraints = {5,9,0},
  difficultyvaluerange0 = {0,20,50},
  difficultyvaluerange1 = {1,30,60},
  difficultyvaluerange2 = {2,40,70},
  difficultyvaluerange3 = {3,50,85},
  difficultyvaluerange4 = {4,60,100},
}
mgr.createBonus(931, newBonus);

A chance to force a non-boss opponent to get close and personal. Requres certain edits in behavior.txt.

BONUS_NOFLEE is now a unique hybrid bonus type. If present on the attacker it act as a chance to force an opponent into close combat, if present on the defender it represents resistance to both panicking and being force into close combat. Wonder how to name it. 'Insolence Chance'? 

  • Like! 1
Link to comment
On 4/25/2020 at 9:55 PM, dimitrius154 said:

Mr. @Charon117, I have a request, if You're interested:

We have this here global.res decoded in a form of a txt file. All text strings are accompanied by a generated numerical ID. Would You consider writing a utility, that compares two such text files, and generates a report, that contains instances of differing texts for matching numerical IDs?

I need the decoded file to look at in order to make a judgement.

Link to comment
4 hours ago, Flix said:

Why not just run a compare against the two files? You'd have to browse through all the changes either way.

I'm expecting heavy differences in tooltip, skill and CA descriptions. Also, having to run a conditional comparison for every string manually does not seem too appealing.

Link to comment
34 minutes ago, dimitrius154 said:

I'm expecting heavy differences in tooltip, skill and CA descriptions. Also, having to run a conditional comparison for every string manually does not seem too appealing.

Do it in excel if you have that? String comparisons and vlookup should do the trick and you can filter nice and easily with built in excel functionality.

  • Thanks! 1
Link to comment
2 hours ago, Dragon Brother said:

Do it in excel if you have that? String comparisons and vlookup should do the trick and you can filter nice and easily with built in excel functionality.

Sure, that's what I'm planning to do, if the more convenient method via browsing an explicit report is unavailable:smile: Right now I'm trying to code in what I call 'Mount Wards' anyway.

Link to comment
12 hours ago, Flix said:

EE 2.4 global_En_texts:  https://drive.google.com/file/d/1tFCLxg4u1Va_hmKm8p8MX8ExbBlyCkg1/view?usp=sharing

@dimitrius154 Why not just run a compare against the two files? You'd have to browse through all the changes either way.

1. I assume you are working on this with a hex editor, and not on the generated file.

2. I assume you can generate different encoding formats. The file in question appears to have 2 byte wide char, instead of 1. Typically Unicode.

3. We need to agree to an encoding format the file will come in. Different formats will just lead to garbage. I prefer UTF-8.

4. Usually the header of the original hex file should give you the encoding, but can never be trusted to be correct. We would need to know which hex encoding Sacred 2 is using ( or in what encoding you are working in the hex editor with).

Edited by Charon117
Link to comment
21 minutes ago, Charon117 said:

1. I assume you are working on this with a hex editor, and not on the generated file.

The edits are made on a txt file generated by decoding the global.res by Sacred2 reader/writer. The editor used is Notepad++.

24 minutes ago, Charon117 said:

2. I assume you can generate different encoding formats. The file in question appears to have 2 byte wide char, instead of 1. Typically Unicode.

3. We need to agree to an encoding format the file will come in. Different formats will just lead to garbage. I prefer UTF-8.

Sacred2 reader/writer decodes in UTF-8, according to the listings. Notepad++ states that the encoding for generated files is UCS-2 LE BOM. If the encoding is changed to UTF-8, the file fails to encode. So it should be UCS-2 LE BOM.

  • Like! 1
Link to comment
3 hours ago, dimitrius154 said:

The edits are made on a txt file generated by decoding the global.res by Sacred2 reader/writer. The editor used is Notepad++.

Sacred2 reader/writer decodes in UTF-8, according to the listings. Notepad++ states that the encoding for generated files is UCS-2 LE BOM. If the encoding is changed to UTF-8, the file fails to encode. So it should be UCS-2 LE BOM.

This is all accurate.

Link to comment
8 hours ago, dimitrius154 said:

The edits are made on a txt file generated by decoding the global.res by Sacred2 reader/writer. The editor used is Notepad++.

... and then encoded back, I get it.

8 hours ago, dimitrius154 said:

Sacred2 reader/writer decodes in UTF-8, according to the listings. Notepad++ states that the encoding for generated files is UCS-2 LE BOM. If the encoding is changed to UTF-8, the file fails to encode. So it should be UCS-2 LE BOM.

Yes, sublime text says its utf-16 LE with BOM.

 

....

 

Ok, so I managed to deal with the madness which is not utf-8 encoding.

...

 

Yeah ... so what comparasions do you want to have ?

Edit: Also can somebody give me a different global.txt, as an example for what to compare for ?

Edited by Charon117
Link to comment
1 hour ago, Charon117 said:

Also can somebody give me a different global.txt, as an example for what to compare for ?

There, a current-state-of-affairs(as in nearly ready) Addendum English version: https://drive.google.com/open?id=1aYAKGdaLmr2khh0_y_sX3TkLccPz_8Az

1 hour ago, Charon117 said:

so what comparasions do you want to have ?

The idea is to compare all strings with same IDs, then retrieve a report containing IDs, where strings differ. It would be kind of nice to be able to set a condition, as of how many separate words the string in question should consist(to weed out pesky skill, CA and property names) to be included into said report.

  • Thanks! 1
Link to comment
13 minutes ago, dimitrius154 said:

The idea is to compare all strings with same IDs, then retrieve a report containing IDs, where strings differ. It would be kind of nice to be able to set a condition, as of how many separate words the string in question should consist(to weed out pesky skill, CA and property names) to be included into said report.

Personally I plan to review every different line. I'd recommend you do the same, to catch typo corrections that may only consist of one or two characters within a word changed.

Link to comment
5 minutes ago, dimitrius154 said:

The idea is to compare all strings with same IDs, then retrieve a report containing IDs, where strings differ.

I can make a container with all strings that differ, no problem.

9 minutes ago, dimitrius154 said:

It would be kind of nice to be able to set a condition, as of how many separate words the string in question should consist(to weed out pesky skill, CA and property names) to be included into said report.

I have to admit you lost me there.

But if you are looking for a fancy-schmancy-colorful comparasion tool than look no further than WinMerge. Actually, now that I mention it, what should I do that WinMerge cant ?

Unbenannt.thumb.png.c5e8f6468b107ea08109fa9f5e602977.png

  • Thanks! 1
Link to comment
8 minutes ago, Charon117 said:

what should I do that WinMerge cant ?

Interesting. I'll take a look.

Link to comment

Setting mount traders to have a second tab has proven ineffective, the necessary local variables are completely cut out. Then again, I've just checked Sacred Underworld, horse dealers don't sell saddles, general traders do.

I think, I'll make Blacksmiths sell Damage modifiers and Mount Wards, instead of armor.

Link to comment
57 minutes ago, dimitrius154 said:

Setting mount traders to have a second tab has proven ineffective, the necessary local variables are completely cut out. Then again, I've just checked Sacred Underworld, horse dealers don't sell saddles, general traders do.

I think, I'll make Blacksmiths sell Damage modifiers and Mount Wards, instead of armor.

Thinking in this general area, have you noticed that there seem to be rudiments of other merchant/interact types?  I noticed there are "Witch" and "Goldsmith" interact-creatures for most races in creatures.txt.  Is there any indication in the code of what these characters were supposed to do?  I suspect originally the Goldsmith may have been the jewelry vendor, and became obsolete when jewelry was given to the RuneMaster instead.

Some of them became generic NPC's or quest givers, but some are unused altogether (Orc and Desert witches for sure).

Link to comment
12 minutes ago, Flix said:

Thinking in this general area, have you noticed that there seem to be rudiments of other merchant/interact types? 

A 'Priest' morphing into a special mount trader is the worst of it all. All the while keeping the above-head sign and the name. That's why Hugard is Priest in vanilla. I've sorted that out and created a new sign.

Priest were supposed to sell potions, which is reasonable.

12 minutes ago, Flix said:

I suspect originally the Goldsmith may have been the jewelry vendor

Correct. Jewelry was supposed to be sold by Goldsmiths. There's even a special sign for them.

[EDIT] Dunno what witches would sell. Ah, I get it - magic staves and potions.

P.S. Some 'efficient manager'(that's how we call such individuals) had axed the content. I have no other explanation for the chaos I see. Then again, Blizzard had axed Diablo I content. and back then they had no 'efficient managers'.

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

Then again, Blizzard had axed Diablo I content. and back then they had no 'efficient managers'.

Really, like what? I never knew Blizzard North worked under any restrictions back then.

Link to comment
24 minutes ago, Flix said:

Really, like what?

Fleshdoom Quest, Izual Quest, Hellforge Quest, Andariel Quest. Quests, NPCs and speeches. I'm not aware of any mechanics content being cut. Though Black Death special ability was badly implemented, no mistake.

Link to comment
4 minutes ago, dimitrius154 said:

Fleshdoom Quest, Izual Quest, Hellforge Quest, Andariel Quest. Quests, NPCs and speeches.

I should have realized that. I used some of those audio files in D2F and was left wondering why I had never encountered them in-game.

Link to comment
1 hour ago, Charon117 said:

So, happy with WinMerge @dimitrius154 ?

Should I close this software project, or keep it open ? Is there still something you want me to work on ?

Yes, thank you for the tip about said software functionality. I have no other requests, since the work left is mostly analyzing  code via Ollydbg.

Link to comment

I guess it's worth mentioning that there seems to be a bug dating back to the olden days where an enemy converted by Instill Belief doesn't always regain their correct faction.  Sometimes when the conversion expires they will become unattackable.  They may or may not continue to follow the player around and will even attack friendly NPC's.  I haven't looked into it myself but the bug still persists in EE and D2F.

Link to comment
9 minutes ago, Flix said:

They may or may not continue to follow the player around and will even attack friendly NPC's. 

Mind-control techics tend to damage the feeble-minded, don't they?

On a serious note, I have a feeling, that they NEVER regain their proper faction. We'll see.

Link to comment

The only lead I have is that I noticed a blueprint bonus called "crbonus_faction_modifier_enemy_hero" that may be involved.  That could just be something to do with Primal Mutation though.

Link to comment

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...