OCL_Improved

Information, How-to's, and discussion about mod'ing Master of Orion II.
Maskk
Posts:19
Joined:Fri Jul 29, 2011 6:48 pm

Postby Maskk » Thu May 02, 2013 9:31 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,

Thanks!
I have it working now. I uploaded a file to make sure that it can write to my MOO (before I spend 10+ hours modding this thing this time).

However, 11 lines into technologies, I accidentally saved one down (Cloning Center) with the incorrect number, when I fixed it, Battle Pods had moved and other technologies had corrupted.
So I am going back to editing 2-3 at a time then resaving all the time.

letsdance
Posts:3
Joined:Tue Jun 19, 2012 9:23 am

Postby letsdance » Fri May 03, 2013 9:23 am

i used the GUI and only got error messages (many many "2nd comma not found" until i quit the program). then i moved it into the same folder as the game and now it works. might want to mention the pathing issue somewhere in the readme.

[edit:] just had a closer look at it: awesome.
dance!

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

Postby Maskk » Sun May 05, 2013 1:33 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
Hi Nirran,

Thanks!
I have it working now. I uploaded a file to make sure that it can write to my MOO (before I spend 10+ hours modding this thing this time).

However, 11 lines into technologies, I accidentally saved one down (Cloning Center) with the incorrect number, when I fixed it, Battle Pods had moved and other technologies had corrupted.
So I am going back to editing 2-3 at a time then resaving all the time.
And fail :(

I finished all my edits to the game, and then went to write the file. The game started. I could start a new game, picked my new picks. Chose my team color, and then the game hangs.

I edited almost everything, I'm unsure where to find the problem.

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

Postby Overlord2 » Sun May 05, 2013 9:23 am

Probably you started the game with tactical combat off, while some techs were enabled for AI, which doesn't handle them correctly in strategic games.

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

Postby Maskk » Sun May 05, 2013 12:51 pm

Probably you started the game with tactical combat off, while some techs were enabled for AI, which doesn't handle them correctly in strategic games.
Tactical Combat is definitely on--I just restarted to double check. Its the only way to play :)

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

Postby Overlord2 » Sun May 05, 2013 5:50 pm

Then you have something wrong with techs. Go back to working version and start making the changes one by one to see which one doesn't work.

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

Postby Maskk » Thu May 09, 2013 11:03 pm

Anyone seen the error:

"44 tech has too many apps"

I'm not sure what that means (I tried moving a tech or two from the 44 tech field but that seemed to not be it)

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

Postby Overlord2 » Fri May 10, 2013 8:54 am

Anyone seen the error:

"44 tech has too many apps"

I'm not sure what that means (I tried moving a tech or two from the 44 tech field but that seemed to not be it)
It means that tech field #44 has more than 4 techs assigned to it.

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

Mass Edit Research

Postby Maskk » Tue Jun 11, 2013 8:40 pm

Hi Nirran,

I backtracked and re-edited everything except the research costs. Now I'm trying to use the mass-edit feature, and can't figure out how to make it happen. Everytime I apply the costs, or load the costs, or try to multiply some values it seems not to work.

The basic thing I am trying to change is to radically slow down the speed of mid and late tech changes.

User avatar
Lodinn
Posts:7
Joined:Tue Jul 09, 2013 1:39 am
Contact:

Postby Lodinn » Mon Jul 15, 2013 1:43 pm

Hi Nirran!

Great work with the editor! 8)

I've got a couple of questions so far.
1) Which tools do you use to decompile the .exe code? I can open the file with whatever hex editor I've got and search for the offsets mentioned on the forum, but it's a mystery to me of how do you turn them into code like here http://code.google.com/p/moomapgen/wiki/Monsters.
2) Is it possible to alter the number of tech fields? I.e. if I would like to expand, say, Physics, Chemistry, Power and Fields with Xenon techs (which atm seems to be easier to me) or, the more complicated one, to add a new tier of computers/fuel cells/armor/FTL drives? As far as I can understand, the main restriction grows from the file been linked already, and it's way easier to change quantities and not qualities (by the latter i mean that the couple of extra if statements may ruin the whole thing). Is the number of tech fields hard-coded as well as the number of drives etc. tiers?
3) Not that general, but still interesting - as it is stated in the OCL manual, the weapon extras are actually the flags... So is this possible to make a beam weapon which damage everything in two square radius as well? What damage will it inflict in that case? Or that flag simply isn't checked for beam weapons? What for the Stellar converter then?
4) Is it possible to alter the looks of the ships - say, change some of the green player's ships looks for the antaran one? Or the orange hydra-looking ship?

And one more note to my 2nd question. How are special events handled? If functions may be edited more or less freely, it means that even making campaigns is possible! (ye, ye, I know, you do it mostly for making PvP more interesting, but... I totally like PvE allowing games, AI in moo2 is written pretty fine and yet if one could alter some special evts, it's possible to load a bunch of pre-edited save games etc.). I'm really sorry for bothering you with such things, but I've never ever thought of that until I saw that community, and for the last few weeks it's just like an obsession for me... :oops:

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

Postby Overlord2 » Mon Jul 15, 2013 2:36 pm

Hey Lodinn,

Let me asnwer this question. I guess its my competence to answer it instead of Nirran. What Nirran did was to make a program, which writes/extracts data from the known offsets. This program is the "editor", which as you rightly pointed is user-friendly. However all the offsets for the data were taken either from previous editor - i.e. ocl, or were supplied to Nirran by me. In my thread you asked how Nirran made the editor or extractor - via programming tools like Idk - Visual basic or else...but now you ask how to get the moo2 data and the offsets themselves, which is completely different story, while Nirran didn't do the primary research. The primary research was implemented by LB, Grig de Griz, tf8 and Anrdrey Tyukov, who I currently work with.
For getting the ingame data we used Ida Pro Disassembler and Hex Ray Decompiler. The Ida project of moo2 is available for download here: http://code.google.com/p/moomapgen/downloads/list

Now here are answers to the rest of your questions:
2) Is it possible to alter the number of tech fields? I.e. if I would like to expand, say, Physics, Chemistry, Power and Fields with Xenon techs (which atm seems to be easier to me) or, the more complicated one, to add a new tier of computers/fuel cells/armor/FTL drives? As far as I can understand, the main restriction grows from the file been linked already, and it's way easier to change quantities and not qualities (by the latter i mean that the couple of extra if statements may ruin the whole thing). Is the number of tech fields hard-coded as well as the number of drives etc. tiers?
Yes, all it is hardcoded and it cannot be changed unless complete rewrite of the game.
3) Not that general, but still interesting - as it is stated in the OCL manual, the weapon extras are actually the flags... So is this possible to make a beam weapon which damage everything in two square radius as well? What damage will it inflict in that case? Or that flag simply isn't checked for beam weapons? What for the Stellar converter then?
Needs testing, not sure it is possible, but most likey not.
4) Is it possible to alter the looks of the ships - say, change some of the green player's ships looks for the antaran one? Or the orange hydra-looking ship?
Yes, you can edit ingame pictures by means of picture editor, which is part of MoO2 Workshop, written by Grig de Griz. The problem will be to locate the exact file where the target picture could be stored. Its one of the many lbx files.
nd one more note to my 2nd question. How are special events handled? If functions may be edited more or less freely, it means that even making campaigns is possible! (ye, ye, I know, you do it mostly for making PvP more interesting, but... I totally like PvE allowing games, AI in moo2 is written pretty fine and yet if one could alter some special evts, it's possible to load a bunch of pre-edited save games etc.). I'm really sorry for bothering you with such things, but I've never ever thought of that until I saw that community, and for the last few weeks it's just like an obsession for me...
The editing of functions is even more complicated than deciphering ingame data.
The programming should be performed in asm code and there is a limitation on space. The new code should fit the given space. If you are able to do the asm coding then you could try to implement the wishes you announced. I must say its not easy at all. Alternatively one could completely rewrite the game and compile it anew. There were several such attempts, but to no success yet. Hope this helps.

User avatar
Lodinn
Posts:7
Joined:Tue Jul 09, 2013 1:39 am
Contact:

Postby Lodinn » Mon Jul 15, 2013 8:32 pm

Hello again!

Thanks for your reply.
For getting the ingame data we used Ida Pro Disassembler and Hex Ray Decompiler. The Ida project of moo2 is available for download here: http://code.google.com/p/moomapgen/downloads/list
Ah, sorry for the mess I've caused, that was actually what I did want to know.
Yes, all it is hardcoded and it cannot be changed unless complete rewrite of the game.
Okay, thanks for the explanation.
Needs testing, not sure it is possible, but most likey not.
Disappointingly, it seems that all the "special" weapons (of type 5) are treated exclusively, so it isn't possible to create stellar converter or any beam weapon which would act like spatial compressor aswell. But it was totally unexpected to me that the bio weapon flag can be toggled on weapons (i tried it out on particle beam).
The ship I've chosen for testing was the Avenger since first I've tried to find out the thing about 2-square radius flag and hadn't SST researched at that point.
The result was I had 240+ bombs at the after-combat screen instead of standard 103, and that was the bio weapons - causing, as expected, diplomatic penalties etc. I think it's quite interesting feature for balancing weapons, don't you find?
Unfortunately, it's of no use in PvP, tho :(
BUT, that doesn't have any effect on stellar converter itself.
By the time, I didn't found any other unusual possibilities with that possible exploit.
Yes, you can edit ingame pictures by means of picture editor, which is part of MoO2 Workshop, written by Grig de Griz. The problem will be to locate the exact file where the target picture could be stored. Its one of the many lbx files.
Ah, I see. Completely forgot about this tool.
Actually, the idea that made me conceive some scruples was the game uses some kind of... Um. Data files, and therefore there's a light of hope of using this to deal with hardcoded things. But it seems there's almost no way to do that, since most of the parameters are still held in the .exe, right?
The editing of functions is even more complicated than deciphering ingame data.
The programming should be performed in asm code and there is a limitation on space. The new code should fit the given space. If you are able to do the asm coding then you could try to implement the wishes you announced.
Ah, that good old-style fit-in-here asm coding... Ye, that's totally a challenge, seems to be nearly impossible for the whole game, could be done for several fragments and very hard indeed.
Alternatively one could completely rewrite the game and compile it anew. There were several such attempts, but to no success yet. Hope this helps.
Well, this all makes me think of finding the original devs behind ATARI's back :D
May I feel free to PM you if I ever would go that far?

Thanks for your thoroughly provided help, Overlord2. You definitely make me feel comfortable here (and embarrassed with my own incapability to figure out some, maybe, not-that-hard-to-dig facts at the same time :oops: ).

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

Postby Overlord2 » Tue Jul 16, 2013 7:57 am

Hello again!

Thanks for your reply.
You're welcome. I hope I wasn't too irksome with my answers.
For getting the ingame data we used Ida Pro Disassembler and Hex Ray Decompiler. The Ida project of moo2 is available for download here: http://code.google.com/p/moomapgen/downloads/list
Ah, sorry for the mess I've caused, that was actually what I did want to know.
I may say that questions formulated wrong cuase a mess.
Needs testing, not sure it is possible, but most likey not.
Disappointingly, it seems that all the "special" weapons (of type 5) are treated exclusively, so it isn't possible to create stellar converter or any beam weapon which would act like spatial compressor aswell. But it was totally unexpected to me that the bio weapon flag can be toggled on weapons (i tried it out on particle beam).
The ship I've chosen for testing was the Avenger since first I've tried to find out the thing about 2-square radius flag and hadn't SST researched at that point.
The result was I had 240+ bombs at the after-combat screen instead of standard 103, and that was the bio weapons - causing, as expected, diplomatic penalties etc. I think it's quite interesting feature for balancing weapons, don't you find?
Some changes can produce unexpected results. I didn't do much swapping, cause I was interested in keeping the game close to original.
Actually, the idea that made me conceive some scruples was the game uses some kind of... Um. Data files, and therefore there's a light of hope of using this to deal with hardcoded things. But it seems there's almost no way to do that, since most of the parameters are still held in the .exe, right?
All functions are stored in the exe. In libraries are stored additional materials, like graphics, music and etc.

The editing of functions is even more complicated than deciphering ingame data.
The programming should be performed in asm code and there is a limitation on space. The new code should fit the given space. If you are able to do the asm coding then you could try to implement the wishes you announced.
Ah, that good old-style fit-in-here asm coding... Ye, that's totally a challenge, seems to be nearly impossible for the whole game, could be done for several fragments and very hard indeed.
There is possibility to overcome it, but it requires skills of using debugger.
Alternatively one could completely rewrite the game and compile it anew. There were several such attempts, but to no success yet. Hope this helps.
Well, this all makes me think of finding the original devs behind ATARI's back :D
Unfortunately the source code was irretrievably lost. The only way to restore the code is to do the reverse engineering.
May I feel free to PM you if I ever would go that far?
Sure.
Thanks for your thoroughly provided help, Overlord2. You definitely make me feel comfortable here (and embarrassed with my own incapability to figure out some, maybe, not-that-hard-to-dig facts at the same time :oops: ).
Well, at first you made an impression of the guy, who's motto is "don't know anything, want to get everything". Good that it turned out to be not this way.

User avatar
Lodinn
Posts:7
Joined:Tue Jul 09, 2013 1:39 am
Contact:

Postby Lodinn » Tue Jul 16, 2013 1:01 pm

I hope I wasn't too irksome with my answers.
No, not at all, just quite the opposite :)
I may say that questions formulated wrong cuase a mess.
I see, I see, my bad.
Unfortunately the source code was irretrievably lost. The only way to restore the code is to do the reverse engineering.
Actually, I mean that there may be a possibility of getting some help with that - people often keep some notes about great projects they've participated in... Well, actually it's better to do something than to rise one more offtopic right here, so I'll just PM if I could achieve any progress.
Well, at first you made an impression of the guy, who's motto is "don't know anything, want to get everything". Good that it turned out to be not this way.
Let's just hope that the right impression is the latter.

Thanks for your help again.

User avatar
Lodinn
Posts:7
Joined:Tue Jul 09, 2013 1:39 am
Contact:

Postby Lodinn » Tue Jul 16, 2013 2:07 pm

Ah, and not the off-topic question:
Is there any way to make monster's weapons available for the player? I've set "Technology required" field to something that could be achieved (the same as needed for the SC, for example), and it still doesn't appear in the ship design.
Also, in order to learn more about dmg mechanics (data I've found in internet is kind of contradictory) I've removed all the excluded specials for the Damper field, and it became clickable after been chosen once, but cannot be actually added (judging by how the game complaints, each special is intrinsically unique). Also, even after that shields-related specials are not selectable, and the whole thing appears to have a very little effect.
What do exactly these "excluded" fields change, then?


Return to “Game Modifications”

Who is online

Users browsing this forum: No registered users and 36 guests