1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Diary #3: What's coming in .2 (releasing today)

Discussion in 'Development Diaries - Written' started by Texashawk, Nov 15, 2015.

  1. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    OK, everyone. I'm back, and I've been busy. After some time off taking care of personal matters with my family, I spent a lot of time optimizing the engine and adding the structure of the character AI systems, already have put in the basics of the build AI -what is built, when it changes, and how it works. Also put in the conversation engine, set up the data files, hooked it up to the comm screen and the action functions, added some UI functionality, and reworked how planets are populated, migrated to and from, and reworked the economy based on some playtesting and feedback. whew So let's show you what I've done! (The new build will be 0.2, BTW It's got everything that we talked about, and really with the AI functionality starting to be put in, we can move to .3 very quickly at the rate that I'm working.)

    First, the region/population system. Here's a screenshot of the new 3D, animated region view system!

    [​IMG]

    [​IMG]

    Region view is a work in progress, and is intended to be an optional view for advanced users who want to drill down to the details of their planet, but will not be needed to play the game.

    The first picture shows the squares in isometric view, but you can toggle between top down and isometric to get a better picture using the 'F' key (this will be a button as well). You can select between different filters to see a visual, color, and bar-size rendition of each value. In this screenshot, I am looking at the habitability view. The more red the bar, the more hostile that region is for life (low bio), and the more green, the better. Also, the higher the bar, the more habitability infrastructure has been built in that region (think towns, cities, enclaves, metropolises, etc). Regions that are bright yellow have been designated as infrastructure focus regions by the viceroy and are having infrastructure upgraded to handle more people.

    In this system, I have removed the hard population caps from regions, instead having a 'safe' maximum population. After that, you can go over (and you will if you overbuild in a region without having supporting cities and towns for people to live!) but your people will slowly generate unrest and their production will decrease relative to the amount of overcrowding in the region. If your viceroy has high empathy or has a high pop tendency when setting their goals, they will tend to build more infrastructure and focus on the regions that need it most.

    There are now 14 different levels of habitability. As a region reaches a new level, their ability to house more people goes up. It is harder to grow a region (takes many more materials and BPs) the larger it gets. The number to the right of the size label of the region is the actual infrastructure level. If people feel too crowded, and especially if they are unemployed, they will move to a region that is less crowded, and/if they still can't find a job, they will more likely than not leave the planet.

    Moving on to the build AI/build plan UI:

    [​IMG]

    So there is a new panel at the bottom - the planet's build plan. On the top of the panel it shows the allocations for each part of the plan - there are 9 different build types (besides Edicts) that a viceroy can allocate BPs to: farms, high-tech facilities, factories, admin centers, labs, mines, infrastructure, and not shown yet, but ground military units and space military units. These will always equal 100% unless there is a mineral shortage, in which case the viceroy can shut down factories until the issue is resolved. (not implemented yet).

    The panel below that shows the progress in each area to build to the next level. This was actually very tricky to code - took almost the whole day to implement this system! The game keeps track of each build type, how many are being built at once, if a planet can build more than 1 level per month that is carried over, and any excess BPs that are not used on the current level are carried over to new construction. In this screenshot, you can see that this viceroy has chosen to focus on high-tech facilities, mines, and admin. This makes sense since they have a power shortage (even tyrants need power, so this is ALWAYS a priority), an alpha material shortage (the highest priority material) and they are a provincial capital, so admin is important, but how important depends in large part on the viceroy's traits and tendencies.

    So this planet is generating 13.4 alpha BPs per month, 5.4 heavy BPs, and 2.2 rare BPs per month. If the viceroy wanted to, they could run their factories in overdrive, using up to 10x the amount of materials per month to get a quick boost in BPs, but this has a logarithmic affect on production (in other words, you get less and less benefit the higher you go towards 10X). Overdriving your factories also tends to piss off your engineers (they are severely overworked), but I have not added that unrest code just yet. You can also now see in the surplus/shortfall the pre-production levels, and if there is stock of that resource, they will use that to show the final surplus/shortfall level. This way, you can truly see what your situation would be with and without the factory production plan. Your viceroy will (should) be smart enough to not run the stocks dry executing the production plan, and if they overdrive their plan sending them materials as an Imperial gift will go a really long way (or persuading someone else to trade them materials, etc).

    Now let's talk about the conversation engine and the actions.

    [​IMG]

    So as you can see above (also notice the new fade/blur effect when a window is modal on the screen; that will be tweaked as we move on) the program will generate a random conversation based on the character's feelings towards you, and eventually their traits. The program uses specially designed parse strings and a random generator based on character traits and attributes.

    There will eventually be about 50 tags that anyone can use to write conversation for different conversation types. So far, there are initial greeting, initial conversation, positive response to action, neutral response to action, negative response to action, affirmative response to request from action, undecided response, and decline response. Soon, there will be plot/rumor responses, threat responses, challenge responses, and request responses. There are also lists of adjectives, colors, sports teams(!) and a few other things to provide some variety. The engine will also generate a random amount of sentences (up to 3) if a response is not 'chained'. Chained responses are pre-written conversation branches that are written for different situations. I'll go into those soon.

    Actions are what you use to directly converse with a character. They work very similar to the first Imperia, and cost one action point to use. (With this new system, you can open up any character screen for free - each action selected costs the AP, not just opening the screen). In the game, we have tentatively made plans for there to be around 160 total actions. Please keep in mind that many of these actions are used by the character AI as part of their strategy tree to accomplish their proximal goals. Oliver will explain all of this process in more detail as we go) In contrast, the first Imperia had about 16 actions. Tooltips will help you understand the basic effects of a specific action without telling you exactly what will happen - for example, praising speech will ++ relations with the character's allies, -- relationships with the character's enemies, + relationships with that character's House, and depending on the result, either ++ or -- their relationship with you, the Emperor. Our goal with the system is to help the player understand the potential first-level results of actions both succeeding or failing.

    [​IMG]

    In this example, I tried to give a praising speech. It didn't go so well. :-( I will probably add the result level in the text initially for debugging purposes, and I'm mulling having the text change color based on the result so it's more visually obvious. Thoughts? For now, there are very generic responses just to test the function flow but everything works so I'll start adding more flavor as I can. Eventually, there will be literally hundreds of different response structures that themselves are generated dynamically so as the conversation engine matures it will feel more and more like talking to real people and less 'mad-libby'.

    [​IMG]

    Next is build events. As you can see, I have added the new builds as they occur on planets. The new addition here is that you can click on an event and it will take you to the system screen that the planet is in. Migration has also changed - it is now active from planet to planet, and even civ to civ, although a civ has to be known to your empire in order for pops to go there. With that, I have changed a lot to the pop and economic system.
     
    #1
    PanzerDuck likes this.
  2. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    Here are the summary of the changes:

    * Got rid of children. It was too hard to track their migration - did they get attached to a pop? Did they just disappear? It was awkward. So what I have now is 'young adults' - when they are 'born' they are automatically 18 and have a sub-standard set of skills. As they age until they are 25, they will dramatically increase their skill levels, then level off somewhat with marginal increases until they are around 50, then slowly tail off until they retire. This makes it much easier to track pops, and still models the effects of new workers in the workforce being unskilled and diluting the overall skill level of a sector, which was the intent all along.

    * Got rid of 'partially employed'. I still think it is a good concept in theory, but it just really didn't work with the economic model - it left too many holes where a pop could take a job, but couldn't because there wasn't a slot. With the reworked model, all slots that can be filled on a planet are taken. The pop will move to a region that has jobs for their class, and the only way that infrastructure levels won't be staffed is if there is no pop that has the skills for that type of infrastructure. This way, a viceroy can take their planetary staffing into account when deciding to build new industry - if they don't have the pop types, that's a decision they will have to make as part of their proximate strategy (I have added this to the strategy tree) - I am starting to sketch out the idea of schools on each planet that raise pops's skill levels in that school - so say, if an engineering school is not built, it has a level of 0. As the school is expanded and becomes better, its level increases, and can handle more pops. A pop who is training to be a new type will temporarily be a Student, and will not work in the main industries. Once their skill level reaches a certain threshold, they will be retrained as that school (they will still have some proficiency in their old skill, however, so they could convert over if need be). They won't be nearly as good as a 'standard' Pop in that class, however, until they get some actual experience. So for example, a good Engineer Pop could have a 65 Engineering skill, but a Pop coming out of a low-level school could have a rating of 15. Yes, they're an Engineer, but a damn poor one, but in the model staffing with some Engineer is much better then no Engineer at all.

    * Dramatically rebalanced the planet and pop generation routines, and am still working on this. I want to have about 6-8% unemployment, but only scattered unemployment because there aren't enough job types available, not because a pop can't get to an otherwise available job. With the code changes, if there's a job to be had, and the Pop is unhappy enough, they'll find it by migration and resettling in a new Region, if not in your empire, than in another known one.

    * Started adding the code for the Province view. Basically, what will happen (and will probably be in the current build if I can get it working in time) is to click on the province name and the screen will zoom and center the entire province/constellation, from where we can have UI panels generate like with the system and planet view (after all, they are still generated from the same 'world space' they are just panels that are generated and destroyed on the fly as needed based on the UI mode).

    These are just the additions in the last week or so. We are dramatically increasing the pace of coding and development at this point, so we will be moving to .3 much quicker than to .2, most likely in the next 3-4 weeks. Also, you will see much more regular updates from me and the team. Thanks for hanging in - results are coming in!

    -Steve
     
    #2
    PanzerDuck likes this.

Share This Page