Temple+ Modding Question

Discussion in 'General Modification' started by _doug_, Feb 21, 2018.

Remove all ads!
  1. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,578
    Likes Received:
    508
    Thanks for the well wishes, they're well now :)

    What was that about three wishes now? (No guarantees, maybe a hanukkah miracle ;))
     
    August likes this.
  2. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Oh I am glad to hear kids are healthy again :)

    I don't know if this would be a lot of work, but if it's rather easy to do, here are my wishes:

    1. Custom strings support for damage_packet.add_dice so I do not have to manipulate the damage.mes.

    2. Custom strings support for bonus_list.add_zeroed. I didn't use this yet, because I don't want to manipulate bonus.mes as well, but now that I am doing more PrC's this would come in handy as well.

    3. The same holds true for Python Actions. Haven't done alot of them in the past, but now that I am doing more of them, I'd wish to have more error codes, something like aec_ability_on_cooldown(maybe get a better description for that, but e.g. breath weapons can only be used every 1d4 turns)
    and aec_already_used_this_turn. From my researches, these error codes are also handled in a mes file but are also limited to the existing ones I believe:
    https://github.com/GrognardsFromHel...40a883f7/TemplePlus/action_sequence.cpp#L4313

    Now if adding new AEC's would be fine, I think I could add them myself. I believe it would make sense to keep the strings in one place for error codes, so I would simply add new strings to the mes file and change the action_sequence.cpp
     
    August likes this.
  3. Endarire

    Endarire Ronald Rynnwrathi

    Joined:
    Jan 7, 2004
    Messages:
    872
    Likes Received:
    90
    Grace grace be unto all of you!
     
  4. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,578
    Likes Received:
    508
    Sorry to say, but items like those 3 are far down my priority list... And I'm strapped for time as it is.
     
    August likes this.
  5. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,581
    Likes Received:
    311
    I don't have a dog in this fight, but I gotta say, Sagenlicht, files like damage.mes and bonus.mes are there to be modded! I don't see the wider value of individual modders doing their own thing away from the files specifically there for these moments. (Quite possibly I am not seeing your big picture, of course).
     
    August likes this.
  6. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    @Sitra Achara no worries :)

    Edit: may I modify the AEC's myself, or do you prefer not to have new AEC's?

    @Shiningted
    The problem with these files are the localizations, at least as far as I understand the topic. If I simply replace them, I turn of the localizations. So yeah, modding those files are not the problem, I did that locally ;) it's just I don't want to mess up localizations.
     
  7. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,578
    Likes Received:
    508
    Oh, but you can use extender files for any mesfile now. I think I might have added that when you were away :)

    You can add AECs, sure.
     
  8. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    628
    Likes Received:
    49
    Sorry @Sagenlicht even though I am aware you have the Zen Archery feat in preparation I have knocked it out whilst waiting in anticipation.

    My question is even though there is no mention of any such prohibition in the splat books should Zen Archery and Brutal Throw be made mutually exclusive? Or have you found an entirely different mechanic to that used in Brutal Throw to literally "use the wisdom bonus instead of the dexterity bonus"?

    Without either the former or the latter I can forsee the extreme example of a 1st level dwarven fighter Str 18 Dex 10 Wis 18 (others immaterial) with Zen Archery as his bonus feat and Brutal Throw as his class feat posting a +9 modified attack bonus with his throwing hammer.
     

    Attached Files:

    August likes this.
  9. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    Thanks for pointing out potential stacking issues @Pygmy. I originally did cap the Dex Modifier to 0 but had to change it, as a negative Dex Modifier would not have been negated by this.

    I will change Brutal Throw and my already pushed Zen Archery Feat to not stack with each other. To my knowledge there is no other feat that replaces Dex with a different stat like Intelligence for ranged weapons correct? We are only taking about Brutal Throw for Thrown Weapons (Strength) and Zen Archery for any ranged attack (Wisdom).
     
  10. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    I can't use an extender for bonus.mes.
    bonus.cpp points to tpdata/tpmes/bonus.mes:
    Code:
    void BonusSystem::GetBonusMesLine(MesLine & line){
        if (line.key >= 335)
            mesFuncs.GetLine_Safe(bonusMesNew, &line);
        else
            mesFuncs.GetLine_Safe(*bonusMesHandle, &line);
        return;
    }
    I can either modifiy the bonus.mes in tpdata/tpmes or the code needs to modified. 2nd option would basically mean to remove the if clause and move the existing bonus.mes in tpdata/tpmes to the new bonus_ext.mes (or in the new bonus_ext folder). Whatever you prefer Sitra :)
     
  11. Sitra Achara

    Sitra Achara Senior Member

    Joined:
    Sep 1, 2003
    Messages:
    3,578
    Likes Received:
    508
    You can modify that file without harming localizations, since it only grabs lines > 335 anyway (which don't even exist in vanilla; it's basically an early extension file). I'll refactor that later.
    Or, if you prefer, you should be able to extend that file as well for easier refactor later on.
     
  12. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    @Pygmy I fixed Zen Archery and Brutal Throw and pushed the fix to Temple+ (in the unarmed feats branch as Zen Archery is a part of that branch). If you want to add the fix to your local overrides (because you can't wait till the Zen Archery feat is availbe in T+ :)) you can simply change the bonus_type integer in Brutal Throw and Zen Archery to 180 and the feats will not stack.
     
    Pygmy likes this.
  13. Pygmy

    Pygmy Established Member Supporter

    Joined:
    Oct 8, 2010
    Messages:
    628
    Likes Received:
    49
    Thank you very much
     
  14. Sagenlicht

    Sagenlicht Established Member

    Joined:
    Apr 14, 2004
    Messages:
    338
    Likes Received:
    119
    I would like to understand the anim_goal thing.

    In 0x100EAB60 I assume the animation for barbarian rage is triggered
    Code:
    //----- (100EAB60) --------------------------------------------------------
    int __cdecl BarbarianRageOnAdd(DCA args)
    {
      int conScore; // eax@1
      int conMod; // eax@1
    
      conScore = Dispatch10AbilityScoreLevelGet(args.objHndCaller, stat_constitution, 0);
      conMod = GetModFromStatLevel(conScore);
      CondNodeSetArg(args.subDispNode->condNode, 0, conMod + 5);
      AnimPushGoalAnimate(args.objHndCaller, 141);
      return 0;
    }
    
    but if I look through animgoals.cpp there are only 82 animgoals listed, so 141 can't directly point to an anim goal I suppose and in animgoals_callbacks I can't find ox100EAB60 either. So I actually fail to understand the basics I guess.

    I actually hoped to be able to just copy and modify an existing anim_goal in python_object.cpp but yeah :(
     
  15. anatoliy

    anatoliy Established Member

    Joined:
    Feb 18, 2017
    Messages:
    628
    Likes Received:
    181
    I asked @DarkStorm exactly year ago about similar question, and that's what he said:
    Also you can see this: https://github.com/anatoliy-savchak/toee.zmod.kots/blob/main/src/zmod_kots_core/scr/const_animate.py
    And my experiments with animations:
     
    Sagenlicht likes this.
Our Host!