adding text files for OOB encyclopaedia

Trade tips and tricks, workarounds maps, and graphics mods. Why certain scenarios or campaigns are favorites, or how to improve stinkers. Attach your work to share/critique.

Moderator: MOD_SPWaW

Post Reply
User avatar
omegaall
Posts: 317
Joined: Mon Jul 28, 2003 4:37 pm

adding text files for OOB encyclopaedia

Post by omegaall »

This issue has been raised I think before. How do you add a text file to the OOB entry. The OOB editor that comes with the game, olny allows entry of a value up to 255 for a text file. If teh unit has an LMB of 7702 the text file entry in teh editor should be the same eg 2207. When I put in 2207 and save it I end up getting 155. Wrong text file.

OK so how is it done.. that is add the correct file entry to the unit in the OOB?
User avatar
KG Erwin
Posts: 8366
Joined: Tue Jul 25, 2000 8:00 am
Location: Cross Lanes WV USA

RE: adding text files for OOB encyclopaedia

Post by KG Erwin »

The first thing you need to do is create the text file for the unit, and save it in the ENC folder using the format ENC7702 or whatever. After this , you can open the editor and make sure that the LBM number and the text number are the same. Also, be careful not to overwrite an existing ENC file, unless that's your intention.
Image
User avatar
omegaall
Posts: 317
Joined: Mon Jul 28, 2003 4:37 pm

RE: adding text files for OOB encyclopaedia

Post by omegaall »

Besides what you have saif Glen, the problem goes beyond that.

OK so I have teh required ENC file in the ENC directory.

Now the LBM file number is 7044. So in teh ENC diirrectory there is a file called ENC7044.txt, in the editor I add the same number,7044, to the text entry box., ref attached pic.

Now after adding this value I go to file save it and quit. When I reopen the editor the value for the text file is NOT 7044.

What I added initally in binary form is an unsigned word/unsigned int , ie 7044.
7044 is 1101110000100
What I end up with is the value 132 which is:
132 is 10000100

The value has been cut in half. The editor is treating it as an unsigned byte/Unsigned char in C
So this aspect of the editor is not working for user input.


So simply there is a BUG in the editor. It can read the correct value but it can not write the correct value. So the write routine has a problem in the code.
I also suspect that the ediror only writes back the changed values not the whole record, or some version of thsi depending on teh actual structure of the OOB file.

Now the OOB editor does have the name Michael Wood attached to it so he may be able to asist in explaining the process.





Image
Attachments
OOBED.jpg
OOBED.jpg (54.03 KiB) Viewed 353 times
User avatar
KG Erwin
Posts: 8366
Joined: Tue Jul 25, 2000 8:00 am
Location: Cross Lanes WV USA

RE: adding text files for OOB encyclopaedia

Post by KG Erwin »

You are right. I tried adding a new ENC file for the USMC BAR Squad, which had a text file value of "0". I changed it to match the LBM I use, which is 6092. Sure enough, when I re-open the editor, the text value displays as 204.

However, I simply changed the ENC entry to ENC0204, and the new text now displays in the game encyclopedia.

This won't work for you, as a text file for 0132 already exists. How odd.
Image
User avatar
omegaall
Posts: 317
Joined: Mon Jul 28, 2003 4:37 pm

RE: adding text files for OOB encyclopaedia

Post by omegaall »

As it is withy this little problem it is not possible to map corectly the ECN entry to the LBM.

Unfortunately both OOB editors have problems with the entry of this value. The standard one does not work and fred's OOBDmp at prersent does not allow for this at all.

User avatar
Major Destruction
Posts: 792
Joined: Thu Aug 10, 2000 8:00 am
Location: Canada
Contact:

RE: adding text files for OOB encyclopaedia

Post by Major Destruction »

For the v8.3 edit Ruxius edited the Italian ENC txt values using a hex editor.

Here is a copy of his notes. I hope it helps you to solve your problem.

I followed the hidden rule to choose a txt file name according to related unit's LBM name...that should help to keep text in order
since LBM tends to be unique. Despite my best efforts this was not possible since OOB editor was affected by a bug which prevented the user to input larger values than 255 into txt field.

To try overcoming this drawback I succesfully changed the IT OOB file manually, by using an hex editor program. In other words I loaded the OOB file into an hex editor which can display bytes which form data inside the file and changed them manually byte per byte
to input directly into the file values I couldn't introduce by bugged OOBeditor. I did so for each new txt value I wanted to be included into Encyclopedia output.

That required a not-easy-work since hex editor only shows sequences of bytes..

I had to understand which bytes IT units was starting and ending from !

OOB DUmb Program helped me to do this becuase it displayed OOB file in the same order that bytes appeared into hex editor...
at this point I only had to locate same kind of data values to learn where I could start to edit inside the IT OOB file....
I was reaaaaaaally happy when I found I could step OVER the OOBeditor bug and change the txt field the way I needed..WOW that's the thriumph of the Human Will ! :))

So I completed my work..all files finally had same LBM and txt number for each units regardless of being larger than 255 ! Unfortunately ONLY ONE unit betrayed me !

It was the P26/40..something weird happened..weapon of this tank showed a x11 suffix next to its name...I was not sure this followed my editing of OOB file (maybe the hex editor when saving changed length or the hell knows which other..) or the attempt to fully use all
italian slots..indeed some of these were empty...since the crowded italian units I was surprised to still find out empty slots...was that the reason ? (the slot 006 is still empty...hint hint hint!) in any case when a P26 was choosen inside the game and used to fire, Spwaw
crashed each time..Hex editor changes was pretty clean...I could see data at the right place, no corruption, no trace of a x11 data entry anywhere..where that damned information was coming from ?

so no reason for this was clear..
I sadly had to give up, time was running low for delivering the patch...and actually I am not sure Matrix had enough time left to look for OOB editor bug, the bug which got the final victory... despite all efforts... :((
Well this was the story..I hope you liked it
:))

JUST IN CASE PLEASE REMEMBER IT Data for enc starts from byte 00007910 (hexadecimal) of IT OOB file
They struggled with a ferocity that was to be expected of brave men fighting with forlorn hope against an enemy who had the advantage of position......knowing that courage was the one thing that would save them.

Julius Caesar, 57 BC
User avatar
KG Erwin
Posts: 8366
Joined: Tue Jul 25, 2000 8:00 am
Location: Cross Lanes WV USA

RE: adding text files for OOB encyclopaedia

Post by KG Erwin »

I knew that Ruxius did a wonderful job with the Italian ENC additions, but I never realized what he had to do to make it work. I added only a couple of texts for the USMC, but these already had text values to match the LBMs.

Thanks for that insight, Major D.
Image
User avatar
omegaall
Posts: 317
Joined: Mon Jul 28, 2003 4:37 pm

RE: adding text files for OOB encyclopaedia

Post by omegaall »

Thanks.

I knew what the propblem was, how it can be overcome by using a hex editor and where to find the necessary bytes to alter.

What I was really raisuing is the fact that this error has been with the OOB editor for a while and should have been corrected. They have the code and it should only take a short time to fix.

Not everyone can jump in and use a hex editor. Also with a PC the bytes are reversed so if you are a stranger to bits and Bytes you will get totally stuck.

Also if you look at the various OOB editors: SpObedit, the one supplied by MARTIX as The Editor; Fred's OOBDmp and StuKOBHack to list 3, only SPObedit has the reference to the ENC files listed. That also has an error in its operation. So for most changing this specific value is a problem.
User avatar
omegaall
Posts: 317
Joined: Mon Jul 28, 2003 4:37 pm

RE: adding text files for OOB encyclopaedia

Post by omegaall »

As a point of interest on this small problem, as I am not sure when/if it can be resolved and Fred has not as yet made changes to his editor for this.

I have started to write a simple one that covers OOB editing and will provide access to change the encyclopaedia entry. Well it will be going when I get some file writing issues resolved..[:@] Nothing like a byte out of place to wreck things..
User avatar
Mike Wood
Posts: 1424
Joined: Wed Mar 29, 2000 4:00 pm
Location: Oakland, California
Contact:

RE: adding text files for OOB encyclopaedia

Post by Mike Wood »

Hello...

Was bug. First have heard of problem. Fixed. Will release with patch.

Have Fun...

Michael Wood
ORIGINAL: omegaall

This issue has been raised I think before. How do you add a text file to the OOB entry. The OOB editor that comes with the game, olny allows entry of a value up to 255 for a text file. If teh unit has an LMB of 7702 the text file entry in teh editor should be the same eg 2207. When I put in 2207 and save it I end up getting 155. Wrong text file.

OK so how is it done.. that is add the correct file entry to the unit in the OOB?
User avatar
Mike Wood
Posts: 1424
Joined: Wed Mar 29, 2000 4:00 pm
Location: Oakland, California
Contact:

RE: adding text files for OOB encyclopaedia

Post by Mike Wood »

Hello...

Can explain process. Was told by some Matrix suit to limit the stored value to 0-255, so cast value, when stored:

WriteToDisk( (unsigned char) gUnit.textValue );

Database storage value is unsigned short int, so removing cast fixes problem. Text files were not used, although coded for them, in first release, so problem never arose.

Hope this Helps...

Michael Wood
ORIGINAL: omegaall
...Now the OOB editor does have the name Michael Wood attached to it so he may be able to asist in explaining the process.
User avatar
omegaall
Posts: 317
Joined: Mon Jul 28, 2003 4:37 pm

RE: adding text files for OOB encyclopaedia

Post by omegaall »

HI Mike,
Thanks for that. I though it was something simple, but not that simple.

So I gather the philosophy from this is don't listen to suits.

ORIGINAL: Mike Wood

Hello...

Can explain process. Was told by some Matrix suit to limit the stored value to 0-255, so cast value, when stored:

WriteToDisk( (unsigned char) gUnit.textValue );

Database storage value is unsigned short int, so removing cast fixes problem. Text files were not used, although coded for them, in first release, so problem never arose.

Hope this Helps...

Michael Wood
ORIGINAL: omegaall
...Now the OOB editor does have the name Michael Wood attached to it so he may be able to asist in explaining the process.
Post Reply

Return to “SP:WaW Scenarios/Campaigns”