Re: Entity 2.1.22
Posted: Fri Jul 25, 2014 11:43 pm
I found ut.Read() does access the map file stream. I will look into a fix.
Archive of Halo 2 modding
https://www.remnantmods.com/forums/
https://www.remnantmods.com/forums/viewtopic.php?f=10&t=1325
I've never looked at the AI Squads before. How is it garbling them?XZodia wrote:The bsp viewer garbles AI Squads >_<
Code: Select all
if (offset > tempb.size) offset = tempb.size;
Code: Select all
int tempsize = tempb.size - offset;
Code: Select all
#This file contains all the boundry aligned reflexives
BIPD: <struct name="Dead Sphere Shapes" offset="644" visible="true" size="128" padalign="16">
COLL: <struct name="3D Nodes" offset="4" visible="true" size="8" padalign="8">
COLL: <struct name="Planes" offset="12" visible="true" size="16" padalign="16">
COLL: <struct name="Leaves" offset="20" visible="true" size="4" padalign="16">
COLL: <struct name="2D Nodes" offset="36" visible="true" size="16" padalign="16">
COLL: <struct name="Surfaces" offset="44" visible="true" size="8" padalign="8">
COLL: <struct name="Edges" offset="52" visible="true" size="12" padalign="12">
COLL: <struct name="Vertices" offset="60" visible="true" size="16" padalign="16">
LTMP: <struct name="Section Palette" offset="8" visible="true" size="1024" padalign="64">
PHMO: <struct name="Rigid Bodies" offset="56" visible="true" size="144" padalign="16">
PHMO: <struct name="Spheres (shape)" offset="72" visible="true" size="128" padalign="16">
PHMO: <struct name="Pills (shape)" offset="88" visible="true" size="80" padalign="16">
PHMO: <struct name="Boxes (shape)" offset="96" visible="true" size="144" padalign="16">
PHMO: <struct name="Polyhedra or Phmo parts" offset="112" visible="true" size="256" padalign="16">
PHMO: <struct name="MOPPS" offset="168" visible="true" size="1" padalign="16">
PHMO: <struct name="Permutations" offset="4" visible="true" size="12" padalign="4">
PHMO: <struct name="Rigid Bodies" offset="4" visible="true" size="2" padalign="4">
PHMO: <struct name="Nodes" offset="200" visible="true" size="12" padalign="4">
PRT3: <struct name="Unknown139" offset="44" visible="true" size="4" padalign="4">
SBSP: <struct name="Planes" offset="8" visible="true" size="16" padalign="16">
SBSP: <struct name="BSP2D Nodes" offset="32" visible="true" size="16" padalign="16">
SBSP: <struct name="Collsion Model" offset="56" visible="true" size="16" padalign="16">
SBSP: <struct name="Vertices" offset="28" visible="true" size="12" padalign="16">
SBSP: <struct name="Index Reorder Table" offset="168" visible="true" size="1" padalign="16">
SBSP: <struct name="3D Nodes" offset="112" visible="true" size="8" padalign="8">
SBSP: <struct name="Planes" offset="120" visible="true" size="16" padalign="16">
SBSP: <struct name="BSP 2D Nodes" offset="144" visible="true" size="16" padalign="16">
SBSP: <struct name="Surfaces" offset="152" visible="true" size="8" padalign="8">
SBSP: <struct name="MOPP Code" offset="496" visible="true" size="1" padalign="16">
SCNR: <struct name="Script String Data" offset="432" visible="true" size="1" padalign="4">
SCNR: <struct name="Scenario Kill Triggers" offset="560" visible="true" size="2" padalign="4">
SHAD: <struct name="Unknown" offset="44" visible="true" size="2" padalign="4">
SHAD: <struct name="Unknown" offset="60" visible="true" size="2" padalign="4">
SHAD: <struct name="Unknown" offset="76" visible="true" size="10" padalign="4">
SHAD: <struct name="Shader Effects" offset="84" visible="true" size="20" padalign="4">
SHAD: <struct name="Unknown" offset="116" visible="true" size="4" padalign="4">
SHAD: <struct name="Resources" offset="44" visible="true" size="8" padalign="4">
STEM: <struct name="Levels Of Detail" offset="0" visible="true" size="10" padalign="4">
STEM: <struct name="Layers" offset="8" visible="true" size="2" padalign="4">
STEM: <struct name="Passes" offset="16" visible="true" size="10" padalign="4">
STEM: <struct name="Implementations" offset="24" visible="true" size="6" padalign="4">
STEM: <struct name="Remappings" offset="32" visible="true" size="4" padalign="4">
VEHI: <struct name="Havok Vehicle Physics" offset="760" visible="true" size="672" padalign="16">
I'd recommend using the ones I posted here, and cross referencing them with the .cs ones I posted a long time ago. These will have the correct alignment intervals. The alignments I have in the cs ones are mostly correct but there are some that I either over padded or put padding where padding wasn't needed just to be safe. I've also made changes here and there in my own plugins recently after working on more bugs.troymac1ure wrote:So when scanning tags with [Parsed], the tag size is calculated by the main size + size of each reflexive * reflexive count.
When scanned without [Parsed] checked, it just uses the actual tag size from the index.
With [Parsed], any data not addressed by the plugins is ignored, therefore causing size differences in tags when reflexives are not listed in the plugin or when reflexives are padded.
What I have added to Entity is an additional plugin field called "padalign". I have re-tansferred Grim's plugins from his .CS files to include this update and will upload them to the plugin server on release.
Having tried this has already corrected at least 2 plugin types (VEHI and SCNR).
EDIT:
Here is a list of aligned reflexives according to Grim's work. I know it doesn't show the parent tags, but I figure it should be easy enough to find these and add the padalign attribute to other plugins.
Code: Select all
#This file contains all the boundry aligned reflexives BIPD: <struct name="Dead Sphere Shapes" offset="644" visible="true" size="128" padalign="16"> COLL: <struct name="3D Nodes" offset="4" visible="true" size="8" padalign="8"> COLL: <struct name="Planes" offset="12" visible="true" size="16" padalign="16"> COLL: <struct name="Leaves" offset="20" visible="true" size="4" padalign="16"> COLL: <struct name="2D Nodes" offset="36" visible="true" size="16" padalign="16"> COLL: <struct name="Surfaces" offset="44" visible="true" size="8" padalign="8"> COLL: <struct name="Edges" offset="52" visible="true" size="12" padalign="12"> COLL: <struct name="Vertices" offset="60" visible="true" size="16" padalign="16"> LTMP: <struct name="Section Palette" offset="8" visible="true" size="1024" padalign="64"> PHMO: <struct name="Rigid Bodies" offset="56" visible="true" size="144" padalign="16"> PHMO: <struct name="Spheres (shape)" offset="72" visible="true" size="128" padalign="16"> PHMO: <struct name="Pills (shape)" offset="88" visible="true" size="80" padalign="16"> PHMO: <struct name="Boxes (shape)" offset="96" visible="true" size="144" padalign="16"> PHMO: <struct name="Polyhedra or Phmo parts" offset="112" visible="true" size="256" padalign="16"> PHMO: <struct name="MOPPS" offset="168" visible="true" size="1" padalign="16"> PHMO: <struct name="Permutations" offset="4" visible="true" size="12" padalign="4"> PHMO: <struct name="Rigid Bodies" offset="4" visible="true" size="2" padalign="4"> PHMO: <struct name="Nodes" offset="200" visible="true" size="12" padalign="4"> PRT3: <struct name="Unknown139" offset="44" visible="true" size="4" padalign="4"> SBSP: <struct name="Planes" offset="8" visible="true" size="16" padalign="16"> SBSP: <struct name="BSP2D Nodes" offset="32" visible="true" size="16" padalign="16"> SBSP: <struct name="Collsion Model" offset="56" visible="true" size="16" padalign="16"> SBSP: <struct name="Vertices" offset="28" visible="true" size="12" padalign="16"> SBSP: <struct name="Index Reorder Table" offset="168" visible="true" size="1" padalign="16"> SBSP: <struct name="3D Nodes" offset="112" visible="true" size="8" padalign="8"> SBSP: <struct name="Planes" offset="120" visible="true" size="16" padalign="16"> SBSP: <struct name="BSP 2D Nodes" offset="144" visible="true" size="16" padalign="16"> SBSP: <struct name="Surfaces" offset="152" visible="true" size="8" padalign="8"> SBSP: <struct name="MOPP Code" offset="496" visible="true" size="1" padalign="16"> SCNR: <struct name="Script String Data" offset="432" visible="true" size="1" padalign="4"> SCNR: <struct name="Scenario Kill Triggers" offset="560" visible="true" size="2" padalign="4"> SHAD: <struct name="Unknown" offset="44" visible="true" size="2" padalign="4"> SHAD: <struct name="Unknown" offset="60" visible="true" size="2" padalign="4"> SHAD: <struct name="Unknown" offset="76" visible="true" size="10" padalign="4"> SHAD: <struct name="Shader Effects" offset="84" visible="true" size="20" padalign="4"> SHAD: <struct name="Unknown" offset="116" visible="true" size="4" padalign="4"> SHAD: <struct name="Resources" offset="44" visible="true" size="8" padalign="4"> STEM: <struct name="Levels Of Detail" offset="0" visible="true" size="10" padalign="4"> STEM: <struct name="Layers" offset="8" visible="true" size="2" padalign="4"> STEM: <struct name="Passes" offset="16" visible="true" size="10" padalign="4"> STEM: <struct name="Implementations" offset="24" visible="true" size="6" padalign="4"> STEM: <struct name="Remappings" offset="32" visible="true" size="4" padalign="4"> VEHI: <struct name="Havok Vehicle Physics" offset="760" visible="true" size="672" padalign="16">
Code: Select all
int nameIndex = temppalette2[tempshort];
if(nameIndex >= 0)
vs.TagPath = map.FileNames.Name[nameIndex];
Been away for a week and now I need some sleep.XZodia wrote:Spent several hours on a wild goose chase, because ME2 doesnt check that a reflexives isnt empty when getting info for indexers...
Noted and added fix to source. Not sure if you were running the newest version, but I had recently added code to narrow down map loading issues (now showed "Error loading Lights" exception)XZodia wrote:Error Loading delta_towers bsp 3.Code: Select all
int nameIndex = temppalette2[tempshort]; if(nameIndex >= 0) vs.TagPath = map.FileNames.Name[nameIndex];
DoorM4n wrote:Also, why is a fresh gemini.map giving me this error when I open the BSP viewer?
http://i.gyazo.com/e236e32c8fddbe379cdfd76ede3a65e0.png
Glad to hear you got the old entity's working. The above is the reason that it throws an error. It has to do with:XZodia wrote:So apparently Entity can't view the 2nd sbsp in New Mombasa?
Appears to be a problem with reading a G8B8 bitmap...
This hack allowed it to load, with no visible problems:Code: Select all
if (offset > tempb.size) offset = tempb.size;
Code: Select all
map.BR.BaseStream.Position = tempr + 72;
Code: Select all
map.BR.BaseStream.Position = tempr + (x * 116) + 72;
When I tried to fix it, there seemed to be a lot more wrong with it than that...troymac1ure wrote:EDIT:
Found this in the AI Squads BSP viewer loading for start positions:should be:Code: Select all
map.BR.BaseStream.Position = tempr + 72;
Code: Select all
map.BR.BaseStream.Position = tempr + (x * 116) + 72;
I don't use the new entity enough to really know all the differences. I can say that in Entity 2.1.14 the RTH feature is excellent in the ME2. In Entity 2.1.15, RTH was broken in the ME2. In the ME(1), the sync to xbox function doesnt work in either 2.1.15 or 2.1.14. Meta save and injection is great in Entity 2.1.14 and Entity 2.1.15. I havent really delved into that in the new Entity. I primarily use Entity 2.1.14. Entity 2.1.15 worked for sound injection--but I believe that also worked in Entity 2.1.14. Also, renaming really fucks up tags if you don't keep thje same length. I have a few tags in my map that went from 30characters to 5 or 10 characters.troymac1ure wrote:So I want the next release to unify the releases. I know alot of you use older versions of my Entity releases for different reasons, but I would like the newest to be the only needed one. What issues do you have that you don't in older releases (such as 2.1.15)?
So far:EDIT:
- * I know that map building was broken, but I reverted the code to 2.1.15.
* Also, I removed the error check for the tag/ident in the SBSP tag which would pop up a warning box.
* I have gone back to having the parsed box un-selected at startup as it causes many issues without perfect plugins (Meta viewing/editing, model extractions, etc).
Found this in the AI Squads BSP viewer loading for start positions:should be:Code: Select all
map.BR.BaseStream.Position = tempr + 72;
Code: Select all
map.BR.BaseStream.Position = tempr + (x * 116) + 72;
I highly recommend against using ME1 as it is there just for keep-sake. I don't work with it anymore.DoorM4n wrote: I don't use the new entity enough to really know all the differences. I can say that in Entity 2.1.14 the RTH feature is excellent in the ME2. In Entity 2.1.15, RTH was broken in the ME2. In the ME(1), the sync to xbox function doesnt work in either 2.1.15 or 2.1.14. Meta save and injection is great in Entity 2.1.14 and Entity 2.1.15. I havent really delved into that in the new Entity. I primarily use Entity 2.1.14. Entity 2.1.15 worked for sound injection--but I believe that also worked in Entity 2.1.14. Also, renaming really fucks up tags if you don't keep thje same length. I have a few tags in my map that went from 30characters to 5 or 10 characters.
Additional: The meta editor 1 just erased 15min of jmad edits after I saved, tested--and worked--and went back into the tag. Entity 2.1.14
What areas do you usually try to delve into when you open the source? I assume you are looking at the newer source that was cleaned up by Prey. It does make it much easier to read now, but some areas are still gibberish to me. I've tried to comment stuff as I go along a bit, but I don't always understand what it's doing and I forget in my own code sometimes.JacksonCougar wrote:I would help with entity, but each time I've opened the source i'm struck by how much I hate the code. Would it be impossible to supplant the entire framework? Maybe not, but at that point you're better off writing a new program.
Code: Select all
private void injectOBJToolStripMenuItem_Click(object sender, EventArgs e)
{
if (folderBrowserDialog.ShowDialog() == DialogResult.Cancel)
{
return;
}
ParsedModel pm = new ParsedModel(ref map.SelectedMeta);
Meta addme = pm.InjectModel(folderBrowserDialog.SelectedPath, map.SelectedMeta);
addme.name += "(new)";
addme.name = GetNameDialog.Show("Choose injection name", "Meta Name:", addme.name, "OK");
ArrayList oi = new ArrayList();
oi.Add(addme);
MapAnalyzer analyze = new MapAnalyzer();
MapLayout layout = analyze.ScanMapForLayOut(map, false);
layout.ReadChunks(map);
Builder build = new Builder();
build.MapBuilder(oi, ref layout, map, false);
map = Map.Refresh(map);
formFuncs.AddMetasToTreeView(map, treeView1, metaView, false);
this.Enabled = true;
MessageBox.Show("Done");
}