peddroelm Posted January 23, 2018 Share Posted January 23, 2018 (edited) My goal is reverse engineering the various combat damage mechanics . Whatever bits of info are currently floating the wiki and other forums - this work was never completed/ published .. Editing/Modding files such as combat_h.nss combat_damage.nss etc ..would enable me to: 1) If I could somehow turn this on #ifdef DEBUG - it would enable an extremely potent built-in combat logging function .. sadly off by default. 2) turn off the triple RNG damage per swing (weapon / attributes / target's armor) for damage formula reverse engineering purposes. 3) could redirect the logging function to display in-game instead of to file .. (useful for 1 vs 1 test situations // might have performance issues in big battles) 4)would give access to the calculated damage related number in the UI. (currently, that feature it is next to useless displaying, depending on weapon style: average damage per swing vs DR 0, average DPS * magic number 1 vs DR 0 , etc .. ). We could make it show both average damage per swing and average DPS vs DR 0 allowing for meaningful comparisons between the different weapon styles .. All of this and more must be possible because I've seen here mods that alter core combat mechanics .. --------------- So - can anybody explain the process of modding .nss scrips for Dragon Age Origins ? EDIT: creating and messing with ECLog.ini doesn't enable the combat and combat debug logs :sad: [LogTypes]..Combat=1CombatDebug=1..the file has effect on some of the options (correct name and placing) but the combat log ones don't work : .... //////////////////// more sadness: log_h.nss// -----------------------------------------------------------------------------// Georg: This is the compiler side killswitch for DEJA/Eclipse Log output// after Sunday, Feb 22, 2009, this defaults to commented out.//// If you need log/deja output from your scripts to debug, you need to// remove the 'NO' from the symbol. You should do so only ever in a local,// temporary copy of this file and never while the file is checked out.//// If you have questions regarding this mechanism, please talk to me.//// Note: SHIP mode executables do not support the LogTrace command and as// such will never provide deja/log output, even if this symbol// is defined.//// -----------------------------------------------------------------------------#defsym NODEBUG Edited January 23, 2018 by peddroelm Link to comment Share on other sites More sharing options...
theskymoves Posted January 23, 2018 Share Posted January 23, 2018 (edited) . Edited January 24, 2018 by theskymoves Link to comment Share on other sites More sharing options...
peddroelm Posted January 23, 2018 Author Share Posted January 23, 2018 (edited) I tried - check out- edit / save- compile (error - 'E: 14:10:06 - core_h.nss - core_h.nss(?): Script must contain either a main or StartingConditional' )- check in- export without dependencies- move exported files from /admin/user .../ toolset/override to /regularuserwhostartsthegame/ .../toolset/override- start game .. no effect for changes .. . tried to make this: // @brief Calcluate weapon damage display values. See below for more info.// @author Georgfloat CalculateWeaponDamage(object oCreature, object oWeapon, int nHand = HAND_MAIN) return 10.0f no matter what . start game .. no effect for changes .. . Edited January 23, 2018 by peddroelm Link to comment Share on other sites More sharing options...
sapphim Posted January 24, 2018 Share Posted January 24, 2018 The files you need for the mod are the compiled .ncs scripts, not the .nss script source. You don't get these by exporting without dependencies, you get them by compiling the script. And you didn't get them when you tried to compile the script because there was an error during compilation. That error is not going to tell you what or where the actual problem is, because they are thoroughly uselessly awful. But the vanilla files should compile fine so the error is most likely somewhere in your edits. Also, pro-tip for the future, stop checking in files after you edit them. Normally if you want to revert a file back to its vanilla state quickly you can select the "undo checkout" option but you can't do that after you've checked in edited files. Link to comment Share on other sites More sharing options...
peddroelm Posted January 25, 2018 Author Share Posted January 25, 2018 (edited) thank you: did some thinking and realized compiling .h files doesn't make much sense (was missing with core.h).. So I fallowed a bit the include chain and ended up to ability_core and rule_core files.. (those had main function)This files will compile / point to error location in .h file then, as advised I exported both with dependencies. Then moved the generated files from admin user (toolset runs on admin) to regular user (game runs without admin) .. Started the game and checked in UI ... No matter the char/skill/weapon combination the reported damage/DPS/ass pulled number was 10. Success .. Script [rules_core] EVENT_TYPE_COMMAND_PENDING (35) Attack(1) , #Attacks: 1 Script [core_h.GetCreatureCriticalHitModifier] Prop (21) on rogue_melee is 11.200000 modifier is: 10.000000 Script combat_h.GetAttackResult Critical hit averted, target has critical hit immunity. Attacker: player Script [core_h.GetCreatureDefense] Defense on player is 77.000000 modifier is: 5.000000 Script combat_h.GetAttackResult ToHit Calculation: fAttack:134.000000 = (fAttackRating: 84.000000 fAttackRoll:50.000000 (range penalty:0.000000) fFlanking: 0.000000 fBonus(script): 0.000000). Attacker: rogue_melee Script combat_h.GetAttackResult ToHit Calculation (2): fDefenseRating: 77.000000 fCriticalHitModifier: 15.400000 bThreatenCritical: 1. Attacker: rogue_melee Script [combat_damage] fWeapon gen_im_wep_mel_dag_dag: base: 5.600000 + max: 8.400000 md:0 Script [combat_damage] fWeapon gen_im_wep_mel_dag_dag:5.697586 = 5.600000 + Rand(2.800000) Script [combat_damage] fAr: gen_im_arm_cht_mas_leg:23.097076 = 24.656250 + Rand(8.218750) Script [combat_damage] Total: 15.368561 Script [combat_damage] fStrength: 9.670975 Script [combat_damage] fWeapon : 5.697586 Script [combat_damage] fDmgBonus: 2.400000 Script [combat_damage] fAr: 23.097076 Script [combat_damage] fAp: 9.971429 Script [combat_damage] fRankScale: 0.400000 Script [combat_damage] Crit: 23.052841 Script [combat_performattack] weapon base speed :1.500000 mod:-0.500000 effects: 1.000000 Script combat_h.Combat_PerformAttack Attack Result: 2 = COMMAND_RESULT_CRITICALHIT. Attacker: rogue_melee Edited January 25, 2018 by peddroelm Link to comment Share on other sites More sharing options...
peddroelm Posted January 28, 2018 Author Share Posted January 28, 2018 Anybody willing to try in turn this into a real mod .. people could actually use ?https://www.nexusmods.com/dragonage/mods/4846 Link to comment Share on other sites More sharing options...
Thandal Posted January 29, 2018 Share Posted January 29, 2018 We do not allow "WIP" mods. Publishing a knowingly broken mod is a violation of our TaP. You want help, but this isn't the way to get it. Link to comment Share on other sites More sharing options...
Recommended Posts