Skip to content

[How to] Making kit mods for the EE!

189101214

Comments

  • Axl_KrowAxl_Krow Member Posts: 69
    Phew, this is some hefty reading material.

    *tag*
  • waehuunwaehuun Member Posts: 26
    edited July 2018
    Raduziel said:

    JJaANF said:

    @Raduziel

    I have (I think) same problem you had:

    I used the guide to make a (fighter) kit of mine, but the record screen displays the base fighter description...

    I installed it on a fresh EET...

    I have no idea where to seek now...

    Edit: It is on my end, or has a link with EET... because I tried again with my base bg2EE and everything worked...

    IIRC I solved this by excluding the biography and briefdesc entries.

    The LAF from my Circle Enforcer follows as an example:
    LAF fl#add_kit_ee
    STR_VAR
    kit_name = ~RACE~
    clascolr = ~6 42 54 242 236~
    END
    I have the same problem. Unfortunately, excluding the biography and briefdesc entries did not solve it for me.
    My LAF fl#add_kit_ee block only has the kit_name entry, still does not work.

    Did you solve this problem, @JJaANF?
  • AllbrotherAllbrother Member Posts: 261
    Hi.

    LAF fl#add_kit_ee
    INT_VAR
    fallen = 0


    doesn't seem to work for me. It doesn't add an entry for my kit in fallen.2da and ingame killing 2 innocents causes falling. Anyone got an idea how to fix?
  • _Luke__Luke_ Member, Mobile Tester Posts: 1,535

    Hi.

    LAF fl#add_kit_ee
    INT_VAR
    fallen = 0


    doesn't seem to work for me. It doesn't add an entry for my kit in fallen.2da and ingame killing 2 innocents causes falling. Anyone got an idea how to fix?

    It doesn't work for me either....

    @argent77 You're one of the author/maintainer, right? What can you tell us about this issue?
  • argent77argent77 Member Posts: 3,476
    Sorry, I can't really help you. The author of this function is @Wisp. I have only contributed some bits and pieces in the past.

    If you think this is a bug you could raise an issue on the GitHub project page.
  • kjeronkjeron Member Posts: 2,368
    @Allbrother
    That value only specifies if the function will add separate class strings for the fallen version of the kit. It is not related to preventing falling.

    If you want to prevent falling:
    APPEND ~FALLEN.2DA~ ~KITNAME 0~ replace KITNAME with your kit's internal name.

  • AllbrotherAllbrother Member Posts: 261
    edited December 2018
    kjeron said:

    @Allbrother
    That value only specifies if the function will add separate class strings for the fallen version of the kit. It is not related to preventing falling.

    If you want to prevent falling:
    APPEND ~FALLEN.2DA~ ~KITNAME 0~ replace KITNAME with your kit's internal name.

    That works, thank you. Question though - should I just append or copy_existing the 2da first? Or it doesn't matter?

    Also, am I just reading the OP wrong, or does the wording need changing for this part? @CrevsDaak

    edit:

    And since I'm pinging you anyway, might as well pile on - any chance you can include that 0x00004000 in the unusability part will apply the trueclass restrictions? It's in the tutorial for the OG games, but the thread for it on g3 is already gone and I don't know how long the thread on pocketplane will remain
  • kjeronkjeron Member Posts: 2,368
    edited December 2018


    That works, thank you. Question though - should I just append or copy_existing the 2da first? Or it doesn't matter?

    Just append it, it's one of the 2da files where the row number/ count is irrelevant.
  • AllbrotherAllbrother Member Posts: 261
    Thanks again
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    edited February 2019
    @subtledoctor: A couple questions. How do you make a non-player-selectable kit like Wilson's? I'd like to create a unique kit for Korax as a joinable NPC, and the kit would probably closely resemble Wilson's, in the sense that it would allow his natural attack to upgrade and prevent him from using normal weapons and shields.
  •  TheArtisan TheArtisan Member Posts: 3,277
    @semiticgod

    Just don’t add anything to the K_T_* or whatever section and it won’t show up in character creation. I believe Wilson’s kit uses a bunch of Can’t Use Itemtype opcodes to prevent items (though he can use healing potions but no other types so I’m not certain)
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    I just realized I forgot another important question: how do I patch a .cre file with a mod-introduced kit?
  •  TheArtisan TheArtisan Member Posts: 3,277
    @semiticgod

    Add this under your .cre in the .tp2 file:
    WRITE_SHORT 0x246 (IDS_OF_SYMBOL (~kit~ ~KITNAME~))
    
  • The user and all related content has been deleted.
  • RaduzielRaduziel Member Posts: 4,714
    AionZ wrote: »
    @semiticgod

    Add this under your .cre in the .tp2 file:
    WRITE_SHORT 0x246 (IDS_OF_SYMBOL (~kit~ ~KITNAME~))
    

    I want to tattoo this code on my arm.

    Here's what I'm using ATM:
    COPY_EXISTING ~kitlist.2da~ ~override~
      COUNT_2DA_ROWS ~9~ "rows"
      FOR ( index = 31 ; index < rows ; index = index + 1 ) BEGIN
        READ_2DA_ENTRY "%index%" 5 9 "clab"
        PATCH_IF ("%clab%" STRING_COMPARE_CASE "RABaerCM" = 0) BEGIN
          READ_2DA_ENTRY "%index%" 0 9 "RABaerCM"
          SET "rows" = 0
        END
      END
      BUT_ONLY_IF_IT_CHANGES
    
    OUTER_SET kit = "%RABaerCM%"
    ACTION_FOR_EACH creature IN aerie aerie6 aerie7 aerie9 aerie10 aerie11 aerie12 BEGIN
    
      ACTION_IF FILE_EXISTS_IN_GAME ~%creature%.cre~ THEN BEGIN
    
        COPY_EXISTING ~%creature%.cre~ ~override~
          WRITE_SHORT   0x244 0
          WRITE_BYTE    0x246 "%kit%"
          WRITE_BYTE    0x247 0x40
      END
     
      END
    
  • kjeronkjeron Member Posts: 2,368
    You need to consider the two previous bytes at 0x244, otherwise you will run into issues with Wildmage/Barbarian kits. Either by zeroing out the field when you know you won't be adding either of them, or writing the entire 4 bytes at once:
    KITID = IDS_OF_SYMBOL (~kit~ ~KITNAME~)
    WRITE_LONG 0x244 ((KITID >> 16) + ((KITID BAND 0xffff) << 16))
    
  •  TheArtisan TheArtisan Member Posts: 3,277
    edited February 2019
    I mean, at least you guys know to use WeiDU. My original way of adding a kit to Sirene was via her in-game character script - possibly the ugliest method possible.
  • RaduzielRaduziel Member Posts: 4,714
    edited February 2019
    kjeron wrote: »
    You need to consider the two previous bytes at 0x244, otherwise you will run into issues with Wildmage/Barbarian kits. Either by zeroing out the field when you know you won't be adding either of them, or writing the entire 4 bytes at once:
    KITID = IDS_OF_SYMBOL (~kit~ ~KITNAME~)
    WRITE_LONG 0x244 ((KITID >> 16) + ((KITID BAND 0xffff) << 16))
    

    So the code would be:
    WRITE_SHORT 0x246 (IDS_OF_SYMBOL (~kit~ ~KITNAME~))
    WRITE_LONG  0x244 ((IDS_OF_SYMBOL (~kit~ ~KITNAME~) >> 16) + ((IDS_OF_SYMBOL (~kit~ ~KITNAME~) BAND 0xffff) << 16))
    

    Or am I misunderstanding?

    Thanks, @kjeron !
  • CamDawgCamDawg Member, Developer Posts: 3,438
    Keep in mind, if you're adding the kit it sets a variable named kitname with the kit's value, so you can skip the IDS lookup, e.g.
    ADD_KIT cdkit
    // (etc)
    WRITE_LONG 0x244 ((cdkit>> 16) + ((cdkit BAND 0xffff) << 16))
    

    @Raduziel The WRITE_LONG covers all four bytes, so the WRITE_SHORT isn't needed.
  • kjeronkjeron Member Posts: 2,368
    CamDawg wrote: »
    Keep in mind, if you're adding the kit it sets a variable named kitname with the kit's value, so you can skip the IDS lookup, e.g.
    ADD_KIT stores the kit's row# from KITLIST.2da, not it's IDS value. You would need to add 0x4000 to the "cdkit" before using it that way.
  • RaduzielRaduziel Member Posts: 4,714
    I'm failing to follow you up, guys.
  • [Deleted User][Deleted User] Posts: 0
    edited February 2019
    The user and all related content has been deleted.
  • kjeronkjeron Member Posts: 2,368
    Wait, wait... so you mean this thing that I have in, like, every single mod I've made:
    EDIT - so instead maybe just do something like
    OUTER_SET nu_bard_code = (0x4000 + %D5_BARD%)
    
    ?
    It's only unnecessary if it's being used in the same component that adds the kit.
    It it's a separate component, then the values do need to be reacquired.
  • lroumenlroumen Member Posts: 2,538
    edited March 2019
    Does a sort of wiki/faq exist for these kinds of things? All those details should be documented somewhere. :|

    I would really like to make/finish some of my mods or mod ideas but I keep hitting brick walls and it takes much time to figure things out.
  • CrevsDaakCrevsDaak Member Posts: 7,155
    edited April 2019
    Allbrother wrote: »
    Also, am I just reading the OP wrong, or does the wording need changing for this part?
    It probably does. I wrote it back when I was 15 and never really went over it. I've been procrastinating on it for years.
  • SX1050SX1050 Member Posts: 8
    Hello,

    I am just a beginner in writing my own mods. And I only want to add the mods for my game, so I hope I dont need the WeiDu-works...
    That is why I didn't use WeiDu, I only changed the files mentionend in the "HOW TO".

    I am working on a Fighter-Kit (Deathbringer like Sarevok)

    Now I got some problems, hope you can help me out. Here is what happens:

    1. I can select the kit in character generation (the name is correct, the description is correct)
    2. but then the character record say "Berserker" not "Deathbringer"...
    3. Everything else works fine
    4. In game the character record shows "Berserker" again
    5. Within EE Keeper there is my Kit written as Deathbringer

    Maybe some one can help me out.

    Another question, how can I add an effect to the class (the effect should call the spell "deathbring assault", just like Sarevok)

    Greetings SX1050
  • CrevsDaakCrevsDaak Member Posts: 7,155
    @SX1050 Hello and welcome to the forums.
    WeiDU is pretty much required if you want to distribute the mods you create, since it's much easier for everyone to interact with the mod that way (once you get used to it, you'll thank having WeiDU and not having to do a lot of stuff by hand anymore), but you can mod your own game without it although I wouldn't recommend it since you'll have less control over what you can do.
    It sounds like a really odd issue to me, and I have no direct answer to it. If you'd look around kitlist.2da and could tell which strrefs are being used for your kit's name, that might say something. Other than a very odd error, this could've been caused by a mistake on your side.
    To add such an effect, I'd recommend you look at what the Wizard Slayer kit is using, since I'm not familiar with opcodes as I used to be, and copy the structure and basic functionality out of that, except that spell failure chance, you want an effect file to be applied to all creatures with a chance of happening of 5% if you want to perfectly replicate Sarevok's. The effect file should apply an instant death effect, which I think you can already find in the vanilla game (no need to add your own but you'll have to refer to somewhere else since I'm not sure which is it anymore).
  • SX1050SX1050 Member Posts: 8
    Hey there CrevsDaak,

    thanks for your reply.

    This is the last line of my Kitlist.2da:
    42 DEATHBRINGER 111197 111198 111199 CLABFI07 63 0x00000001 2 0x0000402A

    Oh i got it, I made the mistake in clastxt.2da...

    But really great and fantastic that you reply.

    I will try your proposal regarding the Wizard Slayer.

    greetings SX1050
  • CrevsDaakCrevsDaak Member Posts: 7,155
    SX1050 wrote: »
    This is the last line of my Kitlist.2da:
    42 DEATHBRINGER 111197 111198 111199 CLABFI07 63 0x00000001 2 0x0000402A

    Oh i got it, I made the mistake in clastxt.2da...
    Great. Otherwise I would've been puzzled since your kitlist.2da entry looks perfect. I wasn't aware several places had information regarding kit name. I'll have to update the guide accordingly I suppose.
  • SX1050SX1050 Member Posts: 8
    Hello again CrevsDaak,

    now I know how to add the Sarevok-effect (deathbringer assault) on a specific Lvl.
    "How to": Create a Spell, that gives the effect. This Effect gives the deathbringer assault.

    But now I want make it strong on lvl up, regarding the following table:

    Lvl Dmg ActivationChance
    2 10 2%
    4 20
    6 30
    8 40
    10 50 +1% ->3%
    12 75
    14 100
    15 +1% ->4%
    16 125
    18 150
    20 175 +1% ->5%
    22 200

    My thoughts on how to manage:

    Eff1 -> brings Lvl2
    Eff2 -> brings Lvl4 and deletes Lvl2
    Eff3 -> brings Lvl6 and deletes Lvl4

    But I dont know HOW...

    I see no chance in increasing the amount of damage, and deleting an eff could maybe possible...

    Any hints or ideas for me?

    Greetings sx1050
Sign In or Register to comment.