Does anyone know which byte/offset controls the granted growth bonus for the /nohousing switch (the 150% bonus)?
Short of straight-out debugging it, I've been muddling through and comparing the 1.40b20 thru 1.40b23 exes trying to narrow down the byte(s) responsible for hours... I was hoping I could remove the growth bonus, or at least alter it.
Any ideas?
BTW First post, I lurk here often though
Regarding /nohousing switch for 1.40b23
Nevermind, found it. Took over a day to pin it down...
Open "MOO2v140b23_patch" (Lord Brazen's patcher itself, not the modified exe it creates afterwards). The bytes controlling the Population Growth Bonus % for the /nohousing switch are located at:
Change those bytes to "00" for zero growth bonus, "32" for 50% bonus, "64" for 100% bonus, etc. Just remember the exe is a 16bit app, so the maximum possible value is "FF" (255% growth bonus). After changing, reapply Lord Brazen's patcher to fix the game exes with your values.
I'll host some pre-fixed exes somewhere later if no Admins have a problem with it, for those of you that aren't comfortable using a Hex editor and changing them yourself (just PM me). Later this weekend I plan on dissecting the VDC exes to do the same thing, but it's going to take longer since VDC uses two (3 including VDCTEST) exes that are already patched with v140b23.
Hopefully this will help make the /nohousing switch more viable. LB had the right idea in creating the switch; he was trying to eliminate the gamey tactic of 1pop Housing Planets. But the extra 150% flat growth bonus he instituted when using it is a bit too much IMHO.
I'll post back later with instructions for modifying VDC mod when I'm finished testing them.
-- Kornstalx
Open "MOO2v140b23_patch" (Lord Brazen's patcher itself, not the modified exe it creates afterwards). The bytes controlling the Population Growth Bonus % for the /nohousing switch are located at:
Code: Select all
Offset 00009BD0, 0C.
Hex/DWord value of 96 (150 in decimal).
I'll host some pre-fixed exes somewhere later if no Admins have a problem with it, for those of you that aren't comfortable using a Hex editor and changing them yourself (just PM me). Later this weekend I plan on dissecting the VDC exes to do the same thing, but it's going to take longer since VDC uses two (3 including VDCTEST) exes that are already patched with v140b23.
Hopefully this will help make the /nohousing switch more viable. LB had the right idea in creating the switch; he was trying to eliminate the gamey tactic of 1pop Housing Planets. But the extra 150% flat growth bonus he instituted when using it is a bit too much IMHO.
I'll post back later with instructions for modifying VDC mod when I'm finished testing them.
-- Kornstalx
Here are some pre-fixed exes for both Moo2v140b23 and for VDC mod (v22). I've provided multiple versions so that anyone who is interested can choose which growth bonus to use (if any). These exes are completely multiplayer compatible; only the host needs to use them.
DOWNLOAD New Nohousing for v140b23 and VDC_22
(I've updated this link to Mediafire as of 7/29/2011 for posterity)
-Kornstalx
DOWNLOAD New Nohousing for v140b23 and VDC_22
(I've updated this link to Mediafire as of 7/29/2011 for posterity)
README
============
This file contains pre-fixed exes that change the way the /nohousing switch works for Moo2 unoffical patch v140b23, and the VDC mod (by Irakly) which is based on v140b23. The /nohousing switch was added by Lord Brazen in his unofficial 1.4 patches, and is used to disable the ability to build Housing on a planet. Unfortuantely, he made it so that when the switch is used, all races get a hard-coded 150% growth bonus as well. The purpose of these files is to allow the player to choose the growth bonus.
See here for Lord Brazen's original info:
http://lordbrazen.blogspot.com/2005/01/ ... h-faq.html
============
Installation
============
Choose which version of /nohousing you would like to use, and replace the existing .exes in the game folder with the new ones. Included are three seperate options to suit your tastes, each in their appropriate folder.
Use the files in the "Growth +0" folder for zero growth bonus with /nohousing
Use the files in the "Growth +50" folder for a 50% growth bonus with /nohousing
Use the files in the "Growth +100" folder for a 100% growth bonus with /nohousing
For vanilla Moo2 1.4, you only need to replace the Orion2v140.exe. VDCGM2, VDCREG, and VDCTEST are for Irakly's VDC_22 mod, and not necessary unless you use it.
============================================================================================
All of the executables in this file are completely multiplayer safe for use with v140b23, and for VDC mod v22. Only the *Host* needs the modified files. For example, if you host a game using the Growth +0 exes and the /nohousing switch, any players that join you will not be able to build housing, *nor* will they get the default 150% population bonus. They must, however, still be using the original 1.40b23 patch (or VDC_22, as appropriate).
============================================================================================
Technical Information:
If you would like to modify your game yourself, open your Orion2v140.exe (of version v140b23) in your favorite hex editor and goto offset 001EEB10, 06. The 06 byte controls the population bonus when /nohousing is used. Default value is 96 (0x96 hex, or 150 decimal).
To modify Ikarly's VCD mod (once he releases a newer version), just open the relevant exes and search for the following byte string, where XX is the controlling byte.
08 74 06 81 C6 XX
(96)
96 is the default. Use 32 for a 50% bonus, and 64 for a 100% bonus, etc.
Just remember the exe is a 16bit app so maximum bonus is "FF" (255%).
============
kornstalx@comcast.net
-Kornstalx
Last edited by Kornstalx on Fri Jul 29, 2011 6:50 am, edited 2 times in total.
Thank you very much for this manual to remove the /nohousing Pop Bonus. I never understood why this nohousing switch includes any further poulation bonus at all.
We have now (at last) the Pop-growth values i think to be most balanced between industrial focused and science focused races. The Removal of this old bugged 1 pop Housing exploit (I consider 1 pop housing an exploit of a bugged housing formula which wrongly includes the basic production values like +5 for auto factories etc.) really improves the overall balance of the Game.
We have now (at last) the Pop-growth values i think to be most balanced between industrial focused and science focused races. The Removal of this old bugged 1 pop Housing exploit (I consider 1 pop housing an exploit of a bugged housing formula which wrongly includes the basic production values like +5 for auto factories etc.) really improves the overall balance of the Game.
No problem man. I did this years ago and the original pre-modified files in the link above were hosted on my old Comcast webspace and are no longer valid. I still had the files (and more importantly, my lengthy readmes) backed up locally, so I re-upped them to Mediafire and edited the above link for posterity.Thank you very much for this manual to remove the /nohousing Pop Bonus. I never understood why this nohousing switch includes any further poulation bonus at all.
Good luck.
Re: Regarding /nohousing switch for 1.40b23
A component of the housing formula in the exe is '40 x production'.
Note that the formula for housing in the code is not h=PROD/(2.5*POPAGG) but h=(40*PROD)/POPAGG and it is divided by 100 at a later stage.
This value 40 is located at;
dos / 140
167293 / 1672D3
28 hex = 40
For example setting it at 14 (20) halves the pop. growth effect of housing.
The generic growth formula contains fixed value 2000, which is located at:
dos / 140
167308-16730D / 167348-16734D
69 C0 D0 07 00 00
where D0 07 > 7D0 = 2000
Lowering this number decreases the base population growth.
Note that the formula for housing in the code is not h=PROD/(2.5*POPAGG) but h=(40*PROD)/POPAGG and it is divided by 100 at a later stage.
This value 40 is located at;
dos / 140
167293 / 1672D3
28 hex = 40
For example setting it at 14 (20) halves the pop. growth effect of housing.
The generic growth formula contains fixed value 2000, which is located at:
dos / 140
167308-16730D / 167348-16734D
69 C0 D0 07 00 00
where D0 07 > 7D0 = 2000
Lowering this number decreases the base population growth.
Last edited by Rocco on Sun Oct 11, 2015 11:41 am, edited 2 times in total.
Re: Regarding /nohousing switch for 1.40b23
Offset for Cloners is located at:
dos / 140
167252 / 167292
64 hex = 100
The maximum value is 7F (127).
dos / 140
167252 / 167292
64 hex = 100
The maximum value is 7F (127).
Return to “Game Modifications”
Who is online
Users browsing this forum: No registered users and 6 guests