Jump to content

Malachor

Sacred Game Modder
  • Posts

    78
  • Joined

  • Last visited

Posts posted by Malachor

  1. How to add extra equipment slots to a character's inventory page.

    UI_scale_Off.thumb.jpg.22adf85502b1ac620c0b7ed11113de35.jpgUI_Seraphim_Inventory_modded07.thumb.jpg.b139cd53008e6be80da9f06d710a9546.jpg
    Note, that:

    a) This doesn't create new slots but adds existing slots from other classes to a class which doesn't have them. Namely 2 more ring slots, an extra amulet slot, the shrunken head from the Dryad, and the battery from the temple guardian.
    b) There's no model for the battery. I had thought that it appeared on the Temple guardian, but after checking an actual temple guardian, it doesn't get displayed.
    c) You don't get the ability to shoot with it. Probably a specific skill that only the temple guardian gets that requires a battery to be equipped.
    d) I didn't implement the shrunken head as well, but unless that does something different, I don't see how that wouldn't work.
    e) Combat art bonuses that spawn on the battery will probably be only for the temple guardian. I didn't look at the specific bonuses that the bonus lists choose from.
    f) When you select an equipped weapon, it's damages appears to change based on the damage of the battery, but I don't think it actually applies(My limited testing didn't show any difference in damage actually dealt). If you select an empty weapon slot your damage doesn't appear to change. But you do get the additional bonuses. Well they appear on the stats tool tip anyway.
    g) This isn't an actual mod, but more an example of research showing that equipment slots can be added. That's how it started out anyway.

    Now onto the method.
    First open scripts/shared/creatureinfo.txt.
    The first entry is the Seraphim.
    Change line 20, validEquipSlots = "", to include the 2 additional rings, 1 additional amulet, the battery, and shrunken head, as shown in the picture.

    ValidEquipSlots.thumb.JPG.8ecdf5f4537754f14b68a1f86facc636.JPG
    Save and close the file.

    Second, open scripts/server/blueprint.txt.
    Search for: hero_battery_normal
    It'll probably be around line 3249.
    Change the wearergroups so that it is WEARGROUP_DEFAULT, just like in the picture.

    Blueprint.JPG.1f3468422e3be796c6889b8cab4466ed.JPG
    Save and close the file.
    Notice the 2 itemtypes: 8635, 8636.

    Third open scripts/server/itemtype.txt
    Search for 8635. About line 212196.
    You should see: mgr.typeCreate(8635, newItemType);
    On line 212187, change user = so that is WEARGROUP_DEFAULT.
    Do the same for the next itemtype which will be 8636.Itemtypes.thumb.JPG.7d2443bb37f62c41bf0900472852fd87.JPG
    Refer to the picture.


    Save and close the file.
    These changes allow the seraphim to equip the batteries.
    Now, we'll cover adding the equipment slots to the user interface(UI).

    In your Sacred 2/pak folder, create 2 new folders, one named Windows and another named orig_skin-xml, and extract the contents of skin-xml.zip into it.
    From orig_skin-xml/Windows copy Inventory.xml, and Inventory_Seraphim.xml, then paste them into your Sacred 2/pak/Windows folder.

    I do plan on providing an overview for the xml files at a later time.

    Open Inventory.xml.
    Search for: handicap. if you're using CM 1.60 it should be around line 156.
    On the next line, change the value for x to 328.

    Inventory.JPG.31a9908beaec314003821be3c0554122.JPG
    Save and close the file.

    Open Inventory_Seraphim.xml.
    Make the necessary changes as can be seen in the picture. Pretty vague, yes, but there are a large number of changes.

    Inventory_Seraphim.thumb.JPG.24b005c148ecbb7c2b02316d5ece44b6.JPG
    Save and close the file.
    Run the game and start a new seraphim. You could use an existing seraphim, in which case I recommend backing it up just in case.
    Any batteries, well as long as they're of the first 2 types, will go into the equipment slot, the same with the extra rings and amulet.

  2. I haven't done a lot of spell/combat art modding but I have noticed that the class CAs have a 2 letter code in their first line. For example: mgr.defineSpell( "se_co_schlaghagel", { is the first Seraphim CA and it has "se" in it. As you posted regarding levin array, there's a "in" instead.

    Seraphim has se

    Inquisitor has in

    High elf has he

    Shadow warrior has sk

    Dryad has dr

    Temple guardian has tw

    Dargon mage has dm

    Alternatively, searching for the aspect name might be quicker/easier. So for levin array you could search for IN_POWER, and then go from there.

    Oh, one other thing; if you're changing a CAs mods, ensure that you include the correct value in the third position.

    Using levin arraqy as an example, if you were swapping:

    entry5 = {"et_maxangle_cone", 45, 0, 1, 8 },

    with:

    entry5 = {"et_spelldamage_physical",600, 300, 0, 133 },

    you would need to change it to:

    entry5 = {"et_spelldamage_physical", 600, 300, 1, 133 },

    I hope this helps.

    • Like! 1
  3. I think it is possible.

    From my research, there are two areas to be changed:

    1) the inventory ui, which is pretty easy. This is in skin-xml.zip

    2) the actual code defining the inventory. In either a .dll file, or a .exe file. This is the part where I got stuck.

     

    What I tried was increasing the size of the stash, so it was the same height as the other ui components.

    Then I used IDA to disassemble s2logic.dll, and sacred2.exe and looked through them for anything relating to the inventory, noting the height and width(from ingame). The problem I got to was, now that I had, or thought I had the correct spot, how do I relate that to the .dll file(IDA creates a .idb file when it disassembles a file). And since my knowledge of this wasn't very good, and my google fu wasn't either, I basically gave up on it, hoping someone else would look into it.

  4. there is an additional line

     

    SpellFactorDiff = {800,1000,1200,1500,2000}

     

    how do these affect min and max gold drop? how do the numbers need to relate? do they need to stay between the min and max? if the min is higher than spellfactor will spellfactor recuce the gold instead of increase it?

     

    also there is defense factor?

     

    I may be assuming relation by juxtaposition. these two additional lines are inserted in between the min and max quest lines. so they may be entirely unrelated. just making sure.

    thanks for the clarification

    Cheers

    I think that SpellFactorDiff is more for spells, rather than amounts of gold. Though, I'm not sure what it does.

    Also, there is DefenseFactorDiff, it's the line directly below QuestGoldMax. At least in my version of balance.txt.

  5. Base mount? Do you mean horses?

    If you do, then search in scripts\server\creatures.txt for horse.

    The horse traders will be included in the search, but they're pretty obvious.

    Make a note of the itemtype_id values.

    Then search in scripts\shared\creatureinfo.txt for

    type         = X,

    Where X is the itemtype_id values(there are 9 spaces between type and =X,).

    Change the walkspeed and/or runspeed as you like, save the file and that should be it.

  6. Changing the special mount walk/run speed is relatively simple.

    Search in scripts\shared\creatureinfo.txt for mount, well you could use specialmountfor, it amounts to the same thing.

    As long as the value on that line is above 0, ie from 1 to 6, it's a special mount. Change it's walk/run speed(s), save, and you're done.

     

    Just a slight correction to your post BleachedFan, there's no itemtype_id in creatureinfo.txt.

    For the character classes, here's a topic I found on it.

    But I'll add the information here as well.

     

    Open scripts\shared\creatureinfo.txt

     

    search for: (don't include the names of the classes)

    type         = 1, (seraphim)
    type         = 2, (dryad)
    type         = 3, (shadowwarrior)
    type         = 4, (inquisitor)
    type         = 5, (highelf)
    type         = 6, (templeguardian)
    type         = 7, (dragonmage)

    There should be 9 spaces between type and =.

    • Like! 1
  7. If you search in scripts\shared\spells.txt for

    sk_ap_kohorte

    and look at

    entry2 = {"et_summon_soldier", 2000, 588, 0, 8 },

    The second value 588 is the id of the skeletons in scripts\server\creatures.txt

    The line below id = 588, is itemtype_id = 3250, which is used in scripts\shared\creatureinfo.txt

    And there you'll find the walkSpeed, and runSpeed.

    Change them, and away you go :)

×
×
  • Create New...
Please Sign In or Sign Up