1.0D CECOMMPATCH - 0.9.5 - Updated: 2017/04/20

Discussion in 'Clockwork Empires General' started by EsBee, Mar 3, 2017.

  1. EsBee

    EsBee Member

    Just a heads up on my current work:

    I'm doing a FULL recipe review to make 100% sure they are working as intended. This will take a few days because there are an insane amount of them and there are two files that need to be compared (with a whole bunch of values for each recipe). I'm also simultaneously compiling a spreadsheet of what everything requires, which I'll release for those that want a quick way to consult what materials are needed. At some point I'll probably code up a reference site that is community patch-specific. Not quite a wiki (can't stand wikis personally), but useful enough to function similarly. I'll probably wait for the first major release of the patch for that though.

    So far several dozen recipes have been corrected. Problems fall under a few categories:

    - being given the wrong "you need # of XYZ" failure message in the mouseover
    - incorrect yields of finished products
    - wrong ingredients (both visually and behind the scenes)
    - wrong ingredient amounts (again both visually and behind the scenes)
    - wrong AI info regarding what to bring back to the workbench
    - and other one-off oddities

    Once the review is complete, every recipe should be working how the mouseover states... not including my own human error. At that point everything should be prepped for a balance review, but that's pretty low priority except for the really obvious and ridiculous stuff.... especially with the mouth-watering possibilities of resurrecting unfinished/unimplemented *new* content so close at hand.


    For the first major release I plan to squash as many outstanding bugs as possible, review what has needed some TLC for awhile, and just generally make the game as close to "fixed vanilla" as possible. After that I'll be focusing more on NEW stuff more. If you're not interested in new content, let me know. I'm not sure how feasible it would be to maintain two different branches ("fixed vanilla" vs "fixed + new"), but if there is enough desire for it I'll certainly try.

    With regards to new content, my goal will always be to match the established vibe of the game. The intention will be to have new content be as Gaslampy as possible, rather than straying into total conversion territory. That means no memes, no "hd" textures, etc.

    *EDIT*
    1/2 way through the recipe review. So far the following fixes have been implemented:

    • "Make Ammo Autoloader" - wrong failure_reason
    • "Make Charcoal" - Iron Charcoal Kiln - wrong failure_reason
    • "Make Bucket of Lacquer" - chem workbench - wrong failure_reason
    • "Make Tin Exotic Caviar" - all workbenches - missing iron ingot ingredient
    • "Make Tin Exotic Caviar" - Adv workbench - wrong ingredient amounts in mouseover
    • "Make Reactive Catalyst" - Chemistry Workbench - wrong ingredient failure text
    • "Make Ornate Bed" - recipe wasn't requiring the necessary ingot of gold (too few)
    • "Make Ornate Table and Chair Set" - recipe wasn't requiring the necessary glass (too few)
    • "Make Brick Ceramics Kiln" - recipe wasn't requiring the necessary bricks (too few)
    • "Make Ceramics Press" - recipe wasn't requiring the necessary brass cogs (too many)
    • "Make Stone Altar" - recipe wasn't requiring the necessary stone (too few)
    • "Make Iron Ceramics Kiln" - recipe wasn't requiring the necessary iron pipes (too few)
    • "Make Jezail Rifle Locker" - wrong tag in workshop_jobs (ingot instead of plate)
    • "Make Grenade Launcher Locker" - wrong failure_reason
    • "Make Stained Glass Window" - recipe wasn't requiring the necessary bric-a-brac (too few)
    • "Make Bucket of Lacquer" - adv workbench - wrong yield (too few)
    • "Make Reactive Catalyst" - adv workbench - wrong failure_reasons
    • "Make Prototype SK Oculars" - adv workbench - wrong failure_reasons
    • "Make Prototype SK Oculars" - adv workbench - wrong mouseover ingredient
    • "Make Brick Charcoal Kiln" - adv workbench - wrong failure_reason and amount
    • "Make Dewatering Pump" - adv workbench - wrong failure_reason
    • "Make Standing Desk" - adv workbench - wrong failure_reason amounts
    • "Make Standing Desk" - adv workbench - wrong mouseover ingredient amounts
    • "Make Bookshelf" - adv workbench - wrong mouseover ingredients and amounts
    • "Make Bookshelf" - adv workbench - wrong failure_reasons
    • "Make Fancy Bookshelf" - adv workbench - wrong mouseover ingredients and amounts
    • "Make Leyden Jars" - recipe wasn't requiring the necessary copper ingots (too many)
    • "Make Cabbage Stew" - steam oven - missing "multiplier" (wildly wrong cost, essentially)
    • "Make Cooked Meat" - steam oven - references "basic food"
     
    Last edited: Mar 8, 2017
    Samut likes this.
  2. EsBee

    EsBee Member

    WHEW! Finally finished the recipe review. Here are the final additional changes:
    • FIX: RECIPE - tooltip items/amounts - "Make Charcoal" - metalworks/ind kiln
    • FIX: RECIPE - tooltip items/amounts - "Make Refined Food" - kitchen/iron oven
    • FIX: RECIPE - tooltip items/amounts - "Make SK-MK1 Oculars" - ceram/ceram workbench
    • FIX: RECIPE - "#x item needed" warning - "Make Refined Food" - kitchen/iron oven
    • FIX: RECIPE - actual items/amounts usage - "Grind Stone Into Ore" - too many Stone used
    • CLEANUP: Removed redundant "Make Steam Oven" job code
    • CLEANUP: Removed redundant "Make Maize Chowder" job code
    • CLEANUP: Various "is_cost" corrections

    All changes have been merged with the v1 branch, so feel free to try them out! See the first reply to this thread for the link. I also created a spreadsheet of all the craftable items, their ingredients/yields, and the workshop+module that crafts them. I will be including it in the official release for quick offline access to the recipes, but I need to add the required research data before it's ready.

    Next on the docket is finishing up the remaining known issues, finalizing some of the name standardization, reviewing mouseover descriptions, and a few other bits and bobs. Should be ready for the first official release soon though!
     
    Cthulhu_Awaits and Samut like this.
  3. Kaidelong

    Kaidelong Member

    Hey, been trying to get in touch with you in steam on this in your profile comments, but your profile is private.

    If you can describe some of the tedious work to me in person I could see about trying to automate it.
     
  4. EsBee

    EsBee Member

    Feel free to friend request me if you want to chat directly. I keep my profile private for a plethora of reasons, but not because I keep my friends list exclusive :)

    An automated system to compare recipes between buildings.xml and workshop_jobs.xml could definitely be useful, but it's a bit tricky. buildings.xml has everything split by Module/Workbench, then Workshop, then individual recipe. Which means there are 2+ recipe entires for 99% of the craftables item in the game. The structure functions like:

    Code:
    <module/workbench>
       <workshop>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
       </workshop>
       <workshop>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
       </workshop>
    </module/workbench>
    <module/workbench>
       <workshop>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
       </workshop>
       <workshop>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
           <recipe>
           </recipe>
       </workshop>
    </module/workbench>
    
    It handles the visual tooltip information for the most part, BUT it does pass certain values to the recipe processing script... in particular the yield (both in terms of the output product AND the amount), though that isn't the only one. A multiplier and a bunch of other stuff is pretty important for the back end as well.

    workshop_jobs.xml, on the other hand, is where the processing (behind-the-scenes) part is handled. There is only one entry per craftable. For bulk creation recipes, the multiplier from buildings.xml is used... meaning multiple recipes of the same type of item use the same crafting data.

    One of the problems with making automated systems for recipes is that the game utilizes a very robust tag system. It's an incredibly awesome and useful system, BUT it means that the same thing can be referenced in a bunch of ways. For example, coal/charcoal/peat could be used on their own as an explicit ingredient... OR they can be interchangeable as part of the carbon/fuel tags. Same goes for logs/bamboo when it comes to "timber".

    There are a ton of other notes I could make about how this system works, but it might be best if you dug through the code yourself and asked specific questions, as I could ramble for days on how it all operates.

    *EDIT*
    In the same vein of automation, it appears GG forgot to clean up their edb_to_xml.lua file... meaning creating commodities.xml from the edb files is a one click process! We lucked out on this one, that's for sure, as it means I won't have to compare 4 different edb files to commodities.xml by hand.
     
    Last edited: Mar 8, 2017
    Samut likes this.
  5. EsBee

    EsBee Member

    More changes. Mostly further name standardization stuff... getting *very* close to having everything consistent and simplified.

    Several important bug fixes were included as well, the most important being:
    • FIX: RECIPE - "Wheat" missing all tags, impacts all recipes with it
    • FIX: RECIPE - research required - "Make Bottle of Sulphur Tonic" - chem/adv workbench - missing "Tonic Healing"
    • FIX: RECIPE - research required - "Make Bucket of Molasses" - kitchen/adv workbench - missing "Temperate/Desert"

    And here's the rest:
    • FIX: TEXT - "Bricks (5)" references instead of "Bricks"
    • FIX: TEXT - "Steam Knight MK1" references instead of "MK-1 Steam Knight"
    • FIX: TEXT - Several "peice" vs "piece" typos
    • FIX: TEXT - Phased out "Basic Food" referenced instead of "Cooked Meat"
    • FIX: RECIPE - "#x item needed" warning - "Roast Coffee Beans"
    • FIX: RECIPE - "#x item needed" warning - "Make Charcoal" - metal/brick char kiln
    • FIX: RECIPE - "#x item needed" warning - "Make MK1 Machine Gun" - metal/smithing forge
    • FIX: RECIPE - "#x item needed" warning - "Make Landmine" - metal/smith forge
    • FIX: RECIPE - "#x item needed" warning - "Brew Beer" - kitchen/brewing vat
    • CHANGE: TEXT - Recipes referencing logs now state "Any Timber"
    • CHANGE: TEXT - Recipes referencing coal or charcoal now state "Any Fuel"
    • CHANGE: TEXT - Recipes referencing raw meat now state "Any Raw Meat"
    • CHANGE: TEXT - Recipes referencing vegetables now state "Any Vegetable"
    • CHANGE: TEXT - Recipes referencing fruit now state "Any Fruit"
    The changes relating to category-based items will be followed up with new icons where needed. In particular the "Any Timber" and "Any Fuel" categories. This will *hopefully* clear up confusion new players have when it comes to what can be used.

    I'll also be completely reviewing how the boxes at the bottom of item tooltips are used. Right now they can be kind of confusing even to experienced players, but I will be using them in a way that makes the category the item belongs to much more obvious.
     
    Rentahamster likes this.
  6. Rentahamster

    Rentahamster Member

    Impressive work you're doing.
     
  7. EsBee

    EsBee Member

    Today's changes (not merged yet as I'm playing around with some experimental changes):
    • FIX: EVENT - One of the fishpeople spawning events triggers an alert sound with no actual alert
    • FIX: EVENT - "Empire Times" script error
    • FIX: WORKSHOP - Mine shoring supplies consumed even on failed attempts
    • FIX: WORKSHOP - Premature "No Door" alert for the barracks
    • FIX: ACHIEVEMENT - "Bottoms Up" not triggering. See "known issues" for info on the tradeoff
    • FIX: ACHIEVEMENT - "Who You Gonna Call" not triggering. See "known issues" for info on the tradeoff

    Known issue: The "Bottoms Up" and "Who You Gonna Call" achievements will not visually progress in Steam, but the achievement DOES work as intended now. The stat/progress portion is impossible to fix because the variable is unknown and all educated guesses didn't work. Since the stat wasn't being tracked internally before, only new booze/spectres served/banished will count towards the achievements. Both stats are save-game specific, so it is NOT an overall amount.

    As for my experimental changes: I'm working on adding some mystery to various spawning events (like "fishpeople spotted" and the like). Currently I have it set up so that there is a 50% chance that the alert won't be shown, and if it is there's another 50% chance that the information won't be detailed as to what faction/species it is. For the change to be effective other spawners will need a similar change. Not necessarily all of them, but enough to make it so there is some actual mystery when it comes to exploration, re-exploration, and what is currently on the 'board'.

    This actually has quite a bit of potential, as it could be folded into further science upgrades that gather more accurate and detailed information by increasing your chances. I'll try not to go off the deep end with it just yet... there are higher priorities, obviously, but I have a feeling this will be one of the first "new content" things I add.

    *EDIT*
    Okay, merged. I removed the really drastic aspect of the experimental change for now (the 50% chance to show the alert at all), but kept the 50% chance for ambiguous naming of the faction/species.
     
    Last edited: Mar 10, 2017
    Cthulhu_Awaits and Samut like this.
  8. Teutomatos

    Teutomatos Member

    Runtime error crash dump btw
     

    Attached Files:

  9. EsBee

    EsBee Member

    The major culprits I see are:

    1) The amount of flattening going on
    2) The deepness of what is being flattened
    3) Building right near the edge

    Any one could have caused all kinds of problems, but I'm guessing it's an issue with colonists being buried alive due to the flattening... OR their needed items/waypoints being set to an impossible-to-reach area. I don't think this will be something I can fix, but I'll dig around and see what I can find.
     
    Last edited: Mar 10, 2017
    Cthulhu_Awaits likes this.
  10. gmkchicago

    gmkchicago Member

    I like how you're doing more cleanup that the last few versions did combined :)
     
  11. EsBee

    EsBee Member

    Naw, I just document like a lunatic :) Plus I have the luxury to spend as much time as I want doing tasks that no commerical project ever would.... or only would at the very end of development, when they're prepping for modder tools and engine licensing. I have no doubt that everything I'm doing (and soooo much more) would have been done had the game had more time. It was certainly never the intention to leave it in its current state.
     
    Cthulhu_Awaits likes this.
  12. Teutomatos

    Teutomatos Member

    Attached Files:

  13. EsBee

    EsBee Member

    WHEW, another huge change... with a bunch of fixes thrown in the mix as well :)

    • !!!MAJOR CHANGE!!! - Tooltip tags have had a total overhaul in how they are used. EVERY item/recipe tooltip impacted!
    • FIX: EVENT - "Creepy Night" causes many duplicates of the same memory
    • FIX: ACHIEVEMENT - "Tidy Estates" not triggering
    • FIX: ICON - Gray "Mine Shorings" missing completely
    • FIX: ICON - Gray "MK-1 Steam Knight Oculars" missing completely
    • FIX: ICON - Gray "MK-1 Steam Knight Chassis" missing completely
    • FIX: ICON - Gray "Auto Ammoloader" missing completely
    • FIX: ICON - Gray "MK-1 Machine Gun" missing completely
    • FIX: ICON - Some gray versions are slightly misaligned compared to the color version
    • FIX: ICON - Gray "Prototype SK Oculars" incorrectly mapped
    • FIX: ICON - Gray "Prototype SK Chassis" incorrectly mapped
    • FIX: ICON - Gray "Contruction Frame" incorrectly mapped
    • FIX: ICON - Gray "Any Distilled Spirits" not mapped
    • FIX: ICON - Gray "Leaf Fossil" not mapped
    • FIX: ICON - parcel_generic incorrectly mapped
    • FIX: RECIPE - Caninha isn't flammable
    • CHANGE: UI - More tooltips scale with the content, preventing huge (mostly empty) tooltips
    • CHANGE: ICON - "Any Timber" icon (color+gray) created
    • CHANGE: ICON - "Any Fuel" icon (color+gray) created
    • CHANGE: ICON - "Ore" category icon (color+gray) created
    • CHANGE: ICON - Recipes using "Any Distilled Spirits" now show the appropriate icon
    • CHANGE: ICON - Recipes using "Any Timber" now show the new icon
    • CHANGE: ICON - Recipes using "Any Fuel" now show the new icon
    • CHANGE: RECIPE - "Fungus" changed to "Any Fungus"


    Regarding the tooltip overhaul:

    The default game didn't use the tag-driven "category" stuff that shows up at the bottom of item tooltips (the boxes with an icon and some text) very well. It was very inconsistent, not super useful, and often times really confusing.

    This how now COMPLETELY changed. I've done a complete overhaul of how they are used, made it 100% consistent across every item, and basically completely redone the entire thing. It's hard to describe how they are used now, but basically it's a category+"how do i get this"+"what do i use it for" system... at least to some degree. I don't use it to show every recipe an item can be used for, for instance, but it *does* show where modules are used, what categories items belong to, and a bunch of other info.

    I suggest just trying it out to see how it works. Hopefully it's logical and useful. It may change in the future, but I'm pretty happy with it at the moment.
     
    Last edited: Mar 12, 2017
    Samut and Kazeto like this.
  14. Kaidelong

    Kaidelong Member

    I don't think this is an accident. Probably they had already written in XML support into early builds of CE, but since XML is difficult to work with, decided to make a custom syntax instead, which the game transpiles to XML at load time.
     
  15. Samut

    Samut Member

    What's the best way to help you with this patch?
     
  16. EsBee

    EsBee Member

    Bug reports, saves of guaranteed crashes, etc. would be the biggest help at the moment. Apart from that it'd be awesome if folks helped to write appropriately themed flavor text for the areas lacking in that department. I'd love to really fill out the game with text similar to GG's classic style, but it takes a lot of time... which means I spend less time coding and troubleshooting.

    Side note, the next patch-to-the-patch has been released!

    • !!!MAJOR CHANGE!!! - Male colonists now have a chance to wear (intelligently) randomized hats!
    • FIX: UI - Blueprint requirements for timber are showing in red when there is amble timber
    • FIX: UI - "Ornate Table and Chair Set" is not showing up in the module placement menus
    • FIX: ICON - "MK-1 Steam Knight" uses prototype version's icon
    • CHANGE: UI - "All Decor" filter reimplemented
    • CHANGE: UI - "All Modules" filter reimplemented
    • CHANGE: UI - "All Doors/Windows" filter added
    • CHANGE: UI - "All Furniture" filter added
    • CHANGE: TAG - Farming added to Lacquer
    • CHANGE: TAG - Farming added to Bamboo
    • CHANGE: TAG - Icon for "Used in Workshops" changed to general workshop icon

    I found a way to add the "All ______" filters back in, WOOO! I had to do it in a bit of a hacky way (or at least it feels that way, haha), but it works great in my tests. I was even able to add some new filters for furniture and doors/windows. Some items are in multiple categories, but this is intentional.

    Regarding the hat change:

    Hats are chance-based with several tiers of randomization to spice things up. Expect to see "pilgrim hats" more often than others, because why not? What hat a colonist can wear is categorized by what social class they're in. They're also male-only for the moment. Females have hats attached to some of the hair models already, plus the hat change requires hiding the hair on the applicable character... meaning you could end up with a lot of bald females. Eventually I will review every hair model and hat combination, re-enable hair for the applicable combos, and let females in on the fun.
     
    Samut likes this.
  17. gmkchicago

    gmkchicago Member

    Tested it tonight, and so far it runs well. The alerts pushing down the buttons issue has been fixed. I find the alert area a little too small, but it is better than before.

    One late game bug I hope would be an easy fix is that 'Being Well Fed' adds to despair. Seems like this was an error.
     
  18. Samut

    Samut Member

    Holy shit - you implemented hats? Gaslamp quit talking about that two years ago.
     
  19. EsBee

    EsBee Member

    If I had to guess, they probably wanted to do something more interesting with them. I do too, buuuut unfortunately I'm not sure if it's possible. Doesn't seem like the hat portion of the model/etc. swapping stuff was ever completed on the engine side of things, so having occupation-based hat-wearing (or even a haberdashery workshop) doesn't seem possible.

    I'm *hoping* I can figure out a way around it, but I have a feeling it just won't be possible. But hey... at least we have *some* kind of variation for our colonists now :)

    There are a good dozen or so currently disabled hats left, but some are just too silly to use for regular citizens... or are *very* occupation-focused (like a chef's hat, or blatant military helmets). But there are a few more I might add to the mix at some point. The rest will probably be used for events or other factions in the future. I may also add some biome-specific weighting to what hats are used as well... like swapping out pilgrim hats for the ushanka models (and the crazy, giant bear fur hat hahaha) in cold zones, explorer pith helmets for tropical/desert, etc. Or maybe hat-usage-weight based on traits. There's a lot that can be done with hats, even if they can't be swapped out after a character is created :)

    The funny thing is, the hat feature was a happy accident. I was trying to find the solution for something else entirely, saw some interesting code from an unused event that utilized hat code, and the lightbulb went off.
     
    Last edited: Mar 14, 2017
    Kazeto, Cthulhu_Awaits and Samut like this.
  20. Samut

    Samut Member

    I was going to ask about changing hats - so the character model can't be changed, or even destroyed and recreated with a different hat? Amazing work nonetheless.

    If you're looking for more of this sort of thing, there's code for some kind of spontaneous town party to take place when colonists are happy. It was never implemented, but I remember seeing the existing code for it right after the game went into Early Access.