Page 1 of 1
Starting Ships
Posted: Mon Mar 09, 2009 12:28 am
by thunderchero
Hi Everyone,
The new Flag Ship mod could use a little help.
I have looked and have not found if code for editing the starting ship type has been found yet. but I thought it had been found.
Example
start 1-4 you get a scout and colony ship
start 5 you get a scout, destroyer and colony ship
I wanted to change scout to command ship. this could correct problem for discriptions of flag ship.
any ideas?
thunderchero
Posted: Tue Mar 10, 2009 2:48 pm
by DCER
Nope, how to do that was never discovered.
Re: Anybody found how to edit starting ship types?
Posted: Wed Mar 11, 2009 11:49 pm
by Spocks-cuddly-tribble
thunderchero wrote:any ideas?
0x
500B2 (default hex-code:
31 C0 31 D2) -> set shipfunction 00/scout for starting scout
loc_450C92 -> xor eax, eax & -> xor edx, edx
Gowron wrote:You can use this instead:
31 D2 B2 XX
with "XX" being the new AI role for the starting ship.
0x
500DD (default:
05/colony) -> set shipfunction for starting colony ship
loc_450CDA -> mov edx, 5
0x
503B6 (default:
01/destroyer) -> set shipfunction for additional ship at advanced
loc_450FAC -> mov edx, 1
The check that prevents the additional ship for the lowest four starting levels is located there as well.
Posted: Thu Mar 12, 2009 9:06 pm
by Spocks-cuddly-tribble
thunderchero wrote:any info on how to allow 3rd ship on all levels
At 0x
503B0 replace
85 with
8C -> JNZ with JL.
Now you can set at 0x
503AE (default 0x
04) code for the lowest starting level (00=beginning...04=advanced) from which the ship will be added. (If tech requirements are meet, of course).
Note: Check at 0x
50128 (default 0x
02) needs to be changed as well if you add the ship to lower starting level than the 4th i.e. if code < 03. See also:
Additional Starting Systems on any Starting Level
Posted: Fri Mar 13, 2009 7:24 am
by Gowron
lol, I was just wondering how on earth you found the ship IDs when I saw it
Nice find, hadn't expected that
Spocks-cuddly-tribble wrote:thunderchero wrote:any ideas?
0x
500B2 (default hex-code:
31 C0 31 D2) -> set shipfunction 00/scout for starting scout
loc_450C92 -> xor eax, eax & -> xor edx, edx
Replace bytes with
BA XX 00 00 -> XX = code of new shipfunction
asm -> mov edx, XX
Be careful, as "BA" takes the next 4 bytes as its argument, so this way not only you'd load an unwanted byte into edx, but also you'd damage the next statement, with possibly fatal results.
You can use this instead:
31 D2 B2 XX
with "XX" being the new AI role for the starting ship.
This will first clear edx and then load "XX" into the dl byte, which produces the same result as loading "XX 00 00 00" into edx
Posted: Tue Oct 13, 2009 11:06 am
by Dr_Breen
i wonder if the number of starting ships can be increased somehow...im mean tech level 5 is called "Empire" (at least in the german version), but your Empire has only 2 combat ships???
Posted: Wed Oct 14, 2009 3:06 am
by DOT
Another idea is to have all ship types which are aviable at the starting tech level.
More than one ship per ship type may lead to "a new game balance" (not to say inbalance).
After all, interesting ideas.
Posted: Tue Jan 19, 2010 7:31 pm
by DOT
To get (only the third) starting ship on ANY starting planet - not only on home system - the code at:
Code: Select all
00450D38 cmp byte ptr [ecx+30h], 0
00450D3C jz loc_450FAC
hat to be changed to
Code: Select all
00450D38 cmp byte ptr [ecx+30h], 1
00450D3C jle loc_450FAC
BUT
the additional systems have always ONLY 70 starting pop (and only 7 ob and main buildings of any type) and only one class m planet is terraformed.
Posted: Wed Jan 20, 2010 3:15 pm
by Spocks-cuddly-tribble
This does not sound very useful...
Try this instead:
Remove the jump at 450CB0 i.e. at 0x
500B0 replace
75 53 with
90 90.
Now you have the default scout & colony on any system (for editing types see above), without any issues.
And in addition you can use the default T5 destroyer on the home system (e.g. as a starting flagship).
More ships are possible but that's a bit work due to the code structure...
Posted: Thu Jan 21, 2010 6:03 pm
by DOT
Thanx! ;-)
That gaves me more than one option to play with...
Starting Fleet
Posted: Fri Jan 22, 2010 3:13 pm
by Spocks-cuddly-tribble
DOT wrote:Another idea is to have all ship types which are aviable at the starting tech level.
Well, interesting ideas (within the restictions of the BotF code) deserve support....
So... (only useful for zero/low-scrap mods, of course)
Starting Fleet - on the home system (replaces T5-destroyer)
Code: Select all
trek.exe at 0x503AE:
replace:
04 0F 85 24 FE FF FF BA 01 00 00 00 E8 F1 44 00 00 0F BF D0 83 FA FF 0F 84 0E FE FF FF 8B 84 24 62 01 00 00 C1 F8 10 E8 66 52 FF FF
with:
04 7C 29 BA 01 00 00 00 52 50 E8 F3 44 00 00 0F BF D0 83 FA FF 74 0D 0F B7 84 24 6C 01 00 00 E8 6E 52 FF FF 58 5A 42 83 FA 04 7E DC
450FAF 7C 29 JL SHORT 450FDA
450FB1 BA01000000 MOV EDX,1 // first ship type
450FB6 52 PUSH EDX
450FB7 50 PUSH EAX
450FB8 E8F3440000 CALL 4554B0 // search ship ID
450FBD 0FBFD0 MOVSX EDX,AX
450FC0 83FA FF CMP EDX,-1
450FC3 74 0D JE SHORT 450FD2
450FC5 0FB784246C010000 MOVZX EAX,WORD PTR[ESP+16C]
450FCD E8 6E52FFFF CALL 446240 // add ship
450FD2 58 POP EAX
450FD3 5A POP EDX
450FD4 42 INC EDX
450FD5 83FA 04 CMP EDX,4 // last ship type
450FD8 7E DC JLE SHORT 450FB6
First byte of replacement code (default 04) is earliest starting level (00=beginning...04=advanced) see above
5th byte (default 01) is first ship type/function added on home systems (if available)
- loops through -
antepenultimate byte (default 04) = last ship type/function added on home systems
For example setting:
00 - 00 - 05 and replacing the home system check at
450CAC (for the former starting scout & colony) with an AI check (i.e. at 0x
500AE change
30 00 to
04 01) gives AI only two
additional ships on any starting system.
In this case I'd recommend changing of the 00/scout to 02/cruiser (see above).
Re: Editing Starting Ships
Posted: Sun Aug 28, 2011 2:30 pm
by Peter1981
just added this feature to the up and comming TOS mod; however Outpost and starbases are invalid.
Re: Starting Ships
Posted: Thu Dec 06, 2012 6:06 pm
by jonesie85two
hi i have successfully placed a scout and colony ship on all starting systems but im having a hard time figuring out how to change the destroyer to command cruiser.
i know its a long shot but would this work. At 0x503B6, change 52 50 e8 f3 to 52 50 e8 04?