Alpha 50A Snippets of Code

Discussion in 'Clockwork Empires General' started by Alavaria, Apr 9, 2016.

  1. Alavaria

    Alavaria Member

    You might not have realized but when I posted about sleeping (beds & building quality) the forum gave me grief for putting in too many characters. Annoying, also who wants to read excepts from CE code directly in posts?

    This might be useful to let people double-check for themselves, Especially since:
    • Numbers are easily changed for balancing - if there's a new version you can do your own homework
    • Maybe some sort of modder's resource. Only because I got Dredmor too late to get in on that
    • Encourage understanding of game mechanics and parameter choices
    • For special people, yes it's definitely you

    Links to posts below this, each will have a version listed on the post, if the current version is different, you may wish to check yourself. I recommend Notepad++ over just Notepad.

    There may be commentary, not everything will be 100% confirmed especially if I went around searching/hunting in multiple files for something.
     
    Last edited: Apr 16, 2016
    Bluebird and Samut like this.
  2. Alavaria

    Alavaria Member

    From scripts\entity\weapons.edb, ver 48-B

    Firearms (player's soldiers can use these):
    Melee weapons, your people use these if they don't have a gun or a tool to attack with. Sometimes bandits also use these.

    Fishpeople weapons, you can't use these.
    1. reload_time
    As far as I can tell, the reload_time does nothing.
    Reloading seems to depend on the length of animation used, and there are four animations:
    • longgun - long vs short
    • Rest - long vs short
    For the player, redcoats get the short reload, while the militia get the long one.
    Bandits use the long reload, and I am pretty sure that foreign soldiers/traders also use the long reload.

    2. Multi-Shot Weapons
    The revolver and carbine are multishot. Characters seem to pause a bit before each shot (and reload at the end of it all). Haven't looked into this yet.


    3. Tool Weapons
    Some tools can be used as weapons, I don't entirely know how the game decides if a character should drop their hoe and pull out a machete to fight in melee with.
     
    Last edited: Apr 16, 2016
    Samut likes this.
  3. Samut

    Samut Member

    Glad to see the longgun tag in there. That could be useful for some day when adding a to hit check instead of nobody ever missing.
     
  4. Alavaria

    Alavaria Member

    Yes though, if anything I imagine it would be finer than that, like add a "shot_accuracy" entry for each ranged attack which is from 0 to 100, or something. And of course there are modifiers for training, a tech for it, etc etc
     
  5. Alavaria

    Alavaria Member

    scripts/entity/crops.edb ver50
    Note that the Prickly Pear has "perennialReturnStage" (3 out of 5) I am checking what this means in terms of work needed to get a harvest.

    There are other crops listed in the file, I don't know which ones are actually already ingame, let me know if you meet some and I will add them.
     
  6. Alavaria

    Alavaria Member

    scripts/entity/factions.edb ver50

    Each trader that spawns (a trade group will have 5 to 8 traders) has an equal chance at any item. Note that lacquer is listed twice for Stahlmark standard trader. The items each trader carries is independent from the others, so you can for example have the Novorus special traders come in with multiple stacks of logs.

    Each trader carries 5 to 10 items. Each trading group comes with 1 leader (not a soldier, doesn't carry goods) and 3 guards (soldiers).
     
    Last edited: Apr 16, 2016