How to invalidate another mod file in sql ?

Ulixes

Prince
Joined
May 2, 2010
Messages
312
Hi everybody, I hope someone can help me.

I made a mod which uses assets of other mods, I don't want to include them in my own mod but I need to delete some of their entries.

Now, I know how to delete table entries in sql but I was wondering if it is possible to invalidate an entire file from another mod instead of deleting table by table.

This would also simplify compatibility, in case the other modder makes an update with an entry in a new table.

Anyone knows if it is possible?
 
Nope, not really. XML and SQL are read into the database and once the changes are there they are there. XML and SQL file contents are parsed and read into the database rather than files themselves. There is no way to make Mod2 un-activate any UpdateDatabase action from Mod1 except by purposefully causing the code from Mod1 to cause a fatal syntax error on its very first command within each file -- and this is neither a very 'friendly' nor reliable thing to do because any update of Mod1 will likely cause everything in this sort of house-of-cards construction to come crashing down.

Mod2 would need its 'blocking' actions to load first with a negative LoadOrder number, so that Mod1 would encounter fatal unique constraint errors when it attempted to make its database alterations, and then Mod2 would need another action that loaded with a very high LoadOrder number that would then add its normal code.

Far better to just use one action with a high LoadOrder value and only use a light razor to alter only those things added to or altered in the database by Mod1 which are absolutely necessary to be changed for the proper functioning of Mod2. Once you decide to make use of the stuff in another mod, you as the maker of the second mod accept the responsibility to play fair with the other mod-maker and their users by taking the onus of the mod compatibility within your mod.

-----------------------------

In Civ5 lua equivalents to GameplayScripts could be overwritten by making sure that Mod2 loaded second and importing an altered version of X.lua into the VFS. I have not experimented to see if this also will work in Civ6 but even if so it is still a bit of a dicey piece of ground to stand on from the point of view of Community-Friendliness. Lua files are treated differently by the game, as are DDS and similar files -- there can usually only be one file called Something.lua or Something.dds so the last one to be shoved into the game's VFS system will be the one used. This is the method one usually uses to re-write the basegame UI files so that an altered User Interface script will work for all three expansion levels.
 
Thank you for the exhaustive answer (I was actually hoping to receive info from you :) ). I guess I'll stick with the usual "delete from" and high load order drill then.
 
Nope, not really. XML and SQL are read into the database and once the changes are there they are there. XML and SQL file contents are parsed and read into the database rather than files themselves. There is no way to make Mod2 un-activate any UpdateDatabase action from Mod1 except by purposefully causing the code from Mod1 to cause a fatal syntax error on its very first command within each file -- and this is neither a very 'friendly' nor reliable thing to do because any update of Mod1 will likely cause everything in this sort of house-of-cards construction to come crashing down.

Mod2 would need its 'blocking' actions to load first with a negative LoadOrder number, so that Mod1 would encounter fatal unique constraint errors when it attempted to make its database alterations, and then Mod2 would need another action that loaded with a very high LoadOrder number that would then add its normal code.

Far better to just use one action with a high LoadOrder value and only use a light razor to alter only those things added to or altered in the database by Mod1 which are absolutely necessary to be changed for the proper functioning of Mod2. Once you decide to make use of the stuff in another mod, you as the maker of the second mod accept the responsibility to play fair with the other mod-maker and their users by taking the onus of the mod compatibility within your mod.

-----------------------------

In case that I make a Vanilla mod that has RF units (But no Loyalty nor Golden Age - Dark Age racing rules, my focus rightnow is primarily units modding) along with mod original ones, and an RF mod that has exactly the same Vanilla versions mod original unit (Let's say. Line Infantry exists in BOTH versions, while Pike and Shot in Vanilla mod) and packed as ONE modpack. Is it possible to code it to run in BOTH Standard Rules (Vanilla) and Rise and Fall rules under the following constrains
1. Player does NOT need to manually disable Vanilla version to play under RF rules in Additional Content (and no Crashing occurs).
2. Player can play under Standard Rules with full aforemented unit list.
If so do I need to use the same number order technics or different ones? with addition to Compatibility Warnings on the label.
 
Back
Top Bottom