Entity 2.1.24

A wealth of applications with which you will need to mod Halo 2.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.21

Post by troymac1ure »

nvm I was completely lost. You posted that right after the Git update, so I thought you meant building Entity's code, not maps. Okay, I'll look into that too..
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

Okay, found my issue:

Code: Select all

                // Update all information for children
                refreshReflexiveListRecursive(
                parentReflexive,
                meta.offset
                + parentReflexive.baseOffset
                + parentReflexive.chunkSelected * parentReflexive.reflexive.chunkSize
                );
When updating children reflexives, parentReflexive.baseOffset is already calculated to contain the selected reflexives offst, so adding parentReflexive.chunkSelected * parentReflexive.reflexive.chunkSize in was doubling the offset of each reflexive. (compared mouse hover offsets of Entity new version to old version and found reflexives 0,1,2 were the same as 0,2,4).
Will send the fix down the line hopefully tonight. Just going to look into a couple of other things first.

EDIT: New version posted. Not all of what I wanted, but the last version had a couple big bugs, so hopefully the rest is just small issues and additions now.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

Great thanks, Does the new version fix the build problems?
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

Didn't touch anything with that yet, so most likely not. I will try building DoorM4ns map through each version and see where it first broke at and analyze the changes when I get a chance next.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

I never new that entity couldn't handle building raw data into maps with more than one sbsp.

I'm currently trying to fix this in an older source, and it is proving to be a royal pain in the ass >_>
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Entity 2.1.22

Post by JacksonCougar »

What's the issue?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

Well I've made a fair bit of progress, but atm the problem is that the BSP raw pointers are not being updated. But the really werid thing is, they never seem to get updated? Even when there is only 1 sbsp...

But the result is that the bsp viewer crashes when I try to load it, so I'm at a bit of a loss really, I'm gonna try forcing them to be updated but I feel I might be going in the wrong direction with that...
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Entity 2.1.22

Post by JacksonCougar »

where is the bsp pointer?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

Which bsp pointer are you referring to?

I found where the raw pointers are getting written :roll: so hopefully I'll be able to make some progress now...
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Entity 2.1.22

Post by JacksonCougar »

It was a serious question, I forgot where the actual pointer the the bsp model is stored lul
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

The meta pointer is in a reflexive in the scnr.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

I've almost got it working, added tags, no errors, sbsp viewer works, map loads, I hear opening music for a second, then it freezes.

Any ideas?

Edit: Interesting development, when I nulled the AI, Scripts and Cinematics the map loaded...
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

XZodia wrote:I've almost got it working, added tags, no errors, sbsp viewer works, map loads, I hear opening music for a second, then it freezes.

Any ideas?

Edit: Interesting development, when I nulled the AI, Scripts and Cinematics the map loaded...
Hmm. A bad script? Do all three need to be disabled?

Also, a temporary patch for loading obfuscated maps until next release. Just overwrite the HaloMap.dll in the Entity directory:
HaloMap.rar
HaloMap v1.6
(215.65 KiB) Downloaded 460 times
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

troymac1ure wrote:Hmm. A bad script? Do all three need to be disabled?
The odd thing is, I haven't changed the scripts, ai or cinematics.
I thought maybe the xbox was running out of memory so I spoke to xbox7887 he gave me a script which would free up some memory but it didnt help.

However, I ran the map through uber anaylse and its a mess, ive got coco model in my bsp raw, so I'm amazed it even loads lol....I think this maybe my problem.

Edit: After closer inspection it appears that entity doesn't handle coco model, as it only appears in singleplayer maps.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

I don't know if you've already fixed this Tory, but there is/was a bug pre-loading the unicode strings.
Because it happens on a background thread, it would often confuse the rest of the program giving errors because the map is already open.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

Not sure. I never had issues with that, but there is a chance if you open a map and very quickly load the Unicode box it may cause some errors due to the strings not finished being loaded. What version(s) did you experience the errors with?
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

2.1.22, Mostly it happened when I was debugging, but it happened a few times normally as well.
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

Looked into this. The String loading never opens the map. It uses the already loaded map to build the strings selection form while the MapForm is being created. At this point the map has already been closed and both threads are just accessing information from the Map class. Are you sure it's the MEStringsSelector that is causing the error?

Also, a known 'bug' is that in debug mode: I have a routine that turns reflexives of 1 byte size into a textbox in the parent form (Used for looking at stuff like scripts that are otherwise just visible in byte form). In large reflexives (such as SBSP, MOPP Data) it will run out of memory and not show anything.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

viewtopic.php?f=10&t=1019&hilit=PMI#p11932
JacksonCougar wrote:Does this have a PMI?
JacksonCougar wrote:I'll fork it and write the code in and you can merge the fork back in: how's that sound?
Image

:roll:
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

troymac1ure wrote:Looked into this. The String loading never opens the map. It uses the already loaded map to build the strings selection form while the MapForm is being created. At this point the map has already been closed and both threads are just accessing information from the Map class. Are you sure it's the MEStringsSelector that is causing the error?
Fairly sure, the error occurs because LoadStringsBackgroundWorker and OpenMap run at the same time or something...

I believe this piece of code is to blame:

Code: Select all

                
                // Wait for up to 10 seconds for map to close (if open) to avoid conflicts)
                int count = 100;
                while (map.isOpen)
                {
                    Thread.Sleep(100);

                    // If time has elapsed, just forget the pre-loading of strings
                    if (count-- <= 0)
                        return;
                }
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
JacksonCougar
Huurcat
Posts: 2460
Joined: Thu Dec 06, 2007 11:30 pm
Location: Somewhere in Canada

Re: Entity 2.1.22

Post by JacksonCougar »

@Troy
That's bad source. I'll fork in the builder in my new project once I sort out some things.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

What's bad about the code? I never work with threads.
The map should be closed by the time this is run, but just in case I have a max 10 second wait. if it still doesn't load, then it just waits until the first time MEStringSelector is accessed.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

Well put simply, yes it will work 95% of the time. Unfortunately, threading is more complicated than that.
Its also a really bad idea to access the same stream in different threads, in case they both try to read from it at the same time.

Really, there shouldn't be any need for a thread here anyway, or the thread should be launched after you read the data from the map on the main thread...
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Entity 2.1.22

Post by troymac1ure »

From what I quickly looked at last night, I think that neither threads access the stream after this is initiated. The String loader takes previously loaded strings and builds a form and listbox from the strings. I am going to look again to make sure that it's not accessing the stream.
User avatar
XZodia
Staff
Posts: 2208
Joined: Sun Dec 09, 2007 2:09 pm
Location: UK
Contact:

Re: Entity 2.1.22

Post by XZodia »

The bsp viewer garbles AI Squads >_<
Image
JacksonCougar wrote:I find you usually have great ideas.
JacksonCougar wrote:Ah fuck. Why must you always be right? Why.
Post Reply