keronpage.blogg.se

Dwarf fortress adventure mode mods
Dwarf fortress adventure mode mods






dwarf fortress adventure mode mods

Modify earned experience by the unit caste's learning rates for that skill when applying Add the share of the experience to each active skill individually Local active_skills = get_active_skill_num(nemesis) Work out how many skills are currently active, for dividing experience between them Local total_experience = (( get_current_tick() - training_info. There are 50 fort-scale ticks in an hour, and exp_rate is per hour Work out the total amount of experience accumulated since the last check See update_skill_levels for thatįunction update_experience_earned( nemesis) Note that this DOESN'T apply the actual changes to their skills. Updates the values for experience earned for active skills Update_historical_skill(histfig, skill_id, total_experience) hist_figure_id)įor index, unit_skill in pairs(unit. (Note that unlike unit skills, historical figure skills work by recording their total experience points towards the skill) Histfig doesn't have a record for this skill, so insert one where required! Search their info to see if they've got points in the skill alreadyįor index, current_skill_id in pairs(histfig. Local function update_historical_skill( histfig, skill_id, experience)

dwarf fortress adventure mode mods

Updates a unit's histfig entry to reflect their current skill levelsįunction update_unit_historical_skills( unit) Gets the number of skills the character is actively trainingįor skill_id, info in pairs(training_info. If get_training_info(nemesis) ~= nil then Returns true if the given unit has training data Sets the experience gaining rate for this world to the given value Local training_skill_id = tonumber(training_skill_id) - ids are stored as strings, so convert for the comparison unit) = false thenįor training_skill_id, info in pairs( get_training_info(nemesis). Check that the unit has any training data at all Returns true if the character is training the particular skill, or false if notįunction is_training_skill( nemesis, skill_id) Skill_training_info = create_skill_entry(nemesis, skill_id) If they don't have a training entry for this skill already, and it's being set to false, there's no reason to even generate a new entry. If skill_training_info = nil and is_training = false then Local skill_training_info = get_skill_training_info(nemesis, skill_id) Create a basic training entry for the unit if they don't have one already skill_id should be the numerical skill idįunction set_training_skill( nemesis, skill_id, is_training) Used to enable/disable training for a given skill Returns the skill training entry for the given nemesis and skill, or nil if the nemesis has no training info for that skill, or that nemesis has no training info at allįunction get_skill_training_info( nemesis, skill_id) Returns the training entry for the given nemesis, or nil if one doesn't exist Returns the current fortress mode scale tick Will generally be a float value, because it'll only really record Skill_id = skill_id, - Numerical id for the skillĪctive = false, - Marks if the skill is currently being trainedĮxperience = 0, - Stores accumulated experience points. Return get_skill_training_info(nemesis, skill_id) If get_skill_training_info(nemesis, skill_id) ~= nil then Training_info = create_training_entry(nemesis. Local training_info = get_training_info(nemesis) training_entries = entryįunction create_skill_entry( nemesis, skill_id) Returns the currently active adventurer exp_rates are saved on a per-world basis Used to load the script so its features start running. Use the GUI to select the provided character's trained skills rather than the active adventurer's. This value is saved on a per-world basis. To put rates into perspective, most reactions give 30 experience for completing them. How much experience points are earned per hour, which is split across all chosen skills to train. The implementation is very rudimentary, and doesn't account for a character's current state (like travelling, or sleeping), so see the rates as an average spread across a whole day. While skills levels are increased, the attribute increase you'd get from training a skill are not implemented. In adventure mode this happens whenever you load the game, finish waiting, or finish travelling. Skills are only updated when a map loads, and training units are present. To ensure this script is always running, include ``gui/passive-training -load`` within an ``onLoad*`` init file. Select which skills you want to be "training", and they will advance as time passes. Allows for passively training skills over module = trueĪllows for passively training skills over time.








Dwarf fortress adventure mode mods