FORUM ARCHIVED

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

    Whew... 0.9.4 is released! This was a beast of a patch that kept snowballing into more and more fixes/changes. This is the first patch that I *HIGHLY* recommend using a new save with, as some of the changes aren't possible to apply to pre-0.9.4 entities. It should still be playable on old CECOMMPATCH saves, but it's definitely worth it to start a fresh one to take full advantage of the fixes.

    Download:
    https://github.com/SickBoySB/cecommpatch/releases/latest

    Changelog:
    • FIX: Script error - Foreign Intervention event
    • FIX: Script error - Foreign Relations Correction event
    • FIX: Script error - Foreign Attack Bandits event
    • FIX: Script error - Foreign Invasion Enemies Arrive event
    • FIX: Buried corpses can be queued to be re-dumped/buried
    • FIX: Buried corpses have a tooltip
    • FIX: Buried overseer corpses show nametag
    • FIX: Dead labourers show in the population menu
    • FIX: Buried corpses sometimes don't disappear
    • FIX: Wrong tooltip when loading a save - Bandits
    • FIX: Wrong tooltip when loading a save - Foreigners
    • FIX: Wrong tooltip when loading a save - Occult Inspectors
    • FIX: Wrong tooltip when loading a save - Visiting Clockworkians
    • FIX: Wrong tooltip when loading a save - Spectres
    • FIX: Wrong tooltip when loading a save - Steam Knights
    • FIX: Wrong tooltip when loading a save - Fishpeople
    • FIX: Wrong tooltip when dead - Bandits
    • FIX: Wrong tooltip when dead - Foreigners
    • FIX: Wrong tooltip when dead - Occult Inspectors
    • FIX: Wrong tooltip when dead - Visiting Clockworkians
    • FIX: Wrong tooltip when dead - Spectres
    • FIX: Wrong tooltip when dead - Steam Knights
    • FIX: Wrong tooltip when dead - Fishpeople
    • FIX: A duplicate, inactive Steam Knight is spawned and stuck at 0,0 for every SK spawned
    • FIX: Scrap Iron is a trade good but doesn't have a trade value
    • FIX: Science Crate is a trade good but doesn't have a trade value
    • FIX: Power Lathe has an extremely low trade value
    • FIX: Dumping fishpeople corpses uses the wrong job
    • FIX: Corpses queued for auto-burial don't have the proper radial menu options
    • FIX: Memories aren't created for human/fishpeople butchering
    • FIX: Obeliskians on fire when they die crash the game
    • FIX: Quaggaroth crashes the game on death
    • FIX: Dead colonists (without last rites) aren't triggering spectre-spawning chances properly
    • FIX: Spectres instantly despawn even if their 'goal' conditions aren't met
    • FIX: Planets Align event can potentially go into an infinite loop
    • CHANGE: Added 3 new "despair" tier icons
    • CHANGE: Added 3 new "anger" tier icons
    • CHANGE: Added 3 new "fear" tier icons
    • CHANGE: Thought bubble graphic made a bit more thought-bubbley
    • CHANGE: Added regularly triggered "emote" thought bubbles for negative moods and severely un-met needs
    • CHANGE: 5 new death animations - Colonists
    • CHANGE: 5 new death animations - Bandits
    • CHANGE: 5 new death animations - Foreigners
    • CHANGE: 5 new death animations - Occult Inspectors
    • CHANGE: 5 new death animations - Visiting Clockworkians
    • CHANGE: 5 new death animations - Fishpeople
    • CHANGE: Increased hat-wearing chance from 40->50%
    • CHANGE: Increased special hat-wearing chance from 10->35%
    • CHANGE: All corpses can now be queued for burial or dumping by cursor select box
    • CHANGE: Buried bodies are now much more reliably removed from the game
    • CHANGE: Forbidden items can be claimed with cursor select box
    • CHANGE: New set of tooltips - Bandits
    • CHANGE: New set of tooltips - Foreigners
    • CHANGE: New set of tooltips - Occult Inspectors
    • CHANGE: New set of tooltips - Visiting Clockworkians
    • CHANGE: New set of tooltips - Spectres
    • CHANGE: New set of tooltips - Steam Knights
    • CHANGE: New set of tooltips - Fishpeople
    • CHANGE: Dead colonists given new tooltip
    • CHANGE: Steam Knights explode (twice) on death now
    • CHANGE: Explosion kills now insta-skeleton and drop meat - Colonists
    • CHANGE: Explosion kills now insta-skeleton and drop meat - Bandits
    • CHANGE: Explosion kills now insta-skeleton and drop meat - Foreigners
    • CHANGE: Explosion kills now insta-skeleton and drop meat - Occult Inspectors
    • CHANGE: Explosion kills now insta-skeleton and drop meat - Visiting Clockworkians
    • CHANGE: Explosion kills now insta-skeleton and drop meat - Fishpeople
    • CHANGE: Quaggaroth given a convulsing death animation (hacky crashfix, but also pretty neat)
    • CHANGE: Quaggaroth has a better chance of properly spawning obeliskians on death
    • CHANGE: Butchered fishpeople leave behind a skeleton
    • CLEANUP: Fancier readme... just because
    • CLEANUP: thoughtIcons00 has an inconsistent grey version
    Notes:
    • The new emote system is primarily based on mood, though there are special situations that will trigger emotes as well... such as badly needing sleep or food. Mood-specific emotes are based on a four-tier system with a minimum threshold of 15 points before the first tier is activated. Only negative moods are emoted so being happy or having low negative mood points will result in fewer thought bubbles. Thought bubbles are triggered every minute or so (it depends on a few factors, including game speed) and are based on that exact moment's mood. This feature is meant to be a warning system to quickly and easily see if something is going wrong without having to check the population menu constantly.
    • Forbidden items can only be claimed with the select box on new (0.9.4 or later) saves, if the item is newly created, or if set to forbidden after the 0.9.4 patch. This is unavoidable because of how items are handled in the game.
    • Manual corpse burial/dumping intentionally cancels the job if it is interrupted. This is up for debate, but the problem with *not* cancelling is that colonists will go into infinite loops if hostile entities get close (like they do with foraging, etc).
    • The result of all the faction-related script error fixes is that you should see a more significant amount of faction event stuff. If you're using an older (pre-0.9.4) save there is a chance that the events are already triggered and broken. The same goes for the spectre fix... you'll see them more often now (since they can spawn without an event, as was intended), though they still have a pretty low chance of spawning.
     
    Last edited: Apr 17, 2017
    Samut likes this.
  2. Samut

    Samut Member

    Amazing. Love the emote bubbles.

    How did you add new animations?
     
  3. EsBee

    EsBee Member

    They're actually just unused animations, though I do have a method to import completely new models+animations. If I can dig up an old version of the game I could also get new particle effects into the game (the particle editor is broken in the 1.0D version).... granted I *could* just do them by hand, but that'd be a pretty miserable task. I may just end up writing my own tool for it.
     
    Samut likes this.
  4. Teutomatos

    Teutomatos Member

    0.9.4 SB patch
    About a message in history say assembly workbench complete, and that it is not.
     

    Attached Files:

  5. LSky

    LSky Member

    Very impressive what you've done so far.
     
  6. Teutomatos

    Teutomatos Member

    Need bricks alerts without reasons.
    At this point, i have assembly workbench and 2 bricks charcoal kiln in the queue.
    But the alerts existing before. Appears and desapears on unidentify reasons.
     

    Attached Files:

  7. EsBee

    EsBee Member

    Unbuilt airmast is the cause. Not a bug, though its placement should probably be prevented if not enough bricks exist... just to prevent confusion.
     
  8. Teutomatos

    Teutomatos Member

    crash crash crash ....
     

    Attached Files:

  9. EsBee

    EsBee Member

    Ah, yeah it's the 'flattening terrain on the edge of the map' issue. Since that's a bug in the renderer that I can't touch, I've done a hackfix that prevents flattening from occurring on the edge. It's a system that will leave the rest of the selected area (assuming those spots are valid), but chop out the part of the selection that is too close.

    In case anyone's curious, this is the gist of the fix (it's not super optimized or fancy code, but it works well enough):

    Code:
            local l_min = 5
            local l_max = 250
        
            local newsx = state.x
            local newsy = state.y
            local newx = x
            local newy = y
            local neww = w
            local newh = h
    
            -- change x if needed
            if state.x < l_min then
                newsx = l_min
                newx = l_min
            elseif state.x > l_max then
                newsx = l_max
                newx = l_max
            end
        
            neww = w - (math.abs(state.x - newsx))
        
            if newsx + neww > l_max then
                neww = l_max - newsx
            end
        
            -- now do the same for y
            if state.y < l_min then
                newsy = l_min
                newy = l_min
            elseif state.y > l_max then
                newsy = l_max
                newy = l_max
            end
        
            newh = h - (math.abs(state.y - newsy))
        
            if newsy + newh > l_max then
                newh = l_max - newsy
            end
        
        
            if (newsx > state.x + w) or
                (newsx + neww > state.x + w) or
                (neww < 1) then
                neww = 0 -- no valid spots
            end
        
            if (newsy > state.y + h) or
                (newsy + newh > state.y + h) or
                (newh < 1) then
                 newh = 0 -- no valid spots
            end
        
            state.x = newsx
            state.y = newsy
            x = newx
            y = newy
            w = neww
            h = newh
    
    If either 'newh' or 'neww' is 0 (meaning NO valid spots exist), the job doesn't get created at all... but otherwise only the invalid spots are chopped out.

    It was a royal pain in the ass to get working properly :p It was one of those seemingly easy fixes that makes your brain go in circles as you dream about grids.
     
    Last edited: Apr 18, 2017
    Samut likes this.
  10. Samut

    Samut Member

    Cool. Does this mean the existing code doesn't check to see if it's on the edge of the map?
     
  11. EsBee

    EsBee Member

    Correct. Though even if it did, the problem is renderer-related so it would still need to be *several* spots away from the edge. I went with 5 spots away, but there's a chance that still may cause problems in extreme terrain changes. It worked fine in my tests, but I may have to bump it to 10 at some point.

    If I had to guess, the problem was probably that terrain flattening changes spots around the actual tile... so when doing it on the edge of the map the game was trying to change tiles that didn't exist.
     
  12. EsBee

    EsBee Member

    0.9.5 released! Unfortunately a new save is recommended with this patch. My apologies for "new save recommended"-ing so soon after 0.9.4, but that's just how this kind of development goes sometimes. It's not absolutely necessary to start a new save, but some of the bigger changes (see "notes" below) require it.

    Download:
    https://github.com/SickBoySB/cecommpatch/releases/latest

    Instructions/etc.:
    https://sickboysb.github.io/cecommpatch/

    Changelog:
    • FIX: Invalid default animal/herd spawns - Cold Biome
    • FIX: Invalid default animal/herd spawns - Temperate Biome
    • FIX: Invalid default animal/herd/obeliskian spawns - Desert Biome
    • FIX: Invalid default animal/herd/deathwurm spawns - Tropical Biome
    • FIX: Minimap has bright white dots around the edges
    • FIX: Large animal burrow has dark square around it
    • FIX: Small animal burrow has dark square around it
    • FIX: Swamp biomes use a missing texture
    • FIX: Geometer Observators cause crash if they die when on fire
    • FIX: Vicars don't perform last rites on buried bodies
    • FIX: Corpses with last rites can still create a spectre
    • FIX: Flattening terrain near the edge of the map will crash the game
    • FIX: Blunderbuss area of effect attacks can cause meat 'splosions
    • FIX: Steam Knight minum gun area of effect attacks can cause meat 'slosions
    • FIX: Airship Masts don't use the correct materials in construction
    • FIX: Airship Masts don't spawn dust cloud on destruction properly
    • FIX: Loud, looping, metallic banging sounds occur in the middle of the map
    • FIX: Geometer Observators use an invalid animation when leaving the map
    • FIX: Geometer Observators cause script errors after exiting the map
    • FIX: Geometers cause script errors after exiting the map
    • FIX: Spectres loop walking animation when idling
    • FIX: Bamboo Agriculture lab research has a duplicate in tropical biomes
    • FIX: Practical Table and Chair Set has a typo
    • CHANGE: Unburied colonist corpses have a higher chance to spawn a spectre (5% -> 10%)
    • CHANGE: Chance for colonist corpses/graves without last rites spawning a spectre increased by 25%
    • CHANGE: Colonists can drink tea in class-appropriate houses with chairs (lower priority than pub drinking)
    • CHANGE: Drinking tea at home creates a new, slightly depressing memory
    • CHANGE: Minimap given fancy border/graphic
    • CHANGE: Flattening terrain near the edge of the map will now be prevented if it's within 5-6 spots (hacky crashfix)
    • CHANGE: Steam Knights despawn after their death animation and final explosion
    • CHANGE: Airship Mast cost changed
    • CHANGE: Airship Mast construction interruption made less sensitive
    • CHANGE: Airship Mast health increased from 20 -> 40
    • CHANGE: Airship Mast alert regarding missing materials removed
    • CHANGE: Airship Mast 'ghost' made less easy to destroy
    • CHANGE: Airship Mast destruction leaves more appropriate debris
    • CHANGE: Conifer trees in snowy areas given a healthy dusting of snow (all variants)
    • CHANGE: Pine trees in snowy areas given a healthy dusting of snow (all variants)
    • CHANGE: Fishepople bodies don't disappear automatically anymore
    • CHANGE: Fishpeople will now retrieve and "handle" their fallen friends
    • CHANGE: Spectres now have a few animations to pick from when idling
    • CHANGE: Simple Chair added to Lower Class House module menu
    • CHANGE: Simple Chair and Table Set added to Lower Class House module menu
    • CHANGE: Simple Chair and Table Set able to be built in Lower Class House
    • CHANGE: Chairs now impact quality (-1) - Simple Table and Chair Set
    • CHANGE: Chairs now impact quality (-1) - Practical Table and Chair Set
    • CHANGE: Chairs now impact quality (-1) - Ornate Table and Chair Set
    • CHANGE: Chairs now impact quality (-1) - Simple Chair
    • CHANGE: Chairs now impact quality (-1) - Practical Chair
    • CHANGE: Chairs now impact quality (-1) - Ornate Chair
    • TOOL: Readme now has a recipe searching tool
    • TOOL: Readme now has a lab research tree browsing tool

    Notes:
    • Chairs impacting building quality is a pretty major change. Barbershops, Public Houses, and Chapels in particular will have to work for their quality rating now.
    • OLD SAVES: The fix to vicars performing last rites only applies to freshly buried colonists, or new saves.
    • OLD SAVES: New airship mast health only applies to new masts.
    • OLD SAVES: Trees with snow on them only apply to new saves, and aren't a guarantee. The way world generation works is a kind of "layer" system, so trees near snow *should* use the snow variant... but not all of them will. This is intentional.
    • OLD SAVES: Chairs impacting quality will only be calculated when a modules is added/removed to a building.
     
    Samut likes this.
  13. Samut

    Samut Member

    Awesome.

    Do your meat 'splosions fixes mean you added them, or they weren't working right so you removed them?

    What was the deal with the loud banging sounds? I didn't know CE could handle location-based sounds.

    Finally, how tricky was it to add snow to the tree models? That's something Gaslamp had talked about but decided it was more trouble than it was worth.
     
  14. EsBee

    EsBee Member

    Meat 'splosions: they were added a patch or two ago, but 0.9.5 fixed instances where people would meat 'splode when I didn't intend them to. Blunderbuss and SK minum gun attacks technically use an explosion for their area of effect attack.. and my code made meat 'splosions based on that. I just needed to add some damage overrides to those particular attacks so that they *behave* like explosions (for the AOE effect), but actually just do bullet damage.

    Loud banging sounds: it was the Steam Knight bug where a duplicate SK would be created at 0,0. Why that caused looping bangs in the center of the map (which is 127,127) is baffling, but those duplicate SKs were all kinds of broken (they were spawned with really old, broken code) so it's not surprising.

    Snowy tree models: my guess is that GG wanted to have it be code-based, which would have indeed been way more work than it was worth. I just duplicated the existing textures+models, added snow to the duplicated textures, and associated the new textures with the duplicate models. Then changed biomes.xml (and added an entry in trees.edb) to use my snowy variants in sub-biomes that used a snow texture on the ground. Ultimately a very manual change that isn't as neat as, say, a dynamic weather system that changes texture over time... but it works well enough for my purpose..... which was just to make cold biomes feel colder. As for how tricky the model stuff was: not at all. It was a bit tedious because of how texture associate works, but not hard at all. It just required going back and forth between model, texture, and then model (again) directories. If anything, adding those files to my github folder was more of a pain :p
     
    Last edited: Apr 21, 2017
    Rentahamster and Samut like this.
  15. HappyDaCat

    HappyDaCat Member

    Has anyone tried decompiling the game? Would that even help?
     
  16. EsBee

    EsBee Member

    Having engine access would indeed be super useful, but that kind of tinkering is not one I'm comfortable with in a project like this... too many potential legal issues. If we had full permission it'd be a different story, but otherwise that's going into territory that is not worth the risk involved. Having the project shut down because of EXE tinkering and/or redistribution would be a huge bummer, after all.
     
    Kazeto likes this.
  17. Samut

    Samut Member

  18. mistrornge

    mistrornge Member

    Any further details? Found the game again and have restarted playing. Anyone else still alive out there?
     
  19. mistrornge

    mistrornge Member

    Downloaded and added the various new work that would have been 0.9.6 but had a crash. I forget where the file is that needs to be uploaded. Anyone know?