daktardewm Posted August 14, 2016 Share Posted August 14, 2016 My intention is to make it so that he will get powerful boosts for the duration of the mission he is in, and not just during the turn that he did the neural scan. I would also want to make it so that the boosts would not stack (i.e. using the augment should not yield the same boost twice). This would be counterbalanced by the fact that his ability would, upon use, raise the alarm level by 3 (without counting the tracker advances from a triggered heart alarm, a KO'd guard in Expert Plus, and the auto track advancement). The end goal of this is to turn Draco into a character whose ability would only come into play if things got FUBAR. Any help would be greatly appreciated. Cheers. neural_scan.lua strings.lua Link to comment Share on other sites More sharing options...
daktardewm Posted August 14, 2016 Author Share Posted August 14, 2016 So I tried running this in a live game and got this in the logs when it crashed. Aug 14 02:03:08 -- ### ABORTING: FATAL SCRIPT ERROR ### dlc1/neural_scan.lua:68: attempt to call method 'iscorpse' (a nil value) stack traceback: [C] in function 'traceback' game/client/state-manager.lua:31 in function 'iscorpse' dlc1/neural_scan.lua:68 in function 'createToolTip' game/client/hud/agent_panel.lua:171 in function 'updateButtonFromAbilityTarget' game/client/hud/targeting.lua:466 in function 'startTargeting' game/client/hud/agent_panel.lua:699 in function 'addAbilityTargets' game/client/hud/agent_panel.lua:555 in function 'refreshContextActions' game/client/hud/agent_panel.lua:856 in function 'refreshPanel' game/client/hud/hud.lua:1276 in function 'refreshHud' game/client/hud/hud.lua:356 in function 'transition' game/client/hud/hud.lua:2025 in function 'transitionReplay' game/client/states/state-game.lua:544 in function 'onPlaybackDone' game/client/states/state-game.lua:168 in function 'processSim' game/client/states/state-game.lua:906 in function 'onUpdate' game/client/states/state-campaigngame.lua:93 in function 'onUpdate' game/client/state-manager.lua:40 in function <game/client/state-manager.lua:35> [C] in function 'xpcall' game/client/state-manager.lua:69 in function <game/client/state-manager.lua:62> Admittedly, I am a massive noob when it comes to coding, so again, any and all help would be appreciated. Link to comment Share on other sites More sharing options...
Cyberboy2000 Posted August 14, 2016 Share Posted August 14, 2016 target:iscorpse() should be target:getTraits().iscorpse Link to comment Share on other sites More sharing options...
daktardewm Posted August 14, 2016 Author Share Posted August 14, 2016 Thanks! It didn't glitch out now. The modal bonus for getting extra movement points seems to work well. Time to see if the other bonuses work as well. On the flipside though, it seems that the alarm increase on use is working as intended. Link to comment Share on other sites More sharing options...
Cyberboy2000 Posted August 14, 2016 Share Posted August 14, 2016 I looked at the code and changed the things you wanted and some more. There are plenty of comments so hopefully it's easier to understand. neural_scan.lua Link to comment Share on other sites More sharing options...
Shirsh Posted August 14, 2016 Share Posted August 14, 2016 14 hours ago, daktardewm said: My intention is to make it so that he will get powerful boosts for the duration of the mission he is in, and not just during the turn that he did the neural scan You may seen it already, but code for it was already made by Klei, with all text strings: if you go to string 186 of neural_scan.lua if target:getTraits().iscorpse then addSkill( sim, userUnit, true ) and change "true" to "false", skills will be given only for current mission. Now just code to remove modified skill from list of potential skills needed upd: never mind, I misread due to my bad english, sorry, now I get you need other effect for bonuses >_< Link to comment Share on other sites More sharing options...
daktardewm Posted August 15, 2016 Author Share Posted August 15, 2016 10 hours ago, Cyberboy2000 said: I looked at the code and changed the things you wanted and some more. There are plenty of comments so hopefully it's easier to understand. neural_scan.lua Oh, this helps loads! Thank you so much, Cyberboy! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.