Announcement

Collapse
No announcement yet.

CTP2 Automatic Database Records Generation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • CTP2 Automatic Database Records Generation

    Looks like modifing the databases is very easy, I found this script for example that creates a PersonailtyRecord.h and a PersonalityRecord.cpp, so just changing this script (personality.cdb) and using ctpdb.exe on it and we have some complex changes done very easily, well the only problem is to figure out how does it work, it looks like it should work when I compile the whole *exe but then I should see new files in the ..\ctp2_code\gs\newdb\ folder and all these *Record.* there are dated from August the 24th, so obviously it didn't work on my computer.

    Code:
    Personality {
    	// This describes the extent to which an AI will send out units to explore
    	Bits Exploration {
    		Wide,	
    		Medium,
            Minimal
    	}
    
    	// This describes the magnitude of an AI's empire and the speed to
    	// which it will expand
    	Bits Expansion {
    		Maximum,
    		Average,
            Minimum
    	}
    
    	// This describes the degree to which the AI will focus on
    	// scientific discovery and the area or branch of specialization.
    	// As well as the primary motivation for diplomatic interactions.
    	Bits Discovery {
    		Scientist,
            Military,
            Economic,
    		Ecotopian,
    		Diplomatic
        }
    
        // This describes the liklihood that the AI will attack.  This can
    	// also be considered the disposition of the personality.
        Bits Conquest {
            Agressive,
            Neutral,
            Passive
        }
    
    	// This describes how likely the AI will be to violate agreements
    	// and follow through on threats.  It also specifies how the
    	// regard of an AI will be changed by the dishonest actions of 
    	// others.
    	Bits Trustworthiness {
    		Chaotic,
    		Neutral,
    		Lawful
    	}
    
    	// This describes in general terms the methodology used by an AI
    	// to accomplish its goals and whether or not the AI cares if its
    	// actions cost the regard of other empires.  Evil actions might
    	// include killing settlers, the use of slavery and the first
    	// strike launch of nuclear weapons.  The regard consequences of
    	// an evil act will be less for an evil empire than a neutral or
    	// good one.
    	Bits Alignment {
    		Evil,
    		Neutral,
    		Good
    	}
    
    	// Send this greeting if stronger militarily
    	StringId StrongGreeting
    
    	// Send this greeting if weaker militarily
    	StringId WeakGreeting
    
    	// Follow through percent
    	Float ThreatFollowThrough
    
    	// Description show in Intelligence Details
    	StringId Description
    }
    Well it looks like some modifications here and the database is extended, of course these new values wouldn't work as long as you don't use their functions created by ctpdb.exe.

    Edit: Looks like I discovered too late that I forgot the label of that thread.

    -Martin
    Last edited by Martin Gühmann; November 10, 2003, 15:43.
    Civ2 military advisor: "No complaints, Sir!"

  • #2
    Looks like it is very easy just modify the *cbs file and everything else is done automaticly.

    -Martin
    Civ2 military advisor: "No complaints, Sir!"

    Comment


    • #3
      That's exactly how that should work (changing the script regens C++ code). If it's not working that way, there is a problem with dependencies. Check to see if the custom build setting has a dependency on the .cpp/.h files.

      Pyaray

      Comment


      • #4
        It works fine. I added a BombardUnitList and BombardUnitsPercent to strategies.txt. (Always wanted to be able to distinguish between bombarding units and other ranged units at this level.) Still got work to finish off in governor.cpp, but it's looking good.

        Comment

        Working...
        X