Introduction & Development

Discussion in 'Scenario Generator' started by LastSword, Oct 10, 2021.

  1. LastSword

    LastSword Prince

    Joined:
    Feb 24, 2013
    Messages:
    1,036
    1. Introduction
    2. About the project (post #2)
    3. Further development (post #2)
    4. Infographics (post #2)
    Introduction
    Scenario Generator is a total conversion mod which will turn a map into a mid-game situation by filling it with cities, units, improvements and diplomatic relations based on one of five available rulesets (each based on era known from the base game). You become a leader of civilization for 25 years (100 turns) during which you have to stand the test of time. Scenarios can be played separately or continuously, mod will use information from previous eras to generate next scenario.
    Discover new mechanics and write your own stories.
     
    Last edited: Oct 16, 2021
  2. LastSword

    LastSword Prince

    Joined:
    Feb 24, 2013
    Messages:
    1,036
    About the project
    The very base concept behind creation of this mod was to remove a linearity of the base game. The solution I choose was rather straight-forward, a randomly generated worlds with pre-defined cultures and scripted rules. Player is thrown into the middle of alive game and decides what to do with that.

    I was inspired by some old classics like Heroes III and obviously older iterations of civilization, however the most influential to me was Mayesty with its indirect control. You will find a mechanics in which you have little to no control: cities create improvements and roads on their own, Trade-Routes automatically choose targets (and are completed once they reach their destination), civilian great people migrate between cities, units' morale and even technologies are discovered randomly. What is more, there is a great bunch of automation available to the player: you can appoint Master of Whispers to manage your Spies, make your Cities automatically build certain buildings without need of queue or even a Tax Collector who will bully gold from City-States whenever possible. Game values macro-scale over micro-decisions.

    Splitting game into 5 separate parts has more perks. First of all, it is a great rubberband mechanic and reset of power, which helps keeping game interesting even after crushing your opponents once (there is an achievement for conquering other player's capital in all five consequent scenarios). Secondly, it allows you to sink within certain eras without the scientific rush the base game posseses.

    Project leans towards roleplay, but the in-built scenario-like score system allows you to challenge yourself by earning Victory Points for the Hall of Fame.

    The first major difference you can notice is a stacking system. In scenario generator each unit has a stacking type and is fully stackable with other types (this information is provided in production popup or unit panel). Some units like Scouts are fully stackable with any unit you are not at war with.

    Promotions are earned by unitclasses rather than by units (newly trained units of this class will start with those promotions). I believed that civ5 created a situation in which loosing an unit is too big deal (and obviously AI is the one punished more by this). Each unit still has own XP levels (each grants +3% combat bonus from veterancy).

    There is so much to write about military, let's just say you will find out that each scenario has something unique in that aspect and the fact that loosing an unit is no longer so devastating event allowed me to introduce Critical Strikes.

    Each scenario assigns each civilization to the certain culture type (ancient era has: Empire, City-State, Tribe), which has impact on starting number of cities, units, available buildings, tech trees and more. What is more, some cultures have subcultures that make civilization even more distinctive (City-States are further classified as Militaristic, Religious and so on).

    There are no starting uniques or leader traits. I personally believe that this is an obsolete mechanic and unique abilities should be obtained through the gameplay. Therefore in scenarios in which I managed to create significant amount of unique units, you can choose unique replacement upon reaching specialization treshold (each unitclass earns progress when trained or with XP). In other scenarios unique units are tied to your culture unfortunately. Buildings can be uniquely enhanced with Inspirations (basic yield bonus of your choose). Game offers a decent variety of unique traits (Social Developments, Innovations, Wonders, Ideological tenets) to make your civilization truely unique.

    Designing a game into pre-defined 100 turns long duration frame forced a common use of cyclical events and systems. Social Developments are being chosen at turns 17,34,51,68; Stock Exchange sessions took place each 14 turns, Wonders are assigned each 10th turn... you should quickly adapt to this rhythm. Oh, fishes and whales migrate every spring (...let's just say that my approach on workboats was taken from old RTSs and I am not completely proud of it even though it adds some depth to sea control).

    The key concept I believed should be a future for civ series is interaction. Most systems are designed in a way to interact with other players rather than work in the void. For example, wonders are now assigned through an annual Wonder project (something similar to World Fair from league) in which the player with the greatest contribution is awarded with an ability to construct random World Wonder. In previously mentioned unit specialization system, tresholds are increased whenever any player chooses unique unit. In some scenarios innovations are locked after the first player develop them. Social Developments are being voted over by a cultural group rather than being chosen by inviduals (even though you can change them later for an extra cost of culture). Authority provides most rewards if you have more of it than any other player rather than on actual amount of Authority. City-States' quests are redesigned into annual Politics' in which major players compete for influence. Stock Exchange is based on actual events in game.
    Therefore all mechanics added to game are designed with what I called a general fairness of turn in mind. Projects and competitions are solved at the game turn end (barbarian turn), and many values are cached then as well. All to remove any advantage players have from being early in turn queue.

    The game is not too punishing on bad decisions, this total conversion was designed to be a roleplay sandbox. AI handicaps are now limited to four basic elements: Gold maintenance, Production cost, Food growth treshold and Unit Supply. What is more, those values can be changed mid-game to adjust difficulty based on your current situation.

    Top Panel is greatly enhanced with new yields and indicators, but it is now scrollable (therefore even on smaller monitors you have access to all information) and can be rearranged by right-clicking certain elements.

    Scenario Generator includes modded DLL and even though mod leans toward roleplay, you should notice major improvements in AI and fixes in comparision to the base game.

    Further Development
    Project reached the state I am content with. I plan to regularly expand it, more information about what am I currently working or focusing on can be find in Changelogs.

    Infographics
    Spoiler :
    Those images were created for v19 and details may be outdated with time. However, they should show the core concept of mechanics.

























     
    Last edited: Oct 22, 2021
    Gedemon likes this.
  3. DImensiondog

    DImensiondog Chieftain

    Joined:
    Apr 12, 2021
    Messages:
    45
    I don't know where to post bugs so i'm putting it here. Downloaded on steam and every time i try to play i get a message saying "initialization failed please report the following error: ...\Scenario generator (v 20)\Gameinit\OT GSG_NewGame_Generator.lua:49: Instance does not exist."
     
  4. DImensiondog

    DImensiondog Chieftain

    Joined:
    Apr 12, 2021
    Messages:
    45
    I got it to work on the trial scenario
     
  5. LastSword

    LastSword Prince

    Joined:
    Feb 24, 2013
    Messages:
    1,036
    Thanks for reporting.

    The line of the problem:
    Code:
    for i,v in pairs(Players) do
                if v:IsEverAlive() then
                    if not v:IsBarbarian() then
                        v:SetInitStartingPlot(v:GetStartingPlot()) --this one
    The fact it finally worked makes it weird, therefore I have only assumptions:
    1. SetInitStartingPlot does not exist: It would mean that DLL did not loaded, were you using other mod with DLL source?
    2. GetStartingPlot() returned a nil value (I am not even sure it would generate instance error) which means that some civilization had no starting plot assigned. Furthermore I have never heard that starting plots may not be assigned properly. Were you using extreme amount of civilizations/city-states on small map or some mod that affects starting positions?
     
    Last edited: Oct 23, 2021
  6. DImensiondog

    DImensiondog Chieftain

    Joined:
    Apr 12, 2021
    Messages:
    45
    A standard fractal map with 16 civs and 32 city states, i found when it worked there was not much space so that was probably it. Also no other mods just the asset mods and scenario generator
     
  7. Bangra 7

    Bangra 7 The Port Of Call

    Joined:
    Aug 28, 2008
    Messages:
    225
    Gender:
    Male
    Location:
    Raleigh, North Carolina
    How can I use my custom civ and its units and traits in the mod? I used default settings for units and traits and the units aren't usable.
     
  8. Bangra 7

    Bangra 7 The Port Of Call

    Joined:
    Aug 28, 2008
    Messages:
    225
    Gender:
    Male
    Location:
    Raleigh, North Carolina
    The civ loads just fine with the leader; but the unique units aren't loading or showing up in any of the eras.
     
  9. LastSword

    LastSword Prince

    Joined:
    Feb 24, 2013
    Messages:
    1,036
    @Bangra_7
    Unfortunately adapting custom civ isn't a simple process.
    By this mod's design philosophy all civilizations have no uniques by default.

    Mod has its own system of handling UUs and UBs which overrides those traits attached to your custom civs.
    Unique Improvements are gonna be ignored as well.
    However, the Unique Ability has to be disabled manually (especially if based on lua) unless you want this certain civ to start with an advantage.

    Each civilization is assigned a "culture type" at the start of each scenario which is handling UUs and UBs.
    In case of UBs there is a little you can do, each culture/subculture has assigned one specific building and I do not recommend overriding it.

    Adding an UU is actually possible through database. Short guidance:
    1) Your mod has to load after Scenario Generator (proper reference).

    2) Attach unit to ITG_CultureUU or ITG_SubcultureUU table.
    Code:
    <ITG_CultureUU>
            <Row>
                <CultureType>CULTURE_COLONIALISTS</CultureType>
                <UnitClassType>UNITCLASS_CROSSBOWMAN</UnitClassType>
                <UnitType>UNIT_ITG_TRIAL_CROSSBOWMAN_2</UnitType>
                <Multiple>false</Multiple>
                <Chance>20</Chance>
            </Row>
    The above code means that civilizations with culturetype CULTURE_COLONIALISTS have 20% chance to have this unit for this unitclass (multiple to false means that max one civilization will have it).

    Reference in mod folder /Database/NewTables:
    ITGSG_UnitClassesTypes.xml
    ITGSG_Subcultures.xml
    ITGSG_Cultures.xml
    You can also check Unique Units I optional content because it is actually doing only that (adding new UUs).

    3) If that is not complicated enough, in some scenarios you acquire UU by "specialization" and in this case you are adding UUs to the pool of options in this way:
    Code:
        <ITG_ScenarioSpecialUnits>
            <Row>
                <ScenarioType>SCENARIO_AGE_OF_TITANS</ScenarioType>
                <UnitClassType>UNITCLASS_CHARIOT_ARCHER</UnitClassType>
                <UnitType>UNIT_ITG_AOT_CHARIOT_EGYPTIAN</UnitType>
            </Row>
    4. Finally you have to add a new column to your unit:
    Code:
               <UnitArtInfo>ART_DEF_UNIT__WARRIOR</UnitArtInfo>
                <UnitFlagIconOffset>3</UnitFlagIconOffset>
                <IconAtlas>UNIT_ATLAS_1</IconAtlas>
                <PortraitIndex>3</PortraitIndex>
                <StackITGType>1</StackITGType>
            </Row>
    
    Mod has a very own unit stacking rules.
     
  10. Bangra 7

    Bangra 7 The Port Of Call

    Joined:
    Aug 28, 2008
    Messages:
    225
    Gender:
    Male
    Location:
    Raleigh, North Carolina
    I'll take a look. Thanks! I really love the scenario options for an advanced start setup. And wish there was a way to implement it with a unique unit approach.
     
  11. NikkoMan

    NikkoMan Chieftain

    Joined:
    May 29, 2022
    Messages:
    5
    Gender:
    Male
    Hi,
    I think there’s a bug. Every time I try playing a game, it shows the loading screen then turns black. I’m playing on a pc.
     
  12. LastSword

    LastSword Prince

    Joined:
    Feb 24, 2013
    Messages:
    1,036
    After generating a game the mod should reload (if terrain was affected).
    A proper process look like this:
    1. Loading Screen
    2. Black Screen
    3. Reload (Loading Screen again)

    If you are stack on black screen for a suspicious amount of time:
    1. If you are familiar with civ5 logs, please send me a Lua.log.
    2. After restarting game you can load a quicksave (which should contain generated scenario).

    You can also uncheck Map Modifications option in advaced setup, but the issue will still be present in conversion between scenarios.
    Smaller maps may reduce amount of time spend on generating world.

    Anyway, thanks for reporting.
     
  13. NikkoMan

    NikkoMan Chieftain

    Joined:
    May 29, 2022
    Messages:
    5
    Gender:
    Male
    Hello LastSword,
    I have attached the Lua log. Thanks for your help!
     

    Attached Files:

  14. LastSword

    LastSword Prince

    Joined:
    Feb 24, 2013
    Messages:
    1,036
    Thanks!

    Mod incompatibility, EUI (and other mods affecting interface) should be unchecked.
     
  15. NikkoMan

    NikkoMan Chieftain

    Joined:
    May 29, 2022
    Messages:
    5
    Gender:
    Male
    Thanks for your reply! However when I sent you that log I wasn’t using any other mods other than that one. Do you think I should get all the mod files (for this mod) online? I subscribed to the mod on steam but had to download part of it online because a part of it was an older version
     

Share This Page