OCL_Improved

Information, How-to's, and discussion about mod'ing Master of Orion II.
Geenimetsuri
Posts:2
Joined:Thu Dec 27, 2012 4:30 am

Postby Geenimetsuri » Thu Dec 27, 2012 4:38 am

Hi, I'm not sure if this is the right place but there's a feature in OCLImproved.

I made a mod with OCLplus with 10x the research costs which extracts and imports just fine.

However, if I extract the orion2v140.exe which I created with OCLplus using OCLImproved the tech costs in the extracted file roll over at 65536 (ie. 2^16), meaning a tech cost of 75000 goes down to 9464.

Although, I'm not sure if MoO can handle 32 bit research costs as I haven't reached the 65k+ techs in the (modded) game myself.


edit:
After bit of research, it turns out that if you used OCLplus to up the RP costs to >65 k then running OCLimproved doesn't actually modify the part that's above 65 k.


So for example 150 000 rp cost works like this...

OCLplus
150000 -> f0 49 02

OCLImproved on 150000 OCLplus export:
18928 -> f0 49 02
18927 -> ef 49 02

So high RP costs should work as expected.

edit 2:
Found an interesting thing...

If I extract OCLPlus generated exe file to a text file and then re-import it there are some binary differences (in 3 'blocks'):

Code: Select all

fc ocl_v140.exe ocl_improved_v140.exe 00164665: 03 04 // ??? 00164666: D1 C1 00164669: 80 01 // Seems to be some sort of shift 0016466A: BE 80 0016466B: 56 BE 0016466C: 01 56 0016466D: 00 01 00164670: 74 00 // Seems to be some sort of shift 00164671: 0A 74 00164672: 8D 09 00164673: 43 8D 00164674: 01 43 00164675: 99 01 00164676: 2B 99 // Acts odd here 00164677: C2 90
What's that all about and does it have an impact on the game play?

Nirran
Posts:80
Joined:Wed Dec 01, 2010 7:35 pm
Location:california
Contact:

Postby Nirran » Mon Jan 28, 2013 6:37 pm

this is odd i missed that post for that long,looking into it now

edit : this is my results from a few hours testing :

extracted with oclplus from vanilla 140.23 and wrote with ocl_imp and no edits,binary comparison reported 0 differences,however ocl_imp crops the numbers to 16 bit(prolly what you experienced)

added code to ocl_imp for 32 bit numbers,wrote extracted all looked good until i started moo2,in which it showed the correct values on turn one,but then crashed when clicking turn(the number was bit 24)

hope that helps

edit : further testing shows that some values above 16 bit are read and usable,for now i've left the 32 bit functions enabled,if it crashes you know that is too high :P


Nirran
Fastest way for evil to triump is for good people to do nothing

dis astranagant
Posts:1
Joined:Mon Feb 04, 2013 6:23 pm

Postby dis astranagant » Mon Feb 04, 2013 6:29 pm

Is "extract game information and load data file" supposed to leave me with all values zeroed out? The wording implies that it would stuff all the current settings from the game files in there for me.


e: oops, used -dos instead of -140

Nirran
Posts:80
Joined:Wed Dec 01, 2010 7:35 pm
Location:california
Contact:

Postby Nirran » Mon Feb 25, 2013 7:16 pm

multiple updates later : new version on my site,several new sections,new method of displaying in OCL GUI,over-haul some of the code in OCL_Imp

uploaded


Nirran
Fastest way for evil to triump is for good people to do nothing

Deflaktor
Posts:8
Joined:Sun May 06, 2012 4:37 pm

Postby Deflaktor » Wed Apr 10, 2013 2:04 pm

The newest version corrupts my exe file
EDIT: the first byte of the exe file gets overritten for some reason and corrupts the exe. reverting the change makes the exe executable again.

Nirran
Posts:80
Joined:Wed Dec 01, 2010 7:35 pm
Location:california
Contact:

Postby Nirran » Wed Apr 10, 2013 6:21 pm

ty for report,i will work on it
Fastest way for evil to triump is for good people to do nothing

Maskk
Posts:19
Joined:Fri Jul 29, 2011 6:48 pm

Postby Maskk » Fri Apr 12, 2013 2:02 am

Corrupted EXE

Spent forever modding all over the place.

I discovered that the Technologies are very twitchy; I found I could only change 1 at a time to a different field before they would start overwriting eachother (e.g. I'd save down Uridium Fuel cells in say Tech Field 10, and as a result it would save over tech # 10... I had to reload the file multiple times to wipe over the old ones).

But I got the changes I want all in my file.

And when I went to load onto the EXE it corrupted MOO2 :(
So now I can't play my game and my last couple nights of dorking out can't be played. (I can't figure out where to revert it)

All help appreciated.

Deflaktor
Posts:8
Joined:Sun May 06, 2012 4:37 pm

Postby Deflaktor » Sat Apr 13, 2013 3:42 pm

The newest version corrupts my exe file
EDIT: the first byte of the exe file gets overritten for some reason and corrupts the exe. reverting the change makes the exe executable again.
Open up your exe file with a hex editor and change the first byte to 4D

Nirran
Posts:80
Joined:Wed Dec 01, 2010 7:35 pm
Location:california
Contact:

Postby Nirran » Mon Apr 22, 2013 4:46 am

i've released a new version,fixes the corruption,will look into the twitchy tech fields(think i know why)

edit : i changed 30 consecutive lines in technologies,didnt have a problem

Nirran
Fastest way for evil to triump is for good people to do nothing

Maskk
Posts:19
Joined:Fri Jul 29, 2011 6:48 pm

Postby Maskk » Tue Apr 23, 2013 10:14 pm

i've released a new version,fixes the corruption,will look into the twitchy tech fields(think i know why)

edit : i changed 30 consecutive lines in technologies,didnt have a problem

Nirran
Hi Nirran,

Double checking that the new version is simply what is found on:
http://moo2.nirran.com/ and download OCL_Improved

When I tried to load the txt file I had created: I received the error.
2nd Comma Not Found - Line number 1649


Thanks again for creating this tool; I'm excited about having this level of ability to edit the game.

Nirran
Posts:80
Joined:Wed Dec 01, 2010 7:35 pm
Location:california
Contact:

Postby Nirran » Thu Apr 25, 2013 7:56 pm

Yea http://moo2.nirran.com/


All new versions will make the txt file not load,re-extract with new version

Nirran
Fastest way for evil to triump is for good people to do nothing

mooFerret
Posts:1
Joined:Fri Apr 26, 2013 5:03 pm

Postby mooFerret » Fri Apr 26, 2013 5:06 pm

Hello, I am trying to extract the game data from the "good old games" version or it. It seems to just mount to dosBox.

I am running into a problem where the game data extracted doesn't load because of/and the txt file is huge (700 MB to 10 GB).

I've tried to trouble shoot it, but to no avail and do not see a help thread.

Maskk
Posts:19
Joined:Fri Jul 29, 2011 6:48 pm

Oops

Postby Maskk » Wed May 01, 2013 11:48 pm

Yea http://moo2.nirran.com/


All new versions will make the txt file not load,re-extract with new version

Nirran
Hi Nirran,

When using the current version of this, when I hit 'extract game information and load data file' it comes back with an error 'Ooops cannot load negative numbers'

What do I do now?

User avatar
Overlord2
Posts:661
Joined:Wed Jun 13, 2007 5:25 pm

Re: Oops

Postby Overlord2 » Thu May 02, 2013 1:20 pm

When using the current version of this, when I hit 'extract game information and load data file' it comes back with an error 'Ooops cannot load negative numbers'
Such error comes when you try to extract 1.40 but have pointed version as dos.

Maskk
Posts:19
Joined:Fri Jul 29, 2011 6:48 pm

Re: Oops

Postby Maskk » Thu May 02, 2013 9:29 pm

When using the current version of this, when I hit 'extract game information and load data file' it comes back with an error 'Ooops cannot load negative numbers'
Such error comes when you try to extract 1.40 but have pointed version as dos.
  • Thanks! I have it working now.


Return to “Game Modifications”

Who is online

Users browsing this forum: No registered users and 24 guests