FILES ----- behaviors\monsters\modular\basemonster.behavior [NEW] behaviors\monsters\modular\targeting.behavior [NEW] behaviors\monsters\modular\actions\aggrohop.behavior behaviors\monsters\modular\actions\hop.behavior behaviors\npc\idle.behavior items\active\weapons\weapon.lua items\active\weapons\melee\altabilities\broadsword\giantsword\giantsword.altability items\active\weapons\melee\altabilities\broadsword\parry\parry.altability items\active\weapons\melee\altabilities\broadsword\parry\parry.lua [NEW] items\active\weapons\melee\altabilities\broadsword\parry\parryshield.frames [NEW] items\active\weapons\melee\altabilities\broadsword\parry\parryshield.png items\active\weapons\melee\altabilities\broadsword\traildash\traildash.lua items\active\weapons\melee\altabilities\hammer\elementalaura\elementalaura.lua items\active\weapons\melee\altabilities\spear\barrier\barrier.altability items\active\weapons\melee\altabilities\spear\flurry\flurry.altability items\active\weapons\melee\hammer\rarehammer.activeitem items\active\weapons\melee\spear\rarespear.activeitem monsters\bmonster.lua monsters\walkers\gleap\gleap.animation monsters\walkers\gleap\gleap.frames monsters\walkers\gleap\gleap.monstertype [NEW] monsters\walkers\ophidaunt\body.monsterpart [NEW] monsters\walkers\ophidaunt\ophidaunt.animation [NEW] monsters\walkers\ophidaunt\ophidaunt.frames [NEW] monsters\walkers\ophidaunt\ophidaunt.monstertype [NEW] monsters\walkers\ophidaunt\ophidaunt.png quests\generated\comfort.config quests\generated\control.config quests\generated\protection.config quests\generated\subquests.config quests\generated\protection\collect_fine.questtemplate [NEW] quests\generated\subquests\protect.questtemplate [NEW] quests\scripts\generated\protect.lua scripts\actions\movement.lua scripts\actions\quests.lua scripts\quest\manager.lua scripts\quest\player.lua [NEW] scripts\quest\manager\plugin.lua [NEW] scripts\quest\manager\summon_npcs.lua scripts\questgen\generator.lua scripts\questgen\relations.lua [NEW] sfx\melee\barrier_create_fire.ogg [NEW] sfx\melee\barrier_create_fire2.ogg [NEW] sfx\melee\barrier_create_ice.ogg [NEW] sfx\melee\barrier_create_ice2.ogg [NEW] sfx\melee\barrier_create_ice3.ogg [NEW] sfx\melee\barrier_create_poison.ogg [NEW] sfx\melee\giantsword_charged_electric.ogg [NEW] sfx\melee\giantsword_charged_fire.ogg [NEW] sfx\melee\giantsword_charged_ice.ogg [NEW] sfx\melee\giantsword_charged_poison.ogg sfx\melee\swing_axe_ice1.ogg sfx\melee\swing_axe_ice2.ogg sfx\melee\swing_axe_ice3.ogg sfx\melee\swing_broadsword_ice1.ogg sfx\melee\swing_broadsword_ice2.ogg sfx\melee\swing_broadsword_ice3.ogg sfx\melee\swing_dagger_ice1.ogg sfx\melee\swing_dagger_ice2.ogg sfx\melee\swing_dagger_ice3.ogg sfx\melee\swing_hammer_ice1.ogg sfx\melee\swing_hammer_ice2.ogg sfx\melee\swing_hammer_ice3.ogg sfx\melee\swing_shortsword_ice1.ogg sfx\melee\swing_shortsword_ice2.ogg sfx\melee\swing_shortsword_ice3.ogg sfx\melee\swing_spear_ice1.ogg sfx\melee\swing_spear_ice2.ogg sfx\melee\swing_spear_ice3.ogg stats\player_primary.lua stats\effects\elementalaura\electricaura.animation stats\effects\elementalaura\fireaura.animation stats\effects\elementalaura\iceaura.animation stats\effects\elementalaura\poisonaura.animation tech\morphball\balldash.lua tech\morphball\morphball.lua tech\skyrail\skyrail.lua DIFFS ----- behaviors\monsters\modular\basemonster.behavior 8c8,10 < "/scripts/actions/builders.lua" --- > "/scripts/behavior.lua", > "/scripts/actions/builders.lua", > "/scripts/actions/entities.lua" 12c14,16 < "damageOnTouch": false --- > "damageOnTouch": false, > "hostileActions": [], > "foundTargetActions": [] 34c38 < "title": "dynamic", --- > "title": "parallel", 36,37c40,44 < "name": "dynamic", < "parameters": {}, --- > "name": "parallel", > "parameters": { > "fail": -1, > "success": -1 > }, 40,80c47,50 < "title": "sequence", < "type": "composite", < "name": "sequence", < "parameters": { < "type": "sliding", < "state": "off", < "fromEntity": "attackTarget", < "toEntity": "fleeTarget" < }, < "children": [ < { < "title": "inverter", < "type": "decorator", < "name": "inverter", < "parameters": {}, < "child": { < "title": "resourcePercentage", < "type": "action", < "name": "resourcePercentage", < "parameters": { < "percentage": 0, < "resource": "health" < } < } < }, < { < "title": "setAnimationState", < "type": "action", < "name": "setAnimationState", < "parameters": { < "state": "hurt", < "type": "movement" < } < }, < { < "title": "runner", < "type": "action", < "name": "runner", < "parameters": {} < } < ] --- > "title": "monster-targeting", > "type": "module", > "name": "monster-targeting", > "parameters": {} 83c53 < "title": "sequence", --- > "title": "dynamic", 85,91c55,56 < "name": "sequence", < "parameters": { < "type": "sliding", < "state": "off", < "fromEntity": "attackTarget", < "toEntity": "fleeTarget" < }, --- > "name": "dynamic", > "parameters": {}, 94,97c59,99 < "title": "wasDamaged", < "type": "action", < "name": "wasDamaged", < "parameters": {} --- > "title": "sequence", > "type": "composite", > "name": "sequence", > "parameters": { > "type": "sliding", > "state": "off", > "fromEntity": "attackTarget", > "toEntity": "fleeTarget" > }, > "children": [ > { > "title": "inverter", > "type": "decorator", > "name": "inverter", > "parameters": {}, > "child": { > "title": "resourcePercentage", > "type": "action", > "name": "resourcePercentage", > "parameters": { > "percentage": 0, > "resource": "health" > } > } > }, > { > "title": "setAnimationState", > "type": "action", > "name": "setAnimationState", > "parameters": { > "state": "hurt", > "type": "movement" > } > }, > { > "title": "runner", > "type": "action", > "name": "runner", > "parameters": {} > } > ] 100,102c102,104 < "title": "setAnimationState", < "type": "action", < "name": "setAnimationState", --- > "title": "sequence", > "type": "composite", > "name": "sequence", 104,106c106,166 < "state": "hurt", < "type": "movement" < } --- > "type": "sliding", > "state": "off", > "fromEntity": "attackTarget", > "toEntity": "fleeTarget" > }, > "children": [ > { > "title": "wasDamaged", > "type": "action", > "name": "wasDamaged", > "parameters": {} > }, > { > "title": "setAnimationState", > "type": "action", > "name": "setAnimationState", > "parameters": { > "state": "hurt", > "type": "movement" > } > }, > { > "title": "timer", > "type": "action", > "name": "timer", > "parameters": { > "time": 0.25 > } > }, > { > "title": "dynamic", > "type": "composite", > "name": "dynamic", > "parameters": {}, > "children": [ > { > "title": "onGround", > "type": "action", > "name": "onGround", > "parameters": {} > }, > { > "title": "timer", > "type": "action", > "name": "timer", > "parameters": { > "time": 0.5 > } > } > ] > }, > { > "title": "setAnimationState", > "type": "action", > "name": "setAnimationState", > "parameters": { > "state": "idle", > "type": "movement" > } > } > ] 109,111c169,171 < "title": "timer", < "type": "action", < "name": "timer", --- > "title": "sequence", > "type": "composite", > "name": "sequence", 113,114c173,203 < "time": 0.25 < } --- > "type": "sliding", > "state": "off", > "fromEntity": "attackTarget", > "toEntity": "fleeTarget" > }, > "children": [ > { > "title": "hasFlag", > "type": "action", > "name": "hasFlag", > "parameters": { > "name": "foundTarget" > } > }, > { > "title": "foundTargetActions", > "type": "action", > "name": "selectorActions", > "parameters": { > "actions": "" > } > }, > { > "title": "unsetFlag", > "type": "action", > "name": "unsetFlag", > "parameters": { > "name": "foundTarget" > } > } > ] 117c206 < "title": "dynamic", --- > "title": "selector", 119c208 < "name": "dynamic", --- > "name": "selector", 123,126c212,244 < "title": "onGround", < "type": "action", < "name": "onGround", < "parameters": {} --- > "title": "sequence", > "type": "composite", > "name": "sequence", > "parameters": { > "type": "sliding", > "state": "off", > "fromEntity": "attackTarget", > "toEntity": "fleeTarget" > }, > "children": [ > { > "title": "entityExists", > "type": "action", > "name": "entityExists", > "parameters": { > "entity": "target" > } > }, > { > "title": "succeeder", > "type": "decorator", > "name": "succeeder", > "parameters": {}, > "child": { > "title": "hostileActions", > "type": "action", > "name": "selectorActions", > "parameters": { > "actions": "" > } > } > } > ] 129c247 < "title": "timer", --- > "title": "periodicActions", 131c249 < "name": "timer", --- > "name": "selectorActions", 133c251 < "time": 0.5 --- > "actions": "" 139c257 < "title": "setAnimationState", --- > "title": "runner", 141,145c259,260 < "name": "setAnimationState", < "parameters": { < "state": "idle", < "type": "movement" < } --- > "name": "runner", > "parameters": {} 148,161d262 < }, < { < "title": "selectorActions", < "type": "action", < "name": "selectorActions", < "parameters": { < "actions": "" < } < }, < { < "title": "runner", < "type": "action", < "name": "runner", < "parameters": {} behaviors\monsters\modular\actions\hop.behavior 5a6 > "/scripts/actions/entities.lua", 17c18,21 < "randomDirection": false --- > "randomDirection": false, > "hopAwayFromWalls": true, > "wallVerticalSpeed": 35, > "hopControlForce": 50 40,47d43 < "title": "faceDirection", < "type": "action", < "name": "faceDirection", < "parameters": { < "direction": "facingDirection" < } < }, < { 66a63,94 > "title": "multiply", > "type": "action", > "name": "multiply", > "parameters": { > "number": 1, > "factor": "" > }, > "output": { > "result": "ySpeed" > } > }, > { > "title": "dynamic", > "type": "composite", > "name": "dynamic", > "parameters": {}, > "children": [ > { > "title": "onGround", > "type": "action", > "name": "onGround", > "parameters": {} > }, > { > "title": "runner", > "type": "action", > "name": "runner", > "parameters": {} > } > ] > }, > { 78,80c106,108 < "title": "selector", < "type": "composite", < "name": "selector", --- > "title": "succeeder", > "type": "decorator", > "name": "succeeder", 82,89c110,116 < "children": [ < { < "title": "canMove", < "type": "action", < "name": "canMove", < "parameters": { < "direction": "facingDirection" < } --- > "child": { > "title": "entityDirection", > "type": "action", > "name": "entityDirection", > "parameters": { > "entity": "self", > "target": "target" 91,99c118,140 < { < "title": "sequence", < "type": "composite", < "name": "sequence", < "parameters": { < "type": "sliding", < "state": "off", < "fromEntity": "attackTarget", < "toEntity": "fleeTarget" --- > "output": { > "direction": "facingDirection" > } > } > }, > { > "title": "succeeder", > "type": "decorator", > "name": "succeeder", > "parameters": {}, > "child": { > "title": "selector", > "type": "composite", > "name": "selector", > "parameters": {}, > "children": [ > { > "title": "canMove", > "type": "action", > "name": "canMove", > "parameters": { > "direction": "facingDirection" > } 101,102c142,149 < "children": [ < { --- > { > "title": "optional", > "type": "decorator", > "name": "optional", > "parameters": { > "shouldRun": "" > }, > "child": { 112a160,168 > } > }, > { > "title": "multiply", > "type": "action", > "name": "multiply", > "parameters": { > "number": 1, > "factor": "" 114,120c170,171 < { < "title": "faceDirection", < "type": "action", < "name": "faceDirection", < "parameters": { < "direction": "facingDirection" < } --- > "output": { > "result": "ySpeed" 122,174c173 < ] < } < ] < }, < { < "title": "multiply", < "type": "action", < "name": "multiply", < "parameters": { < "number": "facingDirection", < "factor": "" < }, < "output": { < "result": "xSpeed" < } < }, < { < "title": "multiply", < "type": "action", < "name": "multiply", < "parameters": { < "number": 1, < "factor": "" < }, < "output": { < "result": "ySpeed" < } < }, < { < "title": "setAnimationState", < "type": "action", < "name": "setAnimationState", < "parameters": { < "state": "jump", < "type": "movement" < } < }, < { < "title": "timer", < "type": "action", < "name": "timer", < "parameters": { < "time": "" < } < }, < { < "title": "setVelocity", < "type": "action", < "name": "setVelocity", < "parameters": { < "velocity": [ < "xSpeed", < "ySpeed" --- > } 177c176,243 < }, --- > } > ] > }, > { > "title": "multiply", > "type": "action", > "name": "multiply", > "parameters": { > "number": "facingDirection", > "factor": "" > }, > "output": { > "result": "xSpeed" > } > }, > { > "title": "faceDirection", > "type": "action", > "name": "faceDirection", > "parameters": { > "direction": "facingDirection" > } > }, > { > "title": "setAnimationState", > "type": "action", > "name": "setAnimationState", > "parameters": { > "state": "jump", > "type": "movement" > } > }, > { > "title": "timer", > "type": "action", > "name": "timer", > "parameters": { > "time": "" > } > }, > { > "title": "setVelocity", > "type": "action", > "name": "setVelocity", > "parameters": { > "velocity": [ > "xSpeed", > "ySpeed" > ] > } > }, > { > "title": "timer", > "type": "action", > "name": "timer", > "parameters": { > "time": 0.25 > } > }, > { > "title": "parallel", > "type": "composite", > "name": "parallel", > "parameters": { > "fail": -1, > "success": -1 > }, > "children": [ 179c245 < "title": "timer", --- > "title": "controlApproachXVelocity", 181c247 < "name": "timer", --- > "name": "controlApproachXVelocity", 183c249,250 < "time": 0.25 --- > "velocity": "xSpeed", > "force": "" 258,274d324 < }, < { < "title": "setAnimationState", < "type": "action", < "name": "setAnimationState", < "parameters": { < "state": "land", < "type": "movement" < } < }, < { < "title": "timer", < "type": "action", < "name": "timer", < "parameters": { < "time": "" < } 276a327,343 > }, > { > "title": "setAnimationState", > "type": "action", > "name": "setAnimationState", > "parameters": { > "state": "land", > "type": "movement" > } > }, > { > "title": "timer", > "type": "action", > "name": "timer", > "parameters": { > "time": "" > } behaviors\npc\idle.behavior 2a3 > "description": "", 121c122 < "chance": 0.1 --- > "chance": 0.9 items\active\weapons\weapon.lua 58,59c58,61 < if self.currentAbility and self.currentAbility.uninit then < self.currentAbility:uninit(true) --- > for _,ability in pairs(self.abilities) do > if ability.uninit then > ability:uninit(true) > end items\active\weapons\melee\altabilities\broadsword\giantsword\giantsword.altability 156c156 < "firefull" : [ "/sfx/melee/charge_full_hold2.ogg" ], --- > "firefull" : [ "/sfx/melee/giantsword_charged_fire.ogg" ], 159c159 < "electricfull" : [ "/sfx/melee/charge_full_hold2.ogg" ], --- > "electricfull" : [ "/sfx/melee/giantsword_charged_electric.ogg" ], 162c162 < "icefull" : [ "/sfx/melee/charge_full_hold2.ogg" ], --- > "icefull" : [ "/sfx/melee/giantsword_charged_ice.ogg" ], 165c165 < "poisonfull" : [ "/sfx/melee/charge_full_hold2.ogg" ] --- > "poisonfull" : [ "/sfx/melee/giantsword_charged_poison.ogg" ] items\active\weapons\melee\altabilities\broadsword\parry\parry.altability 3a4,50 > "animatedParts" : { > "stateTypes" : { > "parryShield" : { > "default" : "inactive", > "states" : { > "inactive" : {}, > "active" : {}, > "block" : { > "frames" : 1, > "cycle" : 0.2, > "mode" : "transition", > "transition" : "active" > } > } > } > }, > "parts" : { > "parryShield" : { > "properties" : { > "zLevel" : -1, > "centered" : true, > "offset" : [-0.75, 1.75], > "transformationGroup" : "weapon", > "rotationCenter" : [0, 0] > }, > "partStates" : { > "parryShield" : { > "inactive" : { > "properties" : { > "image" : "" > } > }, > "active" : { > "properties" : { > "image" : "/items/active/weapons/melee/altabilities/broadsword/parry/parryshield.png:active" > } > }, > "block" : { > "properties" : { > "image" : "/items/active/weapons/melee/altabilities/broadsword/parry/parryshield.png:block" > } > } > } > } > } > } > }, items\active\weapons\melee\altabilities\broadsword\parry\parry.lua 30a31,32 > animator.setAnimationState("parryShield", "active") > 32c34,40 < animator.playSound("parry") --- > for _,notification in pairs(notifications) do > if notification.sourceEntityId ~= -65536 then > animator.playSound("parry") > animator.setAnimationState("parryShield", "block") > return > end > end 45c53,54 < function parry:uninit() --- > function parry:reset() > animator.setAnimationState("parryShield", "inactive") 46a56,59 > end > > function parry:uninit() > self:reset() items\active\weapons\melee\altabilities\broadsword\traildash\traildash.lua 31c31,33 < util.wait(self.stances.windup.duration) --- > util.wait(self.stances.windup.duration, function(dt) > mcontroller.controlModifiers({jumpingSuppressed = true}) > end) 43a46,47 > if not mcontroller.onGround() then return true end > 50c54 < world.spawnProjectile(projectileType, vec2.add(position, self.projectileOffset), activeItem.ownerEntityId(), {0,0}, false, self.projectileParameters) --- > world.spawnProjectile(projectileType, vec2.add(position, self.projectileOffset), activeItem.ownerEntityId(), {-mcontroller.facingDirection(),0}, false, self.projectileParameters) items\active\weapons\melee\altabilities\hammer\elementalaura\elementalaura.lua 86c86 < function elementalAura:uninit() --- > function elementalAura:uninit(final) items\active\weapons\melee\altabilities\spear\barrier\barrier.altability 65c65 < "fire" : [ "/sfx/objects/teslaspike.ogg" ], --- > "fire" : [ "/sfx/melee/barrier_create_fire.ogg" ], 67,68c67,68 < "ice" : [ "/sfx/objects/teslaspike.ogg" ], < "poison" : [ "/sfx/objects/teslaspike.ogg" ] --- > "ice" : [ "/sfx/melee/barrier_create_ice.ogg" ], > "poison" : [ "/sfx/melee/barrier_create_poison.ogg" ] items\active\weapons\melee\altabilities\spear\flurry\flurry.altability 10c10 < "maxCooldownTime" : 0.35, --- > "maxCooldownTime" : 0.25, 12c12 < "cooldownSwingReduction" : 0.05, --- > "cooldownSwingReduction" : 0.04, items\active\weapons\melee\hammer\rarehammer.activeitem 126,128c126,128 < //"/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", < // "/items/active/weapons/melee/altabilities/hammer/shockwave/shockwave.altability", < // "/items/active/weapons/melee/altabilities/hammer/elementalaura/elementalaura.altability", --- > "/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", > "/items/active/weapons/melee/altabilities/hammer/shockwave/shockwave.altability", > "/items/active/weapons/melee/altabilities/hammer/elementalaura/elementalaura.altability", items\active\weapons\melee\spear\rarespear.activeitem 117c117 < //"/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", --- > "/items/active/weapons/melee/altabilities/generic/blinkexplosion/blinkexplosion.altability", 119c119 < //"/items/active/weapons/melee/altabilities/spear/elementalspin/elementalspin.altability", --- > "/items/active/weapons/melee/altabilities/spear/elementalspin/elementalspin.altability", monsters\bmonster.lua 74,75d73 < < world.logInfo("Damage notification: %s", args) 109a108,118 > end > > -- param entity > function isValidTarget(args, output) > args = parseArgs(args, { > entity = nil > }) > local entityId = BData:getEntity(args.entity) > if entityId == nil then return false end > > return entity.isValidTarget(entityId) monsters\walkers\gleap\gleap.animation 9c9 < "frames" : 11, --- > "frames" : 1, 133c133 < "turnHostile" : [ ], --- > "aggroHop" : [ "/sfx/npc/monsters/monster_surprise.ogg" ], monsters\walkers\gleap\gleap.frames 14,26d13 < }, < "aliases" : { < "idle.2" : "prep.2", < "idle.3" : "idle.1", < "idle.4" : "prep.2", < "idle.5" : "idle.1", < "idle.6" : "prep.2", < "idle.7" : "idle.1", < "idle.8" : "prep.2", < "idle.9" : "idle.1", < "idle.10" : "blink.1", < "idle.11" : "blink.2", < "idle.12" : "blink.1" monsters\walkers\gleap\gleap.monstertype 20a21,47 > "queryTargets" : true, > "targetQueryRange" : 20, > "targetOnDamage" : true, > "targetEntityTypes" : [ "player", "npc", "monster" ], > "keepTargetInSight" : true, > "keepTargetInRange" : 50, > "targetOutOfSightTime" : 5.0, > > "foundTargetActions" : [ { "name" : "action-aggrohop" } ], > > "hostileActions" : [ > { > "name" : "action-hop", > "cooldown" : 0.0, > "parameters" : { > "verticalSpeed" : 20, > "horizontalSpeed" : 10, > "hopSequence" : 1, > "timeBetweenHops" : 0.0, > "windupTime" : 0.1, > "landTime" : 0.1, > "hopAwayFromWall" : false, > "wallVerticalSpeed" : 35 > } > } > ], > 24c51 < "cooldown" : 3.0, --- > "cooldown" : 0.0, 28c55,57 < "timeBetweenHops" : 0.25 --- > "hopSequence" : 3, > "timeBetweenHops" : 0.25, > "hopAwayFromWall" : true quests\generated\comfort.config 39,45d38 < "new_clothes" : { < // TODO < "preconditions" : [ < ["isClothing", "item"] < ] < }, < 56,71d48 < }, < < "find_pet" : { < // TODO < "preconditions" : [ < ["itemName", "item", {"literal" : "capturepod"}] < ] < }, < < "ask_friend_to_move_in" : { < // TODO < "preconditions" : [ < ["likes", "target", "questGiver"], < ["likes", "questGiver", "target"], < ["!=", "target", "questGiver"] < ] 72a50 > quests\generated\control.config 2,15d1 < "kill_rival" : { < // TODO < "preconditions" : [ < ["fears", "someoneElse", "target"], < ["!fears", "someoneElse", "questGiver"], < ["!=", "someoneElse", "questGiver"], < ["!=", "target", "questGiver"], < ["!=", "target", "someoneElse"] < ], < "postconditions" : [ < ["fears", "target", "questGiver"], < ["!likes", "someoneElse", "questGiver"] < ] < }, 27,33d12 < }, < < "arm_up" : { < // TODO < "preconditions" : [ < ["isWeapon", "item"] < ] 34a14 > quests\generated\protection.config 2,13d1 < "kill_criminal_scum" : { < // TODO < "preconditions" : [ < ["criminal", "target"], < ["!=", "target", "questGiver"] < ], < "postconditions" : [ < ["!criminal", "target"], < ["!likes", "target", "questGiver"], < ["!fears", "questGiver", "target"] < ] < }, 56,80d43 < }, < < "monster_trade" : { < // TODO < "preconditions" : [ < // Generates the capture pod that is given to the player: < ["itemName", "item", {"literal" : "filledcapturepod"}] < ] < }, < < "heal_npc" : { < // TODO < "preconditions" : [ < ["owns", "player", "item", 1], < ["injured", "target"], < ["!=", "target", "questGiver"], < ["isHealingItem", "item"] < ], < "postconditions" : [ < ["trusts", "target", "questGiver"] < ] < }, < < "monster_invasion" : { < // TODO quests\generated\subquests.config 598,599c598,623 < /*"protect" : { < // TODO --- > "protect" : { > "templateId" : "protect.generated", > "parameters" : { > "target" : { > "type" : "entity" > }, > "other" : { > "type" : "entity" > } > }, > "participants" : { > "target" : { "critical" : true } > }, > > "managerPlugin" : { > "script" : "/scripts/quest/manager/summon_npcs.lua", > "pluginClass" : "SummonNpcs", > "pluginConfig" : { > "spawnCount" : 2, > "positionParam" : "other", > "species" : "human", > "typeName" : "bandit", > "parameters" : {} > } > }, > 601d624 < ["!fears", "questGiver", "target"], 610d632 < ["likes", "target", "questGiver"], 613c635 < }, */ --- > }, quests\generated\protection\collect_fine.questtemplate 23d22 < "portraitParameter" : "target", scripts\actions\movement.lua 269a270,285 > -- param velocity > -- param force > function controlApproachXVelocity(args, output) > args = parseArgs(args, { > velocity = 0, > force = 500 > }) > > local velocity = BData:getNumber(args.velocity) > local force = BData:getNumber(args.force) > if velocity == nil or force == nil then return false end > > mcontroller.controlApproachXVelocity(velocity, force) > return true > end > scripts\actions\quests.lua 104c104,105 < } --- > }, > plugins = arc.managerPlugins scripts\quest\manager.lua 7a8,9 > -- * And in certain quests, spawning enemies and running other quest-specific > -- server-side scripting, via plugins. 48a51,53 > self.plugins = {} > self:loadPlugins() > 51a57,83 > function QuestManager:questParameters(questId) > for _,questDesc in pairs(self.data.arc.quests) do > if questDesc.questId == questId then > return questDesc.parameters > end > end > return {} > end > > function QuestManager:loadPlugins() > for questId, plugin in pairs(entity.configParameter("plugins", {})) do > self:loadPlugin(questId, plugin.script, plugin.pluginClass, plugin.pluginConfig or {}) > end > end > > function QuestManager:loadPlugin(questId, script, className, scriptConfig) > require(script) > local class = _ENV[className] > > self.data.pluginStorage = self.data.pluginStorage or {} > self.data.pluginStorage[questId] = self.data.pluginStorage[questId] or {} > local pluginStorage = self.data.pluginStorage[questId] > > local plugin = class.new(self, pluginStorage, questId, scriptConfig) > self.plugins[questId] = plugin > end > 127a160,163 > for questId, plugin in pairs(self.plugins) do > plugin:update() > end > 243a280,282 > if self.plugins[questId] then > self.plugins[questId]:playerStarted(player) > end 251a291,293 > if self.plugins[questId] then > self.plugins[questId]:playerFailed(player) > end 260a303,305 > end > if self.plugins[questId] then > self.plugins[questId]:playerCompleted(player) scripts\quest\player.lua 73,74c73,80 < message.setHandler(quest.questId()..".abort", function (_, _, ...) self:questAbortHandler(...) end) < message.setHandler(quest.questId()..".participantEvent", function (_, _, ...) self:questParticipantEventHandler(...) end) --- > self:setMessageHandler("abort", function (_, _, ...) self:questAbortHandler(...) end) > self:setMessageHandler("participantEvent", function (_, _, ...) self:questParticipantEventHandler(...) end) > end > > function QuestPlayer:setMessageHandler(messageName, handler) > -- All messages we handle are prefixed by the questId so they that they are > -- handled only by the right quest script on the player, not all of them. > message.setHandler(quest.questId().."."..messageName, handler) scripts\questgen\generator.lua 403a404 > local managerPlugins = {} 419a421,422 > > managerPlugins[questDesc.questId] = operation.config.managerPlugin 436c439,440 < participants = participants --- > participants = participants, > managerPlugins = managerPlugins scripts\questgen\relations.lua 229c229,242 < [case(6, Nil, Nil)] = Relation.some, --- > [case(6, Nil, Nil)] = function (self) > if self.negated then return Relation.some end > local npcs = util.take(5, self.context:entitiesByType()["npc"]) > local results = {} > for _,npc in pairs(npcs) do > for uniqueId,_ in pairs(npc:callScript("getRelationships", self.name, false)) do > results[#results+1] = {npc, self.context:entity(uniqueId)} > end > for uniqueId,_ in pairs(npc:callScript("getRelationships", self.name, true)) do > results[#results+1] = {self.context:entity(uniqueId), npc} > end > end > return results > end, stats\player_primary.lua 1a2 > self.lastYPosition = 0 91c92,93 < local curYVelocity = mcontroller.yVelocity() --- > local curYPosition = mcontroller.yPosition() > local yPosChange = curYPosition - (self.lastYPosition or curYPosition) 92a95 > local curYVelocity = yPosChange / dt 93a97 > 107c111 < self.fallDistance = self.fallDistance + -mcontroller.positionDelta()[2] --- > self.fallDistance = self.fallDistance + -yPosChange 111a116 > self.lastYPosition = curYPosition stats\effects\elementalaura\electricaura.animation 42a43,54 > }, > "particleEmitters" : { > "electricAura" : { > "active" : true, > "emissionRate" : 20, > "offsetRegion" : [-3.0, -3.0, 3.0, 3.0], > "particles" : [ > { "particle" : "electricswoosh1"}, > { "particle" : "electricswoosh2"}, > { "particle" : "electricswoosh2"} > ] > } stats\effects\elementalaura\fireaura.animation 42a43,57 > }, > "particleEmitters" : { > "fireAura" : { > "active" : true, > "emissionRate" : 15, > "offsetRegion" : [-3.0, -3.0, 3.0, 3.0], > "particles" : [ > { "particle" : "fireswoosh1"}, > { "particle" : "fireswoosh2"}, > { "particle" : "fireswoosh3"}, > { "particle" : "fireswoosh1"}, > { "particle" : "fireswoosh2"}, > { "particle" : "fireswoosh3"} > ] > } stats\effects\elementalaura\iceaura.animation 42a43,57 > }, > "particleEmitters" : { > "iceAura" : { > "active" : true, > "emissionRate" : 15, > "offsetRegion" : [-3.0, -3.0, 3.0, 3.0], > "particles" : [ > { "particle" : "iceswoosh1"}, > { "particle" : "iceswoosh2"}, > { "particle" : "iceswoosh3"}, > { "particle" : "iceswoosh1"}, > { "particle" : "iceswoosh2"}, > { "particle" : "iceswoosh3"} > ] > } stats\effects\elementalaura\poisonaura.animation 42a43,57 > }, > "particleEmitters" : { > "poisonAura" : { > "active" : true, > "emissionRate" : 15, > "offsetRegion" : [-3.0, -3.0, 3.0, 3.0], > "particles" : [ > { "particle" : "poisonswoosh1"}, > { "particle" : "poisonswoosh2"}, > { "particle" : "fireswoosh2"}, > { "particle" : "poisonswoosh1"}, > { "particle" : "poisonswoosh2"}, > { "particle" : "fireswoosh2"} > ] > } tech\morphball\balldash.lua 3c3 < self.angularVelocity = 0 --- > self.lastXPosition = nil 72,73c72,73 < self.angularVelocity = -mcontroller.measuredVelocity()[1] / self.ballRadius < self.angle = math.fmod(math.pi * 2 + self.angle + self.angularVelocity * args.dt, math.pi * 2) --- > local angularChange = world.xwrap((self.lastXPosition or mcontroller.xPosition()) - mcontroller.xPosition()) / self.ballRadius > self.angle = math.fmod(math.pi * 2 + self.angle + angularChange, math.pi * 2) 83a84,85 > > self.lastXPosition = mcontroller.xPosition() 98a101 > self.lastXPosition = nil tech\morphball\morphball.lua 5a6 > self.lastPosition = nil 70,71c71,74 < self.angularVelocity = vec2.mag(mcontroller.measuredVelocity()) / ballRadius < if mcontroller.measuredVelocity()[1] > 0 then --- > local positionDiff = world.distance(self.lastPosition or mcontroller.position(), mcontroller.position()) > self.angularVelocity = -vec2.mag(positionDiff) / args.dt / ballRadius > > if positionDiff[1] > 0 then 82a86,87 > > self.lastPosition = mcontroller.position() tech\skyrail\skyrail.lua 14c14 < -- --- > -- 28c28 < -- --- > -- 41c41 < function init() --- > function init() 45c45 < --- > 49c49 < --- > 51c51,53 < self.onRail = false --- > self.onRail = false > self.lastPosition = nil > self.measuredVelocity = {0, 0} 104d105 < 112c113 < --- > 123c124 < --- > 124a126,134 > > if self.lastPosition == nil then > self.lastPosition = mcontroller.position() > end > > local currentPosiiton = mcontroller.position() > local movement = world.distance(currentPosiiton, self.lastPosition) > self.measuredVelocity = {movement[1] / args.dt, movement[2] / args.dt} > self.lastPosition = currentPosition 134c144 < --- > 141c151 < --- > 146,147c156 < local velocity = mcontroller.measuredVelocity() < if velocity[2] > 0 then --- > if self.measuredVelocity[2] > 0 then 164c173 < --- > 174c183 < --- > 187c196 < --- > 190c199 < --- > 196c205 < --- > 203c212 < --- > 206c215 < --- > 209c218 < end --- > end 218,219c227,228 < < if world.magnitude(mcontroller.measuredVelocity()) < minspeed then --- > > if world.magnitude(self.measuredVelocity) < minspeed then 233c242 < --- > 241c250 < --- > 247c256 < --- > 249,250c258,259 < if railListContains(rails,leftRails[1]) or < railListContains(rails,leftRails[2]) or --- > if railListContains(rails,leftRails[1]) or > railListContains(rails,leftRails[2]) or 252c261 < --- > 257,259c266,268 < < elseif railListContains(rails,rightRails[1]) or < railListContains(rails,rightRails[2]) or --- > > elseif railListContains(rails,rightRails[1]) or > railListContains(rails,rightRails[2]) or 261c270 < --- > 268c277 < --This should only happen if you are travelling over the world wrap boundry --- > --This should only happen if you are travelling over the world wrap boundry 278,279c287,288 < end < --- > end > 287,288c296,297 < elseif k=="searchOrder" then < self.railSearchOrder = v --Set rail search order --- > elseif k=="searchOrder" then > self.railSearchOrder = v --Set rail search order 314c323 < function update_railSpeed(acceleration) --- > function update_railSpeed(acceleration) 316c325 < --- > 318c327 < --- > 323c332 < --- > 333c342 < --- > 336c345 < --- > 339c348 < --- > 346c355 < --- > 348c357 < --- > 351c360 < mcontroller.setYVelocity(0) --- > mcontroller.setYVelocity(0) 356c365 < --- > 360c369 < --- > 364c373 < --- > 370,371c379,380 < < mcontroller.setPosition({mcontroller.position()[1],ypos}) --- > > mcontroller.setPosition({mcontroller.position()[1],ypos}) 384c393 < --- > 390c399 < --- > 392,393c401 < local vel = mcontroller.measuredVelocity() < if vel[1] > 0 then --- > if self.measuredVelocity[1] > 0 then 395c403 < elseif vel[1] < 0 then --- > elseif self.measuredVelocity[1] < 0 then 398c406 < --- > 403c411 < self.speed=math.abs(vel[1]) --- > self.speed=math.abs(self.measuredVelocity[1]) 406,407c414,415 < self.speed= (math.abs(vel[1]) + vel[2] * grad) / math.sqrt(2) < --- > self.speed= (math.abs(self.measuredVelocity[1]) + self.measuredVelocity[2] * grad) / math.sqrt(2) > 417c425 < --- > 441c449 < --- > 445c453 < --- > 449,450c457,458 < < if blockIsRail(blockType) then --- > > if blockIsRail(blockType) then 459c467 < --- > 473c481 < blocksX = { { rail.Position[1] + xOffset, rail.Position[2] - 1 }, --- > blocksX = { { rail.Position[1] + xOffset, rail.Position[2] - 1 }, 476c484 < --- > 479c487 < local blockType = world.material(tileX,"foreground") --- > local blockType = world.material(tileX,"foreground") 484c492 < --- > 491c499 < local char = searchOrder:sub(i,i) --- > local char = searchOrder:sub(i,i) 499c507 < end --- > end 511c519 < --- > 523c531 < --- > 525c533 < if nextN==nil then --- > if nextN==nil then 535c543 < gradient=0 --Straight Line --- > gradient=0 --Straight Line 551c559 < --- > 564c572 < --- >