Hiding Robes (?)

Discussion in 'General Modification' started by silverd, Nov 10, 2014.

Remove all ads!
  1. silverd

    silverd Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    I've been trying to make robes invisible.

    So far I've been sort of able to do so, but setting Item Material Slot to any of the unused/empty values as per materials.mes (as there is no 'No Robe' value) makes some parts of equipped garbs disappear (like dresses on females while wearing farmer garbs turn into body suits, the mythical garbs lose some of their pieces, etc). Which isn't at all ideal.

    But setting it to the value of No Armor just makes a naked character even with an equipped armor slot.

    I am assuming that since both the robes and armor gear replace the CHEST: model, there must be some priority system that hides the armor when a robe is equipped.
    Is there any way to reverse that? Prioritize the armor slot over the robe slot?

    Or is there another way to hide a robe without it having to hide parts of the equipped armor?

    Any possible solution to the problem, no matter what it would require, is welcome.

    Much thanks.
     
    Last edited: Nov 10, 2014
  2. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    You want a robe that's still a robe but you can't see it? You could make it's mesh(es) totally transparent. They're targa (.tga) files, so you'd have to use an app like Photoshop to make the entire image of the meshes transparent.
     
  3. silverd

    silverd Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Nope, no go.
    tga files are textures and the skm files are the actual meshes that determine the shape of the model and how it overlays over the body model. Transparency in texture files never worked like that.
    At least that's how it was in any other game where I was modifying armor models.

    Anyway, I am pretty sure that even if I go through the trouble of converting/reconverting the .skm mesh into a dummy one, I would wind up with a naked torso. Because the game apparently hides whatever is in the torso slot when a robe is equipped. It completely overwrites the slot when a robe is equipped in materials.mes. Otherwise there would be clipping issues galore when both the robe and a chest armor are equipped.

    I'm trying to retain the whatever model in the torso slot, but ignore the robe slot.

    Even when I point the protos.tab Material entry for a robe into an unused materials.mes slot -- the slots that are specifically reserved for 'empty armor slots' -- the game just removes some parts of the torso slot model anyway.

    I'm trying to find out if it's either hardcoded for the robe slot, or there could be some priority over which (robe or torso) gets to be shown when both are equipped somewhere. Or something else that may be specific to the .skm files. As well as why does the torso slot model gets changed when a robe that points to an empty materials.mes entry (that have no overriding meshes defined at all) is equipped, when other slots (like helmets) work completely fine, and is there any way around that?
     
  4. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,177
    Likes Received:
    34
    Have you looked at cloaks? They seem to work fine with armor, but there are clipping issues with robes.
     
  5. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    ----------------------------------------------------------------------------
    alternative possibilty but I dont know if this works yet
    create a script that over-rides the equipment, via on-equip item
    for python
    ----------------------------------------------------------------------------
    obj_f_npc_add_mesh
    game.obj_set_int(obj_f_npc_add_mesh, *MeshID_TAG_HERE)

    suedo
    -------------
    if equipment ROBE is equiped == TRUE?
    AND on-equip is AMOR
    ---over-ride the Addmesh to Amor being equiped---
    game.obj_set_int(obj_f_npc_add_mesh, *MeshID_TAG_HERE)
    ----------Resets current animation with update------------------
    game.obj_set_int(obj_f_animation_handle, 0)



    You don't need to make as dummy un-animated SKM mesh file.

    I have made it possible to modify skm meshes that are fully animated, including monsters, amors, cloths, weapons. Then import the conversion back into the game fully animated.

    The SKMTOOLSET makes it possible to edit,convert any MESH in the game, with any bone count.


    the XVDragons are a perfect example of this.
    It is a Modified hydra, with one head, added wings, re-sculpted SKM, that is in fact fully animated in-Game.

    the Robes are an ADD mesh to the over-lay of the humanoid model,
    this does pose a problem for your idea,

    because Amor is also addmesh, and the robes SLOT , over-rides any armor addmesh currently being rendered on the Body.

    what you are refering to, sounds like you would need an addmesh to overlad another addmesh.

    So I would imagine that hiding a Robe in the fasion you suggest would be improbable or not possible.
     
    Last edited: Nov 10, 2014
  6. silverd

    silverd Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    YES! I came to the same exact conclusion just now. I figured out part of the solution already.
    Setting the robe to an empty non-overriding material.mes DOES work, and it doesn't actually remove the armor mesh, just the armors' addmeshes!

    The robe doesn't have any addmeshes when its material is pointing to an empty material entry. The game doesn't know to look for them, since the reserved entries are empty without any addmesh id's. It just hides the addmeshes of equipped torso slot. It looks like it's hardcoded for the robe slot, it doesn't actually overwrite the armor's addmeshes, just hides them.

    This explains the weird phenomena i couldn't figure out why the armor mesh looked different with a robe set to an empty material and that doesn't get displayed on character.

    Okay, so.
    1) Set robe to a reserved for one of the reserved slots for no equipment, and..
    2) I either have to make all clothing garbs a single .skm without any addmeshes,
    or somehow use your code above to get the current equipped clothing/garb's material id and add reapply it again when the robe is equipped via script.

    Question. How do I implement the script for an on equip event?
    Do i need python on windows to compile it or does the game does everything?
     
    Last edited: Nov 10, 2014
  7. silverd

    silverd Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    UPDATE: can't get it to work.
    garb = game.party[0].item_find_by_proto(6211)
    obj_f_base_mesh doesn't work, obj_f_base_anim doesn't work

    the only thing that works for my garb variable is obj_f_item_material_slot . It does, in fact, indeed change the model of the armor. However, with the invisible robe equipped ,obj_f_npc_add_mesh does nothing

    in fact, garb.obj_get_int(obj_f_npc_add_mesh) stays at 0

    --

    Anyway. You know what? thanks.
    I think I might just take the time and remap all robes meshes into garbs +/- fitting their name.
    In the time I spent trying to figure this out I would have done this 10 times over by now :)
    I just want to play this game dammit. Haven't made it past the intro shop yet.
    But all robes look soooooo fugly and don't fit in with my idea of wizards :X
     
  8. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    What exactly is the end result you're trying to achieve here? If you don't like the look of robes, why not just forego robes?
     
  9. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,740
    Likes Received:
    374
    A lot of the flags cannot be read by the Python interpreter. Pity.
     
  10. silverd

    silverd Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Shiningted, those do work if applied to the game.party[x] object though. But not items.
    WHen applied to the hero, the hero model stays with the applied mesh forever, and equipping/de-equipping gear does not change appearance anymore.

    Gaear, yea, but they have stats like spell resistance that I can't ignore :f
    I started to brute force it, it's fine. Thanks for the help ;)
     
  11. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    If you're adept enough at proto editing, shift the specs of the robes you like to a wizard hat or some other thing you intend to wear. (I didn't think we had any magical robes in the shopmap btw.)
     
  12. silverd

    silverd Member

    Joined:
    Nov 9, 2014
    Messages:
    7
    Likes Received:
    0
    Haha. Yea. That's basically what I'm doing, I don't have much time to play on workdays anyway.

    And, no, there are no magical robes in the test shop. I found all robes in the proto editor, some have nice stats ^^ I checked them out by adding them through the console.

    That robe with huge golden stars on it (archmagi?) was the final culprit that made me start this silly quest :p
     
  13. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    673
    Likes Received:
    110
    I did this a while back by simple changing the Object Model Mesh ID to that of ring, since the ring won't show up on the pc visually. I also needed to blank out the proto entry Item Material Slot which works in tandem with the mesh to control some articles of clothing. Works like a charm.

    These 2 changes are completely visual, and don't affect the game rules at all; as far as the game is concerned the item is still a cloak. The item flag OIF_WEAR_CLOAK is still set, and the inventory icon will still display as a cloak. The only aberration is that if the cloak is dropped, it will appear as a ring on the ground instead of a folded up pile of cloth (small price ;)).

    My reason for doing this was to create cloaks of resistance (+1 thru +5) that are not seen. After a certain level, when everyone has a cloak of resistance, the characters just become cloaked figures and kind of lose their visual uniqueness (defined by their hair, skin, clothing/armor, boots, etc.) and they just become generically colored cloaked figures; where you see the fighter as the red-cloak, the wizard as the purple cloak, the rogue as the black-cloak and so on.

    I think you can apply this to anything you want to wear that you don't want to see displayed on your character. My initial attempt to make the cloaks tga file transparent did make the cloak transparent, but the hair was still affected by the mesh, even when invisible.
     
  14. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    Very clever; is it alright with you if I add that as a crafting option in my items mod? I will credit you for the idea, of course.
     
  15. Rudy

    Rudy Established Member

    Joined:
    Jan 30, 2005
    Messages:
    345
    Likes Received:
    2
    For the reference of those reading this in the future, to get marc1967's suggestion to work, I had to change the Mesh ID to a ring, and blank out the Color entry, not the Material entry, which you can leave as mat_cloth without problems.

    Still, very cool. Adventurers are getting more stylish every day.
     
Our Host!