Starting Ships

Starting Ships; support/discussion/questions

Moderator: thunderchero

Post Reply
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 6059
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.
Contact:

Starting Ships

Post by thunderchero » Mon Mar 09, 2009 12:28 am

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
Last edited by thunderchero on Thu Feb 04, 2010 4:49 pm, edited 1 time in total.

User avatar
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER » Tue Mar 10, 2009 2:48 pm

Nope, how to do that was never discovered.

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Re: Anybody found how to edit starting ship types?

Post by Spocks-cuddly-tribble » Wed Mar 11, 2009 11:49 pm

thunderchero wrote:any ideas?
0x500B2 (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.
0x500DD (default: 05/colony) -> set shipfunction for starting colony 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. :wink:
Last edited by Spocks-cuddly-tribble on Wed Apr 01, 2009 1:10 pm, edited 1 time in total.
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble » Thu Mar 12, 2009 9:06 pm

thunderchero wrote:any info on how to allow 3rd ship on all levels :wink:
At 0x503B0 replace 85 with 8C -> JNZ with JL.

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.
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron » Fri Mar 13, 2009 7:24 am

lol, I was just wondering how on earth you found the ship IDs when I saw it :D
Nice find, hadn't expected that :)
Spocks-cuddly-tribble wrote:
thunderchero wrote:any ideas?
0x500B2 (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 :)
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.

Dr_Breen
Commodore
Commodore
Posts: 889
Joined: Wed Apr 30, 2008 2:00 am
Location: Zurich, Switzerland
Contact:

Post by Dr_Breen » Tue Oct 13, 2009 11:06 am

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???
Public BotF / EF2 Teamspeak 3 Server: 83.169.13.55

User avatar
DOT
Lieutenant-Commander
Lieutenant-Commander
Posts: 100
Joined: Tue Dec 23, 2008 3:00 am
Location: 49°N, 8°E

Post by DOT » Wed Oct 14, 2009 3:06 am

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. :wink:
life long and prosper

User avatar
DOT
Lieutenant-Commander
Lieutenant-Commander
Posts: 100
Joined: Tue Dec 23, 2008 3:00 am
Location: 49°N, 8°E

Post by DOT » Tue Jan 19, 2010 7:31 pm

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.
life long and prosper

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble » Wed Jan 20, 2010 3:15 pm

This does not sound very useful...


Try this instead:

:arrow: 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...
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
DOT
Lieutenant-Commander
Lieutenant-Commander
Posts: 100
Joined: Tue Dec 23, 2008 3:00 am
Location: 49°N, 8°E

Post by DOT » Thu Jan 21, 2010 6:03 pm

Thanx! ;-)

That gaves me more than one option to play with...
life long and prosper

User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 723
Joined: Sun Apr 27, 2008 2:00 am

Starting Fleet

Post by Spocks-cuddly-tribble » Fri Jan 22, 2010 3:13 pm

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)


:arrow: 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 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).
On the verge of a nervous breakdown? Try the relaxing tribble sounds.

User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Re: Editing Starting Ships

Post by Peter1981 » Sun Aug 28, 2011 2:30 pm

just added this feature to the up and comming TOS mod; however Outpost and starbases are invalid.

User avatar
jonesie85two
Lieutenant-Commander
Lieutenant-Commander
Posts: 201
Joined: Sat Apr 26, 2008 2:00 am

Re: Starting Ships

Post by jonesie85two » Thu Dec 06, 2012 6:06 pm

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?

Post Reply

Return to “Starting Ships”

Who is online

Users browsing this forum: No registered users