Greetings! Today we’ll be released Elemental BETA 1D to the beta team. For those of you not in the beta don’t worry, you’re not missing out on anything. I can assure you that the game will still cause horrible disfigurement if played.
The big thing about the diplomacy engine in Elemental is that it’s live rather than video ala GalCiv or most other games of this type. This means that we can have in-depth conversations with other characters in the game that have their own body language and such.
What we have in now is very basic and needs a lot of work still (and a lot lot more content) but at least shows the direction we’re starting to go there.
There’s a number of cosmetic changes in this build as well that you’ll begin to see crop up here and there.
This build should be available to the public this evening.
Below is our pruned change log:
- Elemental 1D Change Log -
***********************************************
** New Features **
- Diplomacy Screen Overhaul -
Overview: The Diplomacy screen should now feel more like a 2-way conversation with whomever you're chatting with (opposed to a series of 'soul-less' buttons). Treaties and underlying data formats cleaned up as well.
+ Changes to DiplomacyButtonEntryWnd.h/cpp
+ Stripped out most of the enums because we're not using those buttons anymore
+ Added enums for left/right add buttons
+ Added member m_ulButtonID
+ Left/right buttons call AddSelectedItemsToOffer
+ Added DiplomacyConversationListEntry.h/cpp/dxpack
+ Options for conversation like "I want to talk about treaties"
+ Removed DIplomacyScrollItemEnryWnd.dxpack (replaced by DiplomacyScrollItemEntryWnd.dxpack)
+ Changes to DiplomacySCrollItemEntryWnd.cpp
+ Added code to handle treaty types
+ Added image
+ Added DiplomacyTradeListEntry.h/cpp
+ Entries for the items you're offering
+ Removed DiplomacyInfoEntryWnd.h/cpp
+ Removed DiplomacyTreatyEntryWnd.h/cpp/dxpack
+ Added DiplomacyValueEntryWNd.h/cpp/dxpack
+ Used for listing Diplomacy value
+ Changes to DiplomacyWnd.h/cpp
+ Added enum DIplomacyResponses
+ Removed m_pMainbuttonList
+ Added m_pConversationList // for dialog on menu, when picking what to choose
+ Added m_pResponsesList // for accepting/rejecting
+ Added m_pTradeListLeft and m_pTradeListRight, for listing offers
+ Removed m_pMainStatBar
+ Added m_pTradeContainer
+ Added m_pConversationContainer
+ Added m_pLocalPlayerOffer
+ Added m_pOtherPlayerOffer
+ Changed SetConversationTopic to take a LPCTSTR
+ Added function FillListWithTreaties
+ Removed function FillTreatiesList
+ Removed function SHowCivilizationList
+ Removed function ShowWarefareInfo
+ Removed function SHowMagicInfo
+ Added function AddSelectedItemsToOffer
+ Added function Exit
+ Changes to Player.h and PlayerDiplomacy.cpp
+ Uncommented AddTreatyWithPlayer
+ Commented out AddTreaty
+ Added TradeOffer.h/cpp
+ Class that handles trade offers, so that we can eventually pass them into the tradewnd from the AI or multiplayer opponents
+ Changes to Treaties.h/cpp
+ Added support for an image to be associated with a treaty type
+ Changes to DiplomacyWnd
-> Added default text for conversation dialogs
-> Added code to clear trade offer when calling Clear
-> Added code to make description for treaty that uses treaty values
+ Changes to Treaties
-> CTreatyType: Added m_strTreatyValueDescription - use string replacement mapper to place values and player names
-> Added m_strUnits - units the value uses
-> Added m_strSingleUnit - singular form of the units
-> CTreaty: Added function GenerateTreatyValueString to get the treaty's value as a string with the units
+ Wartime messages hooked up to Diplomacy Window
-> Wrote new text entries
-> tweak FlavorText selection to factor 'Relations' into scoring
- New Terrain Types -
Overview: Swamps, deserts, and hills now display as terrain types on the map. These have their own movement cost and will eventually provide various city resource bonuses and penalties.
+ Added three new terrain types: desert (previously was an environment, and it still exists in the game, but isn’t placed in map generation), swamp (also used to be an environment) and hills. All of them are in the land terrain category, and are placed on the map during generation.
+ Added a new class derived from CSelectableObject: CTerrainClothMapObject, which functions likes a generic version of CForest or CMountain, and allows us to place cloth map icons for various types of terrain, such as the three mentioned above. Desert and swamp both have the own set of cloth map icons. For the moment, hills use the desert icons, hue-shifted to green.
+ Land terrain types with a MapGenPlaceChance of zero will no longer be placed during map generation.
+ Tweaked map generation to place slightly more swamp/desert/hills on the map.
+ Terrain cloth map objects placed on the map will no longer show up as “mountain” when selected in debug mode.
- City Wall Improvements and Seige Equipment -
Overview: Certain techs in the Military tech field will unlock City Wall Improvements. When placed in a city, these walls provide a considerable bonus to defending units. Walls can be destroyed in battle by siege equipment, which is currently limited to the meager Battering Ram. You need a 'Siege Workshop' to build siege items.
+ City Improvements in Battle
-> bonuses given, calculated using local data within the BattleEngine
-> Decrementing Bonuses the moment the improvment is destroyed
-> BattleFinalHPData storing Improvements
-> Improvements storing in BattleResults
-> Added DESTROY() to Improvement class
-> Got Destroyed on main map if Destroyed in Battle
+ Battle Report Details Listing
-> Set Text of 'Details' tab
-> Made new class for Details, added to parent window
-> storing hits and improvement damage for battles in results class
-> showing above text on battle report dtails tab
+ Added "SpecialBuildingType" tag to CImprovementType, which is just some string denoting a category it is in
-> Gave siege workshop "SiegeBuilding" category to demonstrate
+ Added prereq type "BuildingRequirement," which is a city-target prereq that is satisfied if the city has an improvement of the attribute type
built
-> Gave battering ram item "SiegeBuilding" prereq to demonstrate
+ In train unit wnd, unit types that can't be trained aren't disabled anymore (though they look different); instead, if you try to train them, it
pops up a message box saying why they can't be trained
+ City Modifier: 'DefendingUnitBonus'
- StrValue: Stat that gets adjusted
- Value: Percentage change to above stat
- Operator: + (Add), x or * (Multiply), % (Percentage)...these need to be hooked up throughout the modifier code for cleanliness
- DefendingBonuses stored in CCity, recalculated properly
- CCity now has map for...
- m_mapfStationedUnitBonus_Addititve
- m_mapfStationedUnitBonus_Multiply
- m_mapfStationedUnitBonus_PercentGain
+ Added Improvement function 'CalcGameModifierValues' that gets the ADDITITIVE, MULTIPLIER, and PERCENTAGE GAIN values for a given ModType, Attribute, and StrName
***********************************************
** Additional Features and Improvements **
- 'New Technology' Details window -
+ Implemented the New Tech window, which pops up after selecting a technology breakthrough, and displays data about the technology you selected.
- Smarter AI -
+ UnitType .h/.cpp
-> added AILoad() and AISave(), which are minimalist functions that save/load just enough info for an AI to recreate a unit type they designed.
+ RallyPoint .h/.cpp
-> added save/load functions
+ Player .h/.cpp
-> added GetRallyPoint(x,y) function
-> now saving and loading player rally points
-> IsRallyPoint(x,y) now uses GetRallyPoint() instead of searching on it's own
+ MobileGameObject.cpp
-> if a directive has to be canceled, the message box that tells the local user now only pops up if they owned the unit in question.
+ City .h/.cpp
-> removed a note to myself to add m_pRallyPoint to save/load code
-> now saving/loading m_pRallyPoint
+ AiBasic.cpp
-> now saving and loading minimal data about the designed unit types
-> turned the designing of units back on
-> made it so AI units will not attack enemies with a higher battle rank
-> now researching Civilization at first
-> when picking breakthoughs, AI will pick the one with the lowest rarity, else a random one as before. Also only rolls the 50% chance to change categories if it had to choose a random breakthrough (ie. they all had 100% rarity)
- added save and load functions to handle the few things (so far) that AIBasic has that don't come from the player class
- updated AiIsCityProperlyDefendedWithOutMe(pCity, pUnit) to return if pCity->GetStationedUnitCount() > 1, on Scott's request, so that AI cities will leave themselves defended and not just send all their guys out in the wild
+ AISkeleton .h/.cpp
- added pure virtual function AICalcShouldAcceptPeaceWithPlayerID()
+ AICreature.h
- made AICalcShouldAcceptPeaceWithPlayerID() just return FALSE
+ AIBasic .h/.cpp
- made AICalcShouldAcceptPeaceWithPlayerID() just return true for now. Left a pragma about needing logic
- fixed a bug that was causing AI units to not form armies
+ City .h/.cpp
- added CalcSumBattleRankOfDefenders(), so I can use it when looking for the least defended city when I can't find any that are simply undefended. I sums up the battle rank of all the units stationed in the city
+ Unit.cpp
- wrote the implementation of the AIFindNearestLeastDefendedCity() that I definded earlier. it goes through all cities the player knows about, and finds the one that is the least defended, that is, has the lowest battle rank of defenders. in the case of a tie, it will find the closest city out of the tied cities to find the one nearest to the unit.
+ added several functions that I found useful
----FindAndSetAttackDest()
----AICityFinished()
----AIIsCityProperlyDefendedWithoutMe()
----AIUnitTrained()
----AIArmyUpdated()
----AIIsArmyStrongEnoughForOffense()
+ fixed AiGetNumberofUndefendedCitiesWithinRange() to ignore cities they own
+ Found lots of places I could use a wrapper funcition I created instead of using the same code all over the place. yay for re-usability
- Autosaving -
+ changed default turns until auto save from 1 to 5.
+ OptionsWnd.cpp
- added an option to turn on/off auto saving
- added an option to set how many turns go by before an autosave occurs. for now, slider is 0 to 25 turns
- these options are saved and loaded from prefs.ini under "AutoSave" and "AutoSaveTurns"
- these options are also stored in g_pGameOptions under GAME_OPTION_AUTOSAVE and GAME_OPTION_AUTOSAVE_TURNS
- now calling g_pSaveGameManger->SaveGame() instead of dealing with a gamesave directly
+ elemental.str
- added strings for "Enable Auto Save" and "Turns Until Auto Save"
- added a string for the name of a QuickSave file, "QuickSave"
+ ElementalDefs.h
- added GAME_OPTION_AUTOSAVE and GAME_OPTION_AUTOSAVE_TURNS
+ World .h/.cpp
- added m_ulTurnNumOfLastAutoSave, to be used to keep track of when we need to perform an autosave again
- set m_ulTurnNumOfLastAutoSave = 1 in ctr, and in ClearData()
+ World_SavingLoading.cpp
- now saving and loading m_ulTurnNumOfLastAutoSave right after m_ulTurnNum
+ Gameplay.cpp
- in EndTurn(), at the end, right after the turn is incremented, added a check to see if auto save is enabled,
and if it's been enough turns. If so, an AutoSave is performed using the saveGameManager
+ Elemental .h/.cpp
- added wrapper functions that I needed to set function pointers of the SaveGameManger. The wrapper functions are
---BOOL Load(szFileName)
---BOOL Save(szFileName)
---VOID AddSaveGameFileToList(LPCTSTR szDirectory, LPCTSTR szFileName, LPCTSTR szTimeStamp, SYSTEMTIME GameTimeStamp, LPCTSTR szFullPath);
+ Made Player save and load functions virtual so I could override them in AIBasic
+added AutoSave and AutoSaveTurns options
+ set string for save game manager quickSave string
+set save and load function pointers for save game manager
+ ElementalUI .h/.cpp
- added a key combo for quick save. it's CTRL + S.
- quick save key combo uses the save game manager to call it's new QuickSave() function
- changed the cheat key for CTRL+S to be CTRL+SHIFT+S instead, because it was absorbing the QuickSave key combo and
preventing it from working
- added a debug.err string so that when the cheat key callback is hit with a key combo, it prints a string to the debug.err
about what key combo it was. I did this because I know in gc2 we had people say that the game was calling them cheaters
when they didnt cheat. now, the debug should tell us what key is causing the flag to be set.
+ LoadWnd .h/.cpp
- created a new function to add game save entries to the wnd, so that the save game manager can call the wrapper function
I made for it by using a function pointer
- fixed bug with disabled buttons when they shouldn't be disabled.
- FillWithGameSaveFiles() now uses the save game manager instead of dealing with game saves manually
- First Time Greetings -
+ added first time unit greetings 'FirstContact'
+ Conversation window smarter about filling responses (possible responses set in
message data)
- Grouping Types and Troop Quality -
+ Added some new techs for unlocking the different unit grouping types, which were waiting for techs that didn't exist
- New Troop Training Wnd -
+ Fixed bug where training a unit or otherwise selecting the same city again in train unit mode would put the game in an infinite loop
+ Now need to know about a city (which I made mean having seen knowing about any improvement belonging to that city) before you can build a road to it
+ Selecting anything other than a city in train unit mode will hide the train unit wnd
+ Reduced the number of times the training wnd is refreshed unnecessarily
+ Fixed bug where you could select cities you don't own in training mode and start training people in them
- City Building -
+ Added a check inside ConstructImprovement() that calls TestImprovementConstruction() just before attempting to construct. This affects both the AI and the human players.
+ Made a slight change to IsTileBuildable() that was preventing players from building four-subtile improvements on partially-used tiles even when the position was valid.
+ Put in a test to ensure that city hubs cannot be created on forests or mountains (the computer was building cities in forests before).
+ Added lists to hold discovered buildable subtile patterns
+ Added the BuildAllowedSubTiles() function to fill these lists with buildable subtiles based on the currently selected improvement.
+ Altered UpdateGraphics() to use the new buildable subtile lists when drawing subtiles. Also changed the code to only draw greeen (allowed) subtiles - no more green, yellow or red.
+ Added code in SetCityConstructionImprovement( ) to call BuildAllowedSubTiles() and update the graphics accordingly.
- Misc -
+ Civilization Image displaying in Intro Wnd
+ Fixed bug where moves and sight stats were adding up for armies and grouped troops
+ Info card and info note positioning behavior now matches the train unit wnd, repositioning to the bottom of the screen if the screen is wide
enough, otherwise staying above the main UI bar
+ Train unit wnd crash fix
+ Fixed bug where destroying a hut or anything that provides a population storage bonus wouldn't remove the bonus
+ And, in the process, made resource storage more like the rest of the resource system by having the city pull information about resource storage from the improvements, instead of storing game modifiers (or nothing, as was the case with this bug)
+ Replaced a lot of message box images with medallions of the objects they pertain to, instead
+ A little cleanup to the train unit wnd
+ Hooked up new message boxes
+ Added "pts" back to the unit design wnd training and equipment points display, though it's too long and cuts off
+ SelectNothing function in main game wnd now deselects cities
+ The number of rivers that are generated on a map is now based on a range, drawn from the MapStyle XML (with the tags being NumRiversMin and NumRiversMax). Previously, the number of rivers had been hard-coded to 5, and then, for some reason, divided by 3 just before generation, resulting in (at most) one river per map.
+ Research 'possible breakthrough' entry Tweaked to use colorizing bg, image slot
+ Added Mana, Research Points and Spell Points to the stats that are tracked by the history log, and displayed in the graph. The research and spell point graphs will look roughly the same, as they’ve both based off of population, unless you build an improvement that boosts research (currently there are no structures that boost spell point production). Mana is simply the tally of all mana types each player’s sovereign has.
+ Modified CHistoryLog and CHistoryLogEntry to store data as floats instead of longs.
+ Modified CHistoryLogEntry to be able to display plateaus (previously, if there was a period of time where a stat leveled off, it would only record the start of that period; now it records both the start and end of the period).
+ Added "AllowedPerCity" and "AllowedPerGame" tags to CImprovementType, which just restrict the number of improvements of this type that can be
around at one time in the entire world or any given city, respectively
+ Cleaned up some build list updating to show restrictions/newly available improvements at the right time
+ The edges of the cloth map now extend out beyond the limits of the camera’s vision, so there is no longer an abrupt edge into darkness.
+ The brightness of the cloth map fog of war texture can be adjusted in the game options, with the bottom end of the scale rendering the fog as complete blackness.
+ Cleaned up the terrain shader code, fixing a number of warnings, and removing deprecated variables and functionality.
+ Fixed bug with caravans freezing every once it a while (which, from what I have been able to reproduce, was caused when the AI
declared war on the player)
+ The only thing is, I think that AI declaring war is relatively new, while people having sporadic caravan freezes is not.
+ Can cancel city building from the "name your city" dialog
+ Message box saying you can research stuff after building your first city pops up before the tech wnd, and only after pressing ok does the tech wnd unhide (so, for now, the users know that the stall after building is from bringing up a screen)
***********************************************
** Engine Tweaks **
- Flavor Text System -
+ FlavorText string vector now clears in constructor
+ REPLIES held in flavor text, read in through XML
+ Conversation Window working with new response system
+ Other flavor text updated to use new responses
- Data-Driven Stats -
+ Stat Icons made
- Sight, Combat Speed, Structural Attack
+ Sovereigns can't see as far into the FOW
+ Unit Stats Types XML Implemented
- added file 'CoreUnitTypes.xml'
- Unit Stat Types class made
- Display Name, Icon, Description read in from XML
- Display names, icons used in the various screens that display stats
- Training Popup
- Unit Design Window and List
- Save Unit Infocard
- Unit Context and Infocard
- Helper functions to easilly grab that info with jsut one line of code
+ Unit Levels Using a map
- stats hooked up to a map in Unit Levels
- interpolating stat values working with map
- Update COPY CONSTRUCTOR to use the map
+ Unit Stats using a Map
- Armor and Equipment Stat Modifiers using STAT NAMES, not IDs
+ Weapons, Armor, and Equipment properly sorting in Unit Design
- using STAT STRINGS to sort, not IDs
- Multiplayer -
+ started adding NO_GFX and NO_SFX defs for elemental multiplayer server
+ Added project ElementalServer, which will not include any graphics code
+ Added folder server for server specific code
- Misc -
+ Changes to TechManager.h/cpp
-> Added function GetTechCategory that will return the tech category of the specified tech without needing to get a pointer (and a ref) to it
-> Optimized function GetTechDef
+ Changed K_ xml files to fix the scaling issue with pedestrians/guards
+ LOTS MEMORY LEAK FIXES (Memory Inspector prev showed over 4000 leaks after starting up title screen and closing, now shows only 6)
+ XML Data Parser and Data Def Objects Cleaned-up
+ CreateDef functions no longer add the object to the parent
+ AddDef now takes care of adding the object to the parent for ALL CDataDefObject classes
+ AddDef functions that do not add anything now return FALSE
+ Removed "hack" for adding an extra reference to objects that are children of another object
+ Fixed "Circular References" on objects that caused them to leak
+ If A has a ref to B and B has a ref to A, BOTH refs must be released
+ This is done by calling a clear function of B (which releases A) before releasing A yourself
+ Removed extra refs for lots of things (see detailed log)
+ Added missing releases for lots of things (see detailed log)
+ Added missing call to Clear function in destructor of several data objects
+ Added missing calls to unload functions for XML data objects in GameUninitialize