Aller au contenu

Photo

Problem on Getting Custom Weapon Model into Game


  • Veuillez vous connecter pour répondre
19 réponses à ce sujet

#1
NTSTR

NTSTR
  • Members
  • 10 messages
I`m a 3dmax user, so I use GUI for tazpn's Command Line Tools, first get a FBX file, then convert to DAO`s file formats. After all this, I put all mesh files and texture files in my "F:\\\\Program Files\\\\Dragon Age\\\\packages\\\\core\\\\override", like this:

Image IPB

I ran my toolset to see it, but finally found out like this:

Image IPB

I hope someone can help me with...some experienced players can teach me how to deal with...all texture formats are obey this TUT http://social.biowar.../Textureformats

I set all textures fine in 3dmax before I export the FBX file, like this picture:

Image IPB

HELP ME PLZ! Image IPB

Modifié par NTSTR, 30 mai 2010 - 08:39 .


#2
mikemike37

mikemike37
  • Members
  • 669 messages
they end up blue because they are unable to show the texture for some reason. I have a sneaking suspicion you are not aware you need a .mao file "between" your model and your texture?

Your model should reference the name found in the .mao (not the filename) and the mao should correctly reference the names of your texture files (.dds in a suitable format). Setting the maps in 3ds max will do precisely nothing unless you use chewy or eshme's scripts to generate the mao. Can I also suggest using eshme's tool, its much easier than the method you're using but probably wasnt available at the time that tutorial was written.

http://social.biowar...m/project/2336/

If you want to simply make the mao yourself, its not too hard. I suggest you open your toolset and use it to open Program Files\\\\Dragon Age\\\\packages\\\\core\\\\data\\\\materialobjects.erf and extract a material used for a weapon(ex.w_gsw_gs06a_0.mao). Copy and replace with the names of your dds files. Place with your other files in your override. Use the guide below to help you:

http://bg2redux.stud...exturesAdvanced

Let me know how you get on.

Modifié par mikemike37, 30 mai 2010 - 10:15 .


#3
NTSTR

NTSTR
  • Members
  • 10 messages
Thank you very much, man...so I fixed the mao file, and thing`s becoming nice...

but how I spawn my new weapon in game,, any debut code can be used in game just like NWN2?

Image IPB

#4
mikemike37

mikemike37
  • Members
  • 669 messages
the most elegant solution is probably make a new script which adds it to your inventory and call the script using debug console.



http://social.biowar..._custom_modules

#5
NTSTR

NTSTR
  • Members
  • 10 messages
Thanks again, mikemike37! for guilding me all the way. 

I finally learned something today, and I made it to this

Image IPB

I am still working on it, if I have further questions, I`ll post here.... 

#6
mikemike37

mikemike37
  • Members
  • 669 messages
sure. and its looking very nice. well done :)

EDIT: oh and i see you're overriding the greatsword 6 variation to get your appearance in. it is possible to add it in a non-overriding way using 2da edits. this will ensure compatibility with other mods too. its mostly covered here:

http://social.biowar...5/index/1998925

Modifié par mikemike37, 30 mai 2010 - 06:22 .


#7
NTSTR

NTSTR
  • Members
  • 10 messages
I`ve already made a new greatsword 7 variation to get my new model in..Overriding the greatsword 6 was just a test run..



I`m gonna try the self-Illumination maps on this model, which was my favorite part when I was making NWN2 mod

#8
mikemike37

mikemike37
  • Members
  • 669 messages
ah ok. be aware that other modders might decide to name their files variation 7 and that you should use an ID in your variations sheet which hasnt been reserved here



http://social.biowar...tions_.28all.29



just so you know the emissive materials illuminate the texture only, they don't actually glow in any kind of fancy bloom way like they do in unreal engine or anything. you might like to play with crust VFX if you want that.

#9
NTSTR

NTSTR
  • Members
  • 10 messages
Problem`s still coming..
I want to use Eshme`s export tool to export my model(still a simple weapon model)..but I don`t know what`s this thing
Image IPB

"Available Game Object" has nothing to select, and failed to export without select one..

Modifié par NTSTR, 17 juin 2010 - 10:47 .


#10
Eshme

Eshme
  • Members
  • 756 messages
Ohh max 7, im wondering if it works there ^^ Check the readme yet?

Your root object must be named GOB, GOB1, GOBwhatever. This is made to allow certain detections and calculations.

After that it should appear as a selectable Game object.

You can have many root objects appear in the exporter like that.



BTW i just saw u should update to version 5 if u can.

#11
NTSTR

NTSTR
  • Members
  • 10 messages
Now I have a root named GOB, then I guess I can get it...but everytime I export the model, it keep jumping out a window telling me "runtime error: replace end out of range: 28"??

#12
Eshme

Eshme
  • Members
  • 756 messages
Unknown error. If possible can you tell how soon this error happens, ie as soon you hit the button, or how far in the progress is and what the progress sais if anything.



And maxscript may print the errorlog in the max listener, can you copy paste this to me in some form? And it also may open some script and mark the line ,can you show this line to me in some way?

#13
Eshme

Eshme
  • Members
  • 756 messages
Hm i am wondering how the 28 could even happen. 28 letters?. You called it GOB withnothing else? What did you enter in the filename field? Something long?

#14
NTSTR

NTSTR
  • Members
  • 10 messages
I found the reason why it went wrong. I realized root name must not be "GOB", it have to be "GOB" add something like "GOB-111"...

so I exported model out, but I found no .mao file but a .met file? Does that mean if I`m using your v5 tool, I have to make a .mao file manually?

Modifié par NTSTR, 18 juin 2010 - 12:43 .


#15
Eshme

Eshme
  • Members
  • 756 messages
Oh weird, it should work as GOB of course. I will look into it. Regardless, it works just as good like you did.

MAO export, you need up date to Version5. You have Version2.10
BUT, weapon material is not yet supported, i just uploaded Version5 give me abreak. Thus you may either write your own MAO or rewrite one.

MET file is metadata, required by the toolset.


Because of the error... would you sent me the information i asked for above. Listener log, and line in the script?

Modifié par Eshme, 18 juin 2010 - 07:23 .


#16
Eshme

Eshme
  • Members
  • 756 messages
Well NTSTR? I cannot fix this error if you dont help me here lol

#17
NTSTR

NTSTR
  • Members
  • 10 messages
Here you go....full listener log when this error occured...



/**********************************************************************************************************
Dragon Age Origins Tools
Author: Eshme  http://social.biowar...m/project/2336/
latest edit:
10 June 2010
Copyright notes:
This Script was created in my free time as a modding hobby, and is free of charge.
Share it with your friends, but do not claim it as your own, nor sell it.
Copyright ?2010 Eshme
************************************************************************************************************
Include Script
DAOcommon.ms
Common Functions
************************************************************************************************************
*/
 fn CutString InString Cut = (
  local out = copy InString
  if (classof Cut) == String then
  (
   local Position = Findstring InString Cut
   if Position != undefined then out = Replace InString Position Cut.count ""
  )
  out
 )
 
 fn EqualsCaseless String1 String2 = (
  if String1.count != String2.count then return false
  for i = 1 to String1.count do
  (
   local Comp = abs((bit.charasint String1[i]) - (bit.charasint String2[i]))
   if (Comp != 0 and Comp != 32) then return false
  )
  return true
 )
 
 fn RandomNodeIDString = (
  local Rand = "QWERTZUIOPASDFGHJKLYXCVBNM123456789poiuztrwqlkjhgfdsmnbvcxya"
  local out = "_"
  for i = 1 to 3 do
  (
   out += Rand[(random 1 (Rand.count))]
  )
  out
 )
 
 fn RoundMe Number = (if Number - (floor Number) < .5 then (floor Number) as integer else (ceil Number) as integer)
 
 fn GetHierarchy theobj Limit:#None = ( --Gets all children including the one which was sent
  Objarray = #()
  for obj in theobj do
  (
   if Limit == #None then append Objarray obj
   if Limit == #Mesh then if (GetMeshParams Obj > 0) and (superclassof Obj == Geometryclass) then append Objarray obj
   if Limit == #Coll then if (GetCollParams Obj > 0) then append Objarray obj
   if Limit == #Node then if (GetBoneParams Obj > 0) then append Objarray obj
   join ObjArray (GetHierarchy obj.children Limit:Limit)
  )
  Objarray
 )
 fn GetGOB FromObj = ( --Gets the superparent of any node ("GOB" in Bioware models)
  local obj = FromObj
  while obj.parent != undefined do obj = obj.parent
  obj
 )
 
 struct GOBStruct (
  ObjName,
  ObjExtension,
  IsGOB
 )
 
 fn GetGOBs = ( --Gets all the GOBs in the scene. Used to make them show up in the menu's
  local GOBs= #()
  
  for obj in rootnode.children do if (EqualsCaseless obj.name "GOB") then
  (
   append GOBs (GobStruct ObjName:obj.name ObjExtension:"" IsGOB:true)
  )
  for obj in rootnode.children do if not(EqualsCaseless obj.name "GOB") and matchpattern obj.name pattern:"GOB*" then
  (
   append GOBs (GobStruct ObjName:(substring obj.name 1 3) ObjExtension:(substring obj.name 4 20) IsGOB:true)
  )
  for obj in rootnode.children do if not matchpattern obj.name pattern:"GOB*" then
  (
   append GOBs (GobStruct ObjName:obj.name ObjExtension:"" IsGOB:false)
  )
  GOBs
 )
 
 fn AllocateMemory Size = (
  --*******************************************
  --Ensures the Heap is at least of size "Size"
  --********************************************
  local MemInc = (Size - HeapSize)
  if HeapSize + MemInc > 30000000 then MemInc = 30000000 - HeapSize --Limit heap to 30meg
  MemInc = ((MemInc / 100000) as integer) * 100000
  if MemInc > 0 then HeapSize += MemInc
 )
 
 fn FixOutputName Input TruncateArray = (
  --**************************************************************
  --Cuts the output name of any invalid or unnessecary Characters
  --The Name you enter in the Export output fields
  --**************************************************************
  local Output = copy Input
  for CutMe in TruncateArray do Output = Cutstring Output CutMe --cutting extensions to avoid mistakes
  for i = Output.count to 1 by -1 do if Output[i] == "\\\\\\\\\\\\\\\\" then Output = replace Output 1 i "" --cutting all but the filename
  for i = Output.count to 1 by -1 do if Output[i] == " " then Output = replace Output i 1 "_" --replace spaces
  Output
 )
 
 fn IsValidObject obj = (  --Export only handling these with parameters
  if (GetBoneParams obj) > 0 then return true
  if (GetCollParams obj) > 0 then return true
  if (GetMeshParams obj) > 0 then return true
  return false
 )
 
 fn TestParameters Obj = (
  --Testing any Parameters are all readable and up to date.
  --This causes errors everywhere if not true. Used by Export Main functions prior exporting.
  local TestOK = true
  
  if (GetBoneParams obj) > 0 then
  (
   if not (IsBoneParamsUptoDate Obj) then TestOK = false
  )
  if (GetCollParams obj) > 0 then
  (
   if not (IsCollParamsUptoDate Obj) then TestOK = false
  )
  if (GetMeshParams obj) > 0 then
  (
   if not (IsMeshParamsUptoDate Obj) then TestOK = false
  )
  TestOK
 )
 
 struct ModelStatsStruct (
  
  NodeCount = 0,
  UndefinedNodes = #(),
  UndefinedNodesChilds = #(),
  OutdatedNodes = #()
 )
 
 fn GetModelStats RootNode = (
  --****************************************************************************************
  --Should be a function to collect many information on the model, of ModelStatsStruct type
  --perhaps makes it easier to find errors when there is some feedback
  --*****************************************************************************************
  local Stats = ModelStatsStruct()
  local Objs
  
  Objs = GetHierarchy #(RootNode)
  
  Stats.NodeCount = Objs.count
  for obj in objs do
  (
   if not (isValidObject Obj) then
   (
    --**************************************
    --This Node does not have any Parameters
    --**************************************
    append stats.UndefinedNodes Obj
    local double = (finditem stats.UndefinedNodesChilds Obj)
    if double > 0 then deleteItem stats.UndefinedNodesChilds double
    
    local Childs = GetHierarchy #(Obj)
    for Child in Childs do
    (
     --********************************************************
     --This is a Child of one, and wont recursively be exported
     --********************************************************
     if (Child != Obj) and \\\\\\\\
        ((finditem stats.UndefinedNodes Child) == 0) and \\\\\\\\
        ((finditem stats.UndefinedNodesChilds Child) == 0) then
     (
      append stats.UndefinedNodesChilds Child
     )
    )
   )
   if (isValidObject Obj) then
   (
    if not (TestParameters Obj) then
    (
     --**********************************
     --This Node has outdated Parameters
     --**********************************
     append stats.OutdatedNodes Obj
    )
   )
  )
  
  --****************
  --Get out of here
  --****************
  return Stats
 )
 
 struct DAOMatIDStruct (
  ID,     --Holds IDString translation table
  IDString
 )
 
 fn GetMatTypeIDs = (
  local Out = #()
  append Out (DAOMatIDStruct ID:1 IDString:"Black.mat")
  append Out (DAOMatIDStruct ID:2 IDString:"Canopy.mat")
  append Out (DAOMatIDStruct ID:3 IDString:"Character.mat")
  append Out (DAOMatIDStruct ID:4 IDString:"Cloth.mat")
  append Out (DAOMatIDStruct ID:5 IDString:"Clouds.mat")
  append Out (DAOMatIDStruct ID:6 IDString:"DistortionMaskDiffuse.mat")
  append Out (DAOMatIDStruct ID:7 IDString:"DADistortionMask.mat")
  append Out (DAOMatIDStruct ID:8 IDString:"Eye.mat")
  append Out (DAOMatIDStruct ID:9 IDString:"Face.mat")
  append Out (DAOMatIDStruct ID:10 IDString:"GeneralGui.mat")
  append Out (DAOMatIDStruct ID:11 IDString:"HairAlpha.mat")
  append Out (DAOMatIDStruct ID:12 IDString:"InstancingMaterial.mat")
  append Out (DAOMatIDStruct ID:13 IDString:"Lava.mat")
  append Out (DAOMatIDStruct ID:14 IDString:"Prop.mat")
  append Out (DAOMatIDStruct ID:15 IDString:"Sky.mat")
  append Out (DAOMatIDStruct ID:16 IDString:"Static.mat")
  append Out (DAOMatIDStruct ID:17 IDString:"VFX.mat")
  append Out (DAOMatIDStruct ID:18 IDString:"Water.mat")
  append Out (DAOMatIDStruct ID:19 IDString:"Weapon.mat")
  append Out (DAOMatIDStruct ID:20 IDString:"Weapontrail.mat")
  Out
 )
 
 fn GetMatSemanticIDs = (
  local Out = #()
  append Out (DAOMatIDStruct ID:1 IDString:"Default")
  append Out (DAOMatIDStruct ID:2 IDString:"Punch")
  append Out (DAOMatIDStruct ID:3 IDString:"Blend")
  append Out (DAOMatIDStruct ID:4 IDString:"AddvPunchthroughMultiplyTint2S")
  append Out (DAOMatIDStruct ID:5 IDString:"AddvPunchthroughMultiplyTint2SL2")
  --append Out (DAOMatIDStruct ID:6 IDString:"MultiplyTintL3") --double
  append Out (DAOMatIDStruct ID:7 IDString:"LerpedTint")
  append Out (DAOMatIDStruct ID:8 IDString:"LerpedTintL2")
  append Out (DAOMatIDStruct ID:9 IDString:"LerpedTintL3")
  append Out (DAOMatIDStruct ID:10 IDString:"AlphaLerpedTint")
  append Out (DAOMatIDStruct ID:11 IDString:"PunchthroughLerpedTint")
  append Out (DAOMatIDStruct ID:12 IDString:"PunchthroughLerpedTintL2")
  append Out (DAOMatIDStruct ID:13 IDString:"EmissiveLerpedTint")
  append Out (DAOMatIDStruct ID:14 IDString:"EmissiveLerpedTintL2")
  append Out (DAOMatIDStruct ID:15 IDString:"AlphaEmissiveLerpedTint")
  append Out (DAOMatIDStruct ID:16 IDString:"PunchthroughEmissiveLerpedTint")
  append Out (DAOMatIDStruct ID:17 IDString:"PunchthroughEmissiveLerpedTintL2")
  append Out (DAOMatIDStruct ID:18 IDString:"MultiplyTint")
  append Out (DAOMatIDStruct ID:19 IDString:"MultiplyTintL2")
  append Out (DAOMatIDStruct ID:20 IDString:"MultiplyTintL3")
  append Out (DAOMatIDStruct ID:21 IDString:"AlphaMultiplyTint")
  append Out (DAOMatIDStruct ID:22 IDString:"PunchthroughMultiplyTint")
  append Out (DAOMatIDStruct ID:23 IDString:"PunchthroughMultiplyTintL2")
  append Out (DAOMatIDStruct ID:24 IDString:"EmissiveMultiplyTint")
  append Out (DAOMatIDStruct ID:25 IDString:"EmissiveMultiplyTintL2")
  append Out (DAOMatIDStruct ID:26 IDString:"AlphaEmissiveMultiplyTint")
  append Out (DAOMatIDStruct ID:27 IDString:"PunchthroughEmissiveMultiplyTint")
  append Out (DAOMatIDStruct ID:28 IDString:"PunchthroughEmissiveMultiplyTintL2")
  append Out (DAOMatIDStruct ID:29 IDString:"ArmourSkinTint")
  append Out (DAOMatIDStruct ID:30 IDString:"ArmourSkinTintL2")
  append Out (DAOMatIDStruct ID:31 IDString:"ArmourSkinTintL3")
  append Out (DAOMatIDStruct ID:32 IDString:"AlphaArmourSkinTint")
  append Out (DAOMatIDStruct ID:33 IDString:"PunchthroughArmourSkinTint")
  append Out (DAOMatIDStruct ID:34 IDString:"PunchthroughArmourSkinTintL2")
  append Out (DAOMatIDStruct ID:35 IDString:"EmissiveArmourSkinTint")
  append Out (DAOMatIDStruct ID:36 IDString:"EmissiveArmourSkinTintL2")
  append Out (DAOMatIDStruct ID:37 IDString:"AlphaEmissiveArmourSkinTint")
  append Out (DAOMatIDStruct ID:38 IDString:"PunchthroughEmissiveArmourSkinTint")
  append Out (DAOMatIDStruct ID:39 IDString:"PunchthroughEmissiveArmourSkinTintL2")
  append Out (DAOMatIDStruct ID:40 IDString:"NoTint")
  append Out (DAOMatIDStruct ID:41 IDString:"NoTintL2")
  append Out (DAOMatIDStruct ID:42 IDString:"NoTintL3")
  append Out (DAOMatIDStruct ID:43 IDString:"AlphaNoTint")
  append Out (DAOMatIDStruct ID:44 IDString:"PunchthroughNoTint")
  append Out (DAOMatIDStruct ID:45 IDString:"PunchthroughNoTintL2")
  append Out (DAOMatIDStruct ID:46 IDString:"EmissiveNoTint")
  append Out (DAOMatIDStruct ID:47 IDString:"EmissiveNoTintL2")
  append Out (DAOMatIDStruct ID:48 IDString:"EmissiveNoTintL3")
  append Out (DAOMatIDStruct ID:49 IDString:"AlphaEmissiveNoTint")
  append Out (DAOMatIDStruct ID:50 IDString:"PunchthroughEmissiveNoTint")
  append Out (DAOMatIDStruct ID:51 IDString:"PunchthroughEmissiveNoTintL2")
  append Out (DAOMatIDStruct ID:52 IDString:"AlphaNoTintBody")
  append Out (DAOMatIDStruct ID:53 IDString:"AlphaMulTintBody")
  --append Out (DAOMatIDStruct ID:54 IDString:"AddvPunchthroughMultiplyTint2S") --doubles
  --append Out (DAOMatIDStruct ID:55 IDString:"AddvPunchthroughMultiplyTint2SL2")
  append Out (DAOMatIDStruct ID:56 IDString:"LOD2")
  append Out (DAOMatIDStruct ID:57 IDString:"LOD3")
  append Out (DAOMatIDStruct ID:58 IDString:"Clouds")
  append Out (DAOMatIDStruct ID:59 IDString:"PropDistortionDiffuse")
  append Out (DAOMatIDStruct ID:60 IDString:"StaticDistortionDiffuse")
  append Out (DAOMatIDStruct ID:61 IDString:"VFXAddvDistortionDiffuse")
  append Out (DAOMatIDStruct ID:62 IDString:"VFXBlendDistortionDiffuse")
  append Out (DAOMatIDStruct ID:63 IDString:"VFXAddvCSDistortionDiffuse")
  append Out (DAOMatIDStruct ID:64 IDString:"VFXBlendCSDistortionDiffuse")
  append Out (DAOMatIDStruct ID:65 IDString:"VFXChunkyDistortionDiffuse")
  append Out (DAOMatIDStruct ID:66 IDString:"Skinned")
  append Out (DAOMatIDStruct ID:67 IDString:"Particle")
  append Out (DAOMatIDStruct ID:68 IDString:"Particle_CS")
  append Out (DAOMatIDStruct ID:69 IDString:"Eyelash")
  append Out (DAOMatIDStruct ID:70 IDString:"ReticalTint")
  append Out (DAOMatIDStruct ID:71 IDString:"Opaque")
  append Out (DAOMatIDStruct ID:72 IDString:"OpaqueVolume")
  append Out (DAOMatIDStruct ID:73 IDString:"Sky")
  append Out (DAOMatIDStruct ID:74 IDString:"FadeSky")
  append Out (DAOMatIDStruct ID:75 IDString:"LOD1Relief")
  append Out (DAOMatIDStruct ID:76 IDString:"LOD1Blend")
  append Out (DAOMatIDStruct ID:77 IDString:"LOD1BlendFlat")
  append Out (DAOMatIDStruct ID:78 IDString:"LOD1Punch")
  append Out (DAOMatIDStruct ID:79 IDString:"LOD3Punch")
  append Out (DAOMatIDStruct ID:80 IDString:"Addv")
  append Out (DAOMatIDStruct ID:81 IDString:"Blend_Atm")
  append Out (DAOMatIDStruct ID:82 IDString:"ContactSheetAddv")
  append Out (DAOMatIDStruct ID:83 IDString:"ContactSheetBlend")
  append Out (DAOMatIDStruct ID:84 IDString:"VolTexAddv")
  append Out (DAOMatIDStruct ID:85 IDString:"VolTexBlend")
  append Out (DAOMatIDStruct ID:86 IDString:"AlternateDecalBlend")
  append Out (DAOMatIDStruct ID:87 IDString:"AlternateDecalAddv")
  append Out (DAOMatIDStruct ID:88 IDString:"Chunky")
  append Out (DAOMatIDStruct ID:89 IDString:"ChunkyBlend")
  append Out (DAOMatIDStruct ID:90 IDString:"ChunkyAddv")
  append Out (DAOMatIDStruct ID:91 IDString:"ChunkyScroll")
  append Out (DAOMatIDStruct ID:92 IDString:"ChunkyScrollBlend")
  append Out (DAOMatIDStruct ID:93 IDString:"ChunkyScrollAddv")
  append Out (DAOMatIDStruct ID:94 IDString:"ChunkyContactSheet")
  append Out (DAOMatIDStruct ID:95 IDString:"ChunkyContactSheetBlend")
  append Out (DAOMatIDStruct ID:96 IDString:"ChunkyContactSheetAddv")
  append Out (DAOMatIDStruct ID:97 IDString:"ChunkyVolTex")
  append Out (DAOMatIDStruct ID:98 IDString:"ChunkyVolTexBlend")
  append Out (DAOMatIDStruct ID:99 IDString:"ChunkyVolTexAddv")
  append Out (DAOMatIDStruct ID:100 IDString:"Blend_DBA")
  append Out (DAOMatIDStruct ID:101 IDString:"Blend_ContactSheet_DBA")
  append Out (DAOMatIDStruct ID:102 IDString:"Additive_DBA")
  append Out (DAOMatIDStruct ID:103 IDString:"Additive_ContactSheet_DBA")
  append Out (DAOMatIDStruct ID:104 IDString:"ContactSheetBlendSplat")
  append Out (DAOMatIDStruct ID:105 IDString:"ContactSheetAddvSplat")
  append Out (DAOMatIDStruct ID:106 IDString:"Sorted")
  append Out (DAOMatIDStruct ID:107 IDString:"NoSpec")
  append Out (DAOMatIDStruct ID:108 IDString:"FlowingWater")
  append Out (DAOMatIDStruct ID:109 IDString:"ToolsetProbeFlowingWater")
  append Out (DAOMatIDStruct ID:110 IDString:"Toolse****er")
  append Out (DAOMatIDStruct ID:111 IDString:"Wireframe")
  append Out (DAOMatIDStruct ID:112 IDString:"PSSM")
  append Out (DAOMatIDStruct ID:113 IDString:"DepthWrite")
  append Out (DAOMatIDStruct ID:114 IDString:"DepthWriteDebug")
  append Out (DAOMatIDStruct ID:115 IDString:"DepthWriteLowLOD")
  append Out (DAOMatIDStruct ID:116 IDString:"OpaqueDepthWrite")
  append Out (DAOMatIDStruct ID:117 IDString:"Debug")
  append Out (DAOMatIDStruct ID:118 IDString:"Overdraw")
  Out
 )
 
 fn GetDAOMatIDByString IDTable InString = (
  local OutID = 1
  for Item in IDTable do
  (
   if (EqualsCaseless Item.IDString InString) == true then OutID = Item.ID
  )
  OutID
 )
 
 fn GetDAOMatStringByID IDTable InID = (
  local OutString = ""
  for Item in IDTable do
  (
   if Item.ID == InID then OutString = Item.IDString
  )
  OutString

Modifié par NTSTR, 21 juin 2010 - 11:44 .


#18
Eshme

Eshme
  • Members
  • 756 messages
Oooh hehe that is the script not the listener. But the thickened line up there is helpful too.



I need the listener dump. This is opened by pressing F11 or by going (Menu mAxscript/Maxscript listener) or in the lower left corner right click. Can you still post this, this would help. It should meantion the error in red letters, and some big info about the error.

#19
NTSTR

NTSTR
  • Members
  • 10 messages
Welcome to MAXScript.
-- Error occurred in CutString()
--  Frame:
--   cut: ""
--   out: "W_GSW_GS07a"
--   position: 1
--   instring: "W_GSW_GS07a"
--   called in i loop
--  Frame:
--   TFace: undefined
--   TVertsArrayCh1: undefined
--   mat: W_GSW_GS07a_0:Dragon_Age_Material
--   VertexCount: 5330
--   FacesArray: undefined
--   currentFace: undefined
--   CurrentMapFaceCh1: undefined
--   face: undefined
--   HasMap2: false
--   TVertsArrayCh2: undefined
--   MetaDataPartsLightmappable: MetaDataPartsLightmappableStruct meshName:undefined value:undefined LightmapSize:undefined LightmapUVWChannel:undefined LightmapUVWChannelIndex:undefined
--   MeshObj: $Editable_Mesh:W_GSW_GS07a01 @ [0.021133,-0.000374,-2.934742]
--   CurrentFaceIndex: undefined
--   MetaDataPartsGeometry: MetaDataPartsGeometryStruct meshName:undefined value:undefined
--   TiedFaces: undefined
--   MetaDataPartsRenderable: MetaDataPartsRenderableStruct meshName:undefined value:undefined
--   Blend: undefined
--   ChildMetaData: undefined
--   HasSkinMod: false
--   TiedTVertsCh2: undefined
--   TVert: undefined
--   HasMap1: true
--   CurrentMapFaceCh2: undefined
--   DAOStreamData: DAOStreamDataStruct position:true normal:true TexCoord0:true TexCoord1:false Binormal:true tangent:true Color0:false BlendWeights:false BlendIndices:false
--   i: 1
--   InvMeshTransform: (matrix3 [1,0,0] [0,1,0] [0,0,1] [-0.0211328,0.000374107,2.93474])
--   FaceCount: 6686
--   BWMesh: BWMeshStruct verts:#() TVerts1:#() TVerts2:#() Norms:#() PlusVerts:#() PlusTVerts1:#() PlusTVerts2:#() PlusNorms:#() faces:#() FacesPerVert:#() PlusFacesPerVert:#() VertCounter:0 PlusCounter:0 VertMapping:#()
--   TiedTVertsCh1: undefined
--   FaceData: #()
--   called in ExportMSHChilds()
--  Frame:
--   Stream:
--   MetaData: MetaDataStruct lastExportedOn:undefined lastExportedBy:undefined lastExportedFrom:undefined ModelMeshData:#() PhysicsMesh:#() MaterialObject:#() GameResource:undefined type:undefined title:undefined description:undefined LevelType:undefined LevelStyle1:undefined LevelStyle2:undefined LevelModularSystem:undefined LevelLODLevels:undefined CharacterType:undefined CharacterStyle1:undefined CharacterStyle2:undefined PartsList:#() PartsLightmappable:#() PartsGeometry:#() PartsRenderable:#()
--   Progress: #(1, 1)
--   objs: #children($W_GSW_GS07a, $W_GSW_GS07a01)
--   called in i loop
--  Frame:
--   TFace: undefined
--   TVertsArrayCh1: undefined
--   mat: undefined
--   VertexCount: undefined
--   FacesArray: undefined
--   currentFace: undefined
--   CurrentMapFaceCh1: undefined
--   face: undefined
--   HasMap2: undefined
--   TVertsArrayCh2: undefined
--   MetaDataPartsLightmappable: undefined
--   MeshObj: undefined
--   CurrentFaceIndex: undefined
--   MetaDataPartsGeometry: undefined
--   TiedFaces: undefined
--   MetaDataPartsRenderable: undefined
--   Blend: undefined
--   ChildMetaData: undefined
--   HasSkinMod: undefined
--   TiedTVertsCh2: undefined
--   TVert: undefined
--   HasMap1: undefined
--   CurrentMapFaceCh2: undefined
--   DAOStreamData: undefined
--   i: 1
--   InvMeshTransform: undefined
--   FaceCount: undefined
--   BWMesh: undefined
--   TiedTVertsCh1: undefined
--   FaceData: undefined
--   called in ExportMSHChilds()
--  Frame:
--   Stream:
--   MetaData: MetaDataStruct lastExportedOn:undefined lastExportedBy:undefined lastExportedFrom:undefined ModelMeshData:#() PhysicsMesh:#() MaterialObject:#() GameResource:undefined type:undefined title:undefined description:undefined LevelType:undefined LevelStyle1:undefined LevelStyle2:undefined LevelModularSystem:undefined LevelLODLevels:undefined CharacterType:undefined CharacterStyle1:undefined CharacterStyle2:undefined PartsList:#() PartsLightmappable:#() PartsGeometry:#() PartsRenderable:#()
--   Progress: #(1, 1)
--   objs: #($Dummy:GOB @ [0.000000,0.000000,0.000000])
--   called in ExportModel()
--  Frame:
--   Stream:
--   IsReady: true
--   MetaData: MetaDataStruct lastExportedOn:"2010-6-21 23:48:36" lastExportedBy:"Author" lastExportedFrom:"Eshme's Model and Animation Import Export" ModelMeshData:#("W_GSW_GS07a_0.MSH") PhysicsMesh:#("W_GSW_GS07a_0.PHY") MaterialObject:#() GameResource:undefined type:undefined title:undefined description:undefined LevelType:undefined LevelStyle1:undefined LevelStyle2:undefined LevelModularSystem:undefined LevelLODLevels:undefined CharacterType:undefined CharacterStyle1:undefined CharacterStyle2:undefined PartsList:#() PartsLightmappable:#() PartsGeometry:#() PartsRenderable:#()
--   GOB: GOBStruct objname:"GOB" ObjExtension:"" IsGOB:true
--   ChildMetaData: undefined
--   CMD: ""
--   MMHFile: "W_GSW_GS07a_0"
--   MSHFile: "W_GSW_GS07a_0"
--   called in btn_export.pressed()
--  Frame:
>> MAXScript Rollout Handler Exception: -- Runtime error: replace end out of range: 0 <<

#20
Eshme

Eshme
  • Members
  • 756 messages
AH problem solved. Replace end out of range : 0! not 28 that makes sense. 0 is when you name it plain GOB it has nothing to cut away.

Must be an improvement made after max 7.