Jump to content

Sacred 2 modding tool: .txt Comparison extractor 2.1.1

1 Screenshot

About This File

This is a tool coded by myself to compare two different mods and extract all differences between each supported .txt file. Which is nearly all of them.
Use together with S2CE_Insert.exe so you can pull one mod out and insert it somewhere else. Especially useful for mods based on other mods if the first mod gets an update.
The tool will only extract actual changes and not the whole .txt file, that's what makes it so powerful!
The tools latest version will only work on windows OS, latest non-OS-dependend version is 2.0.0!

It works like that: One mod is the basic and one is the modded. It will only compare and extract things that the modded one contains. After each file comparison, if it found any changes, it will create an "EXTRACTED_...".txt file and only list the changes in that extracted file. If there exists something in the basic file that the modded one deleted in that file, it won't list it. If there exists something that's same in basic and modded, it won't list it. If there exists something in modded that's different to basic, it will list it. It works define-based, so if e.g. there's one entry changed in a spell in spells.txt, it will list the whole spell define in EXTRACTED_spells.txt.



  1. unzip/unrar this tool and your two mods you want to compare.
  2. put first mod folder into same folder as S2C_Extract.exe and lua54.dll
  3. [If the first mod are the CM-Patch scripts, replace them like I've described further down]
  4. rename the first mod folder to "basic" (without quotation marks)
  5. put the second mod folder into same folder as above
  6. rename second mod folder to "modded" (without quotation marks)
  7. douple-click S2C_Extract.exe
  8. Q'apla!

If you want to compare a mod to the CM-Patch-scripts, then you must replace

  • scripts/server/creatures.txt
  • scripts/server/weaponpool.txt
  • scripts/shared/spells.txt

with the three three files in the "CM 1.60 files debugged" folder first, as there are some problems and inconsistencies with the CM-patch.

  • Line-by-line based comparison .txt files:
    • scripts
      • autoexec.txt
      • genMipMapInfo.tx
      • options_readme.txt
      • startPos.txt
    • scripts/client
    • scripts/server
      • questscripts.txt
      • respawn.txt
      • spawnpos.txt
      • worldobjecthints.txt
    • scripts/shared
      • defines.txt
      • staticinfo.txt
  • Partially supported define based comparison .txt files:
    • scripts/server
      • creatures.txt
        • The "mapPosition"s at the end of the file are not supported due to two different safe patterns. Everything else works.
        • Unlike in earlier versions, Creature-Blueprint-Relations work again
      • quest.txt
        • Task Creatures work
        • Task Items work
        • Quests work
        • nothing else works
  • Fully supported define-based comparison .txt files:
    • scripts
      • behaviour.txt
      • heightmap.txt
      • landscape.txt
      • optionsDefault.txt
      • roadmap.txt
    • scripts/client
      • animation.txt
      • collision.txt
      • Eliza.txt
      • environment.txt
      • keycodes.txt
      • minitypes.txt
      • patches.txt
      • poidata.txt
      • relations.txt
      • soundcluster.txt
      • soundprofile.txt
      • soundresources.txt
      • surface.txt
    • scripts/server
      • balance.txt
      • blueprint.txt
      • creatures.txt
      • drop.txt
      • equipsets.txt
      • faction.txt
      • pathObjects.txt
      • portals.txt
      • region.txt
      • spawn.txt
      • treasure.txt
      • triggerarea.txt
      • triggervolumes.txt
      • waypoints.txt
      • weaponpool.txt
      • worldobjects.txt
    • scripts/server/heroes
      • centurio.txt
      • dragonmage.txt
      • dryadin.txt
      • highelve.txt
      • inquisitor.txt
      • seraphim.txt
      • templeguard.txt
    • scripts/shared
      • books.txt
      • creatureinfo.txt
      • iteminfo.txt
      • itemtype.txt
      • material.txt
      • spells.txt
      • typification.txt


The tool is completely coded in lua and fully open source. The Script is included in the upload since version 1.1.0.


  • Luiz Henrique de Figueiredo, I used his srlua to compile the script into a standalone .exe.


 You can discuss this tool here:


Edited by Lindor

What's New in Version 1.0.0   See changelog


No changelog available for this version.

  • Like! 1

User Feedback

Recommended Comments

There is a major bug I discovered in the adddollars() and killdollars() functions, resulting in some comparisons failing (or better: not even happening), esp. in spells.txt. There will be a very important update coming soon which fixes the bug.

Link to comment

New version available, main goodie is added line-by-line comparison for all previously not supported files.:gogo:

Link to comment

2.1.0 is out. I forgot to include the script this time, sry for that, I noticed too late. If you want the script, just PM me and I'll send you.

I have one last plan for 2.1.1: I want to make it so that you don't have to manually replace the CM-patch files. Therefore I need automated CM-Patch recognition. Hard but not impossible.
2.1.1 will then include the script again (hopefully:sweating:)

Link to comment

2.1.1 is out.

On 2/13/2022 at 11:04 PM, Lindor said:

I have one last plan for 2.1.1: I want to make it so that you don't have to manually replace the CM-patch files.

This and the other plan of simplifying the process by making it not require you to rename the mods turns out to be too much work to do, I want to continue with my mod instead. All the bugs have been fixed, the tool serves its purpose, all that's left are quality-of-life-improvements so I'm postponing further development to when I'm finished with my next project for my mod.

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...
Please Sign In or Sign Up