1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Proper way to remove civilizations?

Discussion in 'CivBE - Modding Help & Mod Creation' started by BlossomPone, Sep 6, 2015.

  1. BlossomPone

    BlossomPone Chieftain

    Joined:
    Oct 25, 2014
    Messages:
    23
    I am attempting to create a Total Conversion mod for beyond, and I would like to remove the existing sponsors from the game.

    Ive created an SQL script to delete all from both Civilizations and Leaders, and it does successfully remove them from the leader selection screen. However, when i attempt to start the game, the client crashes. There doesnt seem to be anything in the lua.log, or anything that I can find in the logs.

    Is there a way to remove the existing leaders from the game?
     
  2. HandyVac

    HandyVac Gentleman

    Joined:
    Apr 24, 2014
    Messages:
    270
    Gender:
    Male
    Location:
    The shire where the oxen cross the river. UK.
    Rather than deleting anything, you can update the Civilizations table to flag those civs as unplayable.

    e.g.
    Code:
    <Civilizations> 
       <Update> 
          <Where Type="CIVILIZATION_ARC"/>
          <Set AIPlayable="false" Playable="false"/> 
       </Update>
    </Civilizations>
    
    Will remove ARC from the leader selection screen, and prevent either AI or human players from playing as them.
     
  3. BlossomPone

    BlossomPone Chieftain

    Joined:
    Oct 25, 2014
    Messages:
    23
    Wow, I can't believe i didn't think of that. Worked like a charm!

    Would you know if there is such a way to remove anything else? To put this in perspective, I'm going to be nuking the entire tech web, and all buildings, units, virtues, even resources and quests will be removed.

    I'm pretty sure the quests are going to be what i run into the most trouble with, considering those are pretty ingrained in the gameplay itself, but... Any more advice would be plenty appreciated :)

    EDIT: Also, is it possible to update the database from lua? I've wanted to try to create civilizations and dynamically update things from lua code (sql/xml do have their limits, sadly), but I'm not quite sure how to do it, if possible.

    EDIT 2: After fiddling around, I'm trying to apply the idea of finding a way to disable, IF i cannot remove assets from the game. I have successfully removed all technologies from the game, but when removing all buildings, the Transcendental Equasion wonder still remains, for some reason.

    Furthermore, I seem to be unable to remove or disable tile improvements. If i remove them, the game crashes whenever a worker unit is created. All of the tile improvements (since the prereqtechs are removed) have been immediately unlocked. Removing them, as i said, crashes the game, and I don't seem to be able to lock them behind a dummy tech either, as adding a technology to the game crashes the game as well...

    Does anyone have any ideas?
     
  4. Ryika

    Ryika likes cookies and milk.

    Joined:
    Aug 30, 2013
    Messages:
    9,068
    If you don't care about the leftover-stuff in the Civilopedia and compatibility with other mods, then doing something like this is probably the easiest way to create an empty tech"web" and to remove everything from the city view without making the Quest-System and other Lua-related stuff crash:

    Code:
    <GameData>
    	<Technologies>
    		<!-- Hide all Technologies by moving them into a ring that isn't visible 
    			(unless the player is zoomed out completely and scrolls to the right)-->
    		<Update>
    			<Set LeafTech="false"
    				 GridRadius="12"
    				 GridDegrees="0"/>
    		</Update>
    		
    		<!-- Restore Habitation (Needed as the Center-Point - you could also 
    			 create a Custom Tech, but as all Civs - especially custom ones - 
    			 have Habitation as their Starting Technology this is a lot easier-->
    		<Update>
    			<Where Type="TECH_HABITATION"/>
    			<Set LeafTech="false"
    				 GridRadius="0"
    				 GridDegrees="0"/>
    		</Update>
    	</Technologies>
    
    	<!-- Remove all Technology-Connections (so Starting Free Techs from other sources don't give unwanted access to other stuff) -->
    	<Technology_Connections>
    		<Delete/>
    	</Technology_Connections>
    
    	<!-- Make all Buildings unconstructable -->
    	<Buildings>
    		<Update>
    			<Set Cost="-1"
    				 PrereqTech="NULL"/>
    		</Update>
    	</Buildings>
    
    	<!-- These are the Victory Wonders, the Transcendential Equation etc. -->
    	<Projects>
    		<Update>
    			<Set Cost="-1"/>
    		</Update>
    	</Projects>
    
    	<!-- Make all Units require a Leaf Tech that's not available (so basic units can't be built) -->
    	<Units>
    		<Update>
    			<Set PrereqTech="TECH_SURROGACY"/>
    		</Update>
    	</Units>
    </GameData>
    (I haven't actually tested the code, so there may be syntax-errors.)

    For the Tile Improvement stuff: Those come in two parts, The Improvement itself and the "Build"-Action (found in Units/CivBEBuilds.xml). If you only delete the Improvement, then the Build has an invalid association, which is probably why it crashes. You shouldn't need to delete Improvements though, just delete the <Unit_Builds> found in CivBEUnits.xml - they are what allows workers to create Improvements, if you remove them, then the Improvement is hidden from everything except for the Civilopedia.
     
  5. BlossomPone

    BlossomPone Chieftain

    Joined:
    Oct 25, 2014
    Messages:
    23
    You're a godsend, Ryika :) Thank you for your help.

    Do you have any idea how to handle removing virtues and and affinity levels? I seem to have done it, but in the logs it spams errors, and when viewing the virtues screen, the DoF does not leave once you've closed the screen, resulting in fuzz simulator 2015

    I hate asking for so much help, and i appreciate everyone who has helped so far :) I just havent quite gotten the grasp of how to debug this game yet haha.
     
  6. Jacques Francais

    Jacques Francais Chieftain

    Joined:
    Dec 5, 2017
    Messages:
    1
    Gender:
    Male
    Where is the Civilizations table located?
    Thank you.
     

Share This Page

Ebates: Get Paid to Shop