Starting Ships
Moderator: thunderchero
-
- Site Administrator aka Fleet Admiral
- Posts: 7970
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
Starting Ships
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
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
Last edited by thunderchero on Thu Feb 04, 2010 4:49 pm, edited 1 time in total.
-
- Code Master
- Posts: 683
- Joined: Sat Apr 26, 2008 2:00 am
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
Re: Anybody found how to edit starting ship types?
0x500B2 (default hex-code: 31 C0 31 D2) -> set shipfunction 00/scout for starting scoutthunderchero wrote:any ideas?
loc_450C92 -> xor eax, eax & -> xor edx, edx
0x500DD (default: 05/colony) -> set shipfunction for starting colony shipGowron wrote:You can use this instead:
31 D2 B2 XX
with "XX" being the new AI role for the starting ship.
loc_450CDA -> mov edx, 5
0x503B6 (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.
Last edited by Spocks-cuddly-tribble on Wed Apr 01, 2009 1:10 pm, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
At 0x503B0 replace 85 with 8C -> JNZ with JL.thunderchero wrote:any info on how to allow 3rd ship on all levels
Now you can set at 0x503AE (default 0x04) 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 0x50128 (default 0x02) 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
Last edited by Spocks-cuddly-tribble on Wed Apr 01, 2009 1:08 pm, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Code Master
- Posts: 304
- Joined: Sat Apr 26, 2008 2:00 am
- Location: 50° N, 11° E
lol, I was just wondering how on earth you found the ship IDs when I saw it
Nice find, hadn't expected that
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
Nice find, hadn't expected that
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.Spocks-cuddly-tribble wrote:0x500B2 (default hex-code: 31 C0 31 D2) -> set shipfunction 00/scout for starting scoutthunderchero wrote:any ideas?
loc_450C92 -> xor eax, eax & -> xor edx, edx
Replace bytes with BA XX 00 00 -> XX = code of new shipfunction
asm -> mov edx, XX
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
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
-
- Commodore
- Posts: 889
- Joined: Wed Apr 30, 2008 2:00 am
- Location: Zurich, Switzerland
-
- Lieutenant-Commander
- Posts: 100
- Joined: Tue Dec 23, 2008 3:00 am
- Location: 49°N, 8°E
-
- Lieutenant-Commander
- Posts: 100
- Joined: Tue Dec 23, 2008 3:00 am
- Location: 49°N, 8°E
To get (only the third) starting ship on ANY starting planet - not only on home system - the code at:
hat to be changed to
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.
Code: Select all
00450D38 cmp byte ptr [ecx+30h], 0
00450D3C jz loc_450FAC
Code: Select all
00450D38 cmp byte ptr [ecx+30h], 1
00450D3C jle loc_450FAC
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.
life long and prosper
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
This does not sound very useful...
Try this instead:
Remove the jump at 450CB0 i.e. at 0x500B0 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...
Try this instead:
Remove the jump at 450CB0 i.e. at 0x500B0 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...
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Lieutenant-Commander
- Posts: 100
- Joined: Tue Dec 23, 2008 3:00 am
- Location: 49°N, 8°E
-
- Code Master
- Posts: 1962
- Joined: Sun Apr 27, 2008 2:00 am
Starting Fleet
Well, interesting ideas (within the restictions of the BotF code) deserve support....DOT wrote:Another idea is to have all ship types which are aviable at the starting tech level.
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
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 0x500AE 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).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
-
- Rear-Admiral
- Posts: 1118
- Joined: Tue May 06, 2008 2:00 am
- Location: England
Re: Editing Starting Ships
just added this feature to the up and comming TOS mod; however Outpost and starbases are invalid.
-
- Lieutenant-Commander
- Posts: 201
- Joined: Sat Apr 26, 2008 2:00 am
Re: Starting Ships
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?
i know its a long shot but would this work. At 0x503B6, change 52 50 e8 f3 to 52 50 e8 04?