Jump to content

pvyarashevich

Members
  • Posts

    4
  • Joined

  • Last visited

Nexus Mods Profile

About pvyarashevich

Profile Fields

  • Country
    None

pvyarashevich's Achievements

Rookie

Rookie (2/14)

0

Reputation

  1. I had extracted data form *.nif file: vertex, triangles, textures. And successfully displayed it via vispy's opengl example (https://github.com/v...extured_cube.py). Here texture applied with next code: "gl_FragColor = texture2D(texture, v_texcoord);". But how to applied two texture files (*.dds and *_n.dds), and how to apply color background (vertex color) for texture (there is no alpha for some parts of items)? Does anyone have experience to display nif mesh with opengl?
  2. I had extracted data form *.nif file: vertex, triangles, textures. And successfully displayed it via vispy's opengl example (https://github.com/vispy/vispy/blob/master/examples/tutorial/gloo/textured_cube.py). Here texture applied with next code: "gl_FragColor = texture2D(texture, v_texcoord);". But how to applied two texture files, and how to apply color background (vertex color) for texture? Does anyone have experience to display nif mesh with opengl?
  3. In my case the problem was in : float x = obj.getPositionX() I have defined x and then it became constant. When i try to multiply or divide on any value, papyrus compiler said that: "property x on script objectreference is read-only, you cannot give it a value". And on the next iteration values of x, y and z did not change. (magic) Should I use FormList for holding the objects? How can I get path to the 3D model of object based on its FormID value, without openning "creation's kit" "object window"? I mean that there is a lot of object I should get models for, and I want some auto way for it. PS: thx for respones, they were helpfull.
  4. My task is to get reference to all objects and their positions of player's current location. I am planing to restore location with extracted models from *.bsas files. I am trying to use papyrus for this. I created activation tomb according to the bethesda's script manual. And use next script their (Which is using some functions from SKSE). ScriptName Script'sTheMostPerfectName extends ObjectReference Event OnActivate(ObjectReference akActionRef) ; We get player, his location, cell he standing Actor player = Game.getPlayer() Location playerLocation = player.getCurrentLocation() Cell pCell = player.getParentCell() ; We find number of all elements (zero argument is for all types of elements) in current player's cell. int number = pCell.getNumRefs(0) ObjectReference[] objectReferencesList = new ObjectReference[100] int index = 0 ; Then we store all elements into array while (index < number) objectReferencesList[index] = pCell.GetNthRef(index, 0) index = index + 1 endwhile index = 0 ; And output information about each element in location while (index < number) ObjectReference obj = objectReferencesList[index] float x = obj.getPositionX() float y = obj.getPositionY() float z = obj.getPositionZ() float ax = obj.getAngleX() float ay = obj.getAngleY() float az = obj.getAngleZ() Debug.Trace("Object, with number " + index + ", \"" + obj.getBaseObject()+ "\", with name \"" + obj.getName() + "\" has position[" + x + ", " + y + ", " + z + "] and angle (" + ax + ", " + ay + ", " + az + ")", 2) index = index + 1 endwhile endEvent Script's output: [03/12/2018 - 03:57:03AM] Object, with number 0, "[Form < (0001305B)>]", with name "" has position[-556.590515, -316.995544, 63.999969] and angle (0.000000, -0.000000, 180.000000) ..... (and the same thing printed 10 times more) According to the output, I get that obj.getBaseObject() - return object type and referece to this type's ID (So we get the FormID but I don't find the way to get EditorID (names object's knows in 'Object Window'), and the path to the element 3D model); obj.getName() - return only name of objects which are hightlights in the game; (x, y, z) - are the same for all elements (Does it means that I get position of this object's cell? Does I need more number after floating point to get correct location?); (ax, ay, az) - is the correct angles. So we get 11 elements total: 8 for room (only 2 FormID with different angles), 1 for Molag Bal, 1 for tomb, and 1 for player. PS: This question is about papurus's script, creation kit, Skyrim. Sorry for spoiler. Am I using \" 's \" properly? Am I using the right tool for my task? I had find the way to get all elements in location. Did I do it right? Will I face problems in future because I get elements of players current cell? How to get the file path to the element's model? How to get the exact position in current location of each element? Yeah I have a lot of questions, but any useful answer for any of this can help me to move forward.
×
×
  • Create New...