"<InsertOrAbort>"

ghost toast

Prince
Joined
Apr 29, 2022
Messages
479
i found a line in the line "<InsertOrAbort>" instead or <Row>

i found in the CIV5Features_Inherited_Expansion2 file located here
C:\Program Files (x86)\Steam\steamapps\common\Sid Meier's Civilization V\Assets\DLC\Expansion2\Gameplay\XML\Terrain\CIV5Features_Inherited_Expansion2

can anyone describe its function in great detail.
I have many questions.
can it be used on other stuff?
Is its function random?
How will it effect the game?
 
As far as I can tell, this simply addresses stuff that was formerly DLC content but is now a part of BNW expansion (e.g. Ethiopian civ, their trait in the trait files is added using InsertOrAbort), so for players who have both BNW and specific DLCs it avoids adding the same data twice by aborting the insertion if a row with the same identity exists already.

In other words, it doesn't seem all that useful unless you're making your own DLC that tries to add content from other DLCs that may or may not be present
 
As far as I can tell, this simply addresses stuff that was formerly DLC content but is now a part of BNW expansion (e.g. Ethiopian civ, their trait in the trait files is added using InsertOrAbort), so for players who have both BNW and specific DLCs it avoids adding the same data twice by aborting the insertion if a row with the same identity exists already.

In other words, it doesn't seem all that useful unless you're making your own DLC that tries to add content from other DLCs that may or may not be present

Thank you for your insight I will look into testing that function at a later date.
Your explanation has peak my interests.

It so happens I am doing a dlc mod as it is the only way I have a figure out how to change the city set graphics.

This could be helpful, very helpful or not idk yet.

One day in the distant future I'll test out the function in greater detail. And post it here.

Thank you for your great explantion.
 
<InsertOrAbort> should be the parallel to SQL's INSERT OR IGNORE, will make an INSERT into a table only if the data being inserted will not cause the table's PRIMARY KEY to be duplicated and thus cause a UNIQUE constraint failure. Put more simply, and as the other commenter has surmised, it means the row will only be added if it doesn't already exist. Note that this functionality only applies to the core tables, which define ID numbers and unique Types for the various pieces of data in the game, and will not do anything for subtables where it is perfectly legal for two identical rows to exist. As far as I understand, there is no reason why you shouldn't use INSERT OR IGNORE at a given time, as it simply serves to avoid causing an error while arriving at the same conclusion when data is duplicated.

You can read more about the topic here. I'm going to assume that, despite there being an ABORT operator described here, <InsertOrAbort> doesn't actually invoke it because ABORT just sounds like it causes an error like a standard INSERT would. Maybe I'm wrong ofc, but if so then it's just another reason to code in SQL over XML...
 
Thanks Chrisy15 that was a good explanation.
And I'll read that topic.
I would like to in the future get into making some dlc type mods.
That are placed into the dlc folder as apposed to the mods folder for a few different reasons.
And if I decide to make several mods for a that are compatible to mix and match together instead of just 1 big compiled mod, then having a great understanding of the insert or abort line will be very helpful as I may end up needing it.

If you'd like to join the discussion for that mod the link is here


It's going to be a true apocalyptic style overhaul mod where I change out every graphic to a new one including city sets I think I've only posted pictures of one my city sets so far.
The pictures show my first few attempts then a much better product as a I test the graphics.

I have posted many picture of new tile feature and more, all for my post apocalyptic sci-fi world I invision.

If you'd like to help me out and tell me what cool stuff should be seen in a post apcolypic world please post in that forum I could use the ideas I'll make what you suggest.
 
Last edited:
Top Bottom