Pristontale in Unity

Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Hardcore Member drz is offline
    MemberRank
    Jun 2013 Join Date
    134Posts

    Re: Pristontale in Unity


    RaGEZONE Recommends

    RaGEZONE Recommends

    You relly have to check the inx files :)

    for archer you got a list of d001.inx - d031.inx (kpt) The first 64 by of each file leads you to the shape file.

    char\tmABCD\tfbD01.ASE
    char\tmABCD\tfbD03.ASE
    char\tmABCD\tfbD06.ASE
    char\tmABCD\tfbD21.ASE
    char\tmABCD\tfbD22.ASE


    this are the model files for Armor/Item

    You can use my InxConverter for made them readable: InxConvert.rar
    Last edited by drz; 14-08-17 at 09:13 AM.

  2. #17
    Member Tuur is offline
    MemberRank
    Aug 2012 Join Date
    69Posts

    Re: Pristontale in Unity

    Just an update. I ported all Archer and Atalanta heads (up to Tier 4) and bodies (up to D022/mB022) over to Unity. Currently working on the interfaces.

    Have some problems with rendering double sided transparent objects on top of each other. There must be a way to do this correctly since an over 15 year old game can do it. I'm probably overlooking something simple...

    Spoiler:




    ------------------------------ Update -----------------------------

    Found 3 not-very-elegant ways to fix the double sided transparent materials...

    1) The first option is to do two shader passes, meaning there is an additional gpu drawcall per object. There still are some rare cases that it still is rendered wrong.
    2) Second option is to simply not render a part of the texture with an alpha value of approximately 0. It's fine for desktops but can be hard on mobile devices (since it should work cross platform).
    3) Third is to duplicate the normals.

    Think I will go with the second option for now. Took me way too long to figure out how to do this...

    Did some more user interface too.

    ------------------------------ Update -----------------------------

    Refined the camera controls. Added manual, auto and locked mode.

    ------------------------------ Update -----------------------------

    Managed to get the data part of the inventory to work with some dummy items.

    I'm using two 3D arrays of size [2, 12, 6], however, the size can easily be increased or pages can be added. One of the arrays contains the actual items, the other contains the index of the item at every index taken up by the item. So for example:

    Item 01 has a size of 1x1 and is stored at [1, 3].
    Item 02 has a size of 2x2 and is stored at [2, 1].



    Just like in PT the item is added to the first possible spot when picked up. At first I was making a dumb mistake with the loops causing it to keep saying there was not enough room in the inventory... Gave me a headache for a while.

    Still some improvements can be made but i'm too lazy. Since the default inventory is only 2x12x6 these optimizations wouldn't matter that much anyway.

    (I could for example keep track of how many free slots are still free on page 1 and 2. If the item needs more slots that page can be skipped.)

    ------------------------------ Update -----------------------------

    Only took me a little over 3 hours to get this working. Created a dummy item that contain an image, a width, height and name. The item can be attached to a script which makes an object clickable.

    When the object is clicked the script tries to store the item in the inventory array. Only if this succeeds the clickable object is removed.

    I can't move the items around in the inventory yet.



    ------------------------------ Update -----------------------------

    Added functionality to move items around in the inventory. Will be doing some graphical aspects of the inventory soon. Currently I use a keyboard shortcut to move the first item to a set position.

    ------------------------------ Update -----------------------------

    I will update what i'm working on in the first post of this thread.
    Last edited by Tuur; 22-08-17 at 10:11 PM. Reason: Updating

  3. #18
    Member Tuur is offline
    MemberRank
    Aug 2012 Join Date
    69Posts

    Re: Pristontale in Unity

    It proves to be more difficult to draw the inventory correctly than I had hoped... Things got complicated when I started moving items around. The background color is really messing me up.



    ----------------------------- Edit ----------------------------

    Herpederp. There are a lot more colors than i thought there were.

    Item that cannot be used.
    Hovering pointer over item.
    Hovering pointer over item that cannot be used.
    Moving an item (without overlap).
    Moving an item (with overlap over single item that can be used).
    Moving an item (with overlap over single item that cannot be used).
    Moving an item (with overlap over multiple items).

    -------------------------- Edit ----------------------------

    It will be easier to add an independent background layer to the inventory. I thought a background and foreground for each item would be enough but that's over-complicating things.

    -------------------------- Edit ----------------------------

    Done. I will start working on equipping items and displaying the appropriate model for the items next. After that I will add stats and add checks to make items wearable or non-wearable according to those stats.

    I believe I will store the model for each item in the item itself. As a bonus, I could easily add something like Vormav's Customize Look that way.

    Last edited by Tuur; 25-08-17 at 09:46 PM.

  4. #19
    Member Tuur is offline
    MemberRank
    Aug 2012 Join Date
    69Posts

    Re: Pristontale in Unity

    The inventory is now fully working. It worked fine with 2 items in the video but once I tried to add more it derped... While debugging all these loops I cleaned the code up, so blessing in disguise I suppose.

    Turns out that when I had 2 armors of the same type (for example 2x Battle Suit), I added the same copy twice because I was calling 'Inventory.Add(Item)' instead of 'Inventory.Add(Instantiate(Item))'. Because of that, checking if an item could be moved to a slot was bugged in some cases... Fixed it in this video.



    ---------------------------- Edit ----------------------------

    Cleaning up the inventory code once again because I hate 'bad' code (especially when I wrote it myself).

    Moved the selected item from the 'interface code' to the 'inventory code' and changing all actions like Remove/Move/Equip to use the selected item instead of the item passed to the function. When an item is selected, it is removed from the inventory arrays and stored separately.

    I was first storing the selected item in the interface handling code and made sure not to draw that item. Yuck. Because the selected item isn't in the item arrays anymore I don't have to do that now.
    Last edited by Tuur; 27-08-17 at 12:36 AM.

  5. #20
    Member Tuur is offline
    MemberRank
    Aug 2012 Join Date
    69Posts

    Re: Pristontale in Unity

    Working on item system and equiping items but I haven't had a lot of time. I can equip items by pressing a button atm. Each item can have a model. Some code then checks the inventory if a certain item is equiped and draws the model stored in the item. If not it draws the default model.


  6. #21
    KilroyPT Head + Dev Phatkone is offline
    True MemberRank
    Aug 2007 Join Date
    SydneyLocation
    716Posts

    Re: Pristontale in Unity

    Any update @Tuur?

    Keen to see how its progressing :)

  7. #22
    Member Tuur is offline
    MemberRank
    Aug 2012 Join Date
    69Posts

    Re: Pristontale in Unity

    I've been way to busy with university...
    I hope I will have some more time on my hands after exams in January...

  8. #23
    Account Upgraded | Title Enabled! rxaicy is offline
    True MemberRank
    Jan 2009 Join Date
    ChinaLocation
    202Posts

    Re: Pristontale in Unity

    good job,guy
    my qq(a tool for communication in China) ID:363518187




Page 2 of 2 FirstFirst 12

Advertisement