Results 1 to 2 of 2

Thread: Making a Program that....

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2001
    Location
    Seattle, WA, USA
    Posts
    5

    Lightbulb Making a Program that....

    Hey all. I am a hardcore level editor for a game Drakan: Order of The Flame. I have recently found a way to do something with the character files that allows new vertecies to be added to them using an ASCII editor. This process takes a long time and I am fairly new to Visual Basic Programming. I want to know If anyone would have a general Idea of what I need to do to make a program that:

    1) Allows you to enter the Vertecies of one file

    2) Merges or allows you to copy+paste them into another file

    3) Creates and Saves a new file.


    As of now, It takes about 2 hours to just add and texture one of these modified files. I am the only one that currently knows this technique but If I can make this program It could allow all other PCL creators to make new characters. I don't know if this is enough information for you to help me but if you need more Info I can give it.

    I posted one of the files that I would like to be a "Production" of this program. They are the REC files and can be opened with any text editor.

    Thank You,



    Mage150

  2. #2
    Fanatic Member MoMad's Avatar
    Join Date
    Oct 2000
    Location
    Seattle, WA
    Posts
    625
    Yea, it looks reasonably do-able. Although it might take you a while. This is my idea:

    Code:
     Create function(s) that will:
    
     1. Load from the file, line by line
        a. First get the "lengths" or sizes
        b. Then use a for loop to get the vertecies, etc
        c. Then use a switch/case to see what "type" it is
        d. Save it into the appropriate array
     2. Save to a file (those arrays)
        a. First write the array lengths
        b. Then a for loop to write the points
        c. use format$ if you need to right justify the array indexes (unnecesary)
    
     3. Thats it you are done!!
    It will take you a while but isnt it worth it?? LOL.

    This is what im thinking of:

    Code:
     Type udtVert
        A as double
        B as double
        C as double
     End Type
    
     Type udtPt
       X as double
       Y as double
     End Type
    
     Type udtPoly
       pt(3) as udtPt
       vt(3) as udtVert
     End Type
    
     Type udtChannel
       Vertecies() as udtVert 
       ' the first 4 are the matrix so the length is UBound(Vertecies)-4
       Polygons() as udtPoly
       Matrix As Integer
     End Type
    
     Type udtRec
        Version as string
        Name as string
        Author as string
        Weight as Double
        ' [...]
    
        Channels() as udtChannel
       ' [...]
     End Type
    And then in your actual code you will have to do alot of "ReDim" to those arrays according to the numbers you get back from files. It shouldnt be that hard really. Or is it? Get something started and post again if you get stuck on something more specific and ill be glad to help you out.

    MoMad
    :MoMad:
    Nice Sig!

    http://go.to/momad/ Status: Not Ready

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width